From 91e2d215e04f20ebea3d796b85411760929a7e0e Mon Sep 17 00:00:00 2001 From: LichKing-2234 Date: Tue, 12 Sep 2023 05:59:55 +0000 Subject: [PATCH] [AUTO] Generate code by terra --- src/AgoraBase.ts | 32 ++++++++++++++++++++++ src/AgoraMediaBase.ts | 16 +++++++++++ src/AgoraMediaPlayerTypes.ts | 2 +- src/IAgoraMusicContentCenter.ts | 10 ++++++- src/IAgoraRtcEngine.ts | 35 ++++++++++++++++-------- src/IAgoraRtcEngineEx.ts | 11 +++++++- src/impl/IAgoraRtcEngineExImpl.ts | 36 ++++++++++++++++++++++++- src/impl/IAgoraRtcEngineImpl.ts | 39 ++++++++++++++++++--------- src/ti/IAgoraMusicContentCenter-ti.ts | 2 +- 9 files changed, 155 insertions(+), 28 deletions(-) diff --git a/src/AgoraBase.ts b/src/AgoraBase.ts index e371f5ae..2b51c3a6 100644 --- a/src/AgoraBase.ts +++ b/src/AgoraBase.ts @@ -438,6 +438,10 @@ export enum ErrorCodeType { * 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted. */ ErrVdmCameraNotAuthorized = 1501, + /** + * @ignore + */ + ErrAdmApplicationLoopback = 2007, } /** @@ -2078,6 +2082,26 @@ export enum LocalVideoStreamError { * @ignore */ LocalVideoStreamErrorScreenCaptureNoPermission = 22, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCapturePaused = 23, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureResumed = 24, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowHidden = 25, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden = 26, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized = 27, } /** @@ -3125,6 +3149,10 @@ export enum ConnectionChangedReasonType { * @ignore */ ConnectionChangedLicenseValidationFailure = 21, + /** + * @ignore + */ + ConnectionChangedCertificationVeryfyFailure = 22, } /** @@ -3235,6 +3263,10 @@ export enum NetworkType { * 5: The network type is mobile 4G. */ NetworkTypeMobile4g = 5, + /** + * @ignore + */ + NetworkTypeMobile5g = 6, } /** diff --git a/src/AgoraMediaBase.ts b/src/AgoraMediaBase.ts index 31f8bc7e..e3fe44d1 100644 --- a/src/AgoraMediaBase.ts +++ b/src/AgoraMediaBase.ts @@ -267,6 +267,10 @@ export enum ContentInspectType { * @ignore */ ContentInspectSupervision = 2, + /** + * @ignore + */ + ContentInspectImageModeration = 3, } /** @@ -291,6 +295,10 @@ export class ContentInspectConfig { * Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server. */ extraInfo?: string; + /** + * @ignore + */ + serverConfig?: string; /** * Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported. */ @@ -433,6 +441,10 @@ export enum VideoPixelFormat { * 16: The format is I422. */ VideoPixelI422 = 16, + /** + * @ignore + */ + VideoTextureId3d11texture2d = 17, } /** @@ -575,6 +587,10 @@ export class ExternalVideoFrame { * @ignore */ alphaBuffer?: Uint8Array; + /** + * @ignore + */ + texture_slice_index?: number; } /** diff --git a/src/AgoraMediaPlayerTypes.ts b/src/AgoraMediaPlayerTypes.ts index ebe47de7..8426f7c6 100644 --- a/src/AgoraMediaPlayerTypes.ts +++ b/src/AgoraMediaPlayerTypes.ts @@ -380,7 +380,7 @@ export class PlayerUpdatedInfo { /** * The statistics about the media file being cached. If you call the openWithMediaSource method and set enableCache as true, the statistics about the media file being cached is updated every second after the media file is played. See CacheStatistics. */ - cacheStatistics?: CacheStatistics; + cacheStatistics?: CacheStatistics[]; } /** diff --git a/src/IAgoraMusicContentCenter.ts b/src/IAgoraMusicContentCenter.ts index 03b5851d..036afd81 100644 --- a/src/IAgoraMusicContentCenter.ts +++ b/src/IAgoraMusicContentCenter.ts @@ -55,6 +55,10 @@ export enum MusicContentCenterStatusCode { * @ignore */ KMusicContentCenterStatusErrMusicDecryption = 6, + /** + * @ignore + */ + KMusicContentCenterStatusErrHttpInternalError = 7, } /** @@ -252,7 +256,7 @@ export interface IMusicContentCenterEventHandler { */ onMusicCollectionResult?( requestId: string, - result: MusicCollection, + result: MusicCollection[], errorCode: MusicContentCenterStatusCode ): void; @@ -309,6 +313,10 @@ export class MusicContentCenterConfiguration { * @ignore */ maxCacheSize?: number; + /** + * @ignore + */ + mccDomain?: string; } /** diff --git a/src/IAgoraRtcEngine.ts b/src/IAgoraRtcEngine.ts index 0cc73542..c7f31034 100644 --- a/src/IAgoraRtcEngine.ts +++ b/src/IAgoraRtcEngine.ts @@ -1012,7 +1012,7 @@ export class AdvancedAudioOptions { /** * The number of channels for audio preprocessing. See AudioProcessingChannels. */ - audioProcessingChannels?: number; + audioProcessingChannels?: number[]; } /** @@ -1146,11 +1146,11 @@ export class ChannelMediaOptions { /** * @ignore */ - audioDelayMs?: number; + audioDelayMs?: number[]; /** * @ignore */ - mediaPlayerAudioDelayMs?: number; + mediaPlayerAudioDelayMs?: number[]; /** * (Optional) The token generated on your server for authentication. * This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx. @@ -1215,6 +1215,20 @@ export enum ProxyType { HttpsProxyType = 6, } +/** + * @ignore + */ +export enum FeatureType { + /** + * @ignore + */ + VideoVirtualBackground = 1, + /** + * @ignore + */ + VideoBeautyEffect = 2, +} + /** * The options for leaving a channel. */ @@ -3802,15 +3816,9 @@ export abstract class IRtcEngine { abstract createMediaPlayer(): IMediaPlayer; /** - * Destroys the media player instance. - * - * @param mediaPlayer One IMediaPlayer object. - * - * @returns - * ≥ 0: Success. Returns the ID of media player instance. - * < 0: Failure. + * @ignore */ - abstract destroyMediaPlayer(mediaPlayer: IMediaPlayer): number; + abstract destroyMediaPlayer(): IMediaPlayer; /** * @ignore @@ -6726,6 +6734,11 @@ export abstract class IRtcEngine { */ abstract getNtpWallTimeInMs(): number; + /** + * @ignore + */ + abstract isFeatureAvailableOnDevice(type: FeatureType): boolean; + /** * Gets the IAudioDeviceManager object to manage audio devices. * diff --git a/src/IAgoraRtcEngineEx.ts b/src/IAgoraRtcEngineEx.ts index c43ca5cc..878af7d9 100644 --- a/src/IAgoraRtcEngineEx.ts +++ b/src/IAgoraRtcEngineEx.ts @@ -16,7 +16,7 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from './AgoraBase'; -import { RenderModeType } from './AgoraMediaBase'; +import { ContentInspectConfig, RenderModeType } from './AgoraMediaBase'; import { ChannelMediaOptions, IRtcEngine, @@ -895,6 +895,15 @@ export abstract class IRtcEngineEx extends IRtcEngine { filePath: string ): number; + /** + * @ignore + */ + abstract enableContentInspectEx( + enabled: boolean, + config: ContentInspectConfig, + connection: RtcConnection + ): number; + /** * Enables tracing the video frame rendering process. * diff --git a/src/impl/IAgoraRtcEngineExImpl.ts b/src/impl/IAgoraRtcEngineExImpl.ts index 641b6d51..b48f9a5d 100644 --- a/src/impl/IAgoraRtcEngineExImpl.ts +++ b/src/impl/IAgoraRtcEngineExImpl.ts @@ -15,7 +15,7 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from '../AgoraBase'; -import { RenderModeType } from '../AgoraMediaBase'; +import { ContentInspectConfig, RenderModeType } from '../AgoraMediaBase'; import { ChannelMediaOptions, LeaveChannelOptions, @@ -1494,6 +1494,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_takeSnapshotEx'; } + enableContentInspectEx( + enabled: boolean, + config: ContentInspectConfig, + connection: RtcConnection + ): number { + const apiType = this.getApiTypeFromEnableContentInspectEx( + enabled, + config, + connection + ); + const jsonParams = { + enabled: enabled, + config: config, + connection: connection, + toJSON: () => { + return { + enabled: enabled, + config: config, + connection: connection, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromEnableContentInspectEx( + enabled: boolean, + config: ContentInspectConfig, + connection: RtcConnection + ): string { + return 'RtcEngineEx_enableContentInspectEx'; + } + startMediaRenderingTracingEx(connection: RtcConnection): number { const apiType = this.getApiTypeFromStartMediaRenderingTracingEx(connection); const jsonParams = { diff --git a/src/impl/IAgoraRtcEngineImpl.ts b/src/impl/IAgoraRtcEngineImpl.ts index a4384edf..7abce4a0 100644 --- a/src/impl/IAgoraRtcEngineImpl.ts +++ b/src/impl/IAgoraRtcEngineImpl.ts @@ -74,6 +74,7 @@ import { ChannelMediaOptions, CloudProxyType, DirectCdnStreamingMediaOptions, + FeatureType, IDirectCdnStreamingEventHandler, IMetadataObserver, IRtcEngine, @@ -2344,21 +2345,15 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_createMediaPlayer'; } - destroyMediaPlayer(mediaPlayer: IMediaPlayer): number { - const apiType = this.getApiTypeFromDestroyMediaPlayer(mediaPlayer); - const jsonParams = { - media_player: mediaPlayer, - toJSON: () => { - return {}; - }, - }; + destroyMediaPlayer(): IMediaPlayer { + const apiType = this.getApiTypeFromDestroyMediaPlayer(); + const jsonParams = {}; const jsonResults = callIrisApi.call(this, apiType, jsonParams); - return jsonResults.result; + const mediaPlayer = jsonResults.media_player; + return mediaPlayer; } - protected getApiTypeFromDestroyMediaPlayer( - mediaPlayer: IMediaPlayer - ): string { + protected getApiTypeFromDestroyMediaPlayer(): string { return 'RtcEngine_destroyMediaPlayer'; } @@ -6707,6 +6702,26 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_getNtpWallTimeInMs'; } + isFeatureAvailableOnDevice(type: FeatureType): boolean { + const apiType = this.getApiTypeFromIsFeatureAvailableOnDevice(type); + const jsonParams = { + type: type, + toJSON: () => { + return { + type: type, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromIsFeatureAvailableOnDevice( + type: FeatureType + ): string { + return 'RtcEngine_isFeatureAvailableOnDevice'; + } + getAudioDeviceManager(): IAudioDeviceManager { const apiType = this.getApiTypeFromGetAudioDeviceManager(); const jsonParams = {}; diff --git a/src/ti/IAgoraMusicContentCenter-ti.ts b/src/ti/IAgoraMusicContentCenter-ti.ts index 1474136b..04542385 100644 --- a/src/ti/IAgoraMusicContentCenter-ti.ts +++ b/src/ti/IAgoraMusicContentCenter-ti.ts @@ -6,7 +6,7 @@ import * as t from "ts-interface-checker"; export const IMusicContentCenterEventHandler = t.iface([], { "onMusicChartsResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicChartInfo")), t.param("errorCode", "MusicContentCenterStatusCode"))), - "onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", "MusicCollection"), t.param("errorCode", "MusicContentCenterStatusCode"))), + "onMusicCollectionResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("result", t.array("MusicCollection")), t.param("errorCode", "MusicContentCenterStatusCode"))), "onLyricResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("lyricUrl", "string"), t.param("errorCode", "MusicContentCenterStatusCode"))), "onSongSimpleInfoResult": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("simpleInfo", "string"), t.param("errorCode", "MusicContentCenterStatusCode"))), "onPreLoadEvent": t.opt(t.func("void", t.param("requestId", "string"), t.param("songCode", "number"), t.param("percent", "number"), t.param("lyricUrl", "string"), t.param("status", "PreloadStatusCode"), t.param("errorCode", "MusicContentCenterStatusCode"))),