Closed mkrn closed 1 year ago
If you went live, then switched to another app that captures video or audio, then switched back the image is frozen and you cannot resume streaming
I expect the streaming video/audio to resume
main branch, 1.4.5
iPhone 13 Pro
I attempted to handle AV Interruptions to restart AV Session before starting streaming again:
nc.publisher(for: AVAudioSession.interruptionNotification, object: nil) .sink { notification in logger.info(notification) guard let userInfo = notification.userInfo, let interruptionTypeValue = userInfo[AVAudioSessionInterruptionTypeKey] as? NSNumber else { return } let interruptionType = AVAudioSession.InterruptionType(rawValue: interruptionTypeValue.uintValue) if interruptionType == .ended { guard let optionsValue = userInfo[AVAudioSessionInterruptionOptionKey] as? UInt else { return } let options = AVAudioSession.InterruptionOptions(rawValue: optionsValue) if options.contains(.shouldResume) { self.startAVSession() } } } .store(in: &subscriptions)
I also attempted to use didBecomeActiveNotification to start AVSession before restarting
nc.publisher(for: UIApplication.didBecomeActiveNotification, object: nil) .sink { notification in guard self.status == .paused else { return } self.status = .connecting self.signalStrength = .na self.startAVSession() self.startPublish() }.store(in: &subscriptions)
No response
I had never used camera.app during the stream. It's an awesome test. I fixed it 252ab16. Thank you.
Waiting for this to merge to main, already converted code to use new videoSettings format Looking good! Thanks!
Merged to main branch https://github.com/shogo4405/HaishinKit.swift/commit/e44bf9187efedc8832a7cb6d5a2de72ad1b905fc.
Describe the bug
If you went live, then switched to another app that captures video or audio, then switched back the image is frozen and you cannot resume streaming
To Reproduce
Expected behavior
I expect the streaming video/audio to resume
Version
main branch, 1.4.5
Smartphone info.
iPhone 13 Pro
Additional context
I attempted to handle AV Interruptions to restart AV Session before starting streaming again:
I also attempted to use didBecomeActiveNotification to start AVSession before restarting
Screenshots
No response
Relevant log output
No response