

- Mac mute all sounds except for spotify how to#
- Mac mute all sounds except for spotify full#
- Mac mute all sounds except for spotify code#
Haven’t we all wished for synchronized wireless speakers with an amazing sound? Well, say hello to Take a picture or start/stop a video, you will hear a small sound. The assigned trigger will take a picture or start/stop your video recording. Means that the camera is only being controlled by the trigger (click, double click or hold) that youĪssigned to it.
Mac mute all sounds except for spotify how to#
There's a lot more options available on how to handle AVAudioSession and here's the documentation. Now since your videos would be running in "mute" you can simply mixWithOthers. In your AppDelegate in didFinishLaunchingWithOptions method make sure your app is not interrupting any background music. The steps below achieves exactly how Twitter's app handles videos and background music. And then once you are done playing your video let the "interrupted" background music (example: Spotify, Apple Music etc.) to resume.

Mac mute all sounds except for spotify full#
When user goes to full screen with your app's video, any background audio must "pause" or be "interrupted" essentially your app taking over the AVAudioSession. What you may want to do is, show your video muted as a preview, while the user continues to play their song in the background.
This may not be a very pleasing user experience and lead to confusion. That is because your App will have a default setup of AVAudioSession to AVAudioSessionCategorySoloAmbient, which means that your app will ALWAYS interrupt all audio sessions that is running in the background as soon as it starts playing a video, muted or un-muted.
Mac mute all sounds except for spotify code#
You may run a video on mute using the code above, the problem is, if you simply use isMuted = true (for let's say the video preview) it will work, but your app will "hijack" the AVAudioSession from the Operating system, which means if the user was, lets say, listening to music (spotify or apple music), their music would get interrupted. As Fam's answer suggests, you can easily do this in your App to mute a video.
