MediaContext
provides capabilities for device control.
enableMediaEncryption(enabled: boolean, config: any): number;
Since v1.1.5.
Enables media stream encryption.
getAudioRecordingVolume: () => number;
Since v1.1.5.
Gets the volume of the audio collected by the microphone.
getAudioPlaybackVolume: () => number;ng) => Promise<void>;
Since v1.1.5.
Get the volume of the audio played by the speaker.
isNative: boolean,
Whether the local client is a Windows or macOS application.
cpuUsage: number,
Deprecated as of v1.1.5. Use
cpuUsage
inClassroomStatsContext
instead.
The CPU usage.
networkQuality: string,
Deprecated as of v1.1.5. Use
networkQuality
inClassroomStatsContext
instead.
Network quality types.
networkLatency: number,
Deprecated as of v1.1.5. Use
networkLatency
inClassroomStatsContext
instead.
Network delay (ms).
packetLostRate: number,
Deprecated as of v1.1.5. Use
packetLostRate
inClassroomStatsContext
instead.
Packet loss rate (%).
cameraList: any[],
The camera list.
microphoneList: any[],
The microphone list.
speakerList: any[],
The speaker list.
cameraId: string,
The ID of the selected ID.
microphoneId: string,
The ID of the selected microphone.
speakerId: string,
The ID of the selected speaker.
changeDevice: (deviceType: string, value: any) => Promise<void>,
Switches the media device (camera, microphone, or speaker).
Parameter | Description |
---|---|
deviceType |
The device type. You can set the parameter as camera , microphone or speaker . |
value |
The device ID. |
changeAudioVolume: (deviceType: string, value: any) => Promise<void>,
Adjusts the device volume.
Parameter | Description |
---|---|
deviceType |
The device type. You can set the parameter as microphone or speaker . |
value |
The volume. |
changeCamera: (deviceId: string) => Promise<void>
Since v1.1.5.
Switches the camera.
Parameter | Description |
---|---|
deviceId |
The device ID. |
changeMicrophone: (deviceId: string) => Promise<void>
Since v1.1.5.
Switches the microphone.
Parameter | Description |
---|---|
deviceId |
The device ID. |
changeSpeakerVolume: (v: number) => Promise<void>
Since v1.1.5.
Adjusts the volume of the speaker.
changeMicrophoneVolume: (v: number) => Promise<void>
Since v1.1.5.
Adjusts the volume of the microphone.