From 103befd12ed42b2f77c04e876e582697d47be8c6 Mon Sep 17 00:00:00 2001 From: guoxianzhe Date: Fri, 27 Sep 2024 10:15:52 +0000 Subject: [PATCH] [AUTO] Generate codes by terra --- ts/Private/AgoraBase.ts | 137 ++++++++++++++- ts/Private/AgoraMediaBase.ts | 76 +++++++++ ts/Private/IAgoraMediaEngine.ts | 5 + ts/Private/IAgoraRtcEngine.ts | 88 +++++++++- ts/Private/IAgoraRtcEngineEx.ts | 44 ++++- ts/Private/impl/IAgoraMediaEngineImpl.ts | 12 ++ ts/Private/impl/IAgoraRtcEngineExImpl.ts | 99 ++++++++++- ts/Private/impl/IAgoraRtcEngineImpl.ts | 206 ++++++++++++++++++++++- ts/Private/ti/IAgoraRtcEngine-ti.ts | 2 +- 9 files changed, 652 insertions(+), 17 deletions(-) diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index 3e85bfb5f..4644071f7 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/AgoraBase.ts @@ -1,5 +1,6 @@ import './extension/AgoraBaseExtension'; import { + AudioSourceType, RenderModeType, VideoModulePosition, VideoSourceType, @@ -770,6 +771,10 @@ export enum OrientationMode { * Video degradation preferences when the bandwidth is a constraint. */ export enum DegradationPreference { + /** + * @ignore + */ + MaintainAuto = -1, /** * 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. */ @@ -1260,6 +1265,10 @@ export class EncodedVideoFrameInfo { * Compression preference for video encoding. */ export enum CompressionPreference { + /** + * @ignore + */ + PreferCompressionAuto = -1, /** * 0: Low latency preference. The SDK compresses video frames to reduce latency. This preference is suitable for scenarios where smoothness is prioritized and reduced video quality is acceptable. */ @@ -1340,6 +1349,54 @@ export enum CameraFormatType { CameraFormatBgra = 1, } +/** + * @ignore + */ +export enum VideoModuleType { + /** + * @ignore + */ + VideoModuleCapturer = 0, + /** + * @ignore + */ + VideoModuleSoftwareEncoder = 1, + /** + * @ignore + */ + VideoModuleHardwareEncoder = 2, + /** + * @ignore + */ + VideoModuleSoftwareDecoder = 3, + /** + * @ignore + */ + VideoModuleHardwareDecoder = 4, + /** + * @ignore + */ + VideoModuleRenderer = 5, +} + +/** + * @ignore + */ +export enum HdrCapability { + /** + * @ignore + */ + HdrCapabilityUnknown = -1, + /** + * @ignore + */ + HdrCapabilityUnsupported = 0, + /** + * @ignore + */ + HdrCapabilitySupported = 1, +} + /** * The bit mask of the codec type. */ @@ -2054,6 +2111,10 @@ export enum VideoApplicationScenarioType { * ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario. */ ApplicationScenario1v1 = 2, + /** + * @ignore + */ + ApplicationScenarioLiveshow = 3, } /** @@ -3220,6 +3281,46 @@ export enum VideoTranscoderError { VtErrInternal = 20, } +/** + * @ignore + */ +export class MixedAudioStream { + /** + * @ignore + */ + sourceType?: AudioSourceType; + /** + * @ignore + */ + remoteUserUid?: number; + /** + * @ignore + */ + channelName?: string; + /** + * @ignore + */ + trackId?: number; +} + +/** + * @ignore + */ +export class LocalAudioMixerConfiguration { + /** + * @ignore + */ + streamCount?: number; + /** + * @ignore + */ + sourceStreams?: MixedAudioStream[]; + /** + * @ignore + */ + syncWithLocalMic?: boolean; +} + /** * Configurations of the last-mile network test. */ @@ -3752,6 +3853,20 @@ export class FaceShapeBeautyOptions { styleIntensity?: number; } +/** + * @ignore + */ +export class FilterEffectOptions { + /** + * @ignore + */ + path?: string; + /** + * @ignore + */ + strength?: number; +} + /** * The low-light enhancement mode. */ @@ -3820,10 +3935,6 @@ export enum VideoDenoiserLevel { * 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed. */ VideoDenoiserLevelFast = 1, - /** - * 2: Enhanced video noise reduction. prioritizes video noise reduction quality over reducing performance consumption. The performance consumption is higher, the video noise reduction speed is slower, and the video noise reduction quality is better. If VideoDenoiserLevelHighQuality is not enough for your video noise reduction needs, you can use this enumerator. - */ - VideoDenoiserLevelStrength = 2, } /** @@ -5246,6 +5357,20 @@ export class LocalAccessPointConfiguration { disableAut?: boolean; } +/** + * @ignore + */ +export enum RecorderStreamType { + /** + * @ignore + */ + Rtc = 0, + /** + * @ignore + */ + Preview = 1, +} + /** * @ignore */ @@ -5258,6 +5383,10 @@ export class RecorderStreamInfo { * @ignore */ uid?: number; + /** + * @ignore + */ + type?: RecorderStreamType; } /** diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index c11c8a607..5fb2839a2 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/AgoraMediaBase.ts @@ -105,6 +105,44 @@ export enum VideoSourceType { VideoSourceUnknown = 100, } +/** + * @ignore + */ +export enum AudioSourceType { + /** + * @ignore + */ + AudioSourceMicrophone = 0, + /** + * @ignore + */ + AudioSourceCustom = 1, + /** + * @ignore + */ + AudioSourceMediaPlayer = 2, + /** + * @ignore + */ + AudioSourceLoopbackRecording = 3, + /** + * @ignore + */ + AudioSourceMixedStream = 4, + /** + * @ignore + */ + AudioSourceRemoteUser = 5, + /** + * @ignore + */ + AudioSourceRemoteChannel = 6, + /** + * @ignore + */ + AudioSourceUnknown = 100, +} + /** * The type of the audio route. */ @@ -1137,6 +1175,20 @@ export enum VideoModulePosition { PositionPostCapturerOrigin = 1 << 3, } +/** + * @ignore + */ +export class SnapshotConfig { + /** + * @ignore + */ + filePath?: string; + /** + * @ignore + */ + position?: VideoModulePosition; +} + /** * This class is used to get raw PCM audio. * @@ -1613,6 +1665,30 @@ export class MediaRecorderConfiguration { * @ignore */ recorderInfoUpdateInterval?: number; + /** + * @ignore + */ + width?: number; + /** + * @ignore + */ + height?: number; + /** + * @ignore + */ + fps?: number; + /** + * @ignore + */ + sample_rate?: number; + /** + * @ignore + */ + channel_num?: number; + /** + * @ignore + */ + videoSourceType?: VideoSourceType; } /** diff --git a/ts/Private/IAgoraMediaEngine.ts b/ts/Private/IAgoraMediaEngine.ts index f911ce523..cae2b1e29 100644 --- a/ts/Private/IAgoraMediaEngine.ts +++ b/ts/Private/IAgoraMediaEngine.ts @@ -156,6 +156,11 @@ export abstract class IMediaEngine { encodedVideoOption?: SenderOptions ): number; + /** + * @ignore + */ + abstract setExternalRemoteEglContext(): any; + /** * Sets the external audio source parameters. * diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index 535fc5939..c43f01575 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -36,7 +36,9 @@ import { FaceShapeArea, FaceShapeAreaOptions, FaceShapeBeautyOptions, + FilterEffectOptions, FocalLengthInfo, + HdrCapability, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, @@ -44,6 +46,7 @@ import { LicenseErrorType, LiveTranscoding, LocalAccessPointConfiguration, + LocalAudioMixerConfiguration, LocalAudioStats, LocalAudioStreamReason, LocalAudioStreamState, @@ -93,6 +96,7 @@ import { VideoFormat, VideoLayout, VideoMirrorModeType, + VideoModuleType, VideoOrientation, VideoQoePreferenceType, VideoRenderingTracingInfo, @@ -116,6 +120,7 @@ import { MediaSourceType, RawAudioFrameOpModeType, RenderModeType, + SnapshotConfig, VideoSourceType, } from './AgoraMediaBase'; import { IH265Transcoder } from './IAgoraH265Transcoder'; @@ -221,6 +226,10 @@ export enum AudioMixingReasonType { * 724: Successfully call stopAudioMixing to stop playing the music file. */ AudioMixingReasonStoppedByUser = 724, + /** + * @ignore + */ + AudioMixingReasonResumedByUser = 726, /** * 0: The SDK opens music file successfully. */ @@ -938,7 +947,7 @@ export class ScreenCaptureConfiguration { /** * Window ID. This parameter takes effect only when you want to capture the window. */ - windowId?: any; + windowId?: number; /** * The screen capture configuration. See ScreenCaptureParameters. */ @@ -1020,7 +1029,7 @@ export class ScreenCaptureSourceInfo { /** * The window ID for a window or the display ID for a screen. */ - sourceId?: any; + sourceId?: number; /** * The name of the window or screen. UTF-8 encoding. */ @@ -1060,7 +1069,7 @@ export class ScreenCaptureSourceInfo { /** * (For Windows only) Screen ID where the window is located. If the window is displayed across multiple screens, this parameter indicates the ID of the screen with which the window has the largest intersection area. If the window is located outside of the visible screens, the value of this member is -2. */ - sourceDisplayId?: any; + sourceDisplayId?: number; } /** @@ -1572,7 +1581,7 @@ export interface IRtcEngineEventHandler { * @param elapsed Time elapsed (ms) from the local user calling joinChannel until this callback is triggered. */ onFirstLocalVideoFramePublished?( - source: VideoSourceType, + connection: RtcConnection, elapsed: number ): void; @@ -3357,6 +3366,15 @@ export abstract class IRtcEngine { type?: MediaSourceType ): FaceShapeAreaOptions; + /** + * @ignore + */ + abstract setFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type?: MediaSourceType + ): number; + /** * Sets low-light enhancement. * @@ -4782,6 +4800,19 @@ export abstract class IRtcEngine { mirrorMode: VideoMirrorModeType ): number; + /** + * @ignore + */ + abstract setLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): number; + + /** + * @ignore + */ + abstract setRemoteRenderTargetFps(targetFps: number): number; + /** * Sets the local video mirror mode. * @@ -5587,7 +5618,7 @@ export abstract class IRtcEngine { * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract startScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): number; @@ -5662,6 +5693,11 @@ export abstract class IRtcEngine { size: number; }; + /** + * @ignore + */ + abstract setExternalMediaProjection(): any; + /** * Sets the screen sharing scenario. * @@ -5833,6 +5869,23 @@ export abstract class IRtcEngine { */ abstract stopLocalVideoTranscoder(): number; + /** + * @ignore + */ + abstract startLocalAudioMixer(config: LocalAudioMixerConfiguration): number; + + /** + * @ignore + */ + abstract updateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): number; + + /** + * @ignore + */ + abstract stopLocalAudioMixer(): number; + /** * Starts camera capture. * @@ -6428,6 +6481,22 @@ export abstract class IRtcEngine { */ abstract takeSnapshot(uid: number, filePath: string): number; + /** + * Takes a snapshot of a video stream. + * + * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. + * + * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. + * @param filePath The local path (including filename extensions) of the snapshot. For example: + * Windows: C:\Users\\AppData\Local\Agora\\example.jpg + * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable. + * + * @returns + * 0: Success. + * < 0: Failure. + */ + abstract takeSnapshot(uid: number, config: SnapshotConfig): number; + /** * Enables or disables video screenshot and upload. * @@ -6639,6 +6708,11 @@ export abstract class IRtcEngine { */ abstract sendAudioMetadata(metadata: string, length: number): number; + /** + * @ignore + */ + abstract queryHDRCapability(videoModule: VideoModuleType): HdrCapability; + /** * Starts screen capture from the specified video source. * @@ -6846,6 +6920,10 @@ export enum MediaDeviceStateType { * 2: The device is disabled. */ MediaDeviceStateDisabled = 2, + /** + * @ignore + */ + MediaDeviceStatePluggedIn = 3, /** * 4: The device is not found. */ diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index 0f1d3e05d..f36c47dab 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -17,7 +17,11 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from './AgoraBase'; -import { ContentInspectConfig, RenderModeType } from './AgoraMediaBase'; +import { + ContentInspectConfig, + RenderModeType, + SnapshotConfig, +} from './AgoraMediaBase'; import { ChannelMediaOptions, IRtcEngine, @@ -93,6 +97,23 @@ export abstract class IRtcEngineEx extends IRtcEngine { options?: LeaveChannelOptions ): number; + /** + * @ignore + */ + abstract leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string + ): number; + + /** + * @ignore + */ + abstract leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options: LeaveChannelOptions + ): number; + /** * Updates the channel media options after joining the channel. * @@ -895,6 +916,27 @@ export abstract class IRtcEngineEx extends IRtcEngine { filePath: string ): number; + /** + * Takes a snapshot of a video stream using connection ID. + * + * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. + * + * @param connection The connection information. See RtcConnection. + * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. + * @param filePath The local path (including filename extensions) of the snapshot. For example: + * Windows: C:\Users\\AppData\Local\Agora\\example.jpg + * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable. + * + * @returns + * 0: Success. + * < 0: Failure. + */ + abstract takeSnapshotEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number; + /** * Enables or disables video screenshot and upload. * diff --git a/ts/Private/impl/IAgoraMediaEngineImpl.ts b/ts/Private/impl/IAgoraMediaEngineImpl.ts index ddc9e7a5c..ee94322f9 100644 --- a/ts/Private/impl/IAgoraMediaEngineImpl.ts +++ b/ts/Private/impl/IAgoraMediaEngineImpl.ts @@ -172,6 +172,18 @@ export class IMediaEngineImpl implements IMediaEngine { return 'MediaEngine_setExternalVideoSource_fff99b6'; } + setExternalRemoteEglContext(): any { + const apiType = this.getApiTypeFromSetExternalRemoteEglContext(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + const eglContext = jsonResults.eglContext; + return eglContext; + } + + protected getApiTypeFromSetExternalRemoteEglContext(): string { + return 'MediaEngine_setExternalRemoteEglContext_f337cbf'; + } + setExternalAudioSource( enabled: boolean, sampleRate: number, diff --git a/ts/Private/impl/IAgoraRtcEngineExImpl.ts b/ts/Private/impl/IAgoraRtcEngineExImpl.ts index d3fdc02ca..1e08d49e8 100644 --- a/ts/Private/impl/IAgoraRtcEngineExImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineExImpl.ts @@ -16,7 +16,11 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from '../AgoraBase'; -import { ContentInspectConfig, RenderModeType } from '../AgoraMediaBase'; +import { + ContentInspectConfig, + RenderModeType, + SnapshotConfig, +} from '../AgoraMediaBase'; import { ChannelMediaOptions, LeaveChannelOptions, @@ -88,6 +92,69 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_leaveChannelEx_b03ee9a'; } + leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string + ): number { + const apiType = this.getApiTypeFromLeaveChannelWithUserAccountEx( + channelId, + userAccount + ); + const jsonParams = { + channelId: channelId, + userAccount: userAccount, + toJSON: () => { + return { + channelId: channelId, + userAccount: userAccount, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromLeaveChannelWithUserAccountEx( + channelId: string, + userAccount: string + ): string { + return 'RtcEngineEx_leaveChannelWithUserAccountEx_ccad422'; + } + + leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options: LeaveChannelOptions + ): number { + const apiType = this.getApiTypeFromLeaveChannelWithUserAccountEx( + channelId, + userAccount, + options + ); + const jsonParams = { + channelId: channelId, + userAccount: userAccount, + options: options, + toJSON: () => { + return { + channelId: channelId, + userAccount: userAccount, + options: options, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromLeaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options: LeaveChannelOptions + ): string { + return 'RtcEngineEx_leaveChannelWithUserAccountEx_8bbe372'; + } + updateChannelMediaOptionsEx( options: ChannelMediaOptions, connection: RtcConnection @@ -1466,6 +1533,36 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_takeSnapshotEx_de1c015'; } + takeSnapshotEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number { + const apiType = this.getApiTypeFromTakeSnapshotEx(connection, uid, config); + const jsonParams = { + connection: connection, + uid: uid, + config: config, + toJSON: () => { + return { + connection: connection, + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshotEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngineEx_takeSnapshotEx_b856417'; + } + enableContentInspectEx( enabled: boolean, config: ContentInspectConfig, diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index 43c3736a6..04a876407 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -23,12 +23,15 @@ import { FaceShapeArea, FaceShapeAreaOptions, FaceShapeBeautyOptions, + FilterEffectOptions, FocalLengthInfo, + HdrCapability, HeadphoneEqualizerPreset, IAudioEncodedFrameObserver, LastmileProbeConfig, LiveTranscoding, LocalAccessPointConfiguration, + LocalAudioMixerConfiguration, LocalTranscoderConfiguration, LowlightEnhanceOptions, RecorderStreamInfo, @@ -50,6 +53,7 @@ import { VideoEncoderConfiguration, VideoFormat, VideoMirrorModeType, + VideoModuleType, VideoOrientation, VideoQoePreferenceType, VideoStreamType, @@ -66,6 +70,7 @@ import { MediaSourceType, RawAudioFrameOpModeType, RenderModeType, + SnapshotConfig, VideoSourceType, } from '../AgoraMediaBase'; import { IH265Transcoder } from '../IAgoraH265Transcoder'; @@ -272,7 +277,7 @@ export function processIRtcEngineEventHandler( case 'onFirstLocalVideoFramePublished': if (handler.onFirstLocalVideoFramePublished !== undefined) { handler.onFirstLocalVideoFramePublished( - jsonParams.source, + jsonParams.connection, jsonParams.elapsed ); } @@ -1732,6 +1737,40 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_getFaceShapeAreaOptions_0783e2c'; } + setFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type: MediaSourceType = MediaSourceType.PrimaryCameraSource + ): number { + const apiType = this.getApiTypeFromSetFilterEffectOptions( + enabled, + options, + type + ); + const jsonParams = { + enabled: enabled, + options: options, + type: type, + toJSON: () => { + return { + enabled: enabled, + options: options, + type: type, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type: MediaSourceType = MediaSourceType.PrimaryCameraSource + ): string { + return 'RtcEngine_setFilterEffectOptions_53b4be3'; + } + setLowlightEnhanceOptions( enabled: boolean, options: LowlightEnhanceOptions, @@ -3749,6 +3788,53 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_setRemoteRenderMode_6771ce0'; } + setLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): number { + const apiType = this.getApiTypeFromSetLocalRenderTargetFps( + sourceType, + targetFps + ); + const jsonParams = { + sourceType: sourceType, + targetFps: targetFps, + toJSON: () => { + return { + sourceType: sourceType, + targetFps: targetFps, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetLocalRenderTargetFps( + sourceType: VideoSourceType, + targetFps: number + ): string { + return 'RtcEngine_setLocalRenderTargetFps_2ad83d8'; + } + + setRemoteRenderTargetFps(targetFps: number): number { + const apiType = this.getApiTypeFromSetRemoteRenderTargetFps(targetFps); + const jsonParams = { + targetFps: targetFps, + toJSON: () => { + return { + targetFps: targetFps, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetRemoteRenderTargetFps(targetFps: number): string { + return 'RtcEngine_setRemoteRenderTargetFps_46f8ab7'; + } + setLocalVideoMirrorMode(mirrorMode: VideoMirrorModeType): number { const apiType = this.getApiTypeFromSetLocalVideoMirrorMode(mirrorMode); const jsonParams = { @@ -5177,7 +5263,7 @@ export class IRtcEngineImpl implements IRtcEngine { regionRect: Rectangle, captureParams: ScreenCaptureParameters ): string { - return 'RtcEngine_startScreenCaptureByDisplayId_7cf6800'; + return 'RtcEngine_startScreenCaptureByDisplayId_ce89867'; } startScreenCaptureByScreenRect( @@ -5227,7 +5313,7 @@ export class IRtcEngineImpl implements IRtcEngine { } startScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): number { @@ -5253,11 +5339,11 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromStartScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): string { - return 'RtcEngine_startScreenCaptureByWindowId_5ab7e59'; + return 'RtcEngine_startScreenCaptureByWindowId_ce89867'; } setScreenCaptureContentHint(contentHint: VideoContentHint): number { @@ -5393,6 +5479,18 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_queryCameraFocalLengthCapability_2dee6af'; } + setExternalMediaProjection(): any { + const apiType = this.getApiTypeFromSetExternalMediaProjection(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + const mediaProjection = jsonResults.mediaProjection; + return mediaProjection; + } + + protected getApiTypeFromSetExternalMediaProjection(): string { + return 'RtcEngine_setExternalMediaProjection_f337cbf'; + } + setScreenCaptureScenario(screenScenario: ScreenScenarioType): number { const apiType = this.getApiTypeFromSetScreenCaptureScenario(screenScenario); const jsonParams = { @@ -5626,6 +5724,60 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_stopLocalVideoTranscoder'; } + startLocalAudioMixer(config: LocalAudioMixerConfiguration): number { + const apiType = this.getApiTypeFromStartLocalAudioMixer(config); + const jsonParams = { + config: config, + toJSON: () => { + return { + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromStartLocalAudioMixer( + config: LocalAudioMixerConfiguration + ): string { + return 'RtcEngine_startLocalAudioMixer_a7ff78e'; + } + + updateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): number { + const apiType = + this.getApiTypeFromUpdateLocalAudioMixerConfiguration(config); + const jsonParams = { + config: config, + toJSON: () => { + return { + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromUpdateLocalAudioMixerConfiguration( + config: LocalAudioMixerConfiguration + ): string { + return 'RtcEngine_updateLocalAudioMixerConfiguration_a7ff78e'; + } + + stopLocalAudioMixer(): number { + const apiType = this.getApiTypeFromStopLocalAudioMixer(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromStopLocalAudioMixer(): string { + return 'RtcEngine_stopLocalAudioMixer'; + } + startCameraCapture( sourceType: VideoSourceType, config: CameraCapturerConfiguration @@ -6554,6 +6706,29 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_takeSnapshot_1922dd1'; } + takeSnapshot(uid: number, config: SnapshotConfig): number { + const apiType = this.getApiTypeFromTakeSnapshot(uid, config); + const jsonParams = { + uid: uid, + config: config, + toJSON: () => { + return { + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshot( + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngine_takeSnapshot_5669ea6'; + } + enableContentInspect(enabled: boolean, config: ContentInspectConfig): number { const apiType = this.getApiTypeFromEnableContentInspect(enabled, config); const jsonParams = { @@ -6876,6 +7051,27 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_sendAudioMetadata_878f309'; } + queryHDRCapability(videoModule: VideoModuleType): HdrCapability { + const apiType = this.getApiTypeFromQueryHDRCapability(videoModule); + const jsonParams = { + videoModule: videoModule, + toJSON: () => { + return { + videoModule: videoModule, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + const capability = jsonResults.capability; + return capability; + } + + protected getApiTypeFromQueryHDRCapability( + videoModule: VideoModuleType + ): string { + return 'RtcEngine_queryHDRCapability_bebdacb'; + } + startScreenCaptureBySourceType( sourceType: VideoSourceType, config: ScreenCaptureConfiguration diff --git a/ts/Private/ti/IAgoraRtcEngine-ti.ts b/ts/Private/ti/IAgoraRtcEngine-ti.ts index 144cfd88e..79084cc5d 100644 --- a/ts/Private/ti/IAgoraRtcEngine-ti.ts +++ b/ts/Private/ti/IAgoraRtcEngine-ti.ts @@ -25,7 +25,7 @@ export const IRtcEngineEventHandler = t.iface([], { "onDownlinkNetworkInfoUpdated": t.opt(t.func("void", t.param("info", "DownlinkNetworkInfo"))), "onLastmileQuality": t.opt(t.func("void", t.param("quality", "QualityType"))), "onFirstLocalVideoFrame": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))), - "onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("elapsed", "number"))), + "onFirstLocalVideoFramePublished": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("elapsed", "number"))), "onFirstRemoteVideoDecoded": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("remoteUid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("elapsed", "number"))), "onVideoSizeChanged": t.opt(t.func("void", t.param("connection", "RtcConnection"), t.param("sourceType", "VideoSourceType"), t.param("uid", "number"), t.param("width", "number"), t.param("height", "number"), t.param("rotation", "number"))), "onLocalVideoStateChanged": t.opt(t.func("void", t.param("source", "VideoSourceType"), t.param("state", "LocalVideoStreamState"), t.param("reason", "LocalVideoStreamReason"))),