mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-01 07:39:10 +00:00
* feat: Audio Playback Add the ability to play audio files. Add a slider to seek through an audio file. Add play/pause and mute/unmute buttons for audio files. Note: This is a continuation of a mistakenly closed PR: Ref: https://github.com/TagStudioDev/TagStudio/pull/529 While redoing the changes, I made a couple of improvements. When the end of the track is reached, the pause button will swap to the play button and allow the track to be replayed. Here is the original feature request: Ref: https://github.com/TagStudioDev/TagStudio/issues/450 * fix: prevent autoplay on new track when paused * refactor: Add MediaPlayer base class. Added a MediaPlayer base class per some suggestions in the PR comments. Hopefully this reduces duplicate code between the audio/video player in the future. * refactor: add controls to base MediaPlayer class Move media controls from the AudioPlayer widget to the MediaPlayer base class. This removes the need for a separate AudioPlayer class, and allows the video player to reuse the media controls. * fix: position_label update with slider Update the position_label when the slider is moving. * fix: replace platform dependent time formatting Replace the use of `-` in the time format since this is not availabile on all platforms. Update initial `position_label` value to '0:00'.