YouTube redirects to HTTPS anyway, so my previous attempt to fix 10.4 is bad. I also added a log of the error for loading.
This commit is contained in:
		
							parent
							
								
									2d857bcf70
								
							
						
					
					
						commit
						93869465ef
					
				@ -463,11 +463,7 @@ NSString * const MGMVT3D = @"3D";
 | 
			
		||||
		[theAlert runModal];
 | 
			
		||||
	} else {
 | 
			
		||||
		NSMutableDictionary *info = [NSMutableDictionary dictionary];
 | 
			
		||||
        if (![[MGMSystemInfo info] isAfterSnowLeopard]) {
 | 
			
		||||
            [info setObject:[NSURL URLWithString:[[[video objectForKey:MGMULURL] absoluteString] replace:@"https://" with:@"http://"]] forKey:MGMVLVideoURLKey];
 | 
			
		||||
        } else {
 | 
			
		||||
            [info setObject:[video objectForKey:MGMULURL] forKey:MGMVLVideoURLKey];
 | 
			
		||||
        }
 | 
			
		||||
        [info setObject:[video objectForKey:MGMULURL] forKey:MGMVLVideoURLKey];
 | 
			
		||||
        
 | 
			
		||||
		if (![[[videoQualities objectForKey:[video objectForKey:MGMULTag]] objectForKey:MGMVTAudio] boolValue]) {
 | 
			
		||||
            [info setObject:[audio objectForKey:MGMULURL] forKey:MGMVLAudioURLKey];
 | 
			
		||||
 | 
			
		||||
@ -614,6 +614,12 @@ NSString * const MGMILPath = @"path";
 | 
			
		||||
 | 
			
		||||
- (void)updateControls {
 | 
			
		||||
	if ([[moviePlayer movie] loadState]==-1L) {
 | 
			
		||||
		NSError *error = [[moviePlayer movie] attributeForKey:@"QTMovieLoadStateErrorAttribute"];
 | 
			
		||||
		if (error!=nil) {
 | 
			
		||||
			NSLog(@"%@", error);
 | 
			
		||||
		} else {
 | 
			
		||||
			NSLog(@"No error output for this OS.");
 | 
			
		||||
		}
 | 
			
		||||
		[moviePlayer setMovie:nil];
 | 
			
		||||
		if (updateControlsTimer!=nil) {
 | 
			
		||||
			[updateControlsTimer invalidate];
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user