[#958] make sure start time is never less than 0.

This commit is contained in:
ScottDowne 2012-03-22 18:44:26 -04:00
Родитель 2e79edd8af
Коммит f82605116a
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -263,6 +263,16 @@
// function to fire when video is ready
var isReady = function() {
// chrome bug: http://code.google.com/p/chromium/issues/detail?id=119598
// it is possible the video's time is less than 0
// this has the potential to call track events more than once, when they should not
// start: 0, end: 1 will start, end, start again, when it should just start
// just setting it to 0 if it is below 0 fixes this issue
if ( self.media.currentTime < 0 ) {
self.media.currentTime = 0;
}
self.media.removeEventListener( "loadeddata", isReady, false );
var duration, videoDurationPlus;