Closed Lyashenko-Alex closed 12 months ago
Attached project source code.
It seems that being called in the following order is not working:
MTHKSwiftUIView#updateUIView() ViewModel#registerForPublishEvent()
It worked well when attaching 'attachMultiCam' or 'attachCamera' in ViewModel's #config().
Describe the bug
I have tested SwiftUI example. It works fine with single camera. When I try to use multicam for PIP mode, it shows black screen. If I add the below code, canvas is black. I cannot see nothing.
if #available(iOS 13.0, *) { let front = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front) rtmpStream.attachMultiCamera(front) }
Will you please help me to work multicam in SwiftUI?
To Reproduce
In the viewModel, in the registerForPublishEvent() function, add the below code.
if #available(iOS 13.0, *) { let front = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front) rtmpStream.attachMultiCamera(front) }
The view is black.
Expected behavior
It should show PIP view like iOS example with Storyboard.
Version
1.5.8
Smartphone info.
Additional context
No response
Screenshots
No response
Relevant log output
No response