in ios application;
public static func register(with registrar: FlutterPluginRegistrar) {
···
instance.bindListener()
···
}
/// 绑定监听器
public func bindListener() {
do {
try AVAudioSession.sharedInstance().setActive(false)
}
}
when plugin register , other audio will pause 。
[ try AVAudioSession.sharedInstance().setActive(false) ]
This code causes the rest of the music to pause
in ios application;
when plugin register , other audio will pause 。
[ try AVAudioSession.sharedInstance().setActive(false) ]
This code causes the rest of the music to pause