Skip to content

Commit

Permalink
fix(player): check media session is supported (#1268)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulprovidr authored Apr 29, 2024
1 parent 9187df0 commit e6a3fb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vidstack/src/components/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ export class MediaPlayer
context,
);

new NavigatorMediaSession();
if ('mediaSession' in navigator) {
new NavigatorMediaSession();
}

new MediaLoadController('load', this.startLoading.bind(this));
new MediaLoadController('posterLoad', this.startLoadingPoster.bind(this));
}
Expand Down

0 comments on commit e6a3fb4

Please sign in to comment.