Skip to content

Commit

Permalink
fix(mux-video): Make sure to reload/initialize core when (re)connecti…
Browse files Browse the repository at this point in the history
…ng to DOM.
  • Loading branch information
cjpillsbury committed Sep 1, 2023
1 parent 91ab9ab commit 5d4554d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/mux-video/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,13 @@ class MuxVideoElement extends CustomVideoElement implements Partial<MuxMediaProp
}
}

disconnectedCallback() {
connectedCallback(): void {
if (this.src && !this.#core) {
this.#requestLoad();
}
}

disconnectedCallback(): void {
this.unload();
}
}
Expand Down

0 comments on commit 5d4554d

Please sign in to comment.