Skip to content

Persist user selected playback speed#1923

Open
jbenge1 wants to merge 2 commits intojellyfin:mainfrom
jbenge1:savePlaybackRate
Open

Persist user selected playback speed#1923
jbenge1 wants to merge 2 commits intojellyfin:mainfrom
jbenge1:savePlaybackRate

Conversation

@jbenge1
Copy link

@jbenge1 jbenge1 commented Mar 4, 2026

I added playbackRate to swiftfin defaults and write to it whenever there's a change to playback rate. Also added to vlc configurator when that's created to actually persist the playback rate.

Thif fixes #711

@JPKribs JPKribs added enhancement New feature or request iOS Impacts iOS or iPadOS tvOS Impacts tvOS labels Mar 4, 2026
Copy link
Member

@JPKribs JPKribs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! This looks good to me and works in testing. Small potential change I'm frankly not sure of myself so I'll let Ethan make the final verdict for this

Comment on lines +126 to +130
var rate: Float = Defaults[.VideoPlayer.Playback.playbackRate] {
didSet {
Defaults[.VideoPlayer.Playback.playbackRate] = rate
}
}
Copy link
Member

@JPKribs JPKribs Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're setting this at the Default I think we can just use:

@Default(.videoPlayer.Playback.playbackRate)
private var rate

But then we'd have to update all of the locations that call this from the published rate to do the same...

I'll defer to @LePips for this. Your solution works so I'll lean on them for whether or not it makes more sense to call this from the Default when we need it or keep the published rate.

@JPKribs JPKribs requested a review from LePips March 5, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request iOS Impacts iOS or iPadOS tvOS Impacts tvOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playback speed control saved

2 participants