Android KitKat (4.4) video autoplay does not work anymore in webview

前端 未结 1 2062
梦如初夏
梦如初夏 2020-12-17 07:05

on previous versions of Android, we were be able to start a video by calling play() method on video js element or by simulating a click event on it (only for some specifics

相关标签:
1条回答
  • 2020-12-17 07:31

    Please try calling WebView.getSettings().setMediaPlaybackRequiresUserGesture(false) for your WebView.

    (see http://developer.android.com/reference/android/webkit/WebSettings.html#setMediaPlaybackRequiresUserGesture(boolean) )

    0 讨论(0)
提交回复
热议问题