From 3483c94913273777c5de6dbc7bfda44af37cf9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 6 Sep 2021 10:29:44 +0200 Subject: [PATCH] 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. --- src/controls.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/controls.js b/src/controls.js index 9ff15a06..8c718a18 100644 --- a/src/controls.js +++ b/src/controls.js @@ -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`