diff --git a/client/components/app/MediaPlayerContainer.vue b/client/components/app/MediaPlayerContainer.vue index 1a2b1d30..00594be1 100644 --- a/client/components/app/MediaPlayerContainer.vue +++ b/client/components/app/MediaPlayerContainer.vue @@ -159,8 +159,7 @@ export default { return this.streamLibraryItem?.libraryId || null }, totalDurationPretty() { - // Adjusted by playback rate - return this.$secondsToTimestamp(this.totalDuration / this.currentPlaybackRate) + return this.$secondsToTimestamp(this.totalDuration) }, podcastAuthor() { if (!this.isPodcast) return null diff --git a/client/components/modals/BookmarksModal.vue b/client/components/modals/BookmarksModal.vue index d84a8ed8..ea355d3a 100644 --- a/client/components/modals/BookmarksModal.vue +++ b/client/components/modals/BookmarksModal.vue @@ -20,7 +20,7 @@

- {{ this.$secondsToTimestamp(currentTime / playbackRate) }} + {{ this.$secondsToTimestamp(currentTime) }}

diff --git a/client/components/modals/ChaptersModal.vue b/client/components/modals/ChaptersModal.vue index 7b7368b7..eb073273 100644 --- a/client/components/modals/ChaptersModal.vue +++ b/client/components/modals/ChaptersModal.vue @@ -2,13 +2,13 @@
@@ -40,7 +52,17 @@ export default { jumpForwardAmount: 10, jumpBackwardAmount: 10, playbackRateIncrementDecrementValues: [0.1, 0.05], - playbackRateIncrementDecrement: 0.1 + playbackRateIncrementDecrement: 0.1, + enableSmartSpeed: false, + smartSpeedRatio: 2.5, + smartSpeedRatioValues: [ + { text: '1.5x', value: 1.5 }, + { text: '2.0x', value: 2.0 }, + { text: '2.5x', value: 2.5 }, + { text: '3.0x', value: 3.0 }, + { text: '4.0x', value: 4.0 }, + { text: '5.0x', value: 5.0 } + ] } }, computed: { @@ -51,6 +73,9 @@ export default { set(val) { this.$emit('input', val) } + }, + isCasting() { + return this.$store.state.globals.isCasting || false } }, methods: { @@ -69,11 +94,24 @@ export default { this.playbackRateIncrementDecrement = val this.$store.dispatch('user/updateUserSettings', { playbackRateIncrementDecrement: val }) }, + setEnableSmartSpeed() { + this.$store.commit('user/SET_SMART_SPEED_ENABLED', this.enableSmartSpeed) + }, + setSmartSpeedRatio(val) { + this.smartSpeedRatio = val + this.$store.commit('user/SET_SMART_SPEED_RATIO', val) + }, settingsUpdated() { this.useChapterTrack = this.$store.getters['user/getUserSetting']('useChapterTrack') this.jumpForwardAmount = this.$store.getters['user/getUserSetting']('jumpForwardAmount') this.jumpBackwardAmount = this.$store.getters['user/getUserSetting']('jumpBackwardAmount') this.playbackRateIncrementDecrement = this.$store.getters['user/getUserSetting']('playbackRateIncrementDecrement') + + const enableSmartSpeed = this.$store.getters['user/getUserSetting']('enableSmartSpeed') + this.enableSmartSpeed = enableSmartSpeed !== null ? enableSmartSpeed : false + + const smartSpeedRatio = this.$store.getters['user/getUserSetting']('smartSpeedRatio') + this.smartSpeedRatio = smartSpeedRatio !== null ? smartSpeedRatio : 2.5 } }, mounted() { diff --git a/client/components/modals/bookmarks/BookmarkItem.vue b/client/components/modals/bookmarks/BookmarkItem.vue index 6652a288..661609a6 100644 --- a/client/components/modals/bookmarks/BookmarkItem.vue +++ b/client/components/modals/bookmarks/BookmarkItem.vue @@ -2,7 +2,7 @@

- {{ this.$secondsToTimestamp(bookmark.time / playbackRate) }} + {{ this.$secondsToTimestamp(bookmark.time) }}

diff --git a/client/components/player/PlayerTrackBar.vue b/client/components/player/PlayerTrackBar.vue index 6c96a6bf..fda007d5 100644 --- a/client/components/player/PlayerTrackBar.vue +++ b/client/components/player/PlayerTrackBar.vue @@ -1,5 +1,11 @@