Skip to content

Commit

Permalink
[AUTO] Generate code by terra
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 authored Sep 12, 2023
1 parent d08ccb7 commit 91e2d21
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 28 deletions.
32 changes: 32 additions & 0 deletions src/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

/**
Expand Down Expand Up @@ -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,
}

/**
Expand Down Expand Up @@ -3125,6 +3149,10 @@ export enum ConnectionChangedReasonType {
* @ignore
*/
ConnectionChangedLicenseValidationFailure = 21,
/**
* @ignore
*/
ConnectionChangedCertificationVeryfyFailure = 22,
}

/**
Expand Down Expand Up @@ -3235,6 +3263,10 @@ export enum NetworkType {
* 5: The network type is mobile 4G.
*/
NetworkTypeMobile4g = 5,
/**
* @ignore
*/
NetworkTypeMobile5g = 6,
}

/**
Expand Down
16 changes: 16 additions & 0 deletions src/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ export enum ContentInspectType {
* @ignore
*/
ContentInspectSupervision = 2,
/**
* @ignore
*/
ContentInspectImageModeration = 3,
}

/**
Expand All @@ -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.
*/
Expand Down Expand Up @@ -433,6 +441,10 @@ export enum VideoPixelFormat {
* 16: The format is I422.
*/
VideoPixelI422 = 16,
/**
* @ignore
*/
VideoTextureId3d11texture2d = 17,
}

/**
Expand Down Expand Up @@ -575,6 +587,10 @@ export class ExternalVideoFrame {
* @ignore
*/
alphaBuffer?: Uint8Array;
/**
* @ignore
*/
texture_slice_index?: number;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/AgoraMediaPlayerTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
}

/**
Expand Down
10 changes: 9 additions & 1 deletion src/IAgoraMusicContentCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export enum MusicContentCenterStatusCode {
* @ignore
*/
KMusicContentCenterStatusErrMusicDecryption = 6,
/**
* @ignore
*/
KMusicContentCenterStatusErrHttpInternalError = 7,
}

/**
Expand Down Expand Up @@ -252,7 +256,7 @@ export interface IMusicContentCenterEventHandler {
*/
onMusicCollectionResult?(
requestId: string,
result: MusicCollection,
result: MusicCollection[],
errorCode: MusicContentCenterStatusCode
): void;

Expand Down Expand Up @@ -309,6 +313,10 @@ export class MusicContentCenterConfiguration {
* @ignore
*/
maxCacheSize?: number;
/**
* @ignore
*/
mccDomain?: string;
}

/**
Expand Down
35 changes: 24 additions & 11 deletions src/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ export class AdvancedAudioOptions {
/**
* The number of channels for audio preprocessing. See AudioProcessingChannels.
*/
audioProcessingChannels?: number;
audioProcessingChannels?: number[];
}

/**
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*
Expand Down
11 changes: 10 additions & 1 deletion src/IAgoraRtcEngineEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
VideoSubscriptionOptions,
WatermarkOptions,
} from './AgoraBase';
import { RenderModeType } from './AgoraMediaBase';
import { ContentInspectConfig, RenderModeType } from './AgoraMediaBase';
import {
ChannelMediaOptions,
IRtcEngine,
Expand Down Expand Up @@ -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.
*
Expand Down
36 changes: 35 additions & 1 deletion src/impl/IAgoraRtcEngineExImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
VideoSubscriptionOptions,
WatermarkOptions,
} from '../AgoraBase';
import { RenderModeType } from '../AgoraMediaBase';
import { ContentInspectConfig, RenderModeType } from '../AgoraMediaBase';
import {
ChannelMediaOptions,
LeaveChannelOptions,
Expand Down Expand Up @@ -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 = {
Expand Down
39 changes: 27 additions & 12 deletions src/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import {
ChannelMediaOptions,
CloudProxyType,
DirectCdnStreamingMediaOptions,
FeatureType,
IDirectCdnStreamingEventHandler,
IMetadataObserver,
IRtcEngine,
Expand Down Expand Up @@ -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';
}

Expand Down Expand Up @@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion src/ti/IAgoraMusicContentCenter-ti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))),
Expand Down

0 comments on commit 91e2d21

Please sign in to comment.