Skip to content

Commit

Permalink
player: player.attach(mediaElement)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Mar 10, 2024
1 parent 1eb79d7 commit ebe472f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/player.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export class Player {
<video this="el" controls autoplay/>;
}

onmount() {
this.player = new shaka.Player(this.el);
async onmount() {
this.player = new shaka.Player();
this.player.configure({
streaming: {
useNativeHlsOnSafari: false,
Expand All @@ -29,6 +29,7 @@ export class Player {
},
},
});
await this.player.attach(this.el);
}

/** @param {import("./content.js").Entry} entry */
Expand Down

0 comments on commit ebe472f

Please sign in to comment.