Play video in UIWebView in iOS4?

I have an application that works with version 2.0 of the SDK, where I create and add a UIWebView, and then load the .mov URL to play the movie. From the early version 4.0 beta to 4.0 GM, this has stopped working. When I download a movie, I get the following error: Download with plug-in, and the movie never displays.

Is this a known issue? Am I doing something wrong in 4.0?

+7
iphone movie uiwebview
source share
4 answers

I get it. It seems that the problem is that iOS4 does not support backward compatibility with UIWebView created using "init" rather than "initWithFrame". In version 2.0 - 3.1.3 you can only show video in UIWebview mode in full screen mode. I think that’s why it doesn’t matter if you called “init” - the movie player would jump in and go into full screen mode. However, in 3.2 and above, you can now embed the video in a UIWebView, so you need to call initWithFrame and give it something like [[UIScreen mainScreen]) so that there is a visible view. Not quite sure if it is a bull or not, but it seems to be so.

+4
source share

I had a situation where "this movie did not play" when playing a video clip. This happened when the recorder was just used. And this will not happen when the player is simply used.

Then I set the audio session category to kAudioSessionCategory_AmbientSound after the recording is complete.

This problem was resolved after I did this.

+1
source share

At least in PhoneGap ChildBrowser, the didFailLoadWithError method processes and displays this message. Just don’t show the error, the problem is solved, but in this particular case there are two “done” buttons that need to be pressed before you return to the application.

0
source share

Just just ignore it. No harm in that.

if (![error.localizedDescription isEqualToString:@"Plug-in handled load"]) 
0
source share

All Articles