Fix "Resume from" functionality for PT player

This commit is contained in:
Ben Barnard 2017-11-10 06:22:14 +01:00
parent 69cf35f36b
commit e59d734921
2 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,7 @@
this.chosenKey = data.params.key.replace('/library/metadata/', '') this.chosenKey = data.params.key.replace('/library/metadata/', '')
this.chosenMediaIndex = data.params.mediaIndex || 0 this.chosenMediaIndex = data.params.mediaIndex || 0
this.chosenServer = this.plex.getServerById(data.params.machineIdentifier) this.chosenServer = this.plex.getServerById(data.params.machineIdentifier)
this.offset = data.params.offset
this.playertime = data.params.offset this.playertime = data.params.offset
let oldtime = this.playertime let oldtime = this.playertime
let oldkey = this.chosenKey let oldkey = this.chosenKey

View File

@ -330,6 +330,9 @@
}, },
onPlayerLoadeddata (player) { onPlayerLoadeddata (player) {
var that = this var that = this
this.player.currentTime(this.initialOffset / 1000)
player.on(['waiting', 'pause'], function () { player.on(['waiting', 'pause'], function () {
that.isPlaying = 'paused'; that.isPlaying = 'paused';
}); });