-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media player: Add seek and speed controls #2608
Conversation
internal/ui/static/js/app.js
Outdated
speedIndicator.forEach((speedI) => { | ||
// Two digit precision to ensure we always have the same number of characters (4) to avoid controls moving when clicking buttons because of more or less characters. | ||
// The trick only work on rate less than 10, but it feels an acceptable tread of considering the feature | ||
speedI.innerText = `${enclosure.playbackRate.toFixed(2)}x`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt this duplication did not worth the hassle of factorization. But happy to improve it if this felling is not shared.
86bc95e
to
bd5861d
Compare
bd5861d
to
da8f92a
Compare
The speed button does not seems to work for me. Tested with Chrome and Firefox. See screen recording below: Recording.2024-04-10.195845.mp4 |
@fguillot Did you cleared the JS cache ? 😅 Do you have any logs or errors in the console ? What version of chrome exactly, on which OS ? I will test it today to see what's happening. |
Added a comment here: #2608 (comment) |
da8f92a
to
5d0e763
Compare
5d0e763
to
3ccb9eb
Compare
I've rebased the branch and re-tested. All seems ok. |
internal/template/templates/common/enclosure_media_controls.html
Outdated
Show resolved
Hide resolved
3ccb9eb
to
33174b2
Compare
When listening to podcast, it is usual to want to speed up the playback. miniflux#2521 was addressing the need globally, this PR allow to address it for just the current open enclosure media. (no save) Some Browser already include this control directly, but firefox does not (directly anyway). Also, it is often useful to be able to skip chunk of a podcast, to skip commercials for example, or get back a bit because we couldn't hear the last part. I added rudimentary seek controls with the usual +/-10 and 30 seconds chuck size. This is pretty handy when podcast are very long and using the seek bar is way too tricky to just skip 30s. As always, I'm French and could only provide English and French translation for the few text I added in the locale/translations files. Any help is welcome. Tested mostly on Firefox (121.0) and quickly on Vivaldi(6.5.3206.53), chrome based. Fixes: miniflux#1845 miniflux#1846
33174b2
to
5130973
Compare
When listening to podcast, it is usual to want to speed up the playback. #2521 was addressing the need globally, this PR allow to address it for just the current open enclosure media. (no save) Some Browser already include this control directly, but Firefox does not (directly anyway).
Also, it is often useful to be able to skip chunk of a podcast, to skip commercials for example, or get back a bit because we couldn't hear the last part. I added rudimentary seek controls with the usual +/-10 and 30 seconds chuck size. This is pretty handy when podcast are very long and using the seek bar is way too tricky to just skip 30s.
As always, I'm French and could only provide English and French translation for the few text I added in the locale/translations files. Any help is welcome.
Tested mostly on Firefox (121.0) and quickly on Vivaldi(6.5.3206.53), chrome based.
If anything seems odd or require more work, feel free to ask. I'm available to improve things.
I did not find a way to have the global user configured playback rate in the sub-template
enclosure_media_controls.html
. Any proposition is welcome and would remove the need for JS to have this information displayed. (JS still needed to control the playback tho)I did my best with the CSS. Any improvement here is also welcome. I wanted to have something really simple but still responsive. It is not always perfectly aligned (as it is centered) when resizing, but it will fit all screens.
The change look like this:
Fixes: #1845 #1846
Do you follow the guidelines?