davidliu
Committed by GitHub

Document potential pitfall when creating LocalVideoTrack manually. (#556)

@@ -156,6 +156,11 @@ internal constructor( @@ -156,6 +156,11 @@ internal constructor(
156 /** 156 /**
157 * Creates a video track, recording video through the camera with the given [options]. 157 * Creates a video track, recording video through the camera with the given [options].
158 * 158 *
  159 + * Note: If using this in conjunction with [setCameraEnabled], ensure that your created
  160 + * camera track is published first before using [setCameraEnabled]. Otherwise, the LiveKit
  161 + * SDK will attempt to create its own camera track to manage, and will cause issues since
  162 + * generally only one camera session can be active at a time.
  163 + *
159 * @param name The name of the track 164 * @param name The name of the track
160 * @param options The capture options to use for this track, or [Room.videoTrackCaptureDefaults] if none is passed. 165 * @param options The capture options to use for this track, or [Room.videoTrackCaptureDefaults] if none is passed.
161 * @param videoProcessor A video processor to attach to this track that can modify the frames before publishing. 166 * @param videoProcessor A video processor to attach to this track that can modify the frames before publishing.