Closed jigar007 closed 4 years ago
@piyushtank @ceaglest Can you please help asap, as App is in production.
Hi @jigar007,
It sounds like you have more than one TVICameraSource. Two questions to help:
Thanks, Chris
Hi @ceaglest ,
I think the problem is solved now. deinit was not being called. What I did was, I put below code in buttonAction before going to another VC, where I was using CameraSource again.
if let camera = self.camera {
camera.stopCapture()
self.camera = nil
}
But thank you for commenting, I got this idea from your answer only.
Jigar
HI @jigar007,
Awesome news! It sounds like the issue is resolved, let us know if you need any more help in the future.
Cheers, Chris
Description
[Description of the issue] Local camera freezes after we send app in the background and take back to the foreground.
I'm getting following errors (similar to https://github.com/twilio/video-quickstart-ios/issues/445) ERROR:Twilio:Platform: Fatal runtime capture error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x282d3a160 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}}, code -11800
Camera source failed with error: The operation could not be completed
Also
[BackgroundTask] Background Task 38 ("Called by TwilioVideo, from -[TVICameraCapturePipeline videoPipelineWillStartRunning]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
Code
Same as an example app
Reproduces How Often
Each time
Video iOS SDK
TwilioVideo (3.2.3) via CocoaPods
Xcode
Version 11.4.1 (11E503a)
iOS Version
13.4.1
iOS Device
iPhone XS MAX Iphone 6s
Tried solution