mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
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:
14
src/controls.js
vendored
14
src/controls.js
vendored
@@ -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`
|
||||
|
Reference in New Issue
Block a user