Update:Syncing playback time when media item is open in player

This commit is contained in:
advplyr
2023-06-19 12:37:44 -05:00
parent b4bf10d409
commit ff4f8324e7
25 changed files with 149 additions and 177 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ export default {
})
},
streaming() {
return !!this.playableBooks.find((b) => this.$store.getters['getIsItemStreaming'](b.id))
return !!this.playableBooks.find((b) => this.$store.getters['getIsMediaStreaming'](b.id))
},
showPlayButton() {
return this.playableBooks.length
+1 -8
View File
@@ -209,14 +209,7 @@ export default {
return this.$store.getters['globals/getLibraryItemCoverSrcById'](this.libraryItemId)
},
isPlaying() {
if (this.playerIsLocal && this.localLibraryItemId && this.localEpisodeId) {
// Check is streaming local version of this episode
return this.$store.getters['getIsEpisodeStreaming'](this.localLibraryItemId, this.localEpisodeId)
}
return this.$store.getters['getIsEpisodeStreaming'](this.libraryItemId, this.episode.id)
},
playerIsLocal() {
return !!this.$store.state.playerIsLocal
return this.$store.getters['getIsMediaStreaming'](this.libraryItemId, this.episode.id)
},
playerIsPlaying() {
return this.$store.state.playerIsPlaying && this.isPlaying
+3 -3
View File
@@ -326,11 +326,11 @@ export default {
return this.userItemProgress ? this.userItemProgress.finishedAt : 0
},
isStreaming() {
return this.isPlaying && !this.$store.state.playerIsLocal
return this.isPlaying && !this.$store.getters['getIsCurrentSessionLocal']
},
isPlaying() {
if (this.localLibraryItemId && this.$store.getters['getIsItemStreaming'](this.localLibraryItemId)) return true
return this.$store.getters['getIsItemStreaming'](this.libraryItemId)
if (this.localLibraryItemId && this.$store.getters['getIsMediaStreaming'](this.localLibraryItemId)) return true
return this.$store.getters['getIsMediaStreaming'](this.libraryItemId)
},
playerIsPlaying() {
return this.$store.state.playerIsPlaying && (this.isStreaming || this.isPlaying)
+3 -3
View File
@@ -108,7 +108,7 @@
<p class="text-lg text-center px-8">{{ failed ? 'Failed to get local library item ' + localLibraryItemId : 'Loading..' }}</p>
</div>
<div v-if="orderChanged" class="fixed left-0 w-full py-4 px-4 bg-bg box-shadow-book flex items-center" :style="{ bottom: playerLibraryItemId ? '120px' : '0px' }">
<div v-if="orderChanged" class="fixed left-0 w-full py-4 px-4 bg-bg box-shadow-book flex items-center" :style="{ bottom: isPlayerOpen ? '120px' : '0px' }">
<div class="flex-grow" />
<ui-btn small color="success" @click="saveTrackOrder">Save Order</ui-btn>
</div>
@@ -156,8 +156,8 @@ export default {
}
},
computed: {
playerLibraryItemId() {
return this.$store.state.playerLibraryItemId
isPlayerOpen() {
return this.$store.getters['getIsPlayerOpen']
},
isIos() {
return this.$platform === 'ios'