From 0e8e620f6347c9c5f88c7e342664cef01642dba2 Mon Sep 17 00:00:00 2001 From: Arthas <15215604969@163.com> Date: Fri, 8 Sep 2023 01:43:54 -0500 Subject: [PATCH] [AUTO] Generate code by terra (#1067) Co-authored-by: LichKing-2234 --- ts/Private/AgoraBase.ts | 34 +++++++++++- ts/Private/AgoraMediaBase.ts | 24 +++++++++ ts/Private/IAgoraMusicContentCenter.ts | 8 +++ ts/Private/IAgoraRtcEngine.ts | 68 ++++++++++++++++-------- ts/Private/IAgoraRtcEngineEx.ts | 20 ++++--- ts/Private/impl/IAgoraRtcEngineExImpl.ts | 36 ++++++++++++- ts/Private/impl/IAgoraRtcEngineImpl.ts | 21 ++++++++ 7 files changed, 180 insertions(+), 31 deletions(-) diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index 374d75bf9..fefe194b4 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/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, } /** @@ -2081,6 +2085,26 @@ export enum LocalVideoStreamError { * @ignore */ LocalVideoStreamErrorScreenCaptureNoPermission = 22, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCapturePaused = 23, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureResumed = 24, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowHidden = 25, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden = 26, + /** + * @ignore + */ + LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized = 27, } /** @@ -3095,7 +3119,7 @@ export enum ConnectionChangedReasonType { */ ConnectionChangedClientIpAddressChanged = 13, /** - * 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The connection state changes to . + * 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The SDK tries to reconnect to the server automatically. */ ConnectionChangedKeepAliveTimeout = 14, /** @@ -3126,6 +3150,10 @@ export enum ConnectionChangedReasonType { * @ignore */ ConnectionChangedLicenseValidationFailure = 21, + /** + * @ignore + */ + ConnectionChangedCertificationVeryfyFailure = 22, } /** @@ -3236,6 +3264,10 @@ export enum NetworkType { * 5: The network type is mobile 4G. */ NetworkTypeMobile4g = 5, + /** + * @ignore + */ + NetworkTypeMobile5g = 6, } /** diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index b6c0127f5..c82705cb2 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/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,14 @@ export class ExternalVideoFrame { * @ignore */ alphaBuffer?: Uint8Array; + /** + * @ignore + */ + d3d11_texture_2d?: any; + /** + * @ignore + */ + texture_slice_index?: number; } /** @@ -643,6 +663,10 @@ export class VideoFrame { * This parameter only applies to video data in Texture format. Texture ID. */ textureId?: number; + /** + * @ignore + */ + d3d11Texture2d?: any; /** * This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix. */ diff --git a/ts/Private/IAgoraMusicContentCenter.ts b/ts/Private/IAgoraMusicContentCenter.ts index 03b5851db..fb1aeff64 100644 --- a/ts/Private/IAgoraMusicContentCenter.ts +++ b/ts/Private/IAgoraMusicContentCenter.ts @@ -55,6 +55,10 @@ export enum MusicContentCenterStatusCode { * @ignore */ KMusicContentCenterStatusErrMusicDecryption = 6, + /** + * @ignore + */ + KMusicContentCenterStatusErrHttpInternalError = 7, } /** @@ -309,6 +313,10 @@ export class MusicContentCenterConfiguration { * @ignore */ maxCacheSize?: number; + /** + * @ignore + */ + mccDomain?: string; } /** diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index 22fb1bb33..079143d52 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -1022,7 +1022,7 @@ export class AdvancedAudioOptions { */ export class ImageTrackOptions { /** - * The URL of the image that you want to use to replace the video feeds. The image must be in PNG format. This method supports adding an image from the local absolute or relative file path. + * The image URL. Supported formats of images include JPEG, JPG, PNG and GIF. This method supports adding an image from the local absolute or relative file path. */ imageUrl?: string; /** @@ -1038,7 +1038,7 @@ export class ImageTrackOptions { /** * The channel media options. * - * Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishAudioTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. + * Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. */ export class ChannelMediaOptions { /** @@ -1217,6 +1217,20 @@ export enum ProxyType { HttpsProxyType = 6, } +/** + * @ignore + */ +export enum FeatureType { + /** + * @ignore + */ + VideoVirtualBackground = 1, + /** + * @ignore + */ + VideoBeautyEffect = 2, +} + /** * The options for leaving a channel. */ @@ -1267,7 +1281,7 @@ export interface IRtcEngineEventHandler { * * @param channel The channel name. * @param uid The user ID. - * @param proxyType The proxy type connected. See CloudProxyType. + * @param proxyType The proxy type connected. See ProxyType. * @param localProxyIp Reserved for future use. * @param elapsed The time elapsed (ms) from the user calling joinChannel until this callback is triggered. */ @@ -1878,7 +1892,7 @@ export interface IRtcEngineEventHandler { * * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: * Call renewToken to pass in the new token. - * Call to leave the current channel and then pass in the new token when you call joinChannel to join a channel. + * Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel. * * @param connection The connection information. See RtcConnection. */ @@ -2051,7 +2065,7 @@ export interface IRtcEngineEventHandler { /** * Occurs when the user role switching fails in the interactive live streaming. * - * In the live broadcasting channel profile, when the local user calls to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role. + * In the live broadcasting channel profile, when the local user calls setClientRole to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role. * * @param connection The connection information. See RtcConnection. * @param reason The reason for a user role switch failure. See ClientRoleChangeFailedReason. @@ -2985,7 +2999,7 @@ export abstract class IRtcEngine { * This method allows users to join only one channel at a time. * Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token. * - * @param token The token generated on your server for authentication. + * @param token The token generated on your server for authentication. If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: * All lowercase English letters: a to z. * All uppercase English letters: A to Z. @@ -3060,7 +3074,7 @@ export abstract class IRtcEngine { /** * Sets the channel profile. * - * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming. + * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming. * To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile. * This method must be called and set before joinChannel, and cannot be set again after joining the channel. * The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration. @@ -3081,7 +3095,7 @@ export abstract class IRtcEngine { * In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host. You can call this method either before or after joining a channel. If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel. If you call this method to switch the user role after joining a channel, the SDK automatically does the following: * Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state. * Triggers onClientRoleChanged on the local client. - * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is ChannelProfileLiveBroadcasting) only. + * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is set as ChannelProfileLiveBroadcasting) only. * * @param role The user role in the interactive live streaming. See ClientRoleType. * @param options The detailed options of a user, including the user level. See ClientRoleOptions. @@ -3130,13 +3144,13 @@ export abstract class IRtcEngine { * * In scenarios where there are existing cameras to capture video, Agora recommends that you use the following steps to capture and publish video with multiple cameras: * Call this method to enable multi-channel camera capture. - * Call to start the local video preview. + * Call startPreview to start the local video preview. * Call startCameraCapture, and set sourceType to start video capture with the second camera. * Call joinChannelEx, and set publishSecondaryCameraTrack to true to publish the video stream captured by the second camera in the channel. If you want to disable multi-channel camera capture, use the following steps: * Call stopCameraCapture. - * Call this method with enabled set to false. You can call this method before and after to enable multi-camera capture: - * If it is enabled before, the local video preview shows the image captured by the two cameras at the same time. - * If it is enabled after, the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows: + * Call this method with enabled set to false. You can call this method before and after startPreview to enable multi-camera capture: + * If it is enabled before startPreview, the local video preview shows the image captured by the two cameras at the same time. + * If it is enabled after startPreview, the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows: * iPhone XR * iPhone XS * iPhone XS Max @@ -3257,12 +3271,14 @@ export abstract class IRtcEngine { * Sets the image enhancement options. * * Enables or disables image enhancement, and sets the options. - * Call this method before calling enableVideo or. + * Call this method before calling enableVideo or startPreview. * This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally. * * @param enabled Whether to enable the image enhancement function: true : Enable the image enhancement function. false : (Default) Disable the image enhancement function. * @param options The image enhancement options. See BeautyOptions. - * @param type The type of the video source, see MediaSourceType. + * @param type Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + * The default value is UnknownMediaSource. + * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource. * * @returns * 0: Success. @@ -3352,7 +3368,7 @@ export abstract class IRtcEngine { /** * Enables/Disables the virtual background. * - * The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or. + * The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or startPreview. * This feature requires high performance devices. Agora recommends that you implement it on devices equipped with the following chips: * Devices with an i5 CPU and better * Agora recommends that you use this feature in scenarios that meet the following conditions: @@ -4742,7 +4758,7 @@ export abstract class IRtcEngine { * * The SDK enables the low-quality video stream auto mode on the sender side by default (it does not actively sending low-quality video streams). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling setRemoteVideoStreamType. After receiving the application, the sending end automatically switches to the low-quality video stream mode. * If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams). - * If you want to restore the default behavior after making changes, you can call this method again with mode set to AutoSimulcastStream. The difference and connection between this method and is as follows: + * If you want to restore the default behavior after making changes, you can call this method again with mode set to AutoSimulcastStream. The difference and connection between this method and enableDualStreamMode is as follows: * When calling this method and setting mode to DisableSimulcastStream, it has the same effect as calling and setting enabled to false. * When calling this method and setting mode to EnableSimulcastStream, it has the same effect as calling and setting enabled to true. * Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. @@ -5170,7 +5186,9 @@ export abstract class IRtcEngine { * @param extension The name of the extension. * @param key The key of the extension. * @param value The value of the extension key. - * @param type The type of the video source, see MediaSourceType. + * @param type Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + * The default value is UnknownMediaSource. + * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource. * * @returns * 0: Success. @@ -5638,8 +5656,7 @@ export abstract class IRtcEngine { /** * Starts pushing media streams to a CDN without transcoding. * - * Ensure that you enable the Media Push service before using this function. See Enable Media Push. - * Call this method after joining a channel. + * Call this method after joining a channel. * Only hosts in the LIVE_BROADCASTING profile can call this method. * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. * @@ -5657,8 +5674,7 @@ export abstract class IRtcEngine { /** * Starts Media Push and sets the transcoding configuration. * - * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. - * Ensure that you enable the Media Push service before using this function. See Enable Media Push. + * Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. Under one Agora project, the maximum number of concurrent tasks to push media streams is 200 by default. If you need a higher quota, contact. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. * Call this method after joining a channel. * Only hosts in the LIVE_BROADCASTING profile can call this method. * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. @@ -5780,6 +5796,7 @@ export abstract class IRtcEngine { * Sets the rotation angle of the captured video. * * This method applies to Windows only. + * You must call this method after enableVideo. The setting result will take effect after the camera is successfully turned on, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as LocalVideoStreamStateCapturing (1). * When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video. * * @param type The video source type. See VideoSourceType. @@ -6114,7 +6131,7 @@ export abstract class IRtcEngine { * The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks. * The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type. * - * @param token The token generated on your server for authentication. + * @param token The token generated on your server for authentication. If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: * All lowercase English letters: a to z. * All uppercase English letters: A to Z. @@ -6154,7 +6171,7 @@ export abstract class IRtcEngine { * The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks. * The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type. * - * @param token The token generated on your server for authentication. + * @param token The token generated on your server for authentication. If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: * All lowercase English letters: a to z. * All uppercase English letters: A to Z. @@ -6593,6 +6610,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/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index 753ce8199..2511b2c1f 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -16,7 +16,7 @@ import { VideoSubscriptionOptions, WatermarkOptions, } from './AgoraBase'; -import { RenderModeType } from './AgoraMediaBase'; +import { ContentInspectConfig, RenderModeType } from './AgoraMediaBase'; import { ChannelMediaOptions, IRtcEngine, @@ -52,7 +52,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { * If you want to join the same channel from different devices, ensure that the user IDs are different for all devices. * Ensure that the app ID you use to generate the token is the same as the app ID used when creating the IRtcEngine instance. * - * @param token The token generated on your server for authentication. + * @param token The token generated on your server for authentication. If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. * @param connection The connection information. See RtcConnection. * @param options The channel media options. See ChannelMediaOptions. * @@ -78,7 +78,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { * * This method lets the user leave the channel, for example, by hanging up or exiting the call. After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call. This method can be called whether or not a call is currently in progress. This method releases all resources related to the session. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback. * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. - * Calling leaveChannel will leave the channels when calling joinChannel and joinChannelEx at the same time. + * If you want to leave the channels that you joined by calling joinChannel and joinChannelEx, call the leaveChannel method. * * @param connection The connection information. See RtcConnection. * @param options The options for leaving the channel. See LeaveChannelOptions. This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect. @@ -522,7 +522,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Creates a data stream. * - * Creates a data stream. Each user can create up to five data streams in a single channel. Compared with createDataStreamEx, this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. + * Creates a data stream. Each user can create up to five data streams in a single channel. * * @param config The configurations for the data stream. See DataStreamConfig. * @param connection The connection information. See RtcConnection. @@ -641,8 +641,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Starts pushing media streams to a CDN without transcoding. * - * Ensure that you enable the Media Push service before using this function. See Enable Media Push. - * Call this method after joining a channel. + * Call this method after joining a channel. * Only hosts in the LIVE_BROADCASTING profile can call this method. * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. * @@ -918,6 +917,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/ts/Private/impl/IAgoraRtcEngineExImpl.ts b/ts/Private/impl/IAgoraRtcEngineExImpl.ts index 641b6d511..b48f9a5d1 100644 --- a/ts/Private/impl/IAgoraRtcEngineExImpl.ts +++ b/ts/Private/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/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index fe9ed97e1..53771b257 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -74,6 +74,7 @@ import { ChannelMediaOptions, CloudProxyType, DirectCdnStreamingMediaOptions, + FeatureType, IDirectCdnStreamingEventHandler, IMetadataObserver, IRtcEngine, @@ -6707,6 +6708,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 = {};