fix: allowing prev and next on iOS

This commit is contained in:
Phan An 2024-06-07 15:06:32 +02:00
parent bd40651061
commit 31a8284c88

View file

@ -359,13 +359,13 @@ class PlaybackService {
navigator.mediaSession.setActionHandler('previoustrack', () => this.playPrev())
navigator.mediaSession.setActionHandler('nexttrack', () => this.playNext())
// navigator.mediaSession.setActionHandler('seekbackward', details => {
// this.player.media.currentTime -= (details.seekOffset || 10)
// })
//
// navigator.mediaSession.setActionHandler('seekforward', details => {
// this.player.media.currentTime += (details.seekOffset || 10)
// })
navigator.mediaSession.setActionHandler('seekbackward', details => {
this.player.media.currentTime -= (details.seekOffset || 10)
})
navigator.mediaSession.setActionHandler('seekforward', details => {
this.player.media.currentTime += (details.seekOffset || 10)
})
navigator.mediaSession.setActionHandler('seekto', details => {
if (details.fastSeek && 'fastSeek' in this.player.media) {