disableCam method
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()
- Events.streamDisabled with the disabled video Stream
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();