Below is the code being used for an embedded video displayed on our index page. The video is supposed to play once and then display a previous frame with our logo.
It loops in all browsers except chrome and doesn't rewind to the specified time in any of them.
Any thoughts on why it's not working?
Here's the snippet:
It loops in all browsers except chrome and doesn't rewind to the specified time in any of them.
Any thoughts on why it's not working?
Here's the snippet:
/**
* Home Page Video Player
*/
$(document).ready(function() {
// don't do this stuff if we're not on the home page
if ($("#homepage-theater").length == 0) return;
// if HTML5 video support (and the "true" excludes IE9)
if (videoElementSupport(true)){
var $video = $("#homepage-theater video");
// setup play/pause click behavior
$video
.attr("title", "Click to pause video")
.click(function(){
if (this.paused){
this.play();
$(this).attr("title", "Click to pause video");
}
else{
this.pause();
$(this).attr("title", "Click to play video");
}
});
// rewind to slogan frame and stop
$video[0].addEventListener('ended', function(){
this.currentTime = 0;
// this.currentTime = 15.9;
// this.pause();
}, false);
}
// Flash fallback using Flowplayer
$("#homepage-theater .flash-fallback a").flowplayer(
{
src:"js/flowplayer/flowplayer-3.2.7.swf",
wmode:"opaque",
bgcolor:"#ffffff",
quality:"autohigh"
},
{
clip: {
scaling: "fit",
// loop
onBeforeFinish: function () {
return false;
}
},
plugins: {
// controls: {
// url: 'flowplayer.controls-3.2.5.swf',
// fullscreen: false,
// backgroundColor: '#0093c0'
// }
controls: null
}
}
);
});