Skip to main content
Version: 1.0.x

Participant Class Methods

enableCam()

  • enableCam() is used to enable participant's camera.

Events associated with enableCam():

  • First the participant will get a callback on cameraRequested and once the participant accepts the request, camera device will be enabled.
  • Every Participant will receive a streamEnabled event with stream object.

Returns

  • void

Example

participant.enableCam();

disableCam()

  • disableCam() is used to disable participant camera.

Events associated with disableCam():

  • Every Participant will receive a streamDisabled event with stream object.

Returns

  • void

Example

participant.disableCam();

unmuteMic()

  • unmuteMic() is used to enable participant microphone.

Events associated with unmuteMic():

  • First the participant will get a callback on micRequested and once the participant accepts the request, mic will be enabled.
  • Every Participant will receive a streamEnabled event with stream object.

Returns

  • void

Example

participant.unmuteMic();

muteMic()

  • muteMic() is used to disable participant microphone.

Events associated with muteMic():

  • Every Participant will receive a streamDisabled event with stream object.

Returns

  • void

Example

participant.muteMic();

setQuality()

  • It is used to set the quality of the participant's video stream.

Parameters

  • quality: "low"|| "med" | "high"

Returns

  • void

Example

participant.setQuality("high");

setViewPort()

  • setViewPort() is used to set the quality of the participant's video stream based on the viewport height and width.

Parameters

  • width: int
  • height: int

Returns

  • void

Example

participant.setViewPort(480, 360);

remove()

  • It is used to remove participant from the room.

Returns

  • void

Example

participant.remove();

on()

Parameters

  • event

    • type: Events
    • This will specify the event to be listened.
  • eventHandler

    • type: Function
    • This will be invoked whenever, specified event occurred.

Returns

  • void

Example

participant.on(Events.streamEnabled, (Stream stream){
// do something
});