client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

Using not supported preferred code skips publishing track silently

Open konsalex opened this issue 1 year ago • 4 comments

Describe the bug A clear and concise description of what the bug is.

Creating a custom video track with a preferred codec, like VP9 in this case, does not break but silently skips publishing the track.

Other participants in the room cannot see any track, thus my assumption that its not published. If the preferred codec is "allowed" the track is published correctly, for example with h264.

SDK Version Please provide the SDK version. 2.0.13

iOS/macOS Version The OS version which the issue occurs. MacOS: 14.3.1

Xcode Version The Xcode version which the issue occurs. (Please provide the Swift version if you know it) Xcode: 15.3 Swift: 5.10

Steps to Reproduce

Use the following code:

// Use any display or window
try await room.localParticipant.publish(videoTrack: screenTrack,
                                                        options: VideoPublishOptions(
                                                            preferredCodec: .vp9
                                                        )

Expected behavior A clear and concise description of what you expected to happen.

Either give appropriate logs and fallback to a supported codec, or throw an error to let the developer know that something is off.

Screenshots If applicable, add screenshots to help explain your problem.

Logs Please provide logs if you can. If needed I can provide more info

konsalex avatar Aug 18 '24 22:08 konsalex

@konsalex do you have any information about your server / cloud environment? Are you using LiveKit Cloud or self-hosted OSS?

bcherry avatar Aug 20 '24 19:08 bcherry

@bcherry local CLI for dev

konsalex avatar Aug 20 '24 23:08 konsalex

can you confirm you have the VP9 codec enabled? see the "self-hosted" tab here https://docs.livekit.io/recipes/video-codecs/#Configuring-codec-support-server-side

bcherry avatar Aug 21 '24 05:08 bcherry

@bcherry Did not before explicitly but now have this as: livekit-server --dev --config /renkey/livekit-local-server/config.yml

konsalex avatar Aug 21 '24 19:08 konsalex

Thank you for the report, I think this PR might fix this issue: https://github.com/livekit/client-sdk-swift/pull/614

It will throw when trying to publish a codec not enabled by server.

hiroshihorie avatar Mar 25 '25 09:03 hiroshihorie