sessionInterruptionEnded never called because there's no reason
mkrn opened this issue · comments
Mark Sergienko commented
Describe the bug
In this line, in notification object of streamInterruptionEnded there's no reason provided by Apple, so guard is keeping delegate method from ever executing.
Reason should be removed from delegates
HaishinKit.swift/Sources/Media/IOMixer.swift
Line 426 in a30b01c
To Reproduce
add a NetStreamDelegate
add a function
func stream(_ stream: NetStream, sessionInterruptionEnded session: AVCaptureSession, reason: ... ) {
// Implementation for handling session interruption end on iOS
print("sessionInterruptionEnded \(stream) \(session)")
}
it is never called after coming from background or if using another app like Facetime, multitasking and switching back
Expected behavior
stream sessionInterruptionEnded delegate method should be called
Version
main
Smartphone info.
iPhone 13 Pro
Additional context
No response
Screenshots
No response
Relevant log output
No response
shogo4405 commented
Indeed, that is correct.
2023-29-07 22:59:42.138 [Info] [com.haishinkit.HaishinKit] [IOMixer.swift:415] sessionWasInterrupted(_:) > name = AVCaptureSessionWasInterruptedNotification, object = Optional(<AVCaptureMultiCamSession: 0x28053b400 [AVCaptureSessionPresetInputPriority]>
2023-29-07 22:59:47.639 [Info] [com.haishinkit.HaishinKit] [IOMixer.swift:427] sessionInterruptionEnded(_:) > name = AVCaptureSessionInterruptionEndedNotification, object = Optional(<AVCaptureMultiCamSession: 0x28053b400 [AVCaptureSessionPresetInputPriority]>