最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - iFrame unmute and autoplay - Stack Overflow

programmeradmin3浏览0评论

I am trying to embed a short video in a website.

I can either get it to autoplay or get it to have volume...but not both:

to autoplay:

<div style="position: relative; overflow: hidden; aspect-ratio: 1920/1080;">
<p><iframe id="vidFrame" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0; margin: 0; overflow: hidden;" title="The Conclusion People" src="; allowfullscreen="allowfullscreen"></p>
<p></iframe></p>
</div>

to unmute:

<div style="position: relative; overflow: hidden; aspect-ratio: 1920/1080;">
<p><iframe id="vidFrame" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0; margin: 0; overflow: hidden;" title="The Conclusion People" src="; allowfullscreen="allowfullscreen"></p>
<p></iframe></p>
</div>

I have tried several things including;

<div style="position: relative; overflow: hidden; aspect-ratio: 1920/1080;">
<p><iframe id="vidFrame" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0; margin: 0; overflow: hidden;" title="The Conclusion People" src=";mute=0" allowfullscreen="allowfullscreen"></p>
<p></iframe></p>
</div>

can only get it to do either 1 or the other thing (not both).

Help!

发布评论

评论列表(0)

  1. 暂无评论