I'm working on a HTML5 video player automation(test page is a html page). I tried to call myPlayer.Play()
through Javascript. On Android, however, I got this error:
Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.
after sending a Play()
request.
I know autoplay
is disabled on lots of devices on purpose to save users bandwidth. But the first time Play()
seems also needed the user gesture. What is the workaround for this so that I can automate testing for the player device?