LOCAL_VIDEO_STREAM_REASON

Reason for local video state change.

Enumerations

LOCAL_VIDEO_STREAM_REASON_OK
0: Local video is in normal state.
LOCAL_VIDEO_STREAM_REASON_FAILURE
1: Unknown error.
LOCAL_VIDEO_STREAM_REASON_DEVICE_NO_PERMISSION
2: No permission to start the local video capture device. Prompt the user to enable device permissions and rejoin the channel.
Note: Deprecated: This enumeration is deprecated. Use OnPermissionError callback with CAMERA instead.
LOCAL_VIDEO_STREAM_REASON_DEVICE_BUSY
3: The local video capture device is in use. Prompt the user to check if the camera is occupied by another app or try rejoining the channel.
LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE
4: Local video capture failed. Prompt the user to check if the video capture device is working properly, whether the camera is occupied by another app, or try rejoining the channel.
LOCAL_VIDEO_STREAM_REASON_CODEC_NOT_SUPPORT
5: Local video encoding failed.
LOCAL_VIDEO_STREAM_REASON_CAPTURE_INBACKGROUND
6: (iOS only) The app is in the background. Prompt the user that video capture cannot proceed when the app is in the background.
LOCAL_VIDEO_STREAM_REASON_CAPTURE_MULTIPLE_FOREGROUND_APPS
7: (iOS only) The app window is in Slide Over, Split View, or Picture-in-Picture mode, and another app is using the camera. Prompt the user that video capture cannot proceed in this case.
LOCAL_VIDEO_STREAM_REASON_DEVICE_NOT_FOUND
8: Local video capture device not found. Check whether the camera is properly connected and functioning, or try rejoining the channel.
LOCAL_VIDEO_STREAM_REASON_DEVICE_DISCONNECTED
9: (macOS and Windows only) The video capture device in use has been disconnected (e.g., unplugged).
LOCAL_VIDEO_STREAM_REASON_DEVICE_INVALID_ID
10: (macOS and Windows only) The SDK cannot find the video device in the list. Check whether the video device ID is valid.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_MINIMIZED
11: (macOS and Windows only) The window shared via StartScreenCaptureByWindowId is minimized. The SDK cannot share minimized windows. Prompt the user to restore the window.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_CLOSED
12: (macOS and Windows only) The window shared via window ID is closed, or a fullscreen window shared via window ID has exited fullscreen. After exiting fullscreen, remote users cannot see the shared window. To avoid showing a black screen, it is recommended to end the sharing immediately. Common scenarios for this error code:
  • The local user closes the shared window.
  • The local user plays a slideshow and shares it; when the slideshow ends, the SDK reports this error.
  • The local user watches a web video or document in fullscreen, then shares it; when exiting fullscreen, the SDK reports this error.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_OCCLUDED
13: (Windows only) The window to be shared is blocked by another window. The blocked area will be blacked out during sharing.
LOCAL_VIDEO_STREAM_REASON_DEVICE_INTERRUPT
14: (Android only) Video capture interrupted. Possible reasons:
  • The camera is occupied by another app. Prompt the user to check if the camera is in use.
  • The app has been switched to the background. Use a foreground service notification to ensure video capture continues in the background.
LOCAL_VIDEO_STREAM_REASON_DEVICE_FATAL_ERROR
15: (Android only) Video capture device error. Prompt the user to turn off and restart the camera to restore functionality. If the issue persists, check for hardware faults.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_FAILURE
21: (Windows and Android only) The current captured window has no data.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_NO_PERMISSION
22: (Windows and macOS only) No permission to capture the screen.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_AUTO_FALLBACK
24: (Windows only) An unexpected error occurred during screen sharing (possibly due to window exclusion failure), causing the screen sharing strategy to downgrade, but the sharing itself is not affected.
Note: During screen sharing, if window exclusion fails due to device driver issues, the SDK reports this event and automatically falls back to sharing the entire screen. If your scenario requires excluding specific windows for privacy, listen for this event and add additional privacy protection mechanisms when triggered.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_HIDDEN
25: (Windows only) The window being captured is hidden and not visible on the current screen.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_HIDDEN
26: (Windows only) The window being captured has recovered from a hidden state.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_MINIMIZED
27: (macOS and Windows only) The window being captured has recovered from a minimized state.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_PAUSED
28: (Windows only) Screen capture is paused. Common scenario: the current screen may have switched to a secure desktop, such as a UAC dialog or Winlogon desktop.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_RESUMED
29: (Windows only) Screen capture has resumed from a paused state.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_DISPLAY_DISCONNECTED
30: (Windows and macOS only) The display being captured has been disconnected. Prompt the user that screen sharing is paused and restart sharing.
LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_EXCLUDE_WINDOW_FAILED
34: (Windows only) Some windows in the exclusion list failed to be excluded during screen sharing.
LOCAL_VIDEO_STREAM_REASON_DEVICE_SYSTEM_PRESSURE
101: The video capture device is unavailable due to excessive system pressure.