我在我的网站中集成了一个带有声音的自动播放模式的 youtube 视频。它在 android 手机上运行良好,但在 iPhone 上运行不正常。如果我启用音量,则自动播放功能不起作用。仅当 iPhone 上的视频静音时,自动播放才有效。这是我的代码。
<iframe
src="https://www.youtube.com/embed/baGSq10ma0I?enablejsapi=1&playsinline=1&mute=&autoplay=1"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen=""
width="100%"
height="300"
frameborder="0"
></iframe>
答案 0 :(得分:0)
我建议请查看 iOS 版 YouTube 播放器,然后您可以将其嵌入任何视图 https://developers.google.com/youtube/v3/guides/ios_youtube_helper