fix: audio session not deactivate after enter background issue
This commit is contained in:
parent
cdbb9cf2d1
commit
4318e3c9d1
@ -9,6 +9,7 @@ import os.log
|
|||||||
import UIKit
|
import UIKit
|
||||||
import UserNotifications
|
import UserNotifications
|
||||||
import AppShared
|
import AppShared
|
||||||
|
import AVFoundation
|
||||||
|
|
||||||
#if ASDK
|
#if ASDK
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
@ -55,7 +56,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AppDelegate {
|
extension AppDelegate {
|
||||||
|
@ -83,6 +83,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
// Called as the scene transitions from the foreground to the background.
|
// Called as the scene transitions from the foreground to the background.
|
||||||
// Use this method to save data, release shared resources, and store enough scene-specific state information
|
// Use this method to save data, release shared resources, and store enough scene-specific state information
|
||||||
// to restore the scene back to its current state.
|
// to restore the scene back to its current state.
|
||||||
|
AppContext.shared.audioPlaybackService.pauseIfNeed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user