diff --git a/changelog b/changelog index 6a2742f5..ad14c66c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +Thu Sep 26 21:42 2013 CDT + * www/assets/js/player.js: Keep track of the duration of the current + video and use this information to prevent the player restarting when + it receives an out of range timestamp + Thu Sep 26 13:29 2013 CDT * lib/user.js: Some code style cleanup diff --git a/www/assets/js/player.js b/www/assets/js/player.js index a944dfad..44d6c437 100644 --- a/www/assets/js/player.js +++ b/www/assets/js/player.js @@ -27,6 +27,7 @@ var YouTubePlayer = function (data) { removeOld(); self.paused = false; self.videoId = data.id; + self.videoLength = data.seconds; var wmode = USEROPTS.wmode_transparent ? "transparent" : "opaque"; self.player = new YT.Player("ytapiplayer", { height: VHEIGHT, @@ -69,6 +70,7 @@ var YouTubePlayer = function (data) { if(VIDEOQUALITY) self.player.setPlaybackQuality(VIDEOQUALITY); self.videoId = data.id; + self.videoLength = data.seconds; } }; @@ -106,6 +108,7 @@ var VimeoPlayer = function (data) { var self = this; waitUntilDefined(window, "$f", function () { self.videoId = data.id; + self.videoLength = data.seconds; self.init = function () { var iframe = $("