diff options
| author | Factiven <[email protected]> | 2023-05-01 16:00:03 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-01 16:00:03 +0700 |
| commit | 37c438a88efa73f502a0362e3053c95e360e8b9b (patch) | |
| tree | 305dea34094970bcfece03d81d90308c472037b9 /components | |
| parent | Update v3.5 (diff) | |
| parent | Update v3.5.2 (diff) | |
| download | moopa-37c438a88efa73f502a0362e3053c95e360e8b9b.tar.xz moopa-37c438a88efa73f502a0362e3053c95e360e8b9b.zip | |
Update v3.5.2
Merge pull request #5 from DevanAbinaya/pre-production
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) { |