зеркало из https://github.com/mozilla/popcorn-js.git
[#958] make sure start time is never less than 0.
This commit is contained in:
Родитель
2e79edd8af
Коммит
f82605116a
10
popcorn.js
10
popcorn.js
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче