From 11b042b7a930dd249b943b02ccb044bea191db30 Mon Sep 17 00:00:00 2001 From: gxz Date: Fri, 16 Aug 2024 11:52:51 +0800 Subject: [PATCH] feat: renderMode and mirrorMode --- packages/rtc/src/base/DefaultValue.ts | 6 + .../src/binding/IAgoraRtcEngineDispatch.ts | 63 +++-- .../src/binding/IAgoraRtcEngineExDispatch.ts | 30 ++- packages/rtc/src/engine/IrisClient.ts | 4 +- packages/rtc/src/engine/IrisClientManager.ts | 66 +---- packages/rtc/src/engine/IrisClientObserver.ts | 3 +- .../event_handler/IrisClientEventHandler.ts | 5 +- packages/rtc/src/helper/ImplHelper.ts | 6 +- packages/rtc/src/helper/TrackHelper.ts | 12 +- .../rtc/src/impl/IAgoraRtcEngineExImpl.ts | 71 +++++- packages/rtc/src/impl/IAgoraRtcEngineImpl.ts | 166 +++++++++++-- packages/rtc/src/util/AgoraTranslate.ts | 15 ++ .../binding/IAgoraRtcEngineDispatch.test.ts | 225 +++++++++++++++--- .../binding/IAgoraRtcEngineExDispatch.test.ts | 99 +++++++- .../rtc/test/impl/IAgoraRtcEngineImpl.test.ts | 66 ++++- .../test/impl/IAgoraRtcEngineImplEx.test.ts | 24 ++ scripts/terra/config/support_list.json | 5 + 17 files changed, 712 insertions(+), 154 deletions(-) diff --git a/packages/rtc/src/base/DefaultValue.ts b/packages/rtc/src/base/DefaultValue.ts index ea0d91e..cb4a1bf 100644 --- a/packages/rtc/src/base/DefaultValue.ts +++ b/packages/rtc/src/base/DefaultValue.ts @@ -1,7 +1,13 @@ import * as NATIVE_RTC from '@iris/native-rtc'; +import { VideoPlayerConfig } from 'agora-rtc-sdk-ng'; export const defaultLeaveChannelOptions: NATIVE_RTC.LeaveChannelOptions = { stopAudioMixing: true, stopAllEffect: true, stopMicrophoneRecording: true, }; + +export const defaultVideoPlayerConfig: VideoPlayerConfig = { + fit: 'cover', + mirror: false, +}; diff --git a/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts b/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts index 6ab6b85..c70a774 100644 --- a/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts +++ b/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts @@ -3372,34 +3372,65 @@ export class IRtcEngineDispatch implements IRtcEngine { // @ts-ignore setLocalRenderMode_cfb201b(apiParam: ApiParam): CallApiReturnType { - AgoraConsole.warn( - 'RtcEngine_setLocalRenderMode_cfb201b not supported in this platform!' - ); - return this._engine.returnResult(false, -ERROR_CODE_TYPE.ERR_NOT_SUPPORTED); + let obj = JSON.parse(apiParam.data) as any; + let renderMode = obj.renderMode; + if (renderMode === undefined) { + AgoraConsole.error('renderMode is undefined'); + throw 'renderMode is undefined'; + } + let mirrorMode = obj.mirrorMode; + if (mirrorMode === undefined) { + AgoraConsole.error('mirrorMode is undefined'); + throw 'mirrorMode is undefined'; + } + + return this._impl.setLocalRenderMode_cfb201b(renderMode, mirrorMode); } // @ts-ignore setRemoteRenderMode_6771ce0(apiParam: ApiParam): CallApiReturnType { - AgoraConsole.warn( - 'RtcEngine_setRemoteRenderMode_6771ce0 not supported in this platform!' - ); - return this._engine.returnResult(false, -ERROR_CODE_TYPE.ERR_NOT_SUPPORTED); + let obj = JSON.parse(apiParam.data) as any; + let uid = obj.uid; + if (uid === undefined) { + AgoraConsole.error('uid is undefined'); + throw 'uid is undefined'; + } + let renderMode = obj.renderMode; + if (renderMode === undefined) { + AgoraConsole.error('renderMode is undefined'); + throw 'renderMode is undefined'; + } + let mirrorMode = obj.mirrorMode; + if (mirrorMode === undefined) { + AgoraConsole.error('mirrorMode is undefined'); + throw 'mirrorMode is undefined'; + } + + return this._impl.setRemoteRenderMode_6771ce0(uid, renderMode, mirrorMode); } // @ts-ignore setLocalRenderMode_bedb5ae(apiParam: ApiParam): CallApiReturnType { - AgoraConsole.warn( - 'RtcEngine_setLocalRenderMode_bedb5ae not supported in this platform!' - ); - return this._engine.returnResult(false, -ERROR_CODE_TYPE.ERR_NOT_SUPPORTED); + let obj = JSON.parse(apiParam.data) as any; + let renderMode = obj.renderMode; + if (renderMode === undefined) { + AgoraConsole.error('renderMode is undefined'); + throw 'renderMode is undefined'; + } + + return this._impl.setLocalRenderMode_bedb5ae(renderMode); } // @ts-ignore setLocalVideoMirrorMode_b8a6c69(apiParam: ApiParam): CallApiReturnType { - AgoraConsole.warn( - 'RtcEngine_setLocalVideoMirrorMode_b8a6c69 not supported in this platform!' - ); - return this._engine.returnResult(false, -ERROR_CODE_TYPE.ERR_NOT_SUPPORTED); + let obj = JSON.parse(apiParam.data) as any; + let mirrorMode = obj.mirrorMode; + if (mirrorMode === undefined) { + AgoraConsole.error('mirrorMode is undefined'); + throw 'mirrorMode is undefined'; + } + + return this._impl.setLocalVideoMirrorMode_b8a6c69(mirrorMode); } // @ts-ignore diff --git a/packages/rtc/src/binding/IAgoraRtcEngineExDispatch.ts b/packages/rtc/src/binding/IAgoraRtcEngineExDispatch.ts index c5610a3..de51f17 100644 --- a/packages/rtc/src/binding/IAgoraRtcEngineExDispatch.ts +++ b/packages/rtc/src/binding/IAgoraRtcEngineExDispatch.ts @@ -298,10 +298,34 @@ export class IRtcEngineExDispatch extends IRtcEngineDispatch // @ts-ignore setRemoteRenderModeEx_a72fe4e(apiParam: ApiParam): CallApiReturnType { - AgoraConsole.warn( - 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e not supported in this platform!' + let obj = JSON.parse(apiParam.data) as any; + let uid = obj.uid; + if (uid === undefined) { + AgoraConsole.error('uid is undefined'); + throw 'uid is undefined'; + } + let renderMode = obj.renderMode; + if (renderMode === undefined) { + AgoraConsole.error('renderMode is undefined'); + throw 'renderMode is undefined'; + } + let mirrorMode = obj.mirrorMode; + if (mirrorMode === undefined) { + AgoraConsole.error('mirrorMode is undefined'); + throw 'mirrorMode is undefined'; + } + let connection = obj.connection; + if (connection === undefined) { + AgoraConsole.error('connection is undefined'); + throw 'connection is undefined'; + } + + return this._impl.setRemoteRenderModeEx_a72fe4e( + uid, + renderMode, + mirrorMode, + connection ); - return this._engine.returnResult(false, -ERROR_CODE_TYPE.ERR_NOT_SUPPORTED); } // @ts-ignore diff --git a/packages/rtc/src/engine/IrisClient.ts b/packages/rtc/src/engine/IrisClient.ts index 14e72ae..130c7e6 100644 --- a/packages/rtc/src/engine/IrisClient.ts +++ b/packages/rtc/src/engine/IrisClient.ts @@ -219,7 +219,7 @@ export class IrisClient { addLocalAudioTrack(trackPackage: AudioTrackPackage) { this.audioTrackPackages.push(trackPackage); - trackPackage.setIrisClient(this); + trackPackage.irisClient = this; } removeLocalAudioTrack(trackPackage: AudioTrackPackage) { @@ -235,7 +235,7 @@ export class IrisClient { setLocalVideoTrack(trackPackage: VideoTrackPackage) { this.videoTrackPackage = trackPackage; - trackPackage.setIrisClient(this); + trackPackage.irisClient = this; } clearLocalVideoTrack() { diff --git a/packages/rtc/src/engine/IrisClientManager.ts b/packages/rtc/src/engine/IrisClientManager.ts index 4d4c5be..99f7d4b 100644 --- a/packages/rtc/src/engine/IrisClientManager.ts +++ b/packages/rtc/src/engine/IrisClientManager.ts @@ -10,6 +10,7 @@ import { IRemoteAudioTrack, IRemoteVideoTrack, ITrack, + VideoPlayerConfig, } from 'agora-rtc-sdk-ng'; import { @@ -18,6 +19,7 @@ import { IrisVideoFrameBufferConfig, VideoParams, } from '../base/BaseType'; +import { defaultVideoPlayerConfig } from '../base/DefaultValue'; import { IrisTrackEventHandler } from '../event_handler/IrisTrackEventHandler'; import { IrisClient } from './IrisClient'; @@ -29,6 +31,7 @@ export type WalkILocalVideoPackageTrackFun = (track: VideoTrackPackage) => void; export class RemoteUserPackage { connection: NATIVE_RTC.RtcConnection; element: string; + videoPlayerConfig: VideoPlayerConfig; uid: number; videoSourceType: NATIVE_RTC.VIDEO_SOURCE_TYPE; audioSourceType: IrisAudioSourceType; @@ -36,29 +39,14 @@ export class RemoteUserPackage { constructor( connection: NATIVE_RTC.RtcConnection, element: string, + videoPlayerConfig: VideoPlayerConfig = defaultVideoPlayerConfig, uid: number, videoSourceType: NATIVE_RTC.VIDEO_SOURCE_TYPE, audioSourceType: IrisAudioSourceType ) { this.connection = connection; this.element = element; - this.uid = uid; - this.videoSourceType = videoSourceType; - this.audioSourceType = audioSourceType; - } - - update({ - element = this.element, - uid = this.uid, - videoSourceType = this.videoSourceType, - audioSourceType = this.audioSourceType, - }: { - element?: string; - uid?: number; - videoSourceType?: NATIVE_RTC.VIDEO_SOURCE_TYPE; - audioSourceType?: IrisAudioSourceType; - }) { - this.element = element; + this.videoPlayerConfig = videoPlayerConfig; this.uid = uid; this.videoSourceType = videoSourceType; this.audioSourceType = audioSourceType; @@ -69,6 +57,7 @@ export class RemoteUserPackage { export class VideoTrackPackage { element?: string; + videoPlayerConfig: VideoPlayerConfig; type?: NATIVE_RTC.VIDEO_SOURCE_TYPE | NATIVE_RTC.EXTERNAL_VIDEO_SOURCE_TYPE; track?: ILocalVideoTrack | IRemoteVideoTrack; isPreview: boolean = false; @@ -76,32 +65,12 @@ export class VideoTrackPackage { constructor( element?: string, + videoPlayerConfig: VideoPlayerConfig = defaultVideoPlayerConfig, type?: NATIVE_RTC.VIDEO_SOURCE_TYPE | NATIVE_RTC.EXTERNAL_VIDEO_SOURCE_TYPE, track?: ILocalVideoTrack | IRemoteVideoTrack ) { this.element = element; - this.type = type; - this.track = track; - } - - setPreview(isPreview: boolean) { - this.isPreview = isPreview; - } - - setIrisClient(irisClient: IrisClient) { - this.irisClient = irisClient; - } - - update({ - type = this.type, - track = this.track, - element = this.element, - }: { - type?: NATIVE_RTC.VIDEO_SOURCE_TYPE | NATIVE_RTC.EXTERNAL_VIDEO_SOURCE_TYPE; - track?: ILocalVideoTrack | IRemoteVideoTrack; - element?: string; - }) { - this.element = element; + this.videoPlayerConfig = videoPlayerConfig; this.type = type; this.track = track; } @@ -138,25 +107,6 @@ export class AudioTrackPackage { this.track = track; } - setIrisClient(irisClient: IrisClient) { - this.irisClient = irisClient; - } - - update({ - type = this.type, - track = this.track, - }: { - type?: IrisAudioSourceType; - track?: - | ILocalAudioTrack - | IRemoteAudioTrack - | IMicrophoneAudioTrack - | ILocalTrack; - }) { - this.type = type; - this.track = track; - } - dispose() { try { if (this.track) { diff --git a/packages/rtc/src/engine/IrisClientObserver.ts b/packages/rtc/src/engine/IrisClientObserver.ts index f3fdb67..b37bc5f 100644 --- a/packages/rtc/src/engine/IrisClientObserver.ts +++ b/packages/rtc/src/engine/IrisClientObserver.ts @@ -397,7 +397,8 @@ export class IrisClientObserver { if (userPackage.element) { this._engine.trackHelper.play( user!.videoTrack as ITrack, - userPackage.element + userPackage.element, + userPackage.videoPlayerConfig ); } let param: IrisTrackEventHandlerParam = { diff --git a/packages/rtc/src/event_handler/IrisClientEventHandler.ts b/packages/rtc/src/event_handler/IrisClientEventHandler.ts index eb99f5f..d6df1aa 100644 --- a/packages/rtc/src/event_handler/IrisClientEventHandler.ts +++ b/packages/rtc/src/event_handler/IrisClientEventHandler.ts @@ -196,6 +196,7 @@ export class IrisClientEventHandler { userPackage = new RemoteUserPackage( connection, '', + undefined, remoteUid, NATIVE_RTC.VIDEO_SOURCE_TYPE.VIDEO_SOURCE_REMOTE, IrisAudioSourceType.kAudioSourceTypeRemote @@ -205,9 +206,7 @@ export class IrisClientEventHandler { this.agoraRTCClient ); } else { - userPackage.update({ - uid: remoteUid, - }); + userPackage.uid = remoteUid; } } diff --git a/packages/rtc/src/helper/ImplHelper.ts b/packages/rtc/src/helper/ImplHelper.ts index d6bd12b..afcbd23 100644 --- a/packages/rtc/src/helper/ImplHelper.ts +++ b/packages/rtc/src/helper/ImplHelper.ts @@ -103,6 +103,7 @@ export class ImplHelper { if (!videoTrackPackage) { videoTrackPackage = new VideoTrackPackage( + undefined, undefined, videoType, videoTrack @@ -111,7 +112,7 @@ export class ImplHelper { videoTrackPackage ); } else { - videoTrackPackage.update({ track: videoTrack }); + videoTrackPackage.track = videoTrack; } let trackEventHandler: IrisTrackEventHandler = new IrisTrackEventHandler( { @@ -171,6 +172,7 @@ export class ImplHelper { if (!videoTrackPackage) { videoTrackPackage = new VideoTrackPackage( + undefined, undefined, videoType, videoTrack @@ -179,7 +181,7 @@ export class ImplHelper { videoTrackPackage ); } else { - videoTrackPackage.update({ track: videoTrack }); + videoTrackPackage.track = videoTrack; } //设置屏幕共享特殊的事件 diff --git a/packages/rtc/src/helper/TrackHelper.ts b/packages/rtc/src/helper/TrackHelper.ts index 62adbfe..eba61a3 100644 --- a/packages/rtc/src/helper/TrackHelper.ts +++ b/packages/rtc/src/helper/TrackHelper.ts @@ -6,6 +6,7 @@ import { IMicrophoneAudioTrack, IRemoteAudioTrack, ITrack, + VideoPlayerConfig, } from 'agora-rtc-sdk-ng'; import { CallIrisApiResult } from 'iris-web-core'; @@ -20,11 +21,16 @@ export class TrackHelper { } public play( - track: ITrack | IRemoteAudioTrack, - element?: string | HTMLElement + track: ITrack, + element?: string | HTMLElement, + config?: VideoPlayerConfig ): void { try { - track?.play(element); + if (track.trackMediaType === 'video' && config) { + (track as ICameraVideoTrack)?.play(element!, config); + } else { + track?.play(element); + } } catch (e) { AgoraConsole.error(e); Promise.resolve( diff --git a/packages/rtc/src/impl/IAgoraRtcEngineExImpl.ts b/packages/rtc/src/impl/IAgoraRtcEngineExImpl.ts index 4424a0b..dcf2256 100644 --- a/packages/rtc/src/impl/IAgoraRtcEngineExImpl.ts +++ b/packages/rtc/src/impl/IAgoraRtcEngineExImpl.ts @@ -1,5 +1,5 @@ import * as NATIVE_RTC from '@iris/native-rtc'; -import { IMicrophoneAudioTrack } from 'agora-rtc-sdk-ng'; +import { IMicrophoneAudioTrack, VideoPlayerConfig } from 'agora-rtc-sdk-ng'; import { CallApiReturnType, CallIrisApiResult } from 'iris-web-core'; import { IrisAudioSourceType } from '../base/BaseType'; @@ -12,9 +12,7 @@ import { NotifyRemoteType, NotifyType } from '../engine/IrisClientObserver'; import { IrisRtcEngine } from '../engine/IrisRtcEngine'; import { SendDataStreamMessage } from '../helper/ClientHelper'; - -import { AgoraConsole } from '../util/AgoraConsole'; -import { isDefined } from '../util/AgoraTool'; +import { AgoraConsole, AgoraTranslate, isDefined } from '../util'; //@ts-ignore export class IRtcEngineExImpl implements NATIVE_RTC.IRtcEngineEx { @@ -162,17 +160,24 @@ export class IRtcEngineExImpl implements NATIVE_RTC.IRtcEngineEx { canvas.uid ); if (remoteUser) { - remoteUser.update({ - element: canvas.view, - }); - // this._engine.irisClientManager.irisClientObserver.notifyRemote( - // NotifyRemoteType.SUBSCRIBE_VIDEO_TRACK, - // [remoteUser] - // ); + remoteUser.element = canvas.view; } else { + let config: VideoPlayerConfig = { + fit: AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + canvas.renderMode + ? canvas.renderMode + : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ), + mirror: + canvas.mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + canvas.mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; let userPackage = new RemoteUserPackage( connection, canvas.view, + config, canvas.uid, NATIVE_RTC.VIDEO_SOURCE_TYPE.VIDEO_SOURCE_REMOTE, IrisAudioSourceType.kAudioSourceTypeMicrophonePrimary @@ -361,4 +366,48 @@ export class IRtcEngineExImpl implements NATIVE_RTC.IRtcEngineEx { return this._engine.execute(process); } + + setRemoteRenderModeEx_a72fe4e( + uid: number, + renderMode: NATIVE_RTC.RENDER_MODE_TYPE, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE, + connection: NATIVE_RTC.RtcConnection + ): CallApiReturnType { + let config: VideoPlayerConfig = { + fit: AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + renderMode ? renderMode : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ), + mirror: + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + let remoteUserPackage = this._engine.irisClientManager.remoteUserPackages.find( + (user) => { + return user.uid === uid; + } + ); + if (remoteUserPackage) { + let irisClient = this._engine.irisClientManager.getIrisClientByConnection( + connection + ); + if (irisClient) { + let user = irisClient.agoraRTCClient?.remoteUsers.find( + (item) => item.uid === remoteUserPackage!.uid + ); + if (user && user.hasVideo) { + remoteUserPackage.videoPlayerConfig = config; + if (user.videoTrack) { + this._engine.trackHelper.play( + user.videoTrack, + remoteUserPackage.element, + remoteUserPackage.videoPlayerConfig + ); + } + } + } + } + return this._engine.returnResult(); + } } diff --git a/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts b/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts index 772c68d..73f2ae5 100644 --- a/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts +++ b/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts @@ -5,6 +5,7 @@ import { ICameraVideoTrack, ILocalVideoTrack, IMicrophoneAudioTrack, + VideoPlayerConfig, } from 'agora-rtc-sdk-ng'; import { AsyncTaskType, @@ -362,6 +363,7 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { )[0]; if (!videoTrackPackage) { videoTrackPackage = new VideoTrackPackage( + undefined, undefined, sourceType, undefined @@ -372,10 +374,10 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { if (this._engine.implHelper.isVideoCamera(sourceType)) { let cTrack: ICameraVideoTrack; cTrack = await this._engine.implHelper.createVideoCameraTrack(); - videoTrackPackage.update({ track: cTrack }); + videoTrackPackage.track = cTrack; } } - videoTrackPackage.setPreview(true); + videoTrackPackage.isPreview = true; try { let track = videoTrackPackage?.track as ILocalVideoTrack; if (track) { @@ -384,7 +386,11 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { [videoTrackPackage] ); if (videoTrackPackage.element) { - this._engine.trackHelper.play(track, videoTrackPackage.element); + this._engine.trackHelper.play( + track, + videoTrackPackage.element, + videoTrackPackage.videoPlayerConfig + ); } } } catch (err) { @@ -425,9 +431,9 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { videoTrackPackage = this._engine.irisClientManager.getLocalVideoTrackPackageBySourceType( sourceType )[0]; - videoTrackPackage?.setPreview(false); + videoTrackPackage.isPreview = false; try { - let track = videoTrackPackage?.track as ILocalVideoTrack; + let track = videoTrackPackage.track as ILocalVideoTrack; if (track) { await this._engine.irisClientManager.irisClientObserver.notifyLocal( @@ -435,10 +441,7 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { [videoTrackPackage] ); if (videoTrackPackage.element && videoTrackPackage.track) { - this._engine.trackHelper.play( - videoTrackPackage.track, - videoTrackPackage.element - ); + this._engine.trackHelper.stop(videoTrackPackage.track); } } } catch (err) { @@ -485,15 +488,28 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { sourceType )[0]; if (!trackPackage) { - trackPackage = new VideoTrackPackage(canvas.view, sourceType); + let config: VideoPlayerConfig = { + fit: AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + canvas.renderMode + ? canvas.renderMode + : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ), + mirror: + canvas.mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + canvas.mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + trackPackage = new VideoTrackPackage(canvas.view, config, sourceType); this._engine.irisClientManager.addLocalVideoTrackPackage(trackPackage); if (this._engine.implHelper.isVideoCamera(sourceType)) { let cTrack: ICameraVideoTrack; cTrack = await this._engine.implHelper.createVideoCameraTrack(); - trackPackage.update({ track: cTrack }); + trackPackage.track = cTrack; } } - trackPackage.update({ type: sourceType, element: canvas.view }); + trackPackage.type = sourceType; + trackPackage.element = canvas.view; let track = trackPackage.track as ILocalVideoTrack; if (track) { @@ -503,7 +519,11 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { ); if (trackPackage.element && trackPackage.isPreview) { - this._engine.trackHelper.play(track, trackPackage.element); + this._engine.trackHelper.play( + track, + trackPackage.element, + trackPackage.videoPlayerConfig + ); } } return this._engine.returnResult(); @@ -892,7 +912,7 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { config.startPlayTime = Math.floor(startPos / 1000); } bufferSourceAudioTrackPackage.track.startProcessAudioBuffer(config); - bufferSourceAudioTrackPackage.track.play(); + this._engine.trackHelper.play(bufferSourceAudioTrackPackage.track); } catch (reason) { AgoraConsole.error(reason); } @@ -1138,4 +1158,122 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { }) ); } + + setLocalRenderMode_cfb201b( + renderMode: NATIVE_RTC.RENDER_MODE_TYPE, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE + ): CallApiReturnType { + let config: VideoPlayerConfig = { + fit: AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + renderMode ? renderMode : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ), + mirror: + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + this._engine.irisClientManager.localVideoTrackPackages.map( + (videoTrackPackage) => { + let track = videoTrackPackage.track as ILocalVideoTrack; + videoTrackPackage.videoPlayerConfig = config; + if (track) { + this._engine.trackHelper.play( + track, + videoTrackPackage.element, + videoTrackPackage.videoPlayerConfig + ); + } + } + ); + return this._engine.returnResult(); + } + + setRemoteRenderMode_6771ce0( + uid: number, + renderMode: NATIVE_RTC.RENDER_MODE_TYPE, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE + ): CallApiReturnType { + let config: VideoPlayerConfig = { + fit: AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + renderMode ? renderMode : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ), + mirror: + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + let remoteUserPackage = this._engine.irisClientManager.remoteUserPackages.find( + (user) => { + return user.uid === uid; + } + ); + if (remoteUserPackage) { + let irisClient = this._engine.irisClientManager.getIrisClientByConnection( + remoteUserPackage.connection + ); + if (irisClient) { + let user = irisClient.agoraRTCClient?.remoteUsers.find( + (item) => item.uid === remoteUserPackage!.uid + ); + if (user && user.hasVideo) { + remoteUserPackage.videoPlayerConfig = config; + if (user.videoTrack) { + this._engine.trackHelper.play( + user.videoTrack, + remoteUserPackage.element, + remoteUserPackage.videoPlayerConfig + ); + } + } + } + } + return this._engine.returnResult(); + } + + setLocalRenderMode_bedb5ae( + renderMode: NATIVE_RTC.RENDER_MODE_TYPE + ): CallApiReturnType { + let fit = AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit( + renderMode ? renderMode : NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT + ); + this._engine.irisClientManager.localVideoTrackPackages.map( + (videoTrackPackage) => { + let track = videoTrackPackage.track as ILocalVideoTrack; + videoTrackPackage.videoPlayerConfig.fit = fit; + if (track) { + this._engine.trackHelper.play( + track, + videoTrackPackage.element, + videoTrackPackage.videoPlayerConfig + ); + } + } + ); + return this._engine.returnResult(); + } + + setLocalVideoMirrorMode_b8a6c69( + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE + ): CallApiReturnType { + let mirror = + mirrorMode === NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO || + mirrorMode === + NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED; + this._engine.irisClientManager.localVideoTrackPackages.map( + (videoTrackPackage) => { + let track = videoTrackPackage.track as ILocalVideoTrack; + videoTrackPackage.videoPlayerConfig.mirror = mirror; + if (track) { + this._engine.trackHelper.play( + track, + videoTrackPackage.element, + videoTrackPackage.videoPlayerConfig + ); + } + } + ); + return this._engine.returnResult(); + } } diff --git a/packages/rtc/src/util/AgoraTranslate.ts b/packages/rtc/src/util/AgoraTranslate.ts index 0ba4bca..ffc18b9 100644 --- a/packages/rtc/src/util/AgoraTranslate.ts +++ b/packages/rtc/src/util/AgoraTranslate.ts @@ -538,4 +538,19 @@ export class AgoraTranslate { return NATIVE_RTC.CONTENT_INSPECT_RESULT.CONTENT_INSPECT_NEUTRAL; } } + + public static NATIVE_RTC_RENDER_MODE_TYPE2Fit( + renderMode: NATIVE_RTC.RENDER_MODE_TYPE + ): 'cover' | 'contain' | 'fill' { + switch (renderMode) { + case NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_ADAPTIVE: + return 'cover'; + case NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT: + return 'contain'; + case NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_HIDDEN: + return 'cover'; + default: + return 'fill'; + } + } } diff --git a/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts b/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts index 424ca13..20ddbce 100644 --- a/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts +++ b/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts @@ -7525,9 +7525,55 @@ describe('IRtcEngine', () => { ); }); + test('RtcEngine_setLocalRenderMode_cfb201b parameter', async () => { + let nParam = { + renderMode: undefined, + mirrorMode: undefined, + }; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setLocalRenderMode_cfb201b', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('renderMode is undefined'); + } + //@ts-ignore + nParam.renderMode = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setLocalRenderMode_cfb201b', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('mirrorMode is undefined'); + } + //@ts-ignore + nParam.mirrorMode = 'test'; + }); + test('RtcEngine_setLocalRenderMode_cfb201b impl call', async () => { jest - .spyOn(irisRtcEngine, 'returnResult') + .spyOn( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl, + 'setLocalRenderMode_cfb201b' + ) .mockResolvedValue(new CallIrisApiResult(0, '')); let nParam = { renderMode: 'test', @@ -7545,18 +7591,82 @@ describe('IRtcEngine', () => { await IrisCore.callIrisApi(apiEnginePtr, apiParam); expect( irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl - ?.setLocalRenderMode_cfb201b - ).toBeUndefined(); - expect(irisRtcEngine.returnResult).toBeCalledTimes(1); - expect(irisRtcEngine.returnResult).toBeCalledWith( - false, - -NATIVE_RTC.ERROR_CODE_TYPE.ERR_NOT_SUPPORTED - ); + .setLocalRenderMode_cfb201b + ).toBeCalledTimes(1); + expect( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl + .setLocalRenderMode_cfb201b + ).toBeCalledWith('test', 'test'); + }); + + test('RtcEngine_setRemoteRenderMode_6771ce0 parameter', async () => { + let nParam = { + uid: undefined, + renderMode: undefined, + mirrorMode: undefined, + }; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setRemoteRenderMode_6771ce0', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('uid is undefined'); + } + //@ts-ignore + nParam.uid = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setRemoteRenderMode_6771ce0', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('renderMode is undefined'); + } + //@ts-ignore + nParam.renderMode = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setRemoteRenderMode_6771ce0', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('mirrorMode is undefined'); + } + //@ts-ignore + nParam.mirrorMode = 'test'; }); test('RtcEngine_setRemoteRenderMode_6771ce0 impl call', async () => { jest - .spyOn(irisRtcEngine, 'returnResult') + .spyOn( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl, + 'setRemoteRenderMode_6771ce0' + ) .mockResolvedValue(new CallIrisApiResult(0, '')); let nParam = { uid: 'test', @@ -7575,18 +7685,44 @@ describe('IRtcEngine', () => { await IrisCore.callIrisApi(apiEnginePtr, apiParam); expect( irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl - ?.setRemoteRenderMode_6771ce0 - ).toBeUndefined(); - expect(irisRtcEngine.returnResult).toBeCalledTimes(1); - expect(irisRtcEngine.returnResult).toBeCalledWith( - false, - -NATIVE_RTC.ERROR_CODE_TYPE.ERR_NOT_SUPPORTED - ); + .setRemoteRenderMode_6771ce0 + ).toBeCalledTimes(1); + expect( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl + .setRemoteRenderMode_6771ce0 + ).toBeCalledWith('test', 'test', 'test'); + }); + + test('RtcEngine_setLocalRenderMode_bedb5ae parameter', async () => { + let nParam = { + renderMode: undefined, + }; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setLocalRenderMode_bedb5ae', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('renderMode is undefined'); + } + //@ts-ignore + nParam.renderMode = 'test'; }); test('RtcEngine_setLocalRenderMode_bedb5ae impl call', async () => { jest - .spyOn(irisRtcEngine, 'returnResult') + .spyOn( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl, + 'setLocalRenderMode_bedb5ae' + ) .mockResolvedValue(new CallIrisApiResult(0, '')); let nParam = { renderMode: 'test', @@ -7603,18 +7739,44 @@ describe('IRtcEngine', () => { await IrisCore.callIrisApi(apiEnginePtr, apiParam); expect( irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl - ?.setLocalRenderMode_bedb5ae - ).toBeUndefined(); - expect(irisRtcEngine.returnResult).toBeCalledTimes(1); - expect(irisRtcEngine.returnResult).toBeCalledWith( - false, - -NATIVE_RTC.ERROR_CODE_TYPE.ERR_NOT_SUPPORTED - ); + .setLocalRenderMode_bedb5ae + ).toBeCalledTimes(1); + expect( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl + .setLocalRenderMode_bedb5ae + ).toBeCalledWith('test'); + }); + + test('RtcEngine_setLocalVideoMirrorMode_b8a6c69 parameter', async () => { + let nParam = { + mirrorMode: undefined, + }; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngine_setLocalVideoMirrorMode_b8a6c69', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('mirrorMode is undefined'); + } + //@ts-ignore + nParam.mirrorMode = 'test'; }); test('RtcEngine_setLocalVideoMirrorMode_b8a6c69 impl call', async () => { jest - .spyOn(irisRtcEngine, 'returnResult') + .spyOn( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl, + 'setLocalVideoMirrorMode_b8a6c69' + ) .mockResolvedValue(new CallIrisApiResult(0, '')); let nParam = { mirrorMode: 'test', @@ -7631,13 +7793,12 @@ describe('IRtcEngine', () => { await IrisCore.callIrisApi(apiEnginePtr, apiParam); expect( irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl - ?.setLocalVideoMirrorMode_b8a6c69 - ).toBeUndefined(); - expect(irisRtcEngine.returnResult).toBeCalledTimes(1); - expect(irisRtcEngine.returnResult).toBeCalledWith( - false, - -NATIVE_RTC.ERROR_CODE_TYPE.ERR_NOT_SUPPORTED - ); + .setLocalVideoMirrorMode_b8a6c69 + ).toBeCalledTimes(1); + expect( + irisRtcEngine.implDispatchesMap.get('RtcEngine')._impl + .setLocalVideoMirrorMode_b8a6c69 + ).toBeCalledWith('test'); }); test('RtcEngine_enableDualStreamMode_5039d15 impl call', async () => { diff --git a/packages/rtc/test/binding/IAgoraRtcEngineExDispatch.test.ts b/packages/rtc/test/binding/IAgoraRtcEngineExDispatch.test.ts index 150d021..b96ef02 100644 --- a/packages/rtc/test/binding/IAgoraRtcEngineExDispatch.test.ts +++ b/packages/rtc/test/binding/IAgoraRtcEngineExDispatch.test.ts @@ -1164,9 +1164,93 @@ describe('IRtcEngineEx', () => { ); }); + test('RtcEngineEx_setRemoteRenderModeEx_a72fe4e parameter', async () => { + let nParam = { + uid: undefined, + renderMode: undefined, + mirrorMode: undefined, + connection: undefined, + }; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('uid is undefined'); + } + //@ts-ignore + nParam.uid = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('renderMode is undefined'); + } + //@ts-ignore + nParam.renderMode = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('mirrorMode is undefined'); + } + //@ts-ignore + nParam.mirrorMode = 'test'; + try { + await IrisCore.callIrisApi( + apiEnginePtr, + new IrisCore.EventParam( + 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e', + JSON.stringify(nParam), + 0, + '', + ['test'], + [], + 1 + ) + ); + } catch (e) { + expect(e).toEqual('connection is undefined'); + } + //@ts-ignore + nParam.connection = 'test'; + }); + test('RtcEngineEx_setRemoteRenderModeEx_a72fe4e impl call', async () => { jest - .spyOn(irisRtcEngine, 'returnResult') + .spyOn( + irisRtcEngine.implDispatchesMap.get('RtcEngineEx')._impl, + 'setRemoteRenderModeEx_a72fe4e' + ) .mockResolvedValue(new CallIrisApiResult(0, '')); let nParam = { uid: 'test', @@ -1186,13 +1270,12 @@ describe('IRtcEngineEx', () => { await IrisCore.callIrisApi(apiEnginePtr, apiParam); expect( irisRtcEngine.implDispatchesMap.get('RtcEngineEx')._impl - ?.setRemoteRenderModeEx_a72fe4e - ).toBeUndefined(); - expect(irisRtcEngine.returnResult).toBeCalledTimes(1); - expect(irisRtcEngine.returnResult).toBeCalledWith( - false, - -NATIVE_RTC.ERROR_CODE_TYPE.ERR_NOT_SUPPORTED - ); + .setRemoteRenderModeEx_a72fe4e + ).toBeCalledTimes(1); + expect( + irisRtcEngine.implDispatchesMap.get('RtcEngineEx')._impl + .setRemoteRenderModeEx_a72fe4e + ).toBeCalledWith('test', 'test', 'test', 'test'); }); test('RtcEngineEx_enableLoopbackRecordingEx_4f41542 impl call', async () => { diff --git a/packages/rtc/test/impl/IAgoraRtcEngineImpl.test.ts b/packages/rtc/test/impl/IAgoraRtcEngineImpl.test.ts index 0529c73..3c9b0fa 100644 --- a/packages/rtc/test/impl/IAgoraRtcEngineImpl.test.ts +++ b/packages/rtc/test/impl/IAgoraRtcEngineImpl.test.ts @@ -16,7 +16,7 @@ import { IrisWebRtc } from '../../src/IrisRtcApi'; import { IrisAudioSourceType } from '../../src/base/BaseType'; import { BufferSourceAudioTrackPackage } from '../../src/engine/IrisClientManager'; -import { AgoraConsole } from '../../src/util'; +import { AgoraConsole, AgoraTranslate } from '../../src/util'; import { IrisRtcEngine } from '../engine/IrisRtcEngine'; @@ -1090,4 +1090,68 @@ describe('IAgoraRtcEngineImpl', () => { ); expect(JSON.parse(result.data).userInfo.uid).toBe(userInfoList[0].uid); }); + test('setLocalRenderMode_cfb201b', async () => { + let param = { + renderMode: NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + await setupLocalVideo(apiEnginePtr, null); + await callIris(apiEnginePtr, 'RtcEngine_setLocalRenderMode_cfb201b', param); + expect( + irisRtcEngine.irisClientManager.localVideoTrackPackages[0] + .videoPlayerConfig.fit + ).toBe(AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit(param.renderMode)); + expect( + irisRtcEngine.irisClientManager.localVideoTrackPackages[0] + .videoPlayerConfig.mirror + ).toBe(true); + }); + test('setLocalRenderMode_bedb5ae', async () => { + let param = { + renderMode: NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT, + }; + await setupLocalVideo(apiEnginePtr, null); + await callIris(apiEnginePtr, 'RtcEngine_setLocalRenderMode_bedb5ae', param); + expect( + irisRtcEngine.irisClientManager.localVideoTrackPackages[0] + .videoPlayerConfig.fit + ).toBe(AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit(param.renderMode)); + }); + test('setLocalVideoMirrorMode_b8a6c69', async () => { + let param = { + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + await setupLocalVideo(apiEnginePtr, null); + await callIris( + apiEnginePtr, + 'RtcEngine_setLocalVideoMirrorMode_b8a6c69', + param + ); + expect( + irisRtcEngine.irisClientManager.localVideoTrackPackages[0] + .videoPlayerConfig.mirror + ).toBe(true); + }); + test('setRemoteRenderMode_6771ce0', async () => { + let param = { + uid: TEST_REMOTE_UID, + renderMode: NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + }; + await setupLocalVideo(apiEnginePtr, null); + await joinChannel(apiEnginePtr, null); + await callIris( + apiEnginePtr, + 'RtcEngine_setRemoteRenderMode_6771ce0', + param + ); + expect( + irisRtcEngine.irisClientManager.remoteUserPackages[0].videoPlayerConfig + .fit + ).toBe(AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit(param.renderMode)); + expect( + irisRtcEngine.irisClientManager.remoteUserPackages[0].videoPlayerConfig + .mirror + ).toBe(true); + }); }); diff --git a/packages/rtc/test/impl/IAgoraRtcEngineImplEx.test.ts b/packages/rtc/test/impl/IAgoraRtcEngineImplEx.test.ts index cec467a..e13740c 100644 --- a/packages/rtc/test/impl/IAgoraRtcEngineImplEx.test.ts +++ b/packages/rtc/test/impl/IAgoraRtcEngineImplEx.test.ts @@ -11,6 +11,8 @@ import { IrisWebRtc } from '../../src/IrisRtcApi'; import { IrisAudioSourceType } from '../../src/base/BaseType'; import { defaultLeaveChannelOptions } from '../../src/base/DefaultValue'; +import { AgoraTranslate } from '../../src/util'; + import { IrisRtcEngine } from '../engine/IrisRtcEngine'; import { @@ -430,4 +432,26 @@ describe('IAgoraRtcEngineImpl', () => { payload: 'test', }); }); + test('setRemoteRenderModeEx_a72fe4e', async () => { + let connection = await joinChannelEx(apiEnginePtr); + let param = { + uid: TEST_REMOTE_UID, + renderMode: NATIVE_RTC.RENDER_MODE_TYPE.RENDER_MODE_FIT, + mirrorMode: NATIVE_RTC.VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_ENABLED, + connection: connection, + }; + await callIris( + apiEnginePtr, + 'RtcEngineEx_setRemoteRenderModeEx_a72fe4e', + param + ); + expect( + irisRtcEngine.irisClientManager.remoteUserPackages[0].videoPlayerConfig + .fit + ).toBe(AgoraTranslate.NATIVE_RTC_RENDER_MODE_TYPE2Fit(param.renderMode)); + expect( + irisRtcEngine.irisClientManager.remoteUserPackages[0].videoPlayerConfig + .mirror + ).toBe(true); + }); }); diff --git a/scripts/terra/config/support_list.json b/scripts/terra/config/support_list.json index ace73ac..63b3add 100644 --- a/scripts/terra/config/support_list.json +++ b/scripts/terra/config/support_list.json @@ -46,6 +46,11 @@ "RtcEngine_stopEffect_46f8ab7", "RtcEngine_playEffect_531a783", "RtcEngine_stopAllEffects", + "RtcEngine_setLocalRenderMode_bedb5ae", + "RtcEngine_setLocalRenderMode_cfb201b", + "RtcEngine_setLocalVideoMirrorMode_b8a6c69", + "RtcEngine_setRemoteRenderMode_6771ce0", + "RtcEngineEx_setRemoteRenderModeEx_a72fe4e", "RtcEngineEx_joinChannelEx_a3cd08c", "RtcEngineEx_muteAllRemoteVideoStreamsEx_3cf17a4", "RtcEngineEx_muteAllRemoteAudioStreamsEx_3cf17a4",