Issue
I've read lots of posts but none of the old tricks, like autoplay or playsinline or allow='autoplay' work.
I have full control over the WebView so I've even tried mediaPlaybackRequiresUserGesture set to false but it didn't help.
Any other tricks?
This is how I load the iframe:
<iframe width="100%" height="100%" allow="autoplay" src="http://www.youtube.com/embed/${YOUTUBE_VIDE)_ID}?autoplay=1&playsinline=1" frameborder="0" ></iframe>
Solution
Looks like a combination of the steps from this page https://developers.google.com/youtube/iframe_api_reference and mediaPlaybackRequiresUserGesture will allow me to auto play the video. Even tested it on the newest Android System WebView on Android 12.
Answered By - casolorz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.