feat: Better Players - #1053
feat: Better Players#1053nnra6864 wants to merge 2 commits into
Conversation
fix: Saving the preMuteVolume instead of regular volume to prefs style: Adjusted naming style: Reordered func for consistency
5bae835 to
22e63ff
Compare
|
Hey, I skimmed through the video player implementation yesterday and realized that a lot of the code would be duplicated if I just copied the volume implementation. I am also open to suggestions as to how this could be made better. |
| double preMuteVolume = 50; | ||
|
|
||
| Future<void> _savePreferences() async { | ||
| final prefs = await SharedPreferences.getInstance(); |
There was a problem hiding this comment.
please dont use SharedPreferences directly, instead go through the preferences global variable
https://github.com/commetchat/commet/blob/main/commet/lib/config/preferences.dart
There was a problem hiding this comment.
Great recommendation.
This makes my work significantly easier.
Done in fdb05a2.
There was a problem hiding this comment.
I think the interface would be better if the slider was something shown in a tooltip popup when clicking or hovering the volume icon, instead of having a slider in-line
There was a problem hiding this comment.
That's a great idea.
I don't have any prior experience with flutter, so I'd appreciate a suggestion for the class I should use to achieve this.
I ran into Overlay, but that seems a bit more complicated to use, so should I stick with that or switch to some other component I am unaware of?
Also, whilst I am at this, should I make the slider vertical?
This should be fairly easy to achieve with a RotatedBox.
This PR aims to implement basic controls to media players, such as volume changing.
I'll also look into implementing
.mkvand.jxlsupport.I could also try implementing #1052 if it's not merged by the time I get to it.
For now, I implemented the persistent audio player volume control, and will start working on the video player.

If you'd like, I can split the format support into a separate PR, whatever works the best for you.
closes #1051