mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Set AVAudioSession, disable screensaver during playback on macOS
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import AVFAudio
|
||||
import Defaults
|
||||
import SDWebImage
|
||||
import SDWebImagePINPlugin
|
||||
@@ -91,6 +92,9 @@ struct ContentView: View {
|
||||
SiestaLog.Category.enabled = .common
|
||||
SDImageCodersManager.shared.addCoder(SDImageWebPCoder.shared)
|
||||
SDWebImageManager.defaultImageCache = PINCache(name: "net.yattee.app")
|
||||
#if !os(macOS)
|
||||
try? AVAudioSession.sharedInstance().setCategory(.playback, mode: .moviePlayback)
|
||||
#endif
|
||||
|
||||
if let account = accounts.lastUsed ??
|
||||
instances.lastUsed?.anonymousAccount ??
|
||||
|
Reference in New Issue
Block a user