What are the differences between setEnabled and setMuted?
Both Web SDK 4.x and 3.x provide APIs for controlling the collection and sending of local audio and video. The differences between these APIs are detailed in the table below.
You cannot call setEnabled
and setMuted
at the same time.
API | Capture | Send | Recovery time |
---|---|---|---|
(3.x) Mute-related methods: Stream.muteAudio Stream.unmuteAudio Stream.muteVideo Stream.unmuteVideo | After muting, the SDK does not stop audio and video capture. The camera's light does not turn off. | The SDK sends a black frame after muting video and a mute packet after muting audio. Muted users are counted as streaming users, and up to 17 users can stream at the same time in a single channel. | Unmuting after a mute is relatively faster. |
(4.x)LocalTrack.setEnabled | After calling setEnabled to disable the track, the SDK stops audio and video capture. The camera's light turns off. | The SDK does not send any data after calling setEnabled to disable the track. Users whose tracks are disabled are not counted as streaming users. | Enabling audio and video after disabling it is relatively slower. |
(4.x)LocalTrack.setMuted | After calling setMuted to mute the track, the SDK does not stop audio and video capture. The camera's light does not turn off. | The SDK does not send any data after calling setMuted to mute the track. Muted users are not counted as streaming users. | Unmuting after a mute is relatively faster. |