import { EncodedVideoFrameInfo } from './AgoraBase'; /** * The type of the audio route. */ export declare enum AudioRoute { /** * -1: Default audio route. */ RouteDefault = -1, /** * 0: Audio output routing is a headset with microphone. */ RouteHeadset = 0, /** * 1: The audio route is an earpiece. */ RouteEarpiece = 1, /** * 2: The audio route is a headset without a microphone. */ RouteHeadsetnomic = 2, /** * 3: The audio route is the speaker that comes with the device. */ RouteSpeakerphone = 3, /** * 4: The audio route is an external speaker.(iOS only) */ RouteLoudspeaker = 4, /** * @ignore */ RouteHeadsetbluetooth = 5, /** * @ignore */ RouteUsb = 6, /** * @ignore */ RouteHdmi = 7, /** * @ignore */ RouteDisplayport = 8, /** * @ignore */ RouteAirplay = 9 } /** * @ignore */ export declare enum BytesPerSample { /** * @ignore */ TwoBytesPerSample = 2 } /** * @ignore */ export declare class AudioParameters { /** * @ignore */ sample_rate?: number; /** * @ignore */ channels?: number; /** * @ignore */ frames_per_buffer?: number; } /** * The use mode of the audio data. */ export declare enum RawAudioFrameOpModeType { /** * 0: Read-only mode, */ RawAudioFrameOpModeReadOnly = 0, /** * 2: Read and write mode, */ RawAudioFrameOpModeReadWrite = 2 } /** * Media source type. */ export declare enum MediaSourceType { /** * 0: Audio playback device. */ AudioPlayoutSource = 0, /** * 1: Audio capturing device. */ AudioRecordingSource = 1, /** * 2: The primary camera. */ PrimaryCameraSource = 2, /** * 3: The secondary camera. */ SecondaryCameraSource = 3, /** * @ignore */ PrimaryScreenSource = 4, /** * @ignore */ SecondaryScreenSource = 5, /** * @ignore */ CustomVideoSource = 6, /** * @ignore */ MediaPlayerSource = 7, /** * @ignore */ RtcImagePngSource = 8, /** * @ignore */ RtcImageJpegSource = 9, /** * @ignore */ RtcImageGifSource = 10, /** * @ignore */ RemoteVideoSource = 11, /** * @ignore */ TranscodedVideoSource = 12, /** * 100: Unknown media source. */ UnknownMediaSource = 100 } /** * @ignore */ export declare enum ContentInspectResult { /** * @ignore */ ContentInspectNeutral = 1, /** * @ignore */ ContentInspectSexy = 2, /** * @ignore */ ContentInspectPorn = 3 } /** * @ignore */ export declare enum ContentInspectType { /** * @ignore */ ContentInspectInvalid = 0, /** * @ignore */ ContentInspectModeration = 1, /** * @ignore */ ContentInspectSupervision = 2 } /** * @ignore */ export declare class ContentInspectModule { /** * @ignore */ type?: ContentInspectType; /** * @ignore */ interval?: number; } /** * @ignore */ export declare class ContentInspectConfig { /** * @ignore */ extraInfo?: string; /** * @ignore */ modules?: ContentInspectModule[]; /** * @ignore */ moduleCount?: number; } /** * @ignore */ export declare class PacketOptions { /** * @ignore */ timestamp?: number; /** * @ignore */ audioLevelIndication?: number; } /** * @ignore */ export declare class AudioEncodedFrameInfo { /** * @ignore */ sendTs?: number; /** * @ignore */ codec?: number; } /** * @ignore */ export declare class AudioPcmFrame { /** * @ignore */ capture_timestamp?: number; /** * @ignore */ samples_per_channel_?: number; /** * @ignore */ sample_rate_hz_?: number; /** * @ignore */ num_channels_?: number; /** * @ignore */ bytes_per_sample?: BytesPerSample; /** * @ignore */ data_?: number[]; } /** * The channel mode. */ export declare enum AudioDualMonoMode { /** * 0: Original mode. */ AudioDualMonoStereo = 0, /** * 1: Left channel mode. This mode replaces the audio of the right channel with the audio of the left channel, which means the user can only hear the audio of the left channel. */ AudioDualMonoL = 1, /** * 2: Right channel mode. This mode replaces the audio of the left channel with the audio of the right channel, which means the user can only hear the audio of the right channel. */ AudioDualMonoR = 2, /** * 3: Mixed channel mode. This mode mixes the audio of the left channel and the right channel, which means the user can hear the audio of the left channel and the right channel at the same time. */ AudioDualMonoMix = 3 } /** * @ignore */ export declare enum VideoPixelFormat { /** * @ignore */ VideoPixelDefault = 0, /** * @ignore */ VideoPixelI420 = 1, /** * @ignore */ VideoPixelBgra = 2, /** * @ignore */ VideoPixelNv21 = 3, /** * @ignore */ VideoPixelRgba = 4, /** * @ignore */ VideoPixelNv12 = 8, /** * @ignore */ VideoTexture2d = 10, /** * @ignore */ VideoTextureOes = 11, /** * @ignore */ VideoCvpixelNv12 = 12, /** * @ignore */ VideoCvpixelI420 = 13, /** * @ignore */ VideoCvpixelBgra = 14, /** * @ignore */ VideoPixelI422 = 16 } /** * Video display modes. */ export declare enum RenderModeType { /** * 1: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). The window is filled. One dimension of the video might have clipped contents. */ RenderModeHidden = 1, /** * 2: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Priority is to ensuring that all video content is displayed. Areas that are not filled due to disparity in the aspect ratio are filled with black. */ RenderModeFit = 2, /** * @ignore */ RenderModeAdaptive = 3 } /** * @ignore */ export declare enum EglContextType { /** * @ignore */ EglContext10 = 0, /** * @ignore */ EglContext14 = 1 } /** * The video buffer type. */ export declare enum VideoBufferType { /** * 1: The video buffer in the format of raw data. */ VideoBufferRawData = 1, /** * 2: The video buffer in the format of raw data. */ VideoBufferArray = 2, /** * 3: The video buffer in the format ofTexture. */ VideoBufferTexture = 3 } /** * @ignore */ export declare class ExternalVideoFrame { /** * @ignore */ type?: VideoBufferType; /** * @ignore */ format?: VideoPixelFormat; /** * @ignore */ buffer?: Uint8Array; /** * @ignore */ stride?: number; /** * @ignore */ height?: number; /** * @ignore */ cropLeft?: number; /** * @ignore */ cropTop?: number; /** * @ignore */ cropRight?: number; /** * @ignore */ cropBottom?: number; /** * @ignore */ rotation?: number; /** * @ignore */ timestamp?: number; /** * @ignore */ eglType?: EglContextType; /** * @ignore */ textureId?: number; /** * @ignore */ matrix?: number[]; /** * @ignore */ metadata_buffer?: Uint8Array; /** * @ignore */ metadata_size?: number; } /** * @ignore */ export declare class VideoFrame { /** * @ignore */ type?: VideoPixelFormat; /** * @ignore */ width?: number; /** * @ignore */ height?: number; /** * @ignore */ yStride?: number; /** * @ignore */ uStride?: number; /** * @ignore */ vStride?: number; /** * @ignore */ yBuffer?: Uint8Array; /** * @ignore */ uBuffer?: Uint8Array; /** * @ignore */ vBuffer?: Uint8Array; /** * @ignore */ rotation?: number; /** * @ignore */ renderTimeMs?: number; /** * @ignore */ avsync_type?: number; /** * @ignore */ metadata_buffer?: Uint8Array; /** * @ignore */ metadata_size?: number; /** * @ignore */ textureId?: number; /** * @ignore */ matrix?: number[]; /** * @ignore */ alphaBuffer?: Uint8Array; } /** * @ignore */ export declare enum MediaPlayerSourceType { /** * @ignore */ MediaPlayerSourceDefault = 0, /** * @ignore */ MediaPlayerSourceFullFeatured = 1, /** * @ignore */ MediaPlayerSourceSimple = 2 } /** * @ignore */ export declare enum VideoModulePosition { /** * @ignore */ PositionPostCapturer = 1, /** * @ignore */ PositionPreRenderer = 2, /** * @ignore */ PositionPreEncoder = 4, /** * @ignore */ PositionPostFilters = 8 } /** * Audio frame type. */ export declare enum AudioFrameType { /** * 0: PCM 16 */ FrameTypePcm16 = 0 } /** * @ignore */ export declare class AudioFrame { /** * @ignore */ type?: AudioFrameType; /** * @ignore */ samplesPerChannel?: number; /** * @ignore */ bytesPerSample?: BytesPerSample; /** * @ignore */ channels?: number; /** * @ignore */ samplesPerSec?: number; /** * @ignore */ buffer?: Uint8Array; /** * @ignore */ renderTimeMs?: number; /** * @ignore */ avsync_type?: number; } /** * @ignore */ export declare enum AudioFramePosition { /** * @ignore */ AudioFramePositionNone = 0, /** * @ignore */ AudioFramePositionPlayback = 1, /** * @ignore */ AudioFramePositionRecord = 2, /** * @ignore */ AudioFramePositionMixed = 4, /** * @ignore */ AudioFramePositionBeforeMixing = 8 } /** * @ignore */ export declare class AudioParams { /** * @ignore */ sample_rate?: number; /** * @ignore */ channels?: number; /** * @ignore */ mode?: RawAudioFrameOpModeType; /** * @ignore */ samples_per_call?: number; } /** * @ignore */ export interface IAudioFrameObserverBase { /** * @ignore */ onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean; /** * @ignore */ onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean; /** * @ignore */ onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean; } /** * @ignore */ export interface IAudioFrameObserver extends IAudioFrameObserverBase { /** * @ignore */ onPlaybackAudioFrameBeforeMixing?(channelId: string, uid: number, audioFrame: AudioFrame): boolean; } /** * @ignore */ export declare class AudioSpectrumData { /** * @ignore */ audioSpectrumData?: number[]; /** * @ignore */ dataLength?: number; } /** * Audio spectrum information of the remote user. */ export declare class UserAudioSpectrumInfo { /** * */ uid?: number; /** * @ignore */ spectrumData?: AudioSpectrumData; } /** * @ignore */ export interface IAudioSpectrumObserver { /** * @ignore */ onLocalAudioSpectrum?(data: AudioSpectrumData): boolean; /** * @ignore */ onRemoteAudioSpectrum?(spectrums: UserAudioSpectrumInfo[], spectrumNumber: number): boolean; } /** * @ignore */ export interface IVideoEncodedFrameObserver { /** * @ignore */ onEncodedVideoFrameReceived?(uid: number, imageBuffer: Uint8Array, length: number, videoEncodedFrameInfo: EncodedVideoFrameInfo): boolean; } /** * @ignore */ export declare enum VideoFrameProcessMode { /** * @ignore */ ProcessModeReadOnly = 0, /** * @ignore */ ProcessModeReadWrite = 1 } /** * @ignore */ export interface IVideoFrameObserver { /** * @ignore */ onCaptureVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onPreEncodeVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onSecondaryCameraCaptureVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onSecondaryPreEncodeCameraVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onScreenCaptureVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onPreEncodeScreenVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onMediaPlayerVideoFrame?(videoFrame: VideoFrame, mediaPlayerId: number): boolean; /** * @ignore */ onSecondaryScreenCaptureVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onSecondaryPreEncodeScreenVideoFrame?(videoFrame: VideoFrame): boolean; /** * @ignore */ onRenderVideoFrame?(channelId: string, remoteUid: number, videoFrame: VideoFrame): boolean; /** * @ignore */ onTranscodedVideoFrame?(videoFrame: VideoFrame): boolean; } /** * @ignore */ export declare enum ExternalVideoSourceType { /** * @ignore */ VideoFrame = 0, /** * @ignore */ EncodedVideoFrame = 1 } /** * @ignore */ export declare enum MediaRecorderContainerFormat { /** * @ignore */ FormatMp4 = 1 } /** * @ignore */ export declare enum MediaRecorderStreamType { /** * @ignore */ StreamTypeAudio = 1, /** * @ignore */ StreamTypeVideo = 2, /** * @ignore */ StreamTypeBoth = 3 } /** * @ignore */ export declare enum RecorderState { /** * @ignore */ RecorderStateError = -1, /** * @ignore */ RecorderStateStart = 2, /** * @ignore */ RecorderStateStop = 3 } /** * @ignore */ export declare enum RecorderErrorCode { /** * @ignore */ RecorderErrorNone = 0, /** * @ignore */ RecorderErrorWriteFailed = 1, /** * @ignore */ RecorderErrorNoStream = 2, /** * @ignore */ RecorderErrorOverMaxDuration = 3, /** * @ignore */ RecorderErrorConfigChanged = 4 } /** * @ignore */ export declare class MediaRecorderConfiguration { /** * @ignore */ storagePath?: string; /** * @ignore */ containerFormat?: MediaRecorderContainerFormat; /** * @ignore */ streamType?: MediaRecorderStreamType; /** * @ignore */ maxDurationMs?: number; /** * @ignore */ recorderInfoUpdateInterval?: number; } /** * @ignore */ export declare class RecorderInfo { /** * @ignore */ fileName?: string; /** * @ignore */ durationMs?: number; /** * @ignore */ fileSize?: number; } /** * @ignore */ export interface IMediaRecorderObserver { /** * @ignore */ onRecorderStateChanged?(state: RecorderState, error: RecorderErrorCode): void; /** * @ignore */ onRecorderInfoUpdated?(info: RecorderInfo): void; }