Skip to content Skip to sidebar Skip to footer

Android Webview Video Autoplay Success, But Same Apk Fails On Android Tv Mini Pc?

I have managed to get my video autoplay inside my webview.apk, tested on my phone (4.1.2) and it works, while on my android mini pc (4.2) has to be clicked to start the playback...

Solution 1:

I realize this is an old question but this answer might help someone down the road:

Android (and iOS both) disabled the autoplaytag in HTML5 video nodes in the Chrome or native browser. Playing a video requires user interaction (onClick or onMouseOver or something). However, one can autoplay videos in one's own WebView if necessary.

To autoplay videos in an Android Webview, post Android 4.4:

    webview.setWebChromeClient(new WebChromeClient());
    webview.getSettings().setMediaPlaybackRequiresUserGesture(false);

Post a Comment for "Android Webview Video Autoplay Success, But Same Apk Fails On Android Tv Mini Pc?"