Temporary patch for the YouTube API issues with getDuration()
(relates to #374)
This commit is contained in:
parent
a509a5e1bc
commit
08b4c09b89
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -1737,6 +1737,14 @@
|
||||
_triggerEvent(plyr.media, 'timeupdate');
|
||||
}, 100);
|
||||
|
||||
// Check duration again due to YouTube bug
|
||||
// https://github.com/Selz/plyr/issues/374
|
||||
// https://code.google.com/p/gdata-issues/issues/detail?id=8690
|
||||
if (plyr.media.duration !== instance.getDuration()) {
|
||||
plyr.media.duration = instance.getDuration();
|
||||
_triggerEvent(plyr.media, 'durationchange');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
Loading…
x
Reference in New Issue
Block a user