Roll back the previous change

This commit is contained in:
An Phan 2017-03-26 11:53:04 +08:00
parent 26e57bd643
commit 43ef5cad26
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -82,14 +82,8 @@ export const playback = {
if ('mediaSession' in navigator) {
navigator.mediaSession.setActionHandler('play', () => this.resume())
navigator.mediaSession.setActionHandler('pause', () => this.pause())
navigator.mediaSession.setActionHandler('previoustrack', () => {
navigator.mediaSession.playbackState = 'playing'
this.playPrev()
})
navigator.mediaSession.setActionHandler('nexttrack', () => {
navigator.mediaSession.playbackState = 'playing'
this.playNext()
})
navigator.mediaSession.setActionHandler('previoustrack', () => this.playPrev())
navigator.mediaSession.setActionHandler('nexttrack', () => this.playNext())
}
this.initialized = true