From d5464db1f31ddba2b082d28b9d03569c4f0f7740 Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 12 Dec 2024 19:44:07 +0900 Subject: [PATCH] Document potential pitfall when creating LocalVideoTrack manually. (#556) --- .../io/livekit/android/room/participant/LocalParticipant.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt b/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt index e888c247..03c210b9 100644 --- a/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt +++ b/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt @@ -156,6 +156,11 @@ internal constructor( /** * Creates a video track, recording video through the camera with the given [options]. * + * Note: If using this in conjunction with [setCameraEnabled], ensure that your created + * camera track is published first before using [setCameraEnabled]. Otherwise, the LiveKit + * SDK will attempt to create its own camera track to manage, and will cause issues since + * generally only one camera session can be active at a time. + * * @param name The name of the track * @param options The capture options to use for this track, or [Room.videoTrackCaptureDefaults] if none is passed. * @param videoProcessor A video processor to attach to this track that can modify the frames before publishing.