Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Let Hls.js initialize then wait 1 tick for other attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoactivity authored Jul 21, 2023
1 parent d264a8f commit bc7fcf8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hls-video-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class HLSVideoElement extends CustomVideoElement {
return;
}

// Wait 1 tick to allow other attributes to be set.
await Promise.resolve();


if (Hls.isSupported()) {

Expand All @@ -38,8 +37,10 @@ class HLSVideoElement extends CustomVideoElement {
liveDurationInfinity: true
});

// Set up preload
// Wait 1 tick to allow other attributes to be set.
await Promise.resolve();

// Set up preload
switch (this.nativeEl.preload) {
case 'none': {
// when preload is none, load the source on first play
Expand Down

0 comments on commit bc7fcf8

Please sign in to comment.