When I try to initiate a video to play (via YouTube) in a UIWebView
, the video opens, then the debugger says:
[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
Here's a similar question: MPMoviePlayerController stops playing after a few seconds
My only problem is that with a UIWebView
, I can't set up an MPMoviePlayerController
to prepareToPlay
. At least not as far as my knowledge goes. If anyone can help fix this problem, that would be amazing!
I just had this very same issue in one of our apps. Turns out we were setting the
UIWebView
's HTML to an empty string in-(void)viewWillDisappear
. Apparently this method is now being called in iOS 6 when displaying a fullscreen video from anUIWebView
, so that's probably where your issue comes from.I have Faced The Same Problem in ios6 .Reason is that in below iOS6 when youTube Video Played. viewWillDisappear method did not call .But in iOS6 this methods called every time whenever YouTube video Play .It may be a bug ,i don't know at this time.
I have fixed the Same As Below.
Set The Notification for FullScreen Entry And Exit Notification ,SO that you could set Some Flag Value For Avoiding the Execution of SOme Piece of code.
I am Sure It'll be helpful to you.