Is there a way to reset html5 audio and video controls inside a UIWebView?
We have a UIWebView that we are using to display and play a video and audio. We are using HTML5 controlls to do this.
NSString *html = [NSString stringWithFormat:@"<html>\<body>\
<audio controls=\"controls\"><source src=\"%@\"/>Your browser does not support the audio element.</audio>\
</body>\
</html>",
[webView loadHTMLString:html baseURL:@"mybaseURL"];
We also have the same thing except the body now contains:
<body>\
<video controls=\"controls\"><source src=\"%@\"/&g开发者_开发知识库t;Your browser does not support the video element.</video>\
</body>\
The problem I have is this, when I play the video and then go to play the audio, a screenshot of the video frame appears on top of my audio control. I am not sure if I have the correct title for the question. Any suggestions greatly appreciated. Basically, how do I keep the video frame screenshot from appearing on my html5 audio control? I had tried to reset the webView among other things but no success. I could use any solution whether it be JavaScript function or Objective-C.
精彩评论