I'm having a bit of an issue with playing local videos in a UIWebView when clicking on the full screen button.
This is an iPad app and when I go to the view that has the video, and click the play button it will play fine, I can skip and pause/play. But when it comes to clicking full screen it will stretch the video out to full screen, play for a second, full screen will disappear and instead of showing the video in it's place is just a white box. I've tested this on an iPad 3rd Gen running iOS 6 and the iPad simulator running iOS 6 and both do the same. However on an iPad 1st Gen running iOS 5 and a simulator running iOS 5, both will play full screen fine.
On the iOS 6 iPad/simulator, when I click play on the video, in the debug area I see the following:
2012-12-06 16:11:07.361 PICO[19131:11f03] [MPAVController] Autoplay: Enabling autoplay
2012-12-06 16:11:07.362 PICO[19131:11f03] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
2012-12-06 16:11:07.362 PICO[19131:11f03] setting movie path: file:///Users/Nathan/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/DB4C3A91-F148-417B-8319-4690F89E1382/PICO.app/30.20.mp4
2012-12-06 16:11:07.362 PICO[19131:11f03] [MPAVController] Autoplay: Enabling autoplay
2012-12-06 16:11:07.368 PICO[19131:11f03] [MPCloudAssetDownloadController] Prioritization requested for media item ID: 0
2012-12-06 16:11:07.437 PICO[19131:11f03] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
2012-12-06 16:11:07.447 PICO[19131:11f03] [MPAVController] Autoplay: Enabling autoplay
2012-12-06 16:11:07.448 PICO[19131:11f03] [MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
And then when I click the fullscreen button:
2012-12-06 16:12:39.918 PICO[19131:11f03] [MPAVController] Autoplay: Enabling autoplay
2012-12-06 16:12:40.168 PICO[19131:11f03] [MPAVController] Autoplay: Enabling autoplay
2012-12-06 16:12:40.178 PICO[19131:11f03] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
Here is my code anyway:
.h
@property (strong, nonatomic) IBOutlet UIWebView *videoView;
.m
[videoView loadHTMLString:@"<body style=\"margin:0px;\"><video src=\"30.20.mp4\" controls width=\"640\" height=\"360\"></video></body>" baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]bundlePath]]];
videoView.scrollView.scrollEnabled = NO;
So as you can see I'm just using loadHTMLString to load in the video tag sourced with a local video. I've had a good look online and just can't find anything about this. Hopefully it's just something simple!