Skip to content

Commit

Permalink
fix: setMediaKeys return undefined in some Chrome versions (#6669)
Browse files Browse the repository at this point in the history
Co-authored-by: Huan Pu <huanpu@tubi.tv>
  • Loading branch information
JackPu and huanpu2023 committed Sep 5, 2024
1 parent 6950f87 commit 1d10714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/eme-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ class EMEController extends Logger implements ComponentAPI {
this.removeSession(mediaKeySessionContext),
)
.concat(
media?.setMediaKeys(null).catch((error) => {
media?.setMediaKeys(null)?.catch((error) => {
this.log(`Could not clear media keys: ${error}`);
}),
),
Expand Down

0 comments on commit 1d10714

Please sign in to comment.