解决声音问题

This commit is contained in:
Zhihai Zhu 2024-04-20 12:08:01 +08:00
parent 222a149aec
commit aac8519d29
2 changed files with 8 additions and 7 deletions

View File

@ -33,13 +33,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
configureFireBase() configureFireBase()
// do { do {
// try AVAudioSession.sharedInstance().setActive(true) try AVAudioSession.sharedInstance().setActive(true)
// try AVAudioSession.sharedInstance().setCategory(.playback,options: .allowAirPlay) try AVAudioSession.sharedInstance().setCategory(.playback,options: .allowAirPlay)
// } }
// catch { catch {
// print("err: set audiosession:\(error)") print("err: set audiosession:\(error)")
// } }
SVProgressHUD.setDefaultStyle(.dark) SVProgressHUD.setDefaultStyle(.dark)

View File

@ -339,6 +339,7 @@ class CCSpatialVideoDisplayController: BaseController {
// //
@objc func notification_didActiveNotification(notification:Notification) { @objc func notification_didActiveNotification(notification:Notification) {
self.checkAirPlayStatus() self.checkAirPlayStatus()
customPlayer.play(true)
print("ccs .....notification_didEnterBackgroundNotification") print("ccs .....notification_didEnterBackgroundNotification")
} }