Merge pull request #1931 from SBGSports/Autoplay-issue

Fix for Slow loading videos not autoplaying
This commit is contained in:
Sam Potts
2020-08-30 15:45:24 +10:00
committed by GitHub

View File

@ -309,7 +309,7 @@ class Plyr {
// Autoplay if required
if (this.isHTML5 && this.config.autoplay) {
setTimeout(() => silencePromise(this.play()), 10);
this.once('canplay', () => silencePromise(this.play()));
}
// Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek