Html video autoplay issue for all browsers

纵饮孤独 提交于 2019-12-11 06:04:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!