Add playback speed control

Adjustable playback speed control in the form of a slider with a range from 0.01x to 2x.

Closes #33
This commit is contained in:
Rafostar
2021-01-19 16:20:22 +01:00
parent 3ba21d42ec
commit 994491d687
3 changed files with 38 additions and 7 deletions

View File

@@ -46,6 +46,9 @@ class ClapperWidget extends Gtk.Grid
this.player = new Player();
this.controls.elapsedButton.scrolledWindow.set_child(this.player.playlistWidget);
this.controls.speedAdjustment.bind_property(
'value', this.player, 'rate', GObject.BindingFlags.BIDIRECTIONAL
);
this.player.connect('position-updated', this._onPlayerPositionUpdated.bind(this));
this.player.connect('duration-changed', this._onPlayerDurationChanged.bind(this));