Playing videos in UIWebView broken in iOS4?

随声附和 提交于 2019-11-30 13:49:53

I figured this out. It appears to be an issue with iOS4 not being backward compatible with a UIWebView created with 'init' rather than 'initWithFrame'. In 2.0 - 3.1.3, you could only show video in a UIWebview as full screen. I think this is why it didn't matter if you called 'init' -- the movie player would kick in and go fullscreen. However, in 3.2 and higher you can now inline video in a UIWebView so you have to call initWithFrame and give it something like [[UIScreen mainScreen] bounds] so there's a visible view. Not quite sure if this is bull or not but seems to be the case.

I got a situation of "this movie could not be played" when playing a video clip. This happened when recorder was just used. And this would NOT happen when player was just used.

Then I set audio session category to kAudioSessionCategory_AmbientSound after recorder finished.

This problem was solved after I did that.

Simply just ignore it. No harm in doing so.

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

At least in PhoneGap's ChildBrowser, the didFailLoadWithError method handles and displays this message. Simply don't display the error, problem solved, but in this specific case there are two 'done' buttons to press before you get back to the application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!