Android code modification for HTML5 / Youtube autoplay feature


I am trying to get HTML5 / Youtube videos (embedded) autoplay on Android client. It’s a well known that Apple iOS and Android disabled autoplay for most mobile platforms however after some research, stackoverflow users suggested a plausible solution.

It requires adding the below to source code:

int SDK_INT = android.os.Build.VERSION.SDK_INT; if (SDK_INT > 16) { engine.getSettings().setMediaPlaybackRequiresUserGesture(false); }
or For Android 4.2.2+ all you need in your native code is


Could you guys plz, compile a new apk (beta version sort of) with the above modification for us
to test and see if that works in solving autoplay issue. It would really help until xibo gets the dedicated Youtube module.


Thank you for doing that research!

Unfortunately we already include this line - are you running on a 4.2.2+ device?

yes. It’s Android Kitkat 4.4.2.

I think that means the only option is to wait for a dedicated YouTube module - we have tried many many workarounds to this and don’t have anything.

The best workaround is to get the RTSP stream URL from the YouTube video and show it using the local video module in Xibo.