iOS 10 video tag with “autoplay muted playsinline” stops background music (spotify)

风流意气都作罢 提交于 2019-12-10 10:27:53

问题


I am trying to keep playing background music like Spotify playing with playing a inline video with attributs: "autoplay muted playsinline".

<video id="video" muted="muted" autoplay loop muted playsinline >
     <source src="video.mp4" type="video/mp4">
</video>


<script>
window.onload = function () {
    var element = document.getElementById('video');
    element.muted = "muted";
}
</script>

But when I run this the video is plays inline and autoplaying. But as soon as the video start the background music app is pausing.


回答1:


Simple answer. You can't.

One solution: is if you remove the sound track from the video. The background music like Spotify DO NOT stop playing.



来源:https://stackoverflow.com/questions/42417047/ios-10-video-tag-with-autoplay-muted-playsinline-stops-background-music-spoti

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