diff --git a/src/AgoraBase.ts b/src/AgoraBase.ts index cd6beb99..5f93297f 100644 --- a/src/AgoraBase.ts +++ b/src/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, } /** @@ -3223,6 +3284,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. */ @@ -3753,6 +3854,20 @@ export class FaceShapeBeautyOptions { styleIntensity?: number; } +/** + * @ignore + */ +export class FilterEffectOptions { + /** + * @ignore + */ + path?: string; + /** + * @ignore + */ + strength?: number; +} + /** * The low-light enhancement mode. */ @@ -3821,10 +3936,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, } /** @@ -5242,6 +5353,20 @@ export class LocalAccessPointConfiguration { disableAut?: boolean; } +/** + * @ignore + */ +export enum RecorderStreamType { + /** + * @ignore + */ + Rtc = 0, + /** + * @ignore + */ + Preview = 1, +} + /** * @ignore */ @@ -5254,6 +5379,10 @@ export class RecorderStreamInfo { * @ignore */ uid?: number; + /** + * @ignore + */ + type?: RecorderStreamType; } /** diff --git a/src/AgoraMediaBase.ts b/src/AgoraMediaBase.ts index 3691c8e0..107a8cf3 100644 --- a/src/AgoraMediaBase.ts +++ b/src/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/src/IAgoraMediaEngine.ts b/src/IAgoraMediaEngine.ts index f911ce52..540274f2 100644 --- a/src/IAgoraMediaEngine.ts +++ b/src/IAgoraMediaEngine.ts @@ -156,6 +156,11 @@ export abstract class IMediaEngine { encodedVideoOption?: SenderOptions ): number; + /** + * @ignore + */ + abstract setExternalRemoteEglContext(eglContext: any): number; + /** * Sets the external audio source parameters. * diff --git a/src/IAgoraRtcEngine.ts b/src/IAgoraRtcEngine.ts index b5414263..7aa21df3 100644 --- a/src/IAgoraRtcEngine.ts +++ b/src/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. */ @@ -946,7 +955,7 @@ export class ScreenCaptureConfiguration { /** * @ignore */ - windowId?: any; + windowId?: number; /** * @ignore */ @@ -1026,7 +1035,7 @@ export class ScreenCaptureSourceInfo { /** * @ignore */ - sourceId?: any; + sourceId?: number; /** * @ignore */ @@ -1066,7 +1075,7 @@ export class ScreenCaptureSourceInfo { /** * @ignore */ - sourceDisplayId?: any; + sourceDisplayId?: number; } /** @@ -1565,7 +1574,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; @@ -3367,6 +3376,15 @@ export abstract class IRtcEngine { type?: MediaSourceType ): FaceShapeAreaOptions; + /** + * @ignore + */ + abstract setFilterEffectOptions( + enabled: boolean, + options: FilterEffectOptions, + type?: MediaSourceType + ): number; + /** * Sets low-light enhancement. * @@ -4783,6 +4801,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. * @@ -5711,7 +5742,7 @@ export abstract class IRtcEngine { * @ignore */ abstract startScreenCaptureByWindowId( - windowId: any, + windowId: number, regionRect: Rectangle, captureParams: ScreenCaptureParameters ): number; @@ -5820,6 +5851,11 @@ export abstract class IRtcEngine { size: number; }; + /** + * @ignore + */ + abstract setExternalMediaProjection(): any; + /** * Sets the screen sharing scenario. * @@ -5991,6 +6027,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. * @@ -6816,6 +6869,11 @@ export abstract class IRtcEngine { */ abstract sendAudioMetadata(metadata: string, length: number): number; + /** + * @ignore + */ + abstract queryHDRCapability(videoModule: VideoModuleType): HdrCapability; + /** * @ignore */ @@ -6966,6 +7024,11 @@ export abstract class IRtcEngine { * The native handle of the SDK. */ abstract getNativeHandle(): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number; } /** @@ -6998,6 +7061,10 @@ export enum MediaDeviceStateType { * 2: The device is disabled. */ MediaDeviceStateDisabled = 2, + /** + * @ignore + */ + MediaDeviceStatePluggedIn = 3, /** * 4: The device is not found. */ diff --git a/src/IAgoraRtcEngineEx.ts b/src/IAgoraRtcEngineEx.ts index efabe8f7..06310325 100644 --- a/src/IAgoraRtcEngineEx.ts +++ b/src/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,15 @@ export abstract class IRtcEngineEx extends IRtcEngine { options?: LeaveChannelOptions ): number; + /** + * @ignore + */ + abstract leaveChannelWithUserAccountEx( + channelId: string, + userAccount: string, + options?: LeaveChannelOptions + ): number; + /** * Updates the channel media options after joining the channel. * @@ -934,4 +947,13 @@ export abstract class IRtcEngineEx extends IRtcEngine { metadata: string, length: number ): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number; } diff --git a/src/impl/IAgoraMediaEngineImpl.ts b/src/impl/IAgoraMediaEngineImpl.ts index ddc9e7a5..4598eded 100644 --- a/src/impl/IAgoraMediaEngineImpl.ts +++ b/src/impl/IAgoraMediaEngineImpl.ts @@ -172,6 +172,24 @@ export class IMediaEngineImpl implements IMediaEngine { return 'MediaEngine_setExternalVideoSource_fff99b6'; } + setExternalRemoteEglContext(eglContext: any): number { + const apiType = this.getApiTypeFromSetExternalRemoteEglContext(eglContext); + const jsonParams = { + eglContext: eglContext, + toJSON: () => { + return { + eglContext: eglContext, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromSetExternalRemoteEglContext(eglContext: any): string { + return 'MediaEngine_setExternalRemoteEglContext_f337cbf'; + } + setExternalAudioSource( enabled: boolean, sampleRate: number, diff --git a/src/impl/IAgoraRtcEngineExImpl.ts b/src/impl/IAgoraRtcEngineExImpl.ts index d3fdc02c..f454f6d2 100644 --- a/src/impl/IAgoraRtcEngineExImpl.ts +++ b/src/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,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_leaveChannelEx_b03ee9a'; } + 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 @@ -1595,6 +1633,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { ): string { return 'RtcEngineEx_sendAudioMetadataEx_e2bf1c4'; } + + takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfigEx( + 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 getApiTypeFromTakeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngineEx_takeSnapshotEx_b856417'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/src/impl/IAgoraRtcEngineImpl.ts b/src/impl/IAgoraRtcEngineImpl.ts index 43c3736a..d17ed658 100644 --- a/src/impl/IAgoraRtcEngineImpl.ts +++ b/src/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 @@ -6876,6 +7028,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 @@ -7142,6 +7315,29 @@ export class IRtcEngineImpl implements IRtcEngine { protected getApiTypeFromGetNativeHandle(): string { return 'RtcEngine_getNativeHandle'; } + + takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfig(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 getApiTypeFromTakeSnapshotWithConfig( + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngine_takeSnapshot_5669ea6'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/src/ti/IAgoraRtcEngine-ti.ts b/src/ti/IAgoraRtcEngine-ti.ts index 144cfd88..79084cc5 100644 --- a/src/ti/IAgoraRtcEngine-ti.ts +++ b/src/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"))),