1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-23 11:04:59 +02:00
This commit is contained in:
mister-ben 2023-06-04 11:24:28 +02:00
parent d892c1660e
commit 5314f5d961
2 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,9 @@
<script>
var vid = document.getElementById('vid1');
var player = videojs(vid);
var player = videojs(vid, {
mediaSession: true
});
player.log('window.player created', player);

View File

@ -117,6 +117,7 @@ export const initMediaSession = function() {
};
this.on('playing', () => {
// Called on each `playing` rather than `sourceset`, in case of multiple players on a page
updateMediaSession();
ms.playbackState = 'playing';
});