Youtube iframe api allow =“autoplay”Chrome 65

前端之家收集整理的这篇文章主要介绍了Youtube iframe api allow =“autoplay”Chrome 65前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当前的金丝雀版Chrome 65阻止了自动播放声音的iframed youtube视频.

Chrome的最新更改要求iframe具有allow =“autoplay”

如何在youtube iframe api中添加allow =“autoplay”?我在任何文档中都找不到它.

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe

A feature policy allows developers to selectively enable and disable use of varIoUs browser features and APIs. Once an origin has received autoplay permission,it can delegate that permission to cross-origin iframes with a new feature policy for autoplay. Note that autoplay is allowed by default on same-origin iframes.

<iframe src="myvideo.html" allow="autoplay">

解决方法

YouTube IFrame API最近已更新为使用allow = autoplay而非gesture = media.它应该按预期工作.

对困惑感到抱歉.

原文链接:https://www.f2er.com/html/227074.html

猜你在找的HTML相关文章