From b8dcf85cc85063baf9eaf5d3a319da1a262c9a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 12 Mar 2023 22:55:45 +0100 Subject: [PATCH] status/volume: Ignore capitalization for headphone detection When we can't detect a headphone by form factor, we do a string match on the port name. A match on 'Headphone' isn't less likely to be valid than a match on 'headphone', so make sure we ignore capitalization. Part-of: --- js/ui/status/volume.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index fd6c8e7d6..91706343a 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -319,7 +319,7 @@ class OutputStreamSlider extends StreamSlider { // of different identifiers for headphones, and I could // not find the complete list if (sink.get_ports().length > 0) - return sink.get_port().port.includes('headphone'); + return sink.get_port().port.toLowerCase().includes('headphone'); return false; }