Interface: MediaController
Properties
devices
• devices: MediaDeviceInfoLike[]
Current device list
getUserMedia
• getUserMedia: (constraints: MediaDeviceRequest) => void
Type declaration
▸ (constraints): void
Execute the media pipeline immediately with provided constraints
See
MediaDeviceRequest
Parameters
| Name | Type |
|---|---|
constraints | MediaDeviceRequest |
Returns
void
getUserMediaAsync
• getUserMediaAsync: (constraints: MediaDeviceRequest) => Promise<void>
Type declaration
▸ (constraints): Promise<void>
Execute the media pipeline immediately with provided constraints. An
explicit version of getUserMedia to make it possible to chain other
async actions
See
MediaDeviceRequest
Parameters
| Name | Type |
|---|---|
constraints | MediaDeviceRequest |
Returns
Promise<void>
media
• media: Media
Current Media
tryAndGetUserMedia
• tryAndGetUserMedia: (constraints: MediaDeviceRequest) => void
Type declaration
▸ (constraints): void
Cross-check PermissionState and available devices before requesting user media, the request will be skipped if there is no granted device.
Parameters
| Name | Type |
|---|---|
constraints | MediaDeviceRequest |
Returns
void