How can I use AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryAmbient, with: .mixWithOthers)
in a JS file? I want to play sounds on top of music without causing the music from any source to stop. I am able to do it for Apple music, but the music doesn't restart for Pandora, Spotify ect.
var AVAudioSession = require('AVFoundation/AVAudioSession');
AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryAmbient,with: .mixWithOthers)