forked from zelo72/mastodon-ios
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 UserNotifications
|
||||
import AppShared
|
||||
import AVFoundation
|
||||
|
||||
#if ASDK
|
||||
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.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
|
|
|
@ -83,6 +83,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||
// 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
|
||||
// to restore the scene back to its current state.
|
||||
AppContext.shared.audioPlaybackService.pauseIfNeed()
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue