mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
fix: show next/previous track on iOS control panel
This commit is contained in:
parent
92b90f7859
commit
db07e86628
1 changed files with 8 additions and 6 deletions
|
@ -359,13 +359,15 @@ class PlaybackService {
|
||||||
navigator.mediaSession.setActionHandler('previoustrack', () => this.playPrev())
|
navigator.mediaSession.setActionHandler('previoustrack', () => this.playPrev())
|
||||||
navigator.mediaSession.setActionHandler('nexttrack', () => this.playNext())
|
navigator.mediaSession.setActionHandler('nexttrack', () => this.playNext())
|
||||||
|
|
||||||
navigator.mediaSession.setActionHandler('seekbackward', details => {
|
if (!isMobile.apple) {
|
||||||
this.player.media.currentTime -= (details.seekOffset || 10)
|
navigator.mediaSession.setActionHandler('seekbackward', details => {
|
||||||
})
|
this.player.media.currentTime -= (details.seekOffset || 10)
|
||||||
|
})
|
||||||
|
|
||||||
navigator.mediaSession.setActionHandler('seekforward', details => {
|
navigator.mediaSession.setActionHandler('seekforward', details => {
|
||||||
this.player.media.currentTime += (details.seekOffset || 10)
|
this.player.media.currentTime += (details.seekOffset || 10)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
navigator.mediaSession.setActionHandler('seekto', details => {
|
navigator.mediaSession.setActionHandler('seekto', details => {
|
||||||
if (details.fastSeek && 'fastSeek' in this.player.media) {
|
if (details.fastSeek && 'fastSeek' in this.player.media) {
|
||||||
|
|
Loading…
Reference in a new issue