Switch to using location-history package
https://npmjs.com/package/location-history
This commit is contained in:
@@ -28,11 +28,11 @@ module.exports = class PlaybackController {
|
||||
playFile (infoHash, index /* optional */) {
|
||||
this.state.location.go({
|
||||
url: 'player',
|
||||
onbeforeload: (cb) => {
|
||||
setup: (cb) => {
|
||||
this.play()
|
||||
this.openPlayer(infoHash, index, cb)
|
||||
},
|
||||
onbeforeunload: (cb) => this.closePlayer(cb)
|
||||
destroy: () => this.closePlayer()
|
||||
}, (err) => {
|
||||
if (err) dispatch('error', err)
|
||||
})
|
||||
@@ -251,7 +251,7 @@ module.exports = class PlaybackController {
|
||||
})
|
||||
}
|
||||
|
||||
closePlayer (cb) {
|
||||
closePlayer () {
|
||||
console.log('closePlayer')
|
||||
|
||||
// Quit any external players, like Chromecast/Airplay/etc or VLC
|
||||
@@ -290,7 +290,6 @@ module.exports = class PlaybackController {
|
||||
ipcRenderer.send('onPlayerClose')
|
||||
|
||||
this.update()
|
||||
cb()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user