Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fix MPMoviePlayerController iO7 issue
    text
    copied!<p>I am using <a href="https://github.com/MarcosSTM/LBYouTubeView" rel="nofollow">https://github.com/MarcosSTM/LBYouTubeView</a> for playing you tube video..</p> <p>In that after extracting video URL. I am playing youtube video using MPMoviePlayerController as I want to play the video within the frame not in full screen mode automatically.</p> <p>My code is below.</p> <p>MPMoviePlayerController *movieController; at view controller .h file</p> <pre><code>-(void)youTubePlayerViewController:(LBYouTubePlayerViewController *)controller didSuccessfullyExtractYouTubeURL:(NSURL *)videoURL { if ([delegate_LbYouTube respondsToSelector:@selector(youTubePlayerViewController:didSuccessfullyExtractYouTubeURL:)]) { [delegate_LbYouTube youTubePlayerViewController:controller didSuccessfullyExtractYouTubeURL:youvideoURL]; } controller.moviePlayer.controlStyle = MPMovieControlStyleEmbedded; controller.moviePlayer.movieSourceType = MPMovieSourceTypeFile; controller.moviePlayer.view.frame = CGRectMake(0,102, 320, 315); controller.moviePlayer.initialPlaybackTime=[popular.startStr doubleValue]; controller.moviePlayer.endPlaybackTime=[popular.endStr doubleValue]; controller.moviePlayer.contentURL = youvideoURL; [controller.moviePlayer play]; [self.view addSubview:controller.moviePlayer.view]; } -(void)youTubePlayerViewController:(LBYouTubePlayerViewController *)controller failedExtractingYouTubeURLWithError:(NSError *)error { NSLog(@"URL extracting failed with error: %@", error); UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"ERROR" message:@"failed" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } </code></pre> <p>Everything works fine. Sometimes the same video is running and sometimes getting below error..</p> <p>_itemFailedToPlayToEnd: { kind = 1; new = 2; old = 0; }</p> <p>I googled a lot and modified my code as per answers posted in similar questions.But could not rectify the issue...</p> <p>Please suggest how can I fix this error..Any ideas will be appreciated.</p> <p>Thanks in Advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload