Skip to content

Commit e6a3fb4

Browse files
authored
fix(player): check media session is supported (#1268)
1 parent 9187df0 commit e6a3fb4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/vidstack/src/components/player.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ export class MediaPlayer
194194
context,
195195
);
196196

197-
new NavigatorMediaSession();
197+
if ('mediaSession' in navigator) {
198+
new NavigatorMediaSession();
199+
}
200+
198201
new MediaLoadController('load', this.startLoading.bind(this));
199202
new MediaLoadController('posterLoad', this.startLoadingPoster.bind(this));
200203
}

0 commit comments

Comments
 (0)