import type { ChannelMediaOptions } from 'shengwang-electron-sdk'; import { AgoraRtcMediaSourceIndex, AgoraRtcRegion, AgoraRtcStreamPublishPoolItem, AgoraRtcVideoEncoderConfiguration } from '../../../core/rtc/type'; import { AgoraRteDualVideoStreamConfig } from '../../../type'; export type AgoraElectronRtcClientInitConfig = { appId: string; region: AgoraRtcRegion; dualCameraVideoStreamConfig: AgoraRteDualVideoStreamConfig; dualScreenVideoStreamConfig: AgoraRteDualVideoStreamConfig; cloudProxy?: boolean; cloudProxyType?: number; options?: AgoraElectronRtcClientInitOptions; }; export type AgoraElectronRtcClientInitOptions = { logFilePath?: string; addonLogFilePath?: string; videoSourceLogFilePath?: string; videoSourceAddonLogFilePath?: string; logFileSize?: number; logLevel?: number; channelProfile?: number; audioProfile?: number; audioScenario?: number; domainLimit?: boolean; }; export type AgoraElectronRtcChannelClientInitConfig = { appId: string; dualCameraVideoStreamConfig: AgoraRteDualVideoStreamConfig; dualScreenVideoStreamConfig: AgoraRteDualVideoStreamConfig; options?: AgoraElectronRtcChannelClientInitOptions; }; export type AgoraElectronRtcChannelClientInitOptions = { videoSourceLogFilePath?: string; videoSourceAddonLogFilePath?: string; }; export type AgoraElectronRtcChannelPublisherInitConfig = { dualCameraVideoStreamConfig: AgoraRteDualVideoStreamConfig; dualScreenVideoStreamConfig: AgoraRteDualVideoStreamConfig; }; export declare enum AgoraElectronRtcDeviceStatusFlag { TESTING = 1, ON = 2 } export declare enum AgoraElectronSourceStatusMask { ERROR = -1, /** 设备关闭(无任何状态,位掩码 0 → 二进制 00) */ OFF = 0, /** 设备开始测试(第 0 位为 1,位掩码 1 → 二进制 01) */ TESTING = 1,// 等价于 1 /** 设备开启(第 1 位为 1,位掩码 2 → 二进制 10) */ ON = 2,// 等价于 2 /** 设备开启且开始测试(第 0 位 + 第 1 位,位掩码 3 → 二进制 11) */ ON_AND_TESTING = 3 } export declare enum AgoraElectronVideoOrientation { /** * 0: (Default) No rotation. */ VideoOrientation0 = 0, /** * 90: 90 degrees. */ VideoOrientation90 = 90, /** * 180: 180 degrees. */ VideoOrientation180 = 180, /** * 270: 270 degrees. */ VideoOrientation270 = 270 } export declare enum AgoraElectronScreenCaptureSourceType { /** * -1: Unknown type. */ ScreencapturesourcetypeUnknown = -1, /** * 0: The shared target is a window. */ ScreencapturesourcetypeWindow = 0, /** * 1: The shared target is a screen of a particular monitor. */ ScreencapturesourcetypeScreen = 1, /** * 2: Reserved parameter */ ScreencapturesourcetypeCustom = 2 } export declare enum AgoraElectronLocalAudioStreamState { /** * 0: The local audio is in the initial state. */ LocalAudioStreamStateStopped = 0, /** * 1: The local audio capturing device starts successfully. */ LocalAudioStreamStateRecording = 1, /** * 2: The first audio frame encodes successfully. */ LocalAudioStreamStateEncoding = 2, /** * 3: The local audio fails to start. */ LocalAudioStreamStateFailed = 3 } export declare enum AgoraElectronLocalVideoStreamState { /** * 0: The local video is in the initial state. */ LocalVideoStreamStateStopped = 0, /** * 1: The local video capturing device starts successfully. */ LocalVideoStreamStateCapturing = 1, /** * 2: The first video frame is successfully encoded. */ LocalVideoStreamStateEncoding = 2, /** * 3: Fails to start the local video. */ LocalVideoStreamStateFailed = 3 } /** * Reasons for local video state changes. */ export declare enum AgoraElectronLocalVideoStreamReason { /** * 0: The local video is normal. */ LocalVideoStreamReasonOk = 0, /** * 1: No specified reason for the local video failure. */ LocalVideoStreamReasonFailure = 1, /** * 2: No permission to use the local video capturing device. Prompt the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use CAMERA in the onPermissionError callback instead. */ LocalVideoStreamReasonDeviceNoPermission = 2, /** * 3: The local video capturing device is in use. Prompt the user to check if the camera is being used by another app, or try to rejoin the channel. */ LocalVideoStreamReasonDeviceBusy = 3, /** * 4: The local video capture fails. Prompt the user to check whether the video capture device is working properly, whether the camera is used by another app, or try to rejoin the channel. */ LocalVideoStreamReasonCaptureFailure = 4, /** * 5: The local video encoding fails. */ LocalVideoStreamReasonCodecNotSupport = 5, /** * @ignore */ LocalVideoStreamReasonCaptureInbackground = 6, /** * @ignore */ LocalVideoStreamReasonCaptureMultipleForegroundApps = 7, /** * 8: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel. */ LocalVideoStreamReasonDeviceNotFound = 8, /** * 9: The video capture device currently in use is disconnected (such as being unplugged). */ LocalVideoStreamReasonDeviceDisconnected = 9, /** * 10: The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid. */ LocalVideoStreamReasonDeviceInvalidId = 10, /** * @ignore */ LocalVideoStreamReasonDeviceInterrupt = 14, /** * @ignore */ LocalVideoStreamReasonDeviceFatalError = 15, /** * 101: The current video capture device is unavailable due to excessive system pressure. */ LocalVideoStreamReasonDeviceSystemPressure = 101, /** * 11: The shared window is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. Please prompt the user to unminimize the shared window. */ LocalVideoStreamReasonScreenCaptureWindowMinimized = 11, /** * 12: The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code: * The local user closes the shared window. * The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code. * The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code. */ LocalVideoStreamReasonScreenCaptureWindowClosed = 12, /** * 13: (Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing. */ LocalVideoStreamReasonScreenCaptureWindowOccluded = 13, /** * @ignore */ LocalVideoStreamReasonScreenCaptureWindowNotSupported = 20, /** * 21: (Windows and Android only) The currently captured window has no data. */ LocalVideoStreamReasonScreenCaptureFailure = 21, /** * 22: No permission for screen capture. */ LocalVideoStreamReasonScreenCaptureNoPermission = 22, /** * 24: (Windows only) An unexpected error occurred during screen sharing (possibly due to window blocking failure), resulting in decreased performance, but the screen sharing process itself was not affected. During screen sharing, if blocking a specific window fails due to device driver issues, the SDK will report this event and automatically fall back to sharing the entire screen. If your use case requires masking specific windows to protect privacy, we recommend listening for this event and implementing additional privacy protection mechanisms when it is triggered." */ LocalVideoStreamReasonScreenCaptureAutoFallback = 24, /** * 25: (Windows only) The window for the current screen capture is hidden and not visible on the current screen. */ LocalVideoStreamReasonScreenCaptureWindowHidden = 25, /** * 26: (Windows only) The window for screen capture has been restored from hidden state. */ LocalVideoStreamReasonScreenCaptureWindowRecoverFromHidden = 26, /** * 27: The window for screen capture has been restored from the minimized state. */ LocalVideoStreamReasonScreenCaptureWindowRecoverFromMinimized = 27, /** * 28: (Windows only) Screen capture has been paused. Common scenarios reporting this error code: The current screen may have been switched to a secure desktop, such as a UAC dialog box or Winlogon desktop. */ LocalVideoStreamReasonScreenCapturePaused = 28, /** * 29: (Windows only) Screen capture has resumed from paused state. */ LocalVideoStreamReasonScreenCaptureResumed = 29, /** * 30: The displayer used for screen capture is disconnected. The current screen sharing has been paused. Prompt the user to restart the screen sharing. */ LocalVideoStreamReasonScreenCaptureDisplayDisconnected = 30 } export declare enum MaskOperation { AddTesting = "ADD_TESTING", RemoveTesting = "REMOVE_TESTING", AddOn = "ADD_ON", RemoveOn = "REMOVE_ON", SetToError = "SET_TO_ERROR" } export interface AgoraRtcElectronStreamPublishPoolItem extends AgoraRtcStreamPublishPoolItem { mediaOptions: ChannelMediaOptions; videoStreamIndex: AgoraRtcMediaSourceIndex; } export { AgoraError as AgoraRtcError } from 'agora-foundation/lib/utilities/error/agora-error'; export declare enum ScreenCaptureType { SCREEN = "SCREEN", WINDOW = "WINDOW" } export type AgoraRtcDualVideoStreamConfig = { highVideoEncoderConfig: AgoraRtcVideoEncoderConfiguration; lowVideoEncoderConfig: AgoraRtcVideoEncoderConfiguration; }; export declare enum CaptureState { START = "start",// 开启捕获 STOP = "stop" }