Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateLocalMediaOptions

CreateLocalMediaOptions provide a way to configure local user media.

These options are for use with LocalParticipant.getUserMedia and LocalParticipant.getDisplayMedia.

For example, if you want a users video but not audio:

localParticipant.getUserMedia({video: {}});

This will return you a LocalTrack with a LocalTrack.source of TrackSource.Camera and a LocalTrack.kind of TrackKind.Video.

If you wanted a user's audio but not video:

localParticipant.getUserMedia({audio: {}});

This will return you a LocalTrack with a LocalTrack.source of TrackSource.Microphone and a LocalTrack.kind of TrackKind.Audio.

If you want video and audio with specific deviceIds:

localParticipant.getUserMedia({
audio: {name: "foo-audio", constraints: {deviceId: AUDIO_DEVICE_ID}}
video: {name: "foo-video", constraints: {deviceId: VIDEO_DEVICE_ID}}
});

Hierarchy

  • CreateLocalMediaOptions

Index

Properties

Properties

audio?: boolean | LocalTrackOptions

options for configuring local audio

video?: boolean | LocalTrackOptions

options for configuring local video

Generated using TypeDoc