UNPKG

zego-express-engine-reactnative

Version:

React Native Zego Express Video for Android & iOS

1,011 lines 105 kB
import { ZegoAudioEffectPlayerListener, ZegoMediaPlayerListener, ZegoRealTimeSequentialDataEventHandler } from "./ZegoExpressEventHandler"; /** Room scenario. */ export declare enum ZegoScenario { /** [Deprecated] Legacy general scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible. */ General = 0, /** [Deprecated] Legacy communication scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible. */ Communication = 1, /** [Deprecated] Legacy live broadcast scenario, this scenario has been deprecated since version 3.0.0, and it is not recommended to use, please migrate to other new scenario as soon as possible. */ Live = 2, /** Available since: 3.0.0. Description: The default (generic) scenario. If none of the following scenarios conform to your actual application scenario, this default scenario can be used. */ Default = 3, /** Available since: 3.0.0. Description: Standard video call scenario, it is suitable for one-to-one video call scenarios. */ StandardVideoCall = 4, /** Available since: 3.0.0. Description: High quality video call scenario, it is similar to the standard video call scenario, but this scenario uses a higher video frame rate, bit rate, and resolution (540p) by default, which is suitable for video call scenario with high image quality requirements. */ HighQualityVideoCall = 5, /** Available since: 3.0.0. Description: Standard chatroom scenario, suitable for multi-person pure voice calls (low data usage). Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario. */ StandardChatroom = 6, /** Available since: 3.0.0. Description: High quality chatroom scenario, it is similar to the standard chatroom scenario, but this scenario uses a higher audio bit rate than the standard chatroom scenario by default. It is suitable for multi-person pure voice call scenarios with high requirements on sound quality. Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario. */ HighQualityChatroom = 7, /** Available since: 3.0.0. Description: Live broadcast scenario, it is suitable for one-to-many live broadcast scenarios such as shows, games, e-commerce, and large educational classes. The audio and video quality, fluency, and compatibility have been optimized. Note: Even in live broadcast scenarios, the SDK has no business "roles" (such as anchors and viewers), and all users in the room can publish and play streams. */ Broadcast = 8, /** Available since: 3.0.0. Description: Karaoke (KTV) scenario, it is suitable for real-time chorus and online karaoke scenarios, and has optimized delay, sound quality, ear return, echo cancellation, etc., and also ensures accurate alignment and ultra-low delay when multiple people chorus. */ Karaoke = 9, /** Available since: 3.3.0. Description: Standard voice call scenario, it is suitable for one-to-one video or voice call scenarios. Note: On the ExpressVideo SDK, the camera is not enabled by default in this scenario. */ StandardVoiceCall = 10 } /** Room mode. */ export declare enum ZegoRoomMode { /** Single room mode. */ SingleRoom = 0, /** Multiple room mode. */ MultiRoom = 1 } /** engine state. */ export declare enum ZegoEngineState { /** The engine has started */ Start = 0, /** The engine has stoped */ Stop = 1 } /** Room state. */ export declare enum ZegoRoomState { /** Unconnected state, enter this state before logging in and after exiting the room. If there is a steady state abnormality in the process of logging in to the room, such as AppID or Token are incorrect, or if the same user name is logged in elsewhere and the local end is KickOut, it will enter this state. */ Disconnected = 0, /** The state that the connection is being requested. It will enter this state after successful execution login room function. The display of the UI is usually performed using this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting connection status. */ Connecting = 1, /** The status that is successfully connected. Entering this status indicates that the login to the room has been successful. The user can receive the callback notification of the user and the stream information in the room. */ Connected = 2 } /** Room state change reason. */ export declare enum ZegoRoomStateChangedReason { /** Logging in to the room. When calling [loginRoom] to log in to the room or [switchRoom] to switch to the target room, it will enter this state, indicating that it is requesting to connect to the server. The application interface is usually displayed through this state. */ Logining = 0, /** Log in to the room successfully. When the room is successfully logged in or switched, it will enter this state, indicating that the login to the room has been successful, and users can normally receive callback notifications of other users in the room and all stream information additions and deletions. */ Logined = 1, /** Failed to log in to the room. When the login or switch room fails, it will enter this state, indicating that the login or switch room has failed, for example, AppID or Token is incorrect, etc. */ LoginFailed = 2, /** The room connection is temporarily interrupted. If the interruption occurs due to poor network quality, the SDK will retry internally. */ Reconnecting = 3, /** The room is successfully reconnected. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after successful reconnection. */ Reconnected = 4, /** The room fails to reconnect. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after the reconnection fails. */ ReconnectFailed = 5, /** Kicked out of the room by the server. For example, if you log in to the room with the same user name in other places, and the local end is kicked out of the room, it will enter this state. */ KickOut = 6, /** Logout of the room is successful. It is in this state by default before logging into the room. When calling [logoutRoom] to log out of the room successfully or [switchRoom] to log out of the current room successfully, it will enter this state. */ Logout = 7, /** Failed to log out of the room. Enter this state when calling [logoutRoom] fails to log out of the room or [switchRoom] fails to log out of the current room internally. */ LogoutFailed = 8 } /** Publish channel. */ export declare enum ZegoPublishChannel { /** The main (default/first) publish channel. */ Main = 0, /** The auxiliary (second) publish channel */ Aux = 1, /** The third publish channel */ Third = 2, /** The fourth publish channel */ Fourth = 3 } /** Video rendering fill mode. */ export declare enum ZegoViewMode { /** The proportional scaling up, there may be black borders */ AspectFit = 0, /** The proportional zoom fills the entire View and may be partially cut */ AspectFill = 1, /** Fill the entire view, the image may be stretched */ ScaleToFill = 2 } /** Mirror mode for previewing or playing the of the stream. */ export declare enum ZegoVideoMirrorMode { /** The mirror image only for previewing locally. This mode is used by default. When the mobile terminal uses a rear camera, this mode is still used by default, but it does not work. Local preview does not set mirroring. */ OnlyPreviewMirror = 0, /** Both the video previewed locally and the far end playing the stream will see mirror image. */ BothMirror = 1, /** Both the video previewed locally and the far end playing the stream will not see mirror image. */ NoMirror = 2, /** The mirror image only for far end playing the stream. */ OnlyPublishMirror = 3 } /** Publish stream status. */ export declare enum ZegoPublisherState { /** The state is not published, and it is in this state before publishing the stream. If a steady-state exception occurs in the publish process, such as AppID or Token are incorrect, or if other users are already publishing the stream, there will be a failure and enter this state. */ NoPublish = 0, /** The state that it is requesting to publish the stream after the [startPublishingStream] function is successfully called. The UI is usually displayed through this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state. */ PublishRequesting = 1, /** The state that the stream is being published, entering the state indicates that the stream has been successfully published, and the user can communicate normally. */ Publishing = 2 } /** Voice changer preset value. */ export declare enum ZegoVoiceChangerPreset { /** No Voice changer */ None = 0, /** Male to child voice (loli voice effect) */ MenToChild = 1, /** Male to female voice (kindergarten voice effect) */ MenToWomen = 2, /** Female to child voice */ WomenToChild = 3, /** Female to male voice */ WomenToMen = 4, /** Foreigner voice effect */ Foreigner = 5, /** Autobot Optimus Prime voice effect */ OptimusPrime = 6, /** Android robot voice effect */ Android = 7, /** Ethereal voice effect */ Ethereal = 8, /** Magnetic(Male) voice effect */ MaleMagnetic = 9, /** Fresh(Female) voice effect */ FemaleFresh = 10, /** Electronic effects in C major voice effect */ MajorC = 11, /** Electronic effects in A minor voice effect */ MinorA = 12, /** Electronic effects in harmonic minor voice effect */ HarmonicMinor = 13, /** Female Vitality Sound effect */ FemaleEnergetic = 14, /** Richness effect */ RichNess = 15, /** Muffled effect */ Muffled = 16, /** Roundness effect */ Roundness = 17, /** Falsetto effect */ Falsetto = 18, /** Fullness effect */ Fullness = 19, /** Clear effect */ Clear = 20, /** Hight effect */ HighlyResonant = 21, /** Loud clear effect */ LoudClear = 22, /** Minions effect */ Minions = 23, /** Sunshine effect */ Sunshine = 24, /** Gentle effect */ Gentle = 25, /** Sweet effect */ Sweet = 26, /** Sweet male effect */ SweetMale = 27, /** Sweet female effec */ SweetFemale = 28, /** Bright effect */ Bright = 29, /** Autobot effect */ Autobot = 30, /** Out of power effect */ OutOfPower = 31 } /** Reverberation preset value. */ export declare enum ZegoReverbPreset { /** No Reverberation */ None = 0, /** Soft room reverb effect */ SoftRoom = 1, /** Large room reverb effect */ LargeRoom = 2, /** Concert hall reverb effect */ ConcertHall = 3, /** Valley reverb effect */ Valley = 4, /** Recording studio reverb effect */ RecordingStudio = 5, /** Basement reverb effect */ Basement = 6, /** KTV reverb effect */ KTV = 7, /** Popular reverb effect */ Popular = 8, /** Rock reverb effect */ Rock = 9, /** Vocal concert reverb effect */ VocalConcert = 10, /** Gramophone reverb effect */ GramoPhone = 11, /** Enhanced KTV reverb effect. Provide KTV effect with more concentrated voice and better brightness. Compared with the original KTV reverb effect, the reverberation time is shortened and the dry-wet ratio is increased. */ EnhancedKTV = 12, /** Enhanced Rock reverb effect */ EnhancedRock = 13, /** Enhanced misty reverb effect */ EnhancedMisty = 14, /** Hip Hop reverb effect */ HipHop = 15, /** Misty reverb effect */ Misty = 16, /** 3D voice reverb effect */ ThreeDimensionalVoice = 17 } /** Mode of Electronic Effects. */ export declare enum ZegoElectronicEffectsMode { /** Major */ Major = 0, /** Minor */ Minor = 1, /** Harmonic Minor */ HarmonicMinor = 2 } /** Video configuration resolution and bitrate preset enumeration. The preset resolutions are adapted for mobile and desktop. On mobile, height is longer than width, and desktop is the opposite. For example, 1080p is actually 1080(w) x 1920(h) on mobile and 1920(w) x 1080(h) on desktop. */ export declare enum ZegoVideoConfigPreset { /** Set the resolution to 320x180, the default is 15 fps, the code rate is 300 kbps */ Preset180P = 0, /** Set the resolution to 480x270, the default is 15 fps, the code rate is 400 kbps */ Preset270P = 1, /** Set the resolution to 640x360, the default is 15 fps, the code rate is 600 kbps */ Preset360P = 2, /** Set the resolution to 960x540, the default is 15 fps, the code rate is 1200 kbps */ Preset540P = 3, /** Set the resolution to 1280x720, the default is 15 fps, the code rate is 1500 kbps */ Preset720P = 4, /** Set the resolution to 1920x1080, the default is 15 fps, the code rate is 3000 kbps */ Preset1080P = 5 } /** Stream quality level. */ export declare enum ZegoStreamQualityLevel { /** Excellent */ Excellent = 0, /** Good */ Good = 1, /** Normal */ Medium = 2, /** Bad */ Bad = 3, /** Failed */ Die = 4, /** Unknown */ Unknown = 5 } /** Audio channel type. */ export declare enum ZegoAudioChannel { /** Unknown */ Unknown = 0, /** Mono */ Mono = 1, /** Stereo */ Stereo = 2 } /** Audio codec ID. */ export declare enum ZegoAudioCodecID { /** Default, determined by the [scenario] when calling [createEngine]. */ Default = 0, /** Can be used for RTC and CDN streaming; bitrate range from 10kbps to 128kbps; supports stereo; latency is around 500ms. Server cloud transcoding is required when communicating with the Web SDK, and it is not required when relaying to CDN. */ Normal = 1, /** Can be used for RTC and CDN streaming; good compatibility; bitrate range from 16kbps to 192kbps; supports stereo; latency is around 350ms; the sound quality is worse than [Normal] in the same (low) bitrate. Server cloud transcoding is required when communicating with the Web SDK, and it is not required when relaying to CDN. */ Normal2 = 2, /** Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming. */ Normal3 = 3, /** Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming. */ Low = 4, /** Not recommended; if you need to use it, please contact ZEGO technical support. Can only be used for RTC streaming; maximum bitrate is 16kbps. */ Low2 = 5, /** Can only be used for RTC streaming; bitrate range from 6kbps to 192kbps; supports stereo; latency is around 200ms; Under the same bitrate (low bitrate), the sound quality is significantly better than [Normal] and [Normal2]; low CPU overhead. Server cloud transcoding is not required when communicating with the Web SDK, and it is required when relaying to CDN. */ Low3 = 6 } /** Video codec ID. */ export declare enum ZegoVideoCodecID { /** Default (H.264) */ Default = 0, /** Scalable Video Coding (H.264 SVC) */ Svc = 1, /** VP8 */ Vp8 = 2, /** H.265 */ H265 = 3, /** Dualstream Scalable Video Coding */ H264DualStream = 4, /** Unknown Video Coding */ Unknown = 100 } /** Video screen rotation direction. */ export declare enum ZegoOrientation { /** Not rotate */ PortraitUp = 0, /** Rotate 90 degrees counterclockwise */ LandscapeLeft = 1, /** Rotate 180 degrees counterclockwise */ PortraitDown = 2, /** Rotate 270 degrees counterclockwise */ LandscapeRight = 3 } /** Video stream type */ export declare enum ZegoVideoStreamType { /** The type to be played depends on the network status */ Default = 0, /** small resolution type */ Small = 1, /** big resolution type */ Big = 2 } /** Audio echo cancellation mode. */ export declare enum ZegoAECMode { /** Aggressive echo cancellation may affect the sound quality slightly, but the echo will be very clean. */ Aggressive = 0, /** Moderate echo cancellation, which may slightly affect a little bit of sound, but the residual echo will be less. */ Medium = 1, /** Comfortable echo cancellation, that is, echo cancellation does not affect the sound quality of the sound, and sometimes there may be a little echo, but it will not affect the normal listening. */ Soft = 2, /** AI echo cancellation. Supports intelligent recognition and elimination of echo, with a significant improvement in vocal fidelity compared to traditional AEC algorithms, without additional delay or power consumption increase. */ AI = 3 } /** Active Noise Suppression mode. */ export declare enum ZegoANSMode { /** Soft ANS. In most instances, the sound quality will not be damaged, but some noise will remain. */ Soft = 0, /** Medium ANS. It may damage some sound quality, but it has a good noise reduction effect. */ Medium = 1, /** Aggressive ANS. It may significantly impair the sound quality, but it has a good noise reduction effect. */ Aggressive = 2, /** AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use. */ AI = 3, /** Balanced AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use. */ AIBalanced = 4, /** Low latency AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use. */ AILowLatency = 5, /** Aggressive AI mode ANS. It will cause great damage to music, so it can not be used for noise suppression of sound sources that need to collect background sound. Please contact ZEGO technical support before use. */ AIAggressive = 6 } /** Traffic control property (bitmask enumeration). */ export declare enum ZegoTrafficControlProperty { /** Basic (Adaptive (reduce) video bitrate) */ Basic = 0, /** Adaptive (reduce) video FPS */ AdaptiveFPS = 1, /** Adaptive (reduce) video resolution */ AdaptiveResolution = 2, /** Adaptive (reduce) audio bitrate */ AdaptiveAudioBitrate = 4 } /** Video transmission mode when current bitrate is lower than the set minimum bitrate. */ export declare enum ZegoTrafficControlMinVideoBitrateMode { /** Stop video transmission when current bitrate is lower than the set minimum bitrate */ NoVideo = 0, /** Video is sent at a very low frequency (no more than 2fps) which is lower than the set minimum bitrate */ UltraLowFPS = 1 } /** Playing stream status. */ export declare enum ZegoPlayerState { /** The state of the flow is not played, and it is in this state before the stream is played. If the steady flow anomaly occurs during the playing process, such as AppID or Token are incorrect, it will enter this state. */ NoPlay = 0, /** The state that the stream is being requested for playing. After the [startPlayingStream] function is successfully called, it will enter the state. The UI is usually displayed through this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state. */ PlayRequesting = 1, /** The state that the stream is being playing, entering the state indicates that the stream has been successfully played, and the user can communicate normally. */ Playing = 2 } /** Media event when playing. */ export declare enum ZegoPlayerMediaEvent { /** Audio stuck event when playing */ AudioBreakOccur = 0, /** Audio stuck event recovery when playing */ AudioBreakResume = 1, /** Video stuck event when playing */ VideoBreakOccur = 2, /** Video stuck event recovery when playing */ VideoBreakResume = 3 } /** Stream Resource Mode */ export declare enum ZegoStreamResourceMode { /** Default mode. The SDK will automatically select the streaming resource according to the cdnConfig parameters set by the player config and the ready-made background configuration. */ Default = 0, /** Playing stream only from CDN. */ OnlyCDN = 1, /** Playing stream only from L3. */ OnlyL3 = 2, /** Playing stream only from RTC. */ OnlyRTC = 3, /** [Deprecated] CDN Plus mode. The SDK will automatically select the streaming resource according to the network condition. */ CDNPlus = 4, /** Custom mode. The SDK selects the streaming resource based on the customResourceConfig parameter of the streaming settings. */ Custom = 5 } /** Stream Switch Resource Mode */ export declare enum ZegoStreamResourceSwitchMode { /** Default mode. The SDK will automatically select the streaming resource according to the parameters set by the player config and the ready-made background configuration. */ Default = 0, /** Auto switch to RTC resource when publishing. */ SwitchToRTC = 1, /** Keep using original resource when publishing, not switch to RTC resource. */ KeepOriginal = 2 } /** Stream Resource Type */ export declare enum ZegoStreamResourceType { /** Default mode. The SDK will automatically select the streaming resource according to the parameters set by the player config and the ready-made background configuration. */ Default = 0, /** CDN resource. */ CDN = 1, /** L3 resource. */ L3 = 2 } /** Update type. */ export declare enum ZegoUpdateType { /** Add */ Add = 0, /** Delete */ Delete = 1 } /** State of CDN relay. */ export declare enum ZegoStreamRelayCDNState { /** The state indicates that there is no CDN relay */ NoRelay = 0, /** The CDN relay is being requested */ RelayRequesting = 1, /** Entering this status indicates that the CDN relay has been successful */ Relaying = 2 } /** Reason for state of CDN relay changed. */ export declare enum ZegoStreamRelayCDNUpdateReason { /** No error */ None = 0, /** Server error */ ServerError = 1, /** Handshake error */ HandshakeFailed = 2, /** Access point error */ AccessPointError = 3, /** Stream create failure */ CreateStreamFailed = 4, /** Bad stream ID */ BadName = 5, /** CDN server actively disconnected */ CDNServerDisconnected = 6, /** Active disconnect */ Disconnected = 7, /** All mixer input streams sessions closed */ MixStreamAllInputStreamClosed = 8, /** All mixer input streams have no data */ MixStreamAllInputStreamNoData = 9, /** Internal error of stream mixer server */ MixStreamServerInternalError = 10 } /** Device type. */ export declare enum ZegoDeviceType { /** Unknown device type. */ Unknown = 0, /** Camera device. */ Camera = 1, /** Microphone device. */ Microphone = 2, /** Speaker device. */ Speaker = 3, /** Audio device. (Other audio device that cannot be accurately classified into microphones or speakers.) */ AudioDevice = 4, /** Audio Session. */ AudioSession = 5 } /** The exception type for the device. */ export declare enum ZegoDeviceExceptionType { /** Unknown device exception. */ Unknown = 0, /** Generic device exception. */ Generic = 1, /** Invalid device ID exception. */ InvalidId = 2, /** Device permission is not granted. */ PermissionNotGranted = 3, /** The capture frame rate of the device is 0. */ ZeroCaptureFps = 4, /** The device is being occupied. */ DeviceOccupied = 5, /** The device is unplugged (not plugged in). */ DeviceUnplugged = 6, /** The device requires the system to restart before it can work (Windows platform only). */ RebootRequired = 7, /** The system media service is unavailable, e.g. when the iOS system detects that the current pressure is huge (such as playing a lot of animation), it is possible to disable all media related services (Apple platform only). */ MediaServicesWereLost = 8, /** The device is being occupied by Siri (Apple platform only). */ SiriIsRecording = 9, /** The device captured sound level is too low (Windows platform only). */ SoundLevelTooLow = 10, /** The device is being occupied, and maybe cause by iPad magnetic case (Apple platform only). */ MagneticCase = 11, /** Audio session deactive (Apple platform only). */ AudioSessionDeactive = 12, /** Audio session category change (Apple platform only). */ AudioSessionCategoryChange = 13 } /** Remote device status. */ export declare enum ZegoRemoteDeviceState { /** Device on */ Open = 0, /** General device error */ GenericError = 1, /** Invalid device ID */ InvalidID = 2, /** No permission */ NoAuthorization = 3, /** Captured frame rate is 0 */ ZeroFPS = 4, /** The device is occupied */ InUseByOther = 5, /** The device is not plugged in or unplugged */ Unplugged = 6, /** The system needs to be restarted */ RebootRequired = 7, /** System media services stop, such as under the iOS platform, when the system detects that the current pressure is huge (such as playing a lot of animation), it is possible to disable all media related services. */ SystemMediaServicesLost = 8, /** The remote user calls [enableCamera] or [enableAudioCaptureDevice] to disable the camera or microphone. */ Disable = 9, /** The remote user actively calls [muteMicrophone] or [mutePublishStreamAudio] or [mutePublishStreamVideo] to stop publish the audio or video stream. */ Mute = 10, /** The device is interrupted, such as a phone call interruption, etc. */ Interruption = 11, /** There are multiple apps at the same time in the foreground, such as the iPad app split screen, the system will prohibit all apps from using the camera. */ InBackground = 12, /** CDN server actively disconnected */ MultiForegroundApp = 13, /** The system is under high load pressure and may cause abnormal equipment. */ BySystemPressure = 14, /** The remote device is not supported to publish the device state. */ NotSupport = 15 } /** Audio route */ export declare enum ZegoAudioRoute { /** Speaker */ Speaker = 0, /** Headphone */ Headphone = 1, /** Bluetooth device */ Bluetooth = 2, /** Receiver */ Receiver = 3, /** External USB audio device */ ExternalUSB = 4, /** Apple AirPlay */ AirPlay = 5 } /** Mix stream content type. */ export declare enum ZegoMixerInputContentType { /** Mix stream for audio only */ Audio = 0, /** Mix stream for both audio and video */ Video = 1, /** Mix stream for video only. On web platforms, this property does not take effect */ VideoOnly = 2 } /** Video frame buffer type. */ export declare enum ZegoVideoBufferType { /** Raw data type video frame */ Unknown = 0, /** Raw data type video frame */ RawData = 1, /** Encoded data type video frame */ EncodedData = 2, /** Texture 2D type video frame */ GLTexture2D = 3, /** CVPixelBuffer type video frame */ CVPixelBuffer = 4, /** Surface Texture type video frame */ SurfaceTexture = 5, /** GL_TEXTURE_EXTERNAL_OES type video frame */ GLTextureExternalOES = 6, /** Texture 2D and raw data type video frame */ GLTexture2DAndRawData = 7, /** D3D Texture2D type video frame */ D3DTexture2D = 8, /** CVPixelBuffer type nv12 format video frame. Only for custom video processing */ NV12CVPixelBuffer = 9 } /** Audio Config Preset. */ export declare enum ZegoAudioConfigPreset { /** Basic sound quality (16 kbps, Mono, ZegoAudioCodecIDDefault) */ BasicQuality = 0, /** Standard sound quality (48 kbps, Mono, ZegoAudioCodecIDDefault) */ StandardQuality = 1, /** Standard sound quality (56 kbps, Stereo, ZegoAudioCodecIDDefault) */ StandardQualityStereo = 2, /** High sound quality (128 kbps, Mono, ZegoAudioCodecIDDefault) */ HighQuality = 3, /** High sound quality (192 kbps, Stereo, ZegoAudioCodecIDDefault) */ HighQualityStereo = 4 } /** Player state. */ export declare enum ZegoMediaPlayerState { /** Not playing */ NoPlay = 0, /** Playing */ Playing = 1, /** Pausing */ Pausing = 2, /** End of play */ PlayEnded = 3 } /** Player network event. */ export declare enum ZegoMediaPlayerNetworkEvent { /** Network resources are not playing well, and start trying to cache data */ BufferBegin = 0, /** Network resources can be played smoothly */ BufferEnded = 1 } /** AudioEffectPlayer state. */ export declare enum ZegoAudioEffectPlayState { /** Not playing */ NoPlay = 0, /** Playing */ Playing = 1, /** Pausing */ Pausing = 2, /** End of play */ PlayEnded = 3 } /** audio sample rate. */ export declare enum ZegoAudioSampleRate { /** Unknown */ Unknown = 0, /** 8K */ SampleRate8K = 8000, /** 16K */ SampleRate16K = 16000, /** 22.05K */ SampleRate22K = 22050, /** 24K */ SampleRate24K = 24000, /** 32K */ SampleRate32K = 32000, /** 44.1K */ SampleRate44K = 44100, /** 48K */ SampleRate48K = 48000 } /** Audio capture source type. */ export declare enum ZegoAudioSourceType { /** Default audio capture source (the main channel uses custom audio capture by default; the aux channel uses the same sound as main channel by default). */ Default = 0, /** Use custom audio capture, refer to [enableCustomAudioIO] or [setAudioSource]. */ Custom = 1, /** Use media player as audio source, only support aux channel. */ MediaPlayer = 2, /** No audio source. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface. */ None = 3, /** Using microphone as audio source. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface. */ Microphone = 4, /** Using main channel as audio source. Ineffective when used in main channel. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface. */ MainPublishChannel = 5, /** Using screen capture as audio source. Typically used in mobile screen sharing scenarios. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface. */ ScreenCapture = 6 } /** Record type. */ export declare enum ZegoDataRecordType { /** This field indicates that the Express-Audio SDK records audio by default, and the Express-Video SDK records audio and video by default. When recording files in .aac format, audio is also recorded by default. */ Default = 0, /** only record audio */ OnlyAudio = 1, /** only record video, Audio SDK and recording .aac format files are invalid. */ OnlyVideo = 2, /** record audio and video. Express-Audio SDK and .aac format files are recorded only audio. */ AudioAndVideo = 3 } /** Record state. */ export declare enum ZegoDataRecordState { /** Unrecorded state, which is the state when a recording error occurs or before recording starts. */ NoRecord = 0, /** Recording in progress, in this state after successfully call [startRecordingCapturedData] function */ Recording = 1, /** Record successs */ Success = 2 } /** Network mode */ export declare enum ZegoNetworkMode { /** Offline (No network) */ Offline = 0, /** Unknown network mode */ Unknown = 1, /** Wired Ethernet (LAN) */ Ethernet = 2, /** Wi-Fi (WLAN) */ WiFi = 3, /** 2G Network (GPRS/EDGE/CDMA1x/etc.) */ Mode2G = 4, /** 3G Network (WCDMA/HSDPA/EVDO/etc.) */ Mode3G = 5, /** 4G Network (LTE) */ Mode4G = 6, /** 5G Network (NR (NSA/SA)) */ Mode5G = 7 } /** network speed test type */ export declare enum ZegoNetworkSpeedTestType { /** uplink */ Uplink = 0, /** downlink */ Downlink = 1 } /** Publish or play stream event */ export declare enum ZegoStreamEvent { /** Start publishing stream */ PublishStart = 100, /** The first publish stream was successful */ PublishSuccess = 101, /** Failed to publish stream for the first time */ PublishFail = 102, /** Start retrying publishing stream */ RetryPublishStart = 103, /** Retry publishing stream successfully */ RetryPublishSuccess = 104, /** Failed to retry publishing stream */ RetryPublishFail = 105, /** End of publishing stream */ PublishEnd = 106, /** Start playing stream */ PlayStart = 200, /** The first play stream was successful */ PlaySuccess = 201, /** Failed to play stream for the first time */ PlayFail = 202, /** Start retrying playing stream */ RetryPlayStart = 203, /** Retry playing stream successfully */ RetryPlaySuccess = 204, /** Failed to retry playing stream */ RetryPlayFail = 205, /** End of playing stream */ PlayEnd = 206 } /** video capture source. */ export declare enum ZegoVideoSourceType { /** No capture, i.e. no video data. */ None = 1, /** The video source comes from the camera (main channel default, and front camera is captured by default). The default is front camera, which can be adjusted to rear via [useFrontCamera]. */ Camera = 2, /** Video source from custom capture. */ Custom = 3, /** Video source from the main publish channel. When publishing the main channel, this value cannot be set. */ MainPublishChannel = 4, /** Video source from media player. */ Player = 5, /** Video source from screen capture. */ ScreenCapture = 6, /** Video source from secondary camera, the rear camera when [useFrontCamera] is set to true, otherwise the front camera, only support iOS. */ SecondaryCamera = 14 } /** Screen capture source exception type. (only for Android) */ export declare enum ZegoScreenCaptureExceptionType { /** Unknown exception type. */ Unknown = 0, /** The video capture system version does not support it, and Android only supports 5.0 and above. */ VideoNotSupported = 1, /** The capture target fails, such as the monitor is unplugged and the window is closed. */ AudioNotSupported = 2, /** Audio recording object creation failed. Possible reasons: 1. The audio recording permission is not enabled; 2. The allocated memory for audio recording is insufficient; 3. The creation of AudioRecord fails. */ AudioCreateFailed = 3, /** MediaProjection request for dynamic permissions was denied. */ MediaProjectionPermissionDenied = 4, /** Capture is not started. Need to start capturing with [startScreenCapture] first. */ NotStartCapture = 5, /** Screen capture has already started, repeated calls failed. You need to stop the capture with [stopScreenCapture] first. */ AlreadyStarted = 6, /** Failed to start the foreground service. */ ForegroundServiceFailed = 7, /** Before starting screen capture, you need to call [setVideoSource], [setAudioSource] to specify the video and audio source `ScreenCapture`. */ SourceNotSpecified = 8, /** System error exception. For example, low memory, etc. */ SystemError = 9 } /** Multimedia load type. */ export declare enum ZegoMultimediaLoadType { /** Load by file path. */ FilePath = 0, /** Load by memory. */ Memory = 1, /** Load by copyrighted music resource ID. */ ResourceID = 2 } /** Alpha channel data layout. */ export declare enum ZegoAlphaLayoutType { /** There is no alpha data. */ None = 0, /** Alpha channel data is to the left of RGB/YUV data. */ Left = 1, /** Alpha channel data is to the right of RGB/YUV data. */ Right = 2, /** Alpha channel data is to the bottom of RGB/YUV data. */ Bottom = 3, /** Alpha channel data is to the upper right of RGB/YUV data. */ RightTop = 4 } /** Object segmentation type. */ export declare enum ZegoObjectSegmentationType { /** Any background object segmentation. */ AnyBackground = 0, /** Green screen background object segmentation. */ GreenScreenBackground = 1 } /** Object segmentation state. */ export declare enum ZegoObjectSegmentationState { /** Object segmentation turned off. */ Off = 0, /** Object segmentation turned on. */ On = 1 } /** Video background process type. */ export declare enum ZegoBackgroundProcessType { /** Background is transparent. */ Transparent = 0, /** Fill the background with a solid color. */ Color = 1, /** Blur background. */ Blur = 2, /** The background is the specified image. */ Image = 3, /** The background is the specified video. */ Video = 4 } /** Background blur level. */ export declare enum ZegoBackgroundBlurLevel { /** Background blur level low. */ Low = 0, /** Background blur level medium. */ Medium = 1, /** Background blur level high. */ High = 2 } /** * Log config. * * Description: This parameter is required when calling [setlogconfig] to customize log configuration. * Use cases: This configuration is required when you need to customize the log storage path or the maximum log file size. * Caution: None. */ export declare class ZegoLogConfig { /** The storage path of the log file. Description: Used to customize the storage path of the log file. Use cases: This configuration is required when you need to customize the log storage path. Required: False. Default value: The default path of each platform is different, please refer to the official website document https://docs.zegocloud.com/faq/express_sdkLog. Caution: Developers need to ensure read and write permissions for files under this path. */ logPath: string; /** Maximum log file size(Bytes). Description: Used to customize the maximum log file size. Use cases: This configuration is required when you need to customize the upper limit of the log file size. Required: False. Default value: 5MB (5 * 1024 * 1024 Bytes). Value range: Minimum 1MB (1 * 1024 * 1024 Bytes), maximum 100M (100 * 1024 * 1024 Bytes), 0 means no need to write logs. Caution: The larger the upper limit of the log file size, the more log information it carries, but the log upload time will be longer. */ logSize: number; /** Log files count. Default is 3. Value range is [3, 20]. */ logCount: number; constructor(); } /** * Custom video capture configuration. * * Custom video capture, that is, the developer is responsible for collecting video data and sending the collected video data to SDK for video data encoding and publishing to the ZEGO RTC server. This feature is generally used by developers who use third-party beauty features or record game screen living. * When you need to use the custom video capture function, you need to set an instance of this class as a parameter to the [enableCustomVideoCapture] function. * Because when using custom video capture, SDK will no longer start the camera to capture video data. You need to collect video data from video sources by yourself. */ export declare class ZegoCustomVideoCaptureConfig { /** Custom video capture video frame data type */ bufferType: ZegoVideoBufferType; constructor(bufferType: ZegoVideoBufferType); } /** * Custom video process configuration. */ export declare class ZegoCustomVideoProcessConfig { /** Custom video process video frame data type */ bufferType: ZegoVideoBufferType; constructor(bufferType: ZegoVideoBufferType); } /** * Custom audio configuration. */ export declare class ZegoCustomAudioConfig { /** Audio capture source type */ sourceType: ZegoAudioSourceType; constructor(sourceType: ZegoAudioSourceType); } /** * Profile for create engine * * Profile for create engine */ export declare class ZegoEngineProfile { /** Application ID issued by ZEGO for developers, please apply from the ZEGO Admin Console https://console.zegocloud.com The value ranges from 0 to 4294967295. */ appID: number; /** Application signature for each AppID, please apply from the ZEGO Admin Console. Application signature is a 64 character string. Each character has a range of '0' ~ '9', 'a' ~ 'z'. AppSign 2.17.0 and later allows null or no transmission. If the token is passed empty or not passed, the token must be entered in the [ZegoRoomConfig] parameter for authentication when the [loginRoom] interface is called to login to the room. */ appSign: string; /** The room scenario. the SDK will optimize the audio and video configuration for the specified scenario to achieve the best effect in this scenario. After specifying the scenario, you can call other APIs to adjusting the audio and video configuration. Differences between scenarios and how to choose a suitable scenario, please refer to https://docs.zegocloud.com/article/14940 */ scenario: ZegoScenario; constructor(appID: number, appSign: string, scenario: ZegoScenario); } /** * Advanced engine configuration. */ export declare class ZegoEngineConfig { /** @deprecated This property has been deprecated since version 2.3.0, please use the [setLogConfig] function instead. */ logConfig?: ZegoLogConfig; /** Other special function switches, if not set, no special function will be used by default. Please contact ZEGO technical support before use. */ advancedConfig?: Record<string, string>; constructor(); } /** * Advanced room configuration. * * Configure maximum number of users in the room and authentication token, etc. */ export declare class ZegoRoomConfig { /** The maximum number of users in the room, Passing 0 means unlimited, the default is unlimited. */ maxMemberCount: number; /** Whether to enable the user in and out of the room callback notification [onRoomUserUpdate], the default is off. If developers need to use ZEGO Room user notifications, make sure that each user who login sets this flag to true */ isUserStatusNotify: boolean; /** The token issued by the developer's business server is used to ensure security. For the generation rules, please refer to [Using Token Authentication](https://doc-zh.zego.im/article/10360), the default is an empty string, that is, no authentication. In versions 2.17.0 and above, if appSign is not passed in when calling the [createEngine] API to create an engine, or if appSign is empty, this parameter must be set for authentication when logging in to a room. */ token: string; constructor(maxMemberCount: number, isUserStatusNotify: boolean, token: string); } /** * Video config. * * Configure parameters used for publishing stream, such as bitrate, frame rate, and resolution. * Developers should note that the width and height resolution of the mobile and desktop are opposite. For example, 360p, the resolution of the mobile is 360x640, and the desktop is 640x360. * When using external capture, the capture and encoding resolution of RTC cannot be set to 0*0, otherwise, there will be no video data in the publishing stream in the entire engine life cycle. */ export declare class ZegoVideoConfig { /** Capture resolution width, control the width of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post] */ captureWidth: number; /** Capture resolution height, control the height of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post] */ captureHeight: number; /** Encode resolution width, control the image width of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective */ encodeWidth: number; /** Encode resolution height, control the image height of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective */ encodeHeight: number; /** Frame rate, control the frame rate of the camera and the frame rate of the encoder. Publishing stream set to 60 fps, playing stream to take effect need contact technical support */ fps: number; /** Bit rate in kbps. The settings before and after publishing stream can be effective. The SDK will automatically set the bit rate suitable for the scenario selected by the developer. If the bit rate manually set by the developer exceeds the reasonable range, the SDK will automatically process the bit rate according to the reasonable range. If you need to configure a high bit rate due to business needs, please contact ZEGO Business. */ bitrate: number; /** The codec id to be used, the default value is [default]. Settings only take effect before publishing stream */ codecID: ZegoVideoCodecID; /** Video keyframe interval, in seconds. Description: Required: No. Default value: 2 seconds. Value range: [2, 5]. Caution: The setting is only valid before pushing. */ keyFrameInterval?: number; /** * Create video configuration with preset enumeration values */ constructor(preset?: ZegoVideoConfigPreset); } /** * Voice changer parameter. * * Developer can use the built-in presets of the SDK to change the parameters of the voice changer. */ export declare class ZegoVoiceChangerParam { /** Pitch parameter, value range [-12.0, 12.0], the larger the value, the sharper the sound, set it to 0.0 to turn off. Note that on v2.18.0 and older version, the value range is [-8.0, 8.0]. */ pitch: number; constructor(pitch: number); } /** * Audio reverberation advanced parameters. * * Developers can use the SDK's built-in presets to change the parameters of the reverb. */ export declare class ZegoReverbAdvancedParam { /** Room size(%), in the range [0.0, 1.0], to control the size of the "room" in which the reverb is generated, the larger the room, the stronger the reverb. */ roomSize: number; /** Echo(%), in the range [0.0, 100.0], to control the trailing length of the reverb. */ reverberance: number; /** Reverb Damping(%), range [0.0, 100.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation. */ damping: number; /** only wet */ wetOnly: boolean; /** wet gain(dB), range [-20.0, 10.0] */ wetGain: number; /** dry gain(dB), range [-20.0, 10.0] */ dryGain: number; /** Tone Low. 100% by default */ toneLow: number; /** Tone High. 100% by default */ toneHigh: number; /** PreDelay(ms), range [0.0, 200.0] */ preDelay: number; /** Stereo Width(%). 0% by default */ stereoWidth: number; constructor(); } /** * Audio reverberation echo parameters. */ export declare class ZegoReverbEchoParam { /** Gain of input audio signal, in the range [0.0, 1.0] */ inGain: number; /** Gain of output audio signal, in the range [0.0, 1.0] */ outGain: number; /** Number of echos, in the range [0, 7] */ numDelays: number; /** Respective delay of echo signal, in milliseconds, in the range [0, 5000] ms */ delay: Uint16Array; /** Respective decay coefficient of echo signal, in the range [0.0, 1.0] */ decay: Float32Array; constructor(); } /** * User object. * * Configure user ID and username to identify users in the room. * Note that the userID must be unique under the same appID, otherwise, there will be mutual kicks when logging in to the room. * It is strongly recommended that userID corresponds to the user ID of the business APP, that is, a userID and a real user are fixed and unique, and should not be passed to the SDK in a random userID. Because the unique and fixed userID allows ZEGO technicians to quickly locate online problems. */ export declare class ZegoUser { /** User ID, a utf8 string with a maximum length of 64 bytes or less.Privacy reminder: Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.Caution: Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '\'. Do not use '%' if you need to communicate