Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Works the reverse way when AirPods are connected #79

Open
Dybo007 opened this issue Mar 10, 2024 · 0 comments
Open

Works the reverse way when AirPods are connected #79

Dybo007 opened this issue Mar 10, 2024 · 0 comments

Comments

@Dybo007
Copy link

Dybo007 commented Mar 10, 2024

My Stack looks like:

ZStack{
      Text("Some Text Here")
            .font(.custom("Impact", size: isMuted ? 50 : 90))
}

and i'm listening for output device changes like this:

.onReceive(NotificationCenter.default.publisher(for: .defaultOutputDeviceChanged)){ _ in
     if let outputDevice = simplyCA.defaultOutputDevice {
         if outputDevice.name.contains("AirPods") {
                    isAirPodsConnected = true
         } else {
                    isAirPodsConnected = false
         }
     }
 }

The problem is when i connect my Airpods, the isMuted variable is triggered as true (but still able to hear sound). Only when Airpods are connected!! This make the text appear small, big when the volume change but goes back to small after no time... and if really muted, the text appear as big... it works the reverse way...
What i'm doing wrong? Thanks.

Os: Ventura 13.6.1 MBA M2 - AirPods 3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant