iOS 10 + new policy, video cannot be played automatically in power saving mode.
document.getElementById('video').play()
according to my previous experience, mobile devices must have user interaction before they can be played.
you can listen for touchstart events, and you should be able to play them after touching the screen.
early ios and android both had to have a user gesture (user gesture) video tag to play.
ios has changed the rules of video since version 10, and Apple has relaxed inline and autoplay, so your device must be upgraded to ios 10 or above. ideo-policies-for-ios/" rel=" nofollow noreferrer "> Link description
android supports autoplay after version 53 of chrome. Link description
so if the above conditions are met, you can add an autoplay attribute to the video tag to support auto playback
until then, autoplay was banned.
the above is only valid for ios's built-in safari and android's chrome, while other app's built-in browser is not confirmed to be valid.
both ios browsers and chrome disable auto playback by default because of a waste of user traffic.
can you listen to touchstart in body and then play
ask the problem master to finally solve it? I also encountered the same problem
first post a Google policy about autoplay
https://developers.google.com.
normally you can do this by adding an autoplay attribute to the video tag.
this is the code on the target website:
video.play ()