livekit / client-sdk-swift

LiveKit Swift Client SDK. Easily build live audio or video experiences on iOS, macOS, tvOS, and visionOS.
https://livekit.io
Apache License 2.0
210 stars 98 forks source link

Using not supported preferred code skips publishing track silently #463

Open konsalex opened 2 months ago

konsalex commented 2 months ago

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

bcherry commented 2 months ago

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

konsalex commented 2 months ago

@bcherry local CLI for dev

bcherry commented 2 months ago

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

konsalex commented 2 months ago

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