Ok so I've embed a youtube vidoe into Edge with an iframe like this:
$(window).scroll(function() { var top = $(window).scrollTop(); sym.$('#Stage_Iframe').css('top', top); });
var container = sym.$('#Stage_Iframe');
var map = ' <iframe width="100%" height="100%" frameborder="0" scrolling="no" src="http://cirquestyle.comeze.com/aaaaaaaaaaaaaaaaa.html"></iframe>'
container.html(map);
Now in the HTML code/file I have the youtube API codes I was wondering if anyone would know how to remove the #Stage_Iframe DIV in Edge when the Video has ended I've tried but i cant seem to get it to remove the DIV in edge here's how I tried:
<iframe id="youtube-iframe" class="Stage_Iframe_id" z-index:999; style="position: absolute; margin: 0px; left: 0%; top: 0%; width: 100%; height: 100%; right: auto; bottom: auto; border: 0px none rgb(0, 0, 0);" src="http://www.youtube.com/embed/DtmKBaBEBXA?enablejsapi=1&version=3&autop lay=1&loop=1&showinfo=0&controls=0&rel=0&wmode=transparent&vq=hd1080&y t:stretch=16:9&yt:crop=16:9" frameborder="0" wmode="Opaque" ></iframe>
<script type="text/javascript">
<!--
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
player.quality = 'hd1080';
function onYouTubePlayerAPIReady() { player = new YT.Player('youtube-iframe', { events: { 'onStateChange': onPlayerStateChange } }); }
function onPlayerReady(event) { event.target.setPlaybackQuality('hd1080'); event.target.playVideo(); }
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.BUFFERING) {
event.target.setPlaybackQuality('hd1080');
}
if (event.data == YT.PlayerState.ENDED) { player.destroy(); $('#Stage_Iframe').hide(); } // end if
}
-->
</script>
I've underlined the relevent part of the code. . . .
Thank you if anyone can help in any way!