问题
I have an issue with autoplaying html video on mobile browsers. At first, I did it with autoplay and playsinline attributes. It worked but a few days ago it stopped working on mobile devices. First time I've tried, it was not working on mobile safari actually but was ok for CriOs (chrome in ios). Now I tried some solutions and noticed those :
-If I use MP4 video for my source, it works on desktop Chrome and Safari.
-If I use WebM, it works on just Desktop Chrome.
-I've tried to play the video when page loads with Javascript, and it didn't work either.
It's no more working on mobile chrome now,too. A few days ago it was working but not now. I couldn't find anything about a new release or something like that. Does anyone know any solution about this issue ?
回答1:
Autoplay is being blocked now to prevent forcing user to download too much data on there devices, especially when so many people may have bad connection.
Check out these articles below. Now, videos on mobile devices can only play, if initiated by the user.
Google Chrome will block autoplay video starting January 2018
To Play, or Not to Play – New AutoPlay Policies for Safari 11 and Chrome 64
来源:https://stackoverflow.com/questions/49390924/html-video-autoplay-issue-for-all-browsers