YouTupe Video på ASP.NET webside - sideskift ved afslutning
Jeg har YouTupe Video på ASP.NET webside. Den kører ok men jeg ønsker sideskift ved afslutningDer er en events handler men den virker ikke.
Kan i hjælpe?
<!-- https://developers.google.com/youtube/player_parameters#Embedding_a_Player -->
<object style="height=460px; width=640px">
<param name="movie" value="https://www.youtube.com/v/xxxxxxxxxxx?version=3&feature=player_embedded&autoplay=1&autohide=1&showinfo=0"/>
<param name="allowFullScreen" value="true"/>
<param name="allowScriptAccess" value="always"/>
<embed src="https://www.youtube.com/v/vpjvPlSAjiE?version=3&feature=player_embedded&autoplay=1&autohide=1&showinfo=0" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="460"/>
</object>
<!-- https://developers.google.com/youtube/js_api_reference#Events -->
<script type="text/javascript" language="VB">
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
}
function onytplayerStateChange(newState) {
location.href = "/Faelles_Sider/Forside.aspx";
}
</script>