I have tried adding &iv_load_policy=3 to the end of the YouTube url in multiple ways, but the annotations still show. Is there any way to edit the code so that no annotations will show?
EDIT: CODE BELOW
Files from the MediaElement.js Plugin
Random Video with Annotations: https://www.youtube.com/watch?v=IGz13x5OJ_8
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script src="mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="mediaelementplayer.css" />
<script>
$(function(){
player = new MediaElementPlayer('#video-player');
});
</script>
<video style="width:100%;height:100%;" id="video-player" preload="preload" autoplay="autoplay">
<source type="video/youtube" src="https://www.youtube.com/watch?v=IGz13x5OJ_8" />
</video>
The only way I found to suppress YouTube annotations is setting MEJS' YouTube plugin instead of flash (default) like :
$(function () {
player = new MediaElementPlayer('#video-player', {
plugins: ['youtube']
});
});
The only inconvenience is that autoplay
doesn't work (haven't found the option yet) but at least the main issue is solved ;)
See JSFIDDLE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With