onLocalVideoStateChanged property
Callback when the local video state changes.
The SDK triggers this callback when the local video state changes, reporting the current state and the reason for the change. Frame duplication detection only applies to video frames with resolution greater than 200 × 200, frame rate ≥ 10 fps, and bitrate < 20 Kbps. If an exception occurs during video capture, in most cases you can troubleshoot it using the reason parameter in this callback. However, on some devices, when capture issues occur (e.g., freezing), the Android system does not throw any error callbacks, so the SDK cannot report the reason for the local video state change. In this case, you can determine whether no frames are being captured by checking if this callback reports state as localVideoStreamStateCapturing or localVideoStreamStateEncoding, and the captureFrameRate in the onLocalVideoStats callback is 0.
sourceType of video source. See VideoSourceType.stateLocal video state. See LocalVideoStreamState.reasonReason for the local video state change. See LocalVideoStreamReason.
Implementation
final void Function(VideoSourceType source, LocalVideoStreamState state,
LocalVideoStreamReason reason)? onLocalVideoStateChanged;