Create LocalAudioTracks and LocalVideoTracks. By default,
returns both a LocalAudioTrack and a LocalVideoTrack. If
either audio or video is provided, the unspecified kind is omitted.
Each key accepts a boolean or a per-track options object.
A promise that resolves with the created local tracks, or rejects
with a TypeError if a per-track option fails validation.
Example
// Create both audio and video tracks. consttracks = awaitcreateLocalTracks();
Example
// Create only an audio track and connect with it. consttracks = awaitcreateLocalTracks({ audio:true }); constroom = awaitconnect(token, { audioTracks:tracks });
Example
// Create both with custom names. consttracks = awaitcreateLocalTracks({ audio: { name:'microphone' }, video: { name:'camera' }, });
Create LocalAudioTracks and LocalVideoTracks. By default, returns both a LocalAudioTrack and a LocalVideoTrack. If either
audioorvideois provided, the unspecified kind is omitted. Each key accepts a boolean or a per-track options object.