Skip to content

feat: Preview: Add audio preview controls and visualization

mesonium requested to merge mesonium/gajim:work/mesonium/audio-preview into master

This MR introduces major changes and bug fixes to the audio player:

Before After
Screenshot_Before Screenshot_New2

Visually the audio widget has gained some new features. It's now possible to fast forward and rewind by 10 s and to alter the playback speed, either via buttons or by a slider.

Most prominent is the new visualization of the RMS peaks, which do not only enhance the aesthetics but also helps to differentiate between several audio messages and improves the orientation when seeking for a special point of the playback.

While playing back and seeking by dragging the slider, the audio won't scrub anymore and the playback continues. In order to still see the current playback progress, a different color (light blue in the screenshot above) is chosen for the area which will be jumped forward or backward in time, when releasing the slider.

It's now also possible to jump in time by single clicking into the seekbar or by using the mouse wheel and the timestamp label can now be toggled to display the elapsed or remaining time.

In the backend the audio pipeline has been changed, which removes the former delay at the beginning of the first playback of an audio. When starting a playback of an audio message, all other playbacks are stopped immediately now.

Last but not least, progression and settings of each audio preview are now saved within a session.

Edited by mesonium

Merge request reports