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:
|
case .unknown, .buffering, .readyToPlay:
|
||||||
break
|
break
|
||||||
case .playing:
|
case .playing:
|
||||||
try? AVAudioSession.sharedInstance().setCategory(.playback)
|
if case .video = item {
|
||||||
|
try? AVAudioSession.sharedInstance().setCategory(.playback)
|
||||||
|
}
|
||||||
try? AVAudioSession.sharedInstance().setActive(true)
|
try? AVAudioSession.sharedInstance().setActive(true)
|
||||||
case .paused, .stopped, .failed:
|
case .paused, .stopped, .failed:
|
||||||
try? AVAudioSession.sharedInstance().setCategory(.ambient) // set to ambient to allow mixed (needed for GIFV)
|
try? AVAudioSession.sharedInstance().setCategory(.ambient) // set to ambient to allow mixed (needed for GIFV)
|
||||||
|
|
Loading…
Reference in New Issue