mediaPlaybackRequiresUserAction

mediaPlaybackRequiresUserAction

本文介绍了UIWebView、mediaPlaybackRequiresUserAction的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含网页的 webview,网页只包含一个视频,一旦网页打开,这个网页内的视频直接播放!!,这个属性( mediaPlaybackRequiresUserAction )可以帮助他吗??

i have a webview that contains a web page, the web page only contains one video and once the web page open the video inside this web page played directly!!, Is this Property ( mediaPlaybackRequiresUserAction ) could helps he out??

我阅读了文档,但我没有明白这一点..https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950

i read the documentation but i didnt got the point..https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950

谢谢

推荐答案

Well mediaPlaybackRequiresUserAction 默认设置为 YES,从而防止在没有用户交互的情况下进行任何媒体播放.如果将 mediaPlaybackRequiresUserAction 设置为 NO,则 UIWebView 中的音频和视频可以在其中自动启动.

Well mediaPlaybackRequiresUserAction is set to YES by default, thus preventing any media playback without user interaction.If you set mediaPlaybackRequiresUserAction to NO, audio and video in your UIWebView can autostart in it.

这篇关于UIWebView、mediaPlaybackRequiresUserAction的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 01:37