css - jquery.mb.YTPlayer how to add a url redirect triggered by the end of the video -
new coding, have tried inserting various html5 code such as: function redirect() { document.location="index_2.html"; } browser cannot display video element.
this works browser player tried adding element of above following code:
function redirect() { document.location="index.html"; }<a id="bg-video" class="player" data-property="{videourl:'https://www.youtube.com/watch?v=tdvbwpzj7dy',containment:'body',autoplay:true, mute:false, startat:0, showcontrols:false, loop:false, onended:redirect()"}" data-poster="images/bg.jpg">youtube</a> <div id="bg-video-controls"> <a id="bg-video-volume" class="fa fa-volume-off" href="#" title="unmute"> </a> <a id="bg-video-play" class="fa fa-pause" href="#" title="pause"> </a> </div> <!-- end youtube background video -->
i can redirect work video not play.
i figured out after looking @ , struggling until near insanity frustration, then, looked @ free template , realized letters, numbers part of youtube address.
you did same thing did - put in whole address - but, that's screwed up. before , after (wrong , right) using example: {videourl:'https://www.youtube.com/watch?v=tdvbwpzj7dy',containment:'body',autoplay:true, mute:false, startat:0, showcontrols:false, loop:false, onended:redirect()"}" data-poster="images/bg.jpg">youtube this wrong way!!!
here correct url: {videourl:'tdvbwpzj7dy',containment:'body',autoplay:true, mute:false, startat:0, showcontrols:false, loop:false, onended:redirect()"}" data-poster="images/bg.jpg">youtube
remove (delete) https://www.youtube.com/watch?v= , put tdvbwpzj7dy. video work.
Comments
Post a Comment