Class ControlMediaHost

Service for controlling participant media in a session, with options to manage audio, video, screenshare, and chat functionalities.

ControlMediaHost

This service provides the host with control over a participant's media (audio, video, screenshare, chat), with options to enable or disable these functionalities individually or all at once.

controlMediaHost

Options to specify which media type to control and provide necessary parameters.

The media type to control ('audio', 'video', 'screenshare', 'chat', 'all').

Additional parameters, functions, and media streams necessary to perform the media control operations.

  • A promise that resolves when the media control operation is complete.
const controlMediaHostService = new ControlMediaHost();
await controlMediaHostService.controlMediaHost({
type: 'audio',
parameters: {
updateAdminRestrictSetting: (value) => console.log(value),
localStream: myLocalStream,
updateLocalStream: (stream) => console.log(stream),
updateAudioAlreadyOn: (value) => console.log(value),
onScreenChanges: async () => { },
disconnectSendTransportAudio: async () => { },
getUpdatedAllParams: () => ({ }),
}
});
  • This function handles the control of audio, video, screenshare, or chat for a participant based on the specified type.
  • For all type, it sequentially controls each media type to ensure all are turned off.

Constructors

Methods

Constructors

Methods