client-sdk-swift
client-sdk-swift copied to clipboard
Using not supported preferred code skips publishing track silently
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 do you have any information about your server / cloud environment? Are you using LiveKit Cloud or self-hosted OSS?
@bcherry local CLI for dev
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 Did not before explicitly but now have this as:
livekit-server --dev --config /renkey/livekit-local-server/config.yml
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.