livekit-examples/swift-example

Camera not working

dexcell opened this issue · 5 comments

Cannot pubish camera on mbp 2019. Flutter example works fine. Web also works fine.

2023-08-04T18:18:09+0700 info LiveKitSDK : [] LocalParticipant.publish(track:publishOptions:) [publish] LocalVideoTrack(sid: nil, name: camera, source: Source(rawValue: 1)) options: nil...
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] CameraCapturer.init(delegate:) startStopCounter 0 -> 1
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] CameraCapturer.startCapture() CameraCapturer.preferredPixelFormat: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] MulticastDelegate<VideoCapturerDelegate>.notify(label:_:) [notify] capturer.didUpdate state: CapturerState(rawValue: 1)
2023-08-04 18:18:09.137853+0700 LiveKitExample[27569:761290] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x6000012cf8c0> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A
2023-08-04 18:18:09.138856+0700 LiveKitExample[27569:761290] [] CMIO_DAL_PlugInManagement.cpp:880:CreatePlugIn Could not find plugin with kCMIOHardwarePlugInTypeID
2023-08-04 18:18:09.151249+0700 LiveKitExample[27569:761290] [] CMIO_DAL_CMIOExtension_Device.mm:347:Device legacy uuid isn't present, using new style uuid instead
2023-08-04 18:18:09.152535+0700 LiveKitExample[27569:761290] [] CMIO_DAL_CMIOExtension_Device.mm:347:Device legacy uuid isn't present, using new style uuid instead
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] CameraCapturer.startCapture() formats: ["0...30", "0...30", "0...30", "0...30"], target: <LiveKit.Dimensions: 0x60000109c700>
2023-08-04T18:18:09+0700 error LiveKitSDK : [] CameraCapturer.startCapture() Unable to resolve format
2023-08-04T18:18:09+0700 error LiveKitSDK : [] LocalParticipant.publish(track:publishOptions:) [publish] failed LocalVideoTrack(sid: nil, name: camera, source: Source(rawValue: 1)), error: TrackError.capturer Unable to determine format for camera capturer
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] CameraCapturer.init(delegate:) startStopCounter 1 -> 0
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] MulticastDelegate<VideoCapturerDelegate>.notify(label:_:) [notify] capturer.didUpdate state: CapturerState(rawValue: 0)
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] LocalVideoTrack.deinit sid: nil
2023-08-04T18:18:09+0700 debug LiveKitSDK : [] ExampleObservableRoom.toggleCameraEnabled() Failed to publish camera, error: TrackError.capturer Unable to determine format for camera capturer

Thats odd, can I know your device ?

Seems like for some reason, on MBP 2019 the format cannot be resolved and it fails to publish.
Planning to implement some backup logic here.

Are you using an external camera ?

Nope, just built in webcam.

I think this PR fixed it livekit/client-sdk-swift#239
It will be in the next version.