diff --git a/packages/@iris/rtc/generate/IAgoraRtcEngine.ts b/packages/@iris/rtc/generate/IAgoraRtcEngine.ts index 4c9b723..11db4e4 100644 --- a/packages/@iris/rtc/generate/IAgoraRtcEngine.ts +++ b/packages/@iris/rtc/generate/IAgoraRtcEngine.ts @@ -1302,7 +1302,7 @@ export interface IVideoDeviceManager { setDevice_4ad5f6e(deviceIdUTF8: string): CallApiReturnType; - getDevice_73b9872(deviceIdUTF8: string): CallApiReturnType; + getDevice_73b9872(): CallApiReturnType; numberOfCapabilities_3a2037f(deviceIdUTF8: string): CallApiReturnType; diff --git a/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts b/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts index c7e87af..f1d4276 100644 --- a/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts +++ b/packages/rtc/src/binding/IAgoraRtcEngineDispatch.ts @@ -1971,12 +1971,8 @@ export class IVideoDeviceManagerDispatch implements IVideoDeviceManager { } // @ts-ignore - getDevice_73b9872(apiParam: ApiParam): CallApiReturnType { - let obj = JSON.parse(apiParam.data) as any; - let deviceIdUTF8 = obj.deviceIdUTF8; - if (deviceIdUTF8 === undefined) throw 'deviceIdUTF8 is undefined'; - - return this._impl.getDevice_73b9872(deviceIdUTF8); + getDevice_73b9872(): CallApiReturnType { + return this._impl.getDevice_73b9872(); } // @ts-ignore diff --git a/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts b/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts index ccb875b..a80aa0d 100644 --- a/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts +++ b/packages/rtc/test/binding/IAgoraRtcEngineDispatch.test.ts @@ -2487,31 +2487,6 @@ describe('IVideoDeviceManager', () => { ).toBeCalledWith('test'); }); - test('VideoDeviceManager_getDevice_73b9872 parameter', async () => { - let nParam = { - deviceIdUTF8: undefined, - }; - for (let i in nParam) { - try { - await IrisCore.callIrisApi( - apiEnginePtr, - new IrisCore.EventParam( - 'VideoDeviceManager_getDevice_73b9872', - JSON.stringify(nParam), - 0, - '', - ['test'], - [], - 1 - ) - ); - } catch (e) { - expect(e).toEqual(i + ' is undefined'); - } - nParam[i] = 'test'; - } - }); - test('VideoDeviceManager_getDevice_73b9872 impl call', async () => { jest .spyOn( @@ -2519,9 +2494,7 @@ describe('IVideoDeviceManager', () => { 'getDevice_73b9872' ) .mockResolvedValue(new CallIrisApiResult(0, '')); - let nParam = { - deviceIdUTF8: 'test', - }; + let nParam = {}; let apiParam = new IrisCore.EventParam( 'VideoDeviceManager_getDevice_73b9872', JSON.stringify(nParam), @@ -2539,7 +2512,7 @@ describe('IVideoDeviceManager', () => { expect( irisRtcEngine.implDispatchesMap.get('VideoDeviceManager')._impl .getDevice_73b9872 - ).toBeCalledWith('test'); + ).toBeCalledWith(); }); test('VideoDeviceManager_numberOfCapabilities_3a2037f impl call', async () => {