diff options
| author | Factiven <[email protected]> | 2023-05-01 14:49:13 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-05-01 14:49:13 +0700 |
| commit | 2bb6c0f11b8bdc1e6bf732139da4488861c06503 (patch) | |
| tree | 21da09ea0fecb585a1bd550815ee9401a8db9951 /components | |
| parent | Update v3.5 (diff) | |
| download | moopa-2bb6c0f11b8bdc1e6bf732139da4488861c06503.tar.xz moopa-2bb6c0f11b8bdc1e6bf732139da4488861c06503.zip | |
Update v3.5.1
Diffstat (limited to 'components')
| -rw-r--r-- | components/videoPlayer.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/videoPlayer.js b/components/videoPlayer.js index b007d95..b6372c2 100644 --- a/components/videoPlayer.js +++ b/components/videoPlayer.js @@ -98,10 +98,17 @@ export default function VideoPlayer({ art.on("video:timeupdate", () => { if (!session) return; + const mediaSession = navigator.mediaSession; const currentTime = art.currentTime; const duration = art.duration; const percentage = currentTime / duration; + mediaSession.setPositionState({ + duration: art.duration, + playbackRate: art.playbackRate, + position: art.currentTime, + }); + // console.log(percentage); if (percentage >= 0.9) { |