Skip to content

Commit

Permalink
fix(player): media session check throwing during ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Apr 29, 2024
1 parent 977e2ec commit 963bb8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vidstack/src/components/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class MediaPlayer
context,
);

if ('mediaSession' in navigator) {
if (typeof navigator !== 'undefined' && 'mediaSession' in navigator) {
new NavigatorMediaSession();
}

Expand Down

0 comments on commit 963bb8c

Please sign in to comment.