forked from Shinonome/dots-hyprland
volume device info: support bluetooth headphones
This commit is contained in:
@@ -64,7 +64,8 @@ export default () => {
|
|||||||
},
|
},
|
||||||
nameSetup: (self) => Utils.timeout(1, () => {
|
nameSetup: (self) => Utils.timeout(1, () => {
|
||||||
const updateAudioDevice = (self) => {
|
const updateAudioDevice = (self) => {
|
||||||
const usingHeadphones = (Audio.speaker?.stream?.port)?.includes('Headphones');
|
console.log(Audio.speaker?.stream?.port);
|
||||||
|
const usingHeadphones = (Audio.speaker?.stream?.port)?.toLowerCase().includes('headphone');
|
||||||
if (volumeIndicator.attribute.headphones === undefined ||
|
if (volumeIndicator.attribute.headphones === undefined ||
|
||||||
volumeIndicator.attribute.headphones !== usingHeadphones) {
|
volumeIndicator.attribute.headphones !== usingHeadphones) {
|
||||||
volumeIndicator.attribute.headphones = usingHeadphones;
|
volumeIndicator.attribute.headphones = usingHeadphones;
|
||||||
|
|||||||
Reference in New Issue
Block a user