disableCam method

Future<void> disableCam()

Disables the WebCam device for the local participant.

  • When the WebCam is successfully disabled, a Events.streamDisabled event is emitted with the corresponding video Stream object in the event handler, inside the associated Participant object.

Events associated with disableCam()

Example

// Disable WebCam
await room.disableCam();

room.on(Events.streamDisabled, (event) {
  print('Camera stream disabled: ${event.stream.id}');
});

// Disable WebCam from a button
ElevatedButton(
  onPressed: () async {
    await room.disableCam();
  },
  child: Text('Turn Off Camera'),
)

Implementation

Future<void> disableCam() => _disableCamImpl();