mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 09:14:40 +02:00
WIP: Add adjustable skip amount (#3113)
* Add playback settings string to en-us * Add playback settings UI for jump forwards and jump backwards * Remove jump forwards and jump backwards settings * Remove jump forwards and jump backwards en-us strings * Update player UI to include player settings button * Add label view player settings string * Add PlayerSettingsModal component Includes a toggle switch for enabling/disabling the chapter track feature. * Add player settings modal component to MediaPlayerContainer * Handle useChapterTrack changes in PlayerUI * Add jump forwards and jump backwards settings to user store * Add jump forwards and jump backwards label strings * Add jump forwards and jump backwards settings to PlayerSettingsModal * Update jump forwards and jump backwards to handle user state values in PlayerHandler * Update jump backwards icon in PlayerPlaybackControls * Add playback settings string to en-us * Add playback settings UI for jump forwards and jump backwards * Remove jump forwards and jump backwards settings * Remove jump forwards and jump backwards en-us strings * Update player UI to include player settings button * Add label view player settings string * Add PlayerSettingsModal component Includes a toggle switch for enabling/disabling the chapter track feature. * Add player settings modal component to MediaPlayerContainer * Handle useChapterTrack changes in PlayerUI * Add jump forwards and jump backwards settings to user store * Add jump forwards and jump backwards label strings * Add jump forwards and jump backwards settings to PlayerSettingsModal * Update jump forwards and jump backwards to handle user state values in PlayerHandler * Update jump backwards icon in PlayerPlaybackControls * Add jump amounts to playback controls tooltips * Fix merge issues and add new Material Symbols to player ui * Alphabetize strings in en-us.json * Update dropdown component with SelectInput to support menu overflowing modal * Update localization for player settings * Update en-us strings order --------- Co-authored-by: advplyr <advplyr@protonmail.com>
This commit is contained in:
parent
b6875a44cf
commit
43b7ccd61a
8 changed files with 283 additions and 18 deletions
|
@ -51,6 +51,12 @@ export default class PlayerHandler {
|
|||
if (!this.episodeId) return null
|
||||
return this.libraryItem.media.episodes.find(ep => ep.id === this.episodeId)
|
||||
}
|
||||
get jumpForwardAmount() {
|
||||
return this.ctx.$store.getters['user/getUserSetting']('jumpForwardAmount')
|
||||
}
|
||||
get jumpBackwardAmount() {
|
||||
return this.ctx.$store.getters['user/getUserSetting']('jumpBackwardAmount')
|
||||
}
|
||||
|
||||
setSessionId(sessionId) {
|
||||
this.currentSessionId = sessionId
|
||||
|
@ -381,13 +387,15 @@ export default class PlayerHandler {
|
|||
jumpBackward() {
|
||||
if (!this.player) return
|
||||
var currentTime = this.getCurrentTime()
|
||||
this.seek(Math.max(0, currentTime - 10))
|
||||
const jumpAmount = this.jumpBackwardAmount
|
||||
this.seek(Math.max(0, currentTime - jumpAmount))
|
||||
}
|
||||
|
||||
jumpForward() {
|
||||
if (!this.player) return
|
||||
var currentTime = this.getCurrentTime()
|
||||
this.seek(Math.min(currentTime + 10, this.getDuration()))
|
||||
const jumpAmount = this.jumpForwardAmount
|
||||
this.seek(Math.min(currentTime + jumpAmount, this.getDuration()))
|
||||
}
|
||||
|
||||
setVolume(volume) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue