具有“自动静音播放"功能的iOS 10视频标签;停止背景音乐(Spotify) [英] iOS 10 video tag with "autoplay muted playsinline" stops background music (spotify)

查看:160
本文介绍了具有“自动静音播放"功能的iOS 10视频标签;停止背景音乐(Spotify)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试继续播放Spotify等背景音乐,并播放带有属性的内嵌视频:自动播放静音的playsinline".

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.

推荐答案

简单的答案.你不能.

一种解决方案: 如果您从视频中删除了音轨. Spotify等背景音乐不会停止播放.

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

这篇关于具有“自动静音播放"功能的iOS 10视频标签;停止背景音乐(Spotify)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆