Removing annotations on embedded YouTube videos

。_饼干妹妹 提交于 2019-12-03 09:12:59

Try this:

$('object').each(function(){ 
        var $param = $(this).children(':first-child');
        var newUrl = $param.attr('value') + '&iv_load_policy=3';
        $param.attr('value', newUrl);
}); 

Done quickly without testing....

Tested and works

iv_load_policy=3 is the way to go. However there are nice embed code generators, to do it for you.

The new HTML5 player no longer uses this embed code, but I have just adapted this code to work with the iframe that is being embedded and have it working on my site. (Works with WordPress ombed too)

$("iframe").each(function() {
        var src = $(this).attr("src") + '&iv_load_policy=3';
        $(this).attr("src", src);
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!