Why is the camera indicator light still on after disabling your own video on the web page?
Problem Description
When using ZEGOCLOUD Express Web SDK, after successfully disabling your own video by calling the mutePublishStreamVideo interface, the camera indicator light is still on.
Problem Cause
ZEGOCLOUD Express Web SDK does not support turning on/off video capture separately. Calling the mutePublishStreamVideo interface to close the video being streamed actually only sets the "MediaStreamTrack.enabled" property to "false". After calling this interface, it still sends black video frames and does not close video capture, so the camera indicator light will not turn off.
Solution
Call the destroyStream interface to destroy the video stream to close video capture, and the camera indicator light will turn off. However, since the object pushed by the SDK is a stream containing both audio and video tracks, destroying the stream will affect both audio and video. Therefore, when calling the destroyStream interface, it will simultaneously revoke access to both the camera and microphone, that is, close the capture of both audio and video.
