LocalVideoStreamReason
Reason for local video state change.
Enumerations
- localVideoStreamReasonOk
- 0: Local video is in normal state.
- localVideoStreamReasonFailure
- 1: Unknown error.
- localVideoStreamReasonDeviceNoPermission
- 2: No permission to start the local video capture device. Prompt the user to enable device permissions and rejoin the channel.
- localVideoStreamReasonDeviceBusy
- 3: The local video capture device is currently in use. Prompt the user to check if the camera is occupied by another app or try rejoining the channel.
- localVideoStreamReasonCaptureFailure
- 4: Failed to capture local video. 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.
- localVideoStreamReasonCodecNotSupport
- 5: Failed to encode local video.
- localVideoStreamReasonCaptureInbackground
- 6: (iOS only) The app is in the background. Prompt the user that video capture cannot function properly while the app is in the background.
- localVideoStreamReasonCaptureMultipleForegroundApps
- 7: (iOS only) The current 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 function properly under these conditions.
- localVideoStreamReasonDeviceNotFound
- 8: Local video capture device not found. Check if the camera is properly connected and functioning, or try rejoining the channel.
- localVideoStreamReasonDeviceDisconnected
- 9: (macOS and Windows only) The video capture device in use has been disconnected (e.g., unplugged).
- localVideoStreamReasonDeviceInvalidId
- 10: (macOS and Windows only) The SDK cannot find the video device in the device list. Check if the video device ID is valid.
- localVideoStreamReasonScreenCaptureWindowMinimized
- 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.
- localVideoStreamReasonScreenCaptureWindowClosed
- 12: (macOS and Windows only) The window shared by window ID has been closed, or a fullscreen window shared by ID has exited fullscreen. After exiting fullscreen, remote users will not see the shared window. To avoid black screens, it is recommended to end the sharing session 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 code.
- The local user views a web video or document in fullscreen, then shares it. When exiting fullscreen, the SDK reports this error code.
- localVideoStreamReasonScreenCaptureWindowOccluded
- 13: (Windows only) The window to be shared is occluded by another window. The occluded part will appear black in the shared content.
- localVideoStreamReasonDeviceInterrupt
- 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 sent to the background. Use a foreground service notification to ensure video capture continues in the background.
- localVideoStreamReasonDeviceFatalError
- 15: (Android only) Video capture device error. Prompt the user to turn the camera off and on again. If the issue persists, check for hardware failure.
- localVideoStreamReasonScreenCaptureFailure
- 21: (Windows and Android only) No data from the currently captured window.
- localVideoStreamReasonScreenCaptureNoPermission
- 22: (Windows and macOS only) No permission to capture the screen.
- localVideoStreamReasonScreenCaptureAutoFallback
- 24: (Windows only) An unexpected error occurred during screen sharing (possibly due to failure to block a window), causing the screen sharing strategy to fall back. The sharing process itself is not affected.
Note: During screen sharing, if the SDK fails to block a specific window due to driver or hardware issues, it will report this event and automatically fall back to sharing the entire screen. If your use case requires blocking specific windows for privacy, listen for this event and implement additional privacy protections when triggered.
- localVideoStreamReasonScreenCaptureWindowHidden
- 25: (Windows only) The window being captured is hidden and not visible on the current screen.
- localVideoStreamReasonScreenCaptureWindowRecoverFromHidden
- 26: (Windows only) The window being captured has recovered from a hidden state.
- localVideoStreamReasonScreenCaptureWindowRecoverFromMinimized
- 27: (macOS and Windows only) The window being captured has recovered from a minimized state.
- localVideoStreamReasonScreenCapturePaused
- 28: (Windows only) Screen capture is paused. Common scenario: the screen may have switched to a secure desktop, such as a UAC dialog or Winlogon desktop.
- localVideoStreamReasonScreenCaptureResumed
- 29: (Windows only) Screen capture has resumed from a paused state.
- localVideoStreamReasonScreenCaptureDisplayDisconnected
- 30: (Windows and macOS only) The display being captured has been disconnected. Prompt the user that screen sharing is paused and restart screen sharing.
- localVideoStreamReasonDeviceSystemPressure
- 101: The video capture device is unavailable due to excessive system pressure.