0

does iOS 6 webview have an issue of presenting videos ? :(

my code is a simple call to webview's loadRequest method:

 self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];

cosole says:

[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Disabling autoplay for pause
[MPAVController] Autoplay: Disabling autoplay
[MPAVController] Autoplay: Ending background task assertion (8) for playback stall
[MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 1)

I referred to this answer but in vain.

please suggest an answer.

Community
  • 1
  • 1
Nikita P
  • 4,226
  • 5
  • 31
  • 55

1 Answers1

0

Hi since you cannot use MPMoviePlayerController, you have to use Webview, instead of using

self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];

Try this way to embed,

Community
  • 1
  • 1
Tony Thomas
  • 967
  • 10
  • 20