Don’t pause background music when opening a GIF
This commit is contained in:
parent
dc1f65e0b5
commit
3b3f870caa
|
@ -67,7 +67,9 @@ final class MediaPreviewVideoViewModel {
|
|||
case .unknown, .buffering, .readyToPlay:
|
||||
break
|
||||
case .playing:
|
||||
if case .video = item {
|
||||
try? AVAudioSession.sharedInstance().setCategory(.playback)
|
||||
}
|
||||
try? AVAudioSession.sharedInstance().setActive(true)
|
||||
case .paused, .stopped, .failed:
|
||||
try? AVAudioSession.sharedInstance().setCategory(.ambient) // set to ambient to allow mixed (needed for GIFV)
|
||||
|
|
Loading…
Reference in New Issue