Completely disable audio track when set to disabled

Instead of just muting audio when disabled, tell GStreamer to diable it completely. This is slower, but makes this option do what it was supposed to.
This commit is contained in:
Rafał Dzięgiel
2021-09-06 10:29:44 +02:00
parent a99abc652a
commit 3483c94913

14
src/controls.js vendored
View File

@@ -214,20 +214,6 @@ class ClapperControls extends Gtk.Box
{
const clapperWidget = this.get_ancestor(Gtk.Grid);
/* Reenabling audio is slow (as expected),
* so it is better to toggle mute instead */
if(checkButton.type === 'audio') {
if(checkButton.activeId < 0)
return clapperWidget.player.set_mute(true);
if(clapperWidget.player.get_mute())
clapperWidget.player.set_mute(false);
return clapperWidget.player[
`set_${checkButton.type}_track`
](checkButton.activeId);
}
if(checkButton.activeId < 0) {
return clapperWidget.player[
`set_${checkButton.type}_track_enabled`