mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Revert "Improve setting audio session"
This reverts commit eedc8f32d1
.
Fix #307
This commit is contained in:
@@ -276,6 +276,10 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
}
|
||||
|
||||
let startPlaying = {
|
||||
#if !os(macOS)
|
||||
try? AVAudioSession.sharedInstance().setActive(true)
|
||||
#endif
|
||||
|
||||
self.setRate(self.model.currentRate)
|
||||
|
||||
guard let item = self.model.playerItem, self.isAutoplaying(item) else { return }
|
||||
|
@@ -182,6 +182,10 @@ final class MPVBackend: PlayerBackend {
|
||||
}
|
||||
|
||||
let startPlaying = {
|
||||
#if !os(macOS)
|
||||
try? AVAudioSession.sharedInstance().setActive(true)
|
||||
#endif
|
||||
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else {
|
||||
return
|
||||
|
Reference in New Issue
Block a user