juliogomez7 Posted February 7, 2018 Share Posted February 7, 2018 I have a Video that I load from the beggining of the game, and when clicking a given sprite it will perform a tween that when finishes, it will play the video. It works perfectly on desktop, however in Android I'm getting DOMException: play() can only be initiated by a user gesture. Do you know what could be the issue and how can I solve it? Thanks! Quote Link to comment Share on other sites More sharing options...
enpu Posted February 8, 2018 Share Posted February 8, 2018 @juliogomez7 Starting video playback on mobile browser usually requires user gesture. https://stackoverflow.com/questions/42160528/html5-autoplay-video-in-mobile-device Try to set the video to muted and see if it works. Quote Link to comment Share on other sites More sharing options...
juliogomez7 Posted February 8, 2018 Author Share Posted February 8, 2018 @enpu It still doesn't work on Android, it's seems mandatory to start playback with an user gesture even if it's muted. Is there a way of simulate an event somehow so I can trigger the playback there? I've found more situations where I need to play a video without user actions. Quote Link to comment Share on other sites More sharing options...
enpu Posted February 9, 2018 Share Posted February 9, 2018 @juliogomez7 Are you using Chrome for Android? Does it work on iOS? Quote Link to comment Share on other sites More sharing options...
juliogomez7 Posted February 9, 2018 Author Share Posted February 9, 2018 Yes @enpu, I'm using Chrome for Android. It seems that the same thing happens on iOS as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.