mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-23 03:41:32 +00:00
feat: implement smart speed UI and state persistence
This commit is contained in:
parent
4299fdce59
commit
fa2460868e
7 changed files with 150 additions and 2 deletions
|
|
@ -383,6 +383,13 @@ export default class PlayerHandler {
|
|||
this.player.setPlaybackRate(playbackRate)
|
||||
}
|
||||
|
||||
setSmartSpeed(enabled, ratio = 2.5) {
|
||||
if (this.player && this.player instanceof LocalAudioPlayer) {
|
||||
this.player.smartSpeedRatio = ratio
|
||||
this.player.setSmartSpeed(enabled)
|
||||
}
|
||||
}
|
||||
|
||||
seek(time, shouldSync = true) {
|
||||
if (!this.player) return
|
||||
this.player.seek(time, this.playerPlaying)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue