Temporary patch for the YouTube API issues with getDuration() (relates to #374)

This commit is contained in:
Sam Potts 2016-10-23 15:18:08 +11:00
parent a509a5e1bc
commit 08b4c09b89
2 changed files with 10 additions and 2 deletions

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1737,6 +1737,14 @@
_triggerEvent(plyr.media, 'timeupdate'); _triggerEvent(plyr.media, 'timeupdate');
}, 100); }, 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; break;
case 2: case 2: