Add delay to plyr init

pull/245/head
Varun Patil 2022-11-23 11:35:07 -08:00
parent ab505900a2
commit 25c46098ab
1 changed files with 4 additions and 4 deletions

View File

@ -213,13 +213,13 @@ class VideoContentSetup {
content.videojs.on("loadedmetadata", () => {
canPlay = true;
this.updateRotation(content); // also gets the correct video elem as a side effect
this.initPlyr(content);
// Wait (also below) for the transition to end
window.setTimeout(() => this.initPlyr(content), 250);
});
content.videojs.qualityLevels()?.on("addqualitylevel", (e) => {
window.setTimeout(() => {
this.initPlyr(content);
}, 0);
window.setTimeout(() => this.initPlyr(content), 250);
});
// Get correct orientation