localVideoStateChanged property

LocalVideoStateCallback? localVideoStateChanged
getter/setter pair

Occurs when the local video stream state changes. When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the localVideoStateChanged callback with the state code of Failed and error code of CaptureFailure in the following situations: The app switches to the background, and the system gets the camera resource. The camera starts normally, but does not output video for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the localVideoStateChanged callback with the state code of Capturing and error code of CaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.

Param localVideoState The state of the local video, see LocalVideoStreamState .

Param error The detailed error information, see LocalVideoStreamError .

Implementation

LocalVideoStateCallback? localVideoStateChanged;