agora-electron-sdk 4.3.0 → 4.3.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/gulpfile.js +11 -4
  3. package/js/Private/AgoraBase.js +121 -24
  4. package/js/Private/AgoraMediaBase.js +15 -3
  5. package/js/Private/IAgoraRtcEngine.js +3 -3
  6. package/js/Private/impl/AgoraMediaBaseImpl.js +11 -1
  7. package/js/Private/impl/IAgoraMediaEngineImpl.js +28 -0
  8. package/js/Private/impl/IAgoraMediaPlayerImpl.js +2 -2
  9. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +1 -1
  10. package/js/Private/impl/IAgoraRtcEngineExImpl.js +37 -0
  11. package/js/Private/impl/IAgoraRtcEngineImpl.js +123 -11
  12. package/js/Private/impl/IAudioDeviceManagerImpl.js +2 -2
  13. package/js/Private/internal/IrisApiEngine.js +6 -0
  14. package/js/Private/internal/MediaEngineInternal.js +25 -5
  15. package/js/Private/internal/MediaPlayerInternal.js +0 -6
  16. package/js/Private/internal/MusicContentCenterInternal.js +0 -4
  17. package/js/Private/internal/RtcEngineExInternal.js +10 -14
  18. package/js/Private/ti/AgoraMediaBase-ti.js +5 -1
  19. package/js/Private/ti/IAgoraRtcEngine-ti.js +1 -0
  20. package/package.json +5 -3
  21. package/scripts/buildJS.js +3 -3
  22. package/scripts/clean.js +6 -35
  23. package/scripts/downloadPrebuild.js +50 -3
  24. package/scripts/synclib.js +32 -12
  25. package/scripts/util.js +29 -0
  26. package/ts/Private/AgoraBase.ts +146 -33
  27. package/ts/Private/AgoraMediaBase.ts +77 -47
  28. package/ts/Private/IAgoraLog.ts +1 -1
  29. package/ts/Private/IAgoraMediaEngine.ts +35 -5
  30. package/ts/Private/IAgoraMediaPlayer.ts +10 -1
  31. package/ts/Private/IAgoraRtcEngine.ts +147 -102
  32. package/ts/Private/IAgoraRtcEngineEx.ts +39 -4
  33. package/ts/Private/IAudioDeviceManager.ts +2 -2
  34. package/ts/Private/extension/IAgoraMediaEngineExtension.ts +3 -1
  35. package/ts/Private/impl/AgoraMediaBaseImpl.ts +15 -0
  36. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +37 -0
  37. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +2 -2
  38. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +1 -1
  39. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +53 -0
  40. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +153 -11
  41. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +2 -2
  42. package/ts/Private/internal/IrisApiEngine.ts +11 -1
  43. package/ts/Private/internal/MediaEngineInternal.ts +31 -0
  44. package/ts/Private/internal/MediaPlayerInternal.ts +0 -14
  45. package/ts/Private/internal/MusicContentCenterInternal.ts +0 -7
  46. package/ts/Private/internal/RtcEngineExInternal.ts +9 -28
  47. package/ts/Private/ti/AgoraMediaBase-ti.ts +5 -0
  48. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +1 -0
  49. package/types/Private/AgoraBase.d.ts +146 -36
  50. package/types/Private/AgoraBase.d.ts.map +1 -1
  51. package/types/Private/AgoraMediaBase.d.ts +77 -48
  52. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  53. package/types/Private/IAgoraLog.d.ts +1 -1
  54. package/types/Private/IAgoraMediaEngine.d.ts +33 -6
  55. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  56. package/types/Private/IAgoraMediaPlayer.d.ts +10 -1
  57. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  58. package/types/Private/IAgoraRtcEngine.d.ts +132 -103
  59. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  60. package/types/Private/IAgoraRtcEngineEx.d.ts +33 -4
  61. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  62. package/types/Private/IAudioDeviceManager.d.ts +2 -2
  63. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +2 -2
  64. package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -1
  65. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +2 -1
  66. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
  67. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +5 -1
  68. package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
  69. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +4 -0
  70. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
  71. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +18 -1
  72. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  73. package/types/Private/internal/IrisApiEngine.d.ts +3 -2
  74. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
  75. package/types/Private/internal/MediaEngineInternal.d.ts +4 -1
  76. package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -1
  77. package/types/Private/internal/MediaPlayerInternal.d.ts +0 -2
  78. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
  79. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  80. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -5
  81. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  82. package/types/Private/ti/AgoraMediaBase-ti.d.ts +1 -0
  83. package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -1
  84. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
@@ -51,6 +51,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
51
51
  * If you are already in a channel, you cannot rejoin it with the same user ID.
52
52
  * If you want to join the same channel from different devices, ensure that the user IDs are different for all devices.
53
53
  * Ensure that the App ID you use to generate the token is the same as the App ID used when creating the IRtcEngine instance.
54
+ * If you choose the Testing Mode (using an App ID for authentication) for your project and call this method to join a channel, you will automatically exit the channel after 24 hours.
54
55
  *
55
56
  * @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.
56
57
  * @param connection The connection information. See RtcConnection.
@@ -183,7 +184,9 @@ export abstract class IRtcEngineEx extends IRtcEngine {
183
184
  /**
184
185
  * Sets the video stream type to subscribe to.
185
186
  *
186
- * The SDK defaults to enabling low-quality video stream adaptive mode (AutoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate.
187
+ * The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. The SDK defaults to enabling low-quality video stream adaptive mode (AutoSimulcastStream) on the sending end, which means the sender does not actively send low-quality video stream. The receiver with the role of the host can initiate a low-quality video stream request by calling this method, and upon receiving the request, the sending end automatically starts sending the low-quality video stream.
188
+ * If the publisher has already called setDualStreamModeEx and set mode to DisableSimulcastStream (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamModeEx again on the sending end and adjust the settings.
189
+ * Calling this method on the receiving end of the audience role will not take effect.
187
190
  *
188
191
  * @param uid The user ID.
189
192
  * @param streamType The video stream type, see VideoStreamType.
@@ -511,7 +514,17 @@ export abstract class IRtcEngineEx extends IRtcEngine {
511
514
  abstract getConnectionStateEx(connection: RtcConnection): ConnectionStateType;
512
515
 
513
516
  /**
514
- * @ignore
517
+ * Enables or disables the built-in encryption.
518
+ *
519
+ * All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.
520
+ *
521
+ * @param connection The connection information. See RtcConnection.
522
+ * @param enabled Whether to enable built-in encryption: true : Enable the built-in encryption. false : (Default) Disable the built-in encryption.
523
+ * @param config Built-in encryption configurations. See EncryptionConfig.
524
+ *
525
+ * @returns
526
+ * 0: Success.
527
+ * < 0: Failure.
515
528
  */
516
529
  abstract enableEncryptionEx(
517
530
  connection: RtcConnection,
@@ -799,7 +812,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
799
812
  *
800
813
  * After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:
801
814
  * High-quality video stream: High bitrate, high resolution.
802
- * Low-quality video stream: Low bitrate, low resolution. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
815
+ * Low-quality video stream: Low bitrate, low resolution. Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamModeEx instead. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
803
816
  *
804
817
  * @param enabled Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode.
805
818
  * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to DisableSimulcastStream, setting streamConfig will not take effect.
@@ -818,7 +831,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
818
831
  /**
819
832
  * Sets the dual-stream mode on the sender side.
820
833
  *
821
- * The SDK defaults to enabling low-quality video stream adaptive mode (AutoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling setRemoteVideoStreamTypeEx, and the sender will automatically start sending low-quality video stream upon receiving the request.
834
+ * The SDK defaults to enabling low-quality video stream adaptive mode (AutoSimulcastStream) on the sending end, which means the sender does not actively send low-quality video stream. The receiver with the role of the host can initiate a low-quality video stream request by calling setRemoteVideoStreamTypeEx, and upon receiving the request, the sending end automatically starts sending the low-quality video stream.
822
835
  * If you want to modify this behavior, you can call this method and set mode to DisableSimulcastStream (never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).
823
836
  * 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 enableDualStreamModeEx is as follows:
824
837
  * When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamModeEx (false).
@@ -913,4 +926,26 @@ export abstract class IRtcEngineEx extends IRtcEngine {
913
926
  connection: RtcConnection,
914
927
  parameters: string
915
928
  ): number;
929
+
930
+ /**
931
+ * Gets the call ID with the connection ID.
932
+ *
933
+ * Call this method after joining a channel. When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get the callId parameter, and pass it in when calling methods such as rate and complain.
934
+ *
935
+ * @param connection The connection information. See RtcConnection.
936
+ *
937
+ * @returns
938
+ * The current call ID, if the method succeeds.
939
+ * An empty string, if the method call fails.
940
+ */
941
+ abstract getCallIdEx(connection: RtcConnection): string;
942
+
943
+ /**
944
+ * @ignore
945
+ */
946
+ abstract sendAudioMetadataEx(
947
+ connection: RtcConnection,
948
+ metadata: string,
949
+ length: number
950
+ ): number;
916
951
  }
@@ -55,7 +55,7 @@ export abstract class IAudioDeviceManager {
55
55
  abstract getPlaybackDevice(): string;
56
56
 
57
57
  /**
58
- * Retrieves the audio playback device associated with the device ID.
58
+ * Retrieves the information of the audio playback device.
59
59
  *
60
60
  * @returns
61
61
  * An AudioDeviceInfo object, which contains the ID and device name of the audio devices.
@@ -105,7 +105,7 @@ export abstract class IAudioDeviceManager {
105
105
  abstract getRecordingDevice(): string;
106
106
 
107
107
  /**
108
- * Retrieves the volume of the audio recording device.
108
+ * Retrieves the information of the audio recording device.
109
109
  *
110
110
  * @returns
111
111
  * An AudioDeviceInfo object, which includes the device ID and device name.
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  IAudioFrameObserver,
3
+ IFaceInfoObserver,
3
4
  IVideoEncodedFrameObserver,
4
5
  IVideoFrameObserver,
5
6
  } from '../AgoraMediaBase';
6
7
 
7
8
  export type IMediaEngineEvent = IAudioFrameObserver &
8
9
  IVideoFrameObserver &
9
- IVideoEncodedFrameObserver;
10
+ IVideoEncodedFrameObserver &
11
+ IFaceInfoObserver;
10
12
 
11
13
  declare module '../IAgoraMediaEngine' {
12
14
  interface IMediaEngine {
@@ -3,6 +3,7 @@ import {
3
3
  IAudioFrameObserverBase,
4
4
  IAudioPcmFrameSink,
5
5
  IAudioSpectrumObserver,
6
+ IFaceInfoObserver,
6
7
  IMediaRecorderObserver,
7
8
  IVideoEncodedFrameObserver,
8
9
  IVideoFrameMetaInfo,
@@ -190,6 +191,20 @@ export function processIVideoFrameObserver(
190
191
  }
191
192
  }
192
193
 
194
+ export function processIFaceInfoObserver(
195
+ handler: IFaceInfoObserver,
196
+ event: string,
197
+ jsonParams: any
198
+ ) {
199
+ switch (event) {
200
+ case 'onFaceInfo':
201
+ if (handler.onFaceInfo !== undefined) {
202
+ handler.onFaceInfo(jsonParams.outFaceInfo);
203
+ }
204
+ break;
205
+ }
206
+ }
207
+
193
208
  export function processIMediaRecorderObserver(
194
209
  handler: IMediaRecorderObserver,
195
210
  event: string,
@@ -9,6 +9,7 @@ import {
9
9
  ExternalVideoFrame,
10
10
  ExternalVideoSourceType,
11
11
  IAudioFrameObserver,
12
+ IFaceInfoObserver,
12
13
  IVideoEncodedFrameObserver,
13
14
  IVideoFrameObserver,
14
15
  } from '../AgoraMediaBase';
@@ -73,6 +74,24 @@ export class IMediaEngineImpl implements IMediaEngine {
73
74
  return 'MediaEngine_registerVideoEncodedFrameObserver_d45d579';
74
75
  }
75
76
 
77
+ registerFaceInfoObserver(observer: IFaceInfoObserver): number {
78
+ const apiType = this.getApiTypeFromRegisterFaceInfoObserver(observer);
79
+ const jsonParams = {
80
+ observer: observer,
81
+ toJSON: () => {
82
+ return {};
83
+ },
84
+ };
85
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
86
+ return jsonResults.result;
87
+ }
88
+
89
+ protected getApiTypeFromRegisterFaceInfoObserver(
90
+ observer: IFaceInfoObserver
91
+ ): string {
92
+ return 'MediaEngine_registerFaceInfoObserver_0303ed6';
93
+ }
94
+
76
95
  pushAudioFrame(frame: AudioFrame, trackId: number = 0): number {
77
96
  const apiType = this.getApiTypeFromPushAudioFrame(frame, trackId);
78
97
  const jsonParams = {
@@ -431,6 +450,24 @@ export class IMediaEngineImpl implements IMediaEngine {
431
450
  ): string {
432
451
  return 'MediaEngine_unregisterVideoEncodedFrameObserver';
433
452
  }
453
+
454
+ unregisterFaceInfoObserver(observer: IFaceInfoObserver): number {
455
+ const apiType = this.getApiTypeFromUnregisterFaceInfoObserver(observer);
456
+ const jsonParams = {
457
+ observer: observer,
458
+ toJSON: () => {
459
+ return {};
460
+ },
461
+ };
462
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
463
+ return jsonResults.result;
464
+ }
465
+
466
+ protected getApiTypeFromUnregisterFaceInfoObserver(
467
+ observer: IFaceInfoObserver
468
+ ): string {
469
+ return 'MediaEngine_unregisterFaceInfoObserver';
470
+ }
434
471
  }
435
472
 
436
473
  import { callIrisApi } from '../internal/IrisApiEngine';
@@ -958,7 +958,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
958
958
  key: string,
959
959
  value: number
960
960
  ): string {
961
- return 'MediaPlayer_setPlayerOptionInInt';
961
+ return 'MediaPlayer_setPlayerOption_4d05d29';
962
962
  }
963
963
 
964
964
  setPlayerOptionInString(key: string, value: string): number {
@@ -981,7 +981,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
981
981
  key: string,
982
982
  value: string
983
983
  ): string {
984
- return 'MediaPlayer_setPlayerOptionInString';
984
+ return 'MediaPlayer_setPlayerOption_ccad422';
985
985
  }
986
986
  }
987
987
 
@@ -194,7 +194,7 @@ export class IMusicPlayerImpl extends IMediaPlayerImpl implements IMusicPlayer {
194
194
  songCode: number,
195
195
  startPos: number = 0
196
196
  ): string {
197
- return 'MusicPlayer_openWithSongCode';
197
+ return 'MusicPlayer_open_303b92e';
198
198
  }
199
199
  }
200
200
 
@@ -1512,6 +1512,59 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
1512
1512
  ): string {
1513
1513
  return 'RtcEngineEx_setParametersEx_8225ea3';
1514
1514
  }
1515
+
1516
+ getCallIdEx(connection: RtcConnection): string {
1517
+ const apiType = this.getApiTypeFromGetCallIdEx(connection);
1518
+ const jsonParams = {
1519
+ connection: connection,
1520
+ toJSON: () => {
1521
+ return {
1522
+ connection: connection,
1523
+ };
1524
+ },
1525
+ };
1526
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1527
+ const callId = jsonResults.callId;
1528
+ return callId;
1529
+ }
1530
+
1531
+ protected getApiTypeFromGetCallIdEx(connection: RtcConnection): string {
1532
+ return 'RtcEngineEx_getCallIdEx_b13f7c4';
1533
+ }
1534
+
1535
+ sendAudioMetadataEx(
1536
+ connection: RtcConnection,
1537
+ metadata: string,
1538
+ length: number
1539
+ ): number {
1540
+ const apiType = this.getApiTypeFromSendAudioMetadataEx(
1541
+ connection,
1542
+ metadata,
1543
+ length
1544
+ );
1545
+ const jsonParams = {
1546
+ connection: connection,
1547
+ metadata: metadata,
1548
+ length: length,
1549
+ toJSON: () => {
1550
+ return {
1551
+ connection: connection,
1552
+ metadata: metadata,
1553
+ length: length,
1554
+ };
1555
+ },
1556
+ };
1557
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1558
+ return jsonResults.result;
1559
+ }
1560
+
1561
+ protected getApiTypeFromSendAudioMetadataEx(
1562
+ connection: RtcConnection,
1563
+ metadata: string,
1564
+ length: number
1565
+ ): string {
1566
+ return 'RtcEngineEx_sendAudioMetadataEx_e2bf1c4';
1567
+ }
1515
1568
  }
1516
1569
 
1517
1570
  import { callIrisApi } from '../internal/IrisApiEngine';
@@ -7,6 +7,7 @@ import {
7
7
  AudioScenarioType,
8
8
  AudioSessionOperationRestriction,
9
9
  BeautyOptions,
10
+ CameraStabilizationMode,
10
11
  ChannelMediaRelayConfiguration,
11
12
  ChannelProfileType,
12
13
  ClientRoleOptions,
@@ -19,6 +20,7 @@ import {
19
20
  EarMonitoringFilterType,
20
21
  EchoTestConfiguration,
21
22
  EncryptionConfig,
23
+ FocalLengthInfo,
22
24
  HeadphoneEqualizerPreset,
23
25
  IAudioEncodedFrameObserver,
24
26
  LastmileProbeConfig,
@@ -897,6 +899,17 @@ export function processIRtcEngineEventHandler(
897
899
  }
898
900
  break;
899
901
 
902
+ case 'onAudioMetadataReceived':
903
+ if (handler.onAudioMetadataReceived !== undefined) {
904
+ handler.onAudioMetadataReceived(
905
+ jsonParams.connection,
906
+ jsonParams.uid,
907
+ jsonParams.metadata,
908
+ jsonParams.length
909
+ );
910
+ }
911
+ break;
912
+
900
913
  case 'onExtensionEvent':
901
914
  if (handler.onExtensionEvent !== undefined) {
902
915
  handler.onExtensionEvent(
@@ -2686,6 +2699,24 @@ export class IRtcEngineImpl implements IRtcEngine {
2686
2699
  return 'RtcEngine_setAudioMixingPitch_46f8ab7';
2687
2700
  }
2688
2701
 
2702
+ setAudioMixingPlaybackSpeed(speed: number): number {
2703
+ const apiType = this.getApiTypeFromSetAudioMixingPlaybackSpeed(speed);
2704
+ const jsonParams = {
2705
+ speed: speed,
2706
+ toJSON: () => {
2707
+ return {
2708
+ speed: speed,
2709
+ };
2710
+ },
2711
+ };
2712
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
2713
+ return jsonResults.result;
2714
+ }
2715
+
2716
+ protected getApiTypeFromSetAudioMixingPlaybackSpeed(speed: number): string {
2717
+ return 'RtcEngine_setAudioMixingPlaybackSpeed_46f8ab7';
2718
+ }
2719
+
2689
2720
  getEffectsVolume(): number {
2690
2721
  const apiType = this.getApiTypeFromGetEffectsVolume();
2691
2722
  const jsonParams = {};
@@ -3541,6 +3572,26 @@ export class IRtcEngineImpl implements IRtcEngine {
3541
3572
  return 'RtcEngine_uploadLogFile_66d4ecd';
3542
3573
  }
3543
3574
 
3575
+ writeLog(level: LogLevel, fmt: string): number {
3576
+ const apiType = this.getApiTypeFromWriteLog(level, fmt);
3577
+ const jsonParams = {
3578
+ level: level,
3579
+ fmt: fmt,
3580
+ toJSON: () => {
3581
+ return {
3582
+ level: level,
3583
+ fmt: fmt,
3584
+ };
3585
+ },
3586
+ };
3587
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
3588
+ return jsonResults.result;
3589
+ }
3590
+
3591
+ protected getApiTypeFromWriteLog(level: LogLevel, fmt: string): string {
3592
+ return 'RtcEngine_writeLog_62889f6';
3593
+ }
3594
+
3544
3595
  setLocalRenderMode(
3545
3596
  renderMode: RenderModeType,
3546
3597
  mirrorMode: VideoMirrorModeType = VideoMirrorModeType.VideoMirrorModeAuto
@@ -4807,6 +4858,26 @@ export class IRtcEngineImpl implements IRtcEngine {
4807
4858
  return 'RtcEngine_setCameraAutoExposureFaceModeEnabled_5039d15';
4808
4859
  }
4809
4860
 
4861
+ setCameraStabilizationMode(mode: CameraStabilizationMode): number {
4862
+ const apiType = this.getApiTypeFromSetCameraStabilizationMode(mode);
4863
+ const jsonParams = {
4864
+ mode: mode,
4865
+ toJSON: () => {
4866
+ return {
4867
+ mode: mode,
4868
+ };
4869
+ },
4870
+ };
4871
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
4872
+ return jsonResults.result;
4873
+ }
4874
+
4875
+ protected getApiTypeFromSetCameraStabilizationMode(
4876
+ mode: CameraStabilizationMode
4877
+ ): string {
4878
+ return 'RtcEngine_setCameraStabilizationMode_701b981';
4879
+ }
4880
+
4810
4881
  setDefaultAudioRouteToSpeakerphone(defaultToSpeaker: boolean): number {
4811
4882
  const apiType =
4812
4883
  this.getApiTypeFromSetDefaultAudioRouteToSpeakerphone(defaultToSpeaker);
@@ -4875,6 +4946,35 @@ export class IRtcEngineImpl implements IRtcEngine {
4875
4946
  return 'RtcEngine_setRouteInCommunicationMode_46f8ab7';
4876
4947
  }
4877
4948
 
4949
+ isCameraCenterStageSupported(): boolean {
4950
+ const apiType = this.getApiTypeFromIsCameraCenterStageSupported();
4951
+ const jsonParams = {};
4952
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
4953
+ return jsonResults.result;
4954
+ }
4955
+
4956
+ protected getApiTypeFromIsCameraCenterStageSupported(): string {
4957
+ return 'RtcEngine_isCameraCenterStageSupported';
4958
+ }
4959
+
4960
+ enableCameraCenterStage(enabled: boolean): number {
4961
+ const apiType = this.getApiTypeFromEnableCameraCenterStage(enabled);
4962
+ const jsonParams = {
4963
+ enabled: enabled,
4964
+ toJSON: () => {
4965
+ return {
4966
+ enabled: enabled,
4967
+ };
4968
+ },
4969
+ };
4970
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
4971
+ return jsonResults.result;
4972
+ }
4973
+
4974
+ protected getApiTypeFromEnableCameraCenterStage(enabled: boolean): string {
4975
+ return 'RtcEngine_enableCameraCenterStage_5039d15';
4976
+ }
4977
+
4878
4978
  getScreenCaptureSources(
4879
4979
  thumbSize: Size,
4880
4980
  iconSize: Size,
@@ -5160,6 +5260,25 @@ export class IRtcEngineImpl implements IRtcEngine {
5160
5260
  return 'RtcEngine_queryScreenCaptureCapability';
5161
5261
  }
5162
5262
 
5263
+ queryCameraFocalLengthCapability(): {
5264
+ focalLengthInfos: FocalLengthInfo[];
5265
+ size: number;
5266
+ } {
5267
+ const apiType = this.getApiTypeFromQueryCameraFocalLengthCapability();
5268
+ const jsonParams = {};
5269
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
5270
+ const focalLengthInfos = jsonResults.focalLengthInfos;
5271
+ const size = jsonResults.size;
5272
+ return {
5273
+ focalLengthInfos,
5274
+ size,
5275
+ };
5276
+ }
5277
+
5278
+ protected getApiTypeFromQueryCameraFocalLengthCapability(): string {
5279
+ return 'RtcEngine_queryCameraFocalLengthCapability_2dee6af';
5280
+ }
5281
+
5163
5282
  setScreenCaptureScenario(screenScenario: ScreenScenarioType): number {
5164
5283
  const apiType = this.getApiTypeFromSetScreenCaptureScenario(screenScenario);
5165
5284
  const jsonParams = {
@@ -6656,6 +6775,29 @@ export class IRtcEngineImpl implements IRtcEngine {
6656
6775
  return 'RtcEngine_isFeatureAvailableOnDevice_a694b62';
6657
6776
  }
6658
6777
 
6778
+ sendAudioMetadata(metadata: string, length: number): number {
6779
+ const apiType = this.getApiTypeFromSendAudioMetadata(metadata, length);
6780
+ const jsonParams = {
6781
+ metadata: metadata,
6782
+ length: length,
6783
+ toJSON: () => {
6784
+ return {
6785
+ metadata: metadata,
6786
+ length: length,
6787
+ };
6788
+ },
6789
+ };
6790
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
6791
+ return jsonResults.result;
6792
+ }
6793
+
6794
+ protected getApiTypeFromSendAudioMetadata(
6795
+ metadata: string,
6796
+ length: number
6797
+ ): string {
6798
+ return 'RtcEngine_sendAudioMetadata_878f309';
6799
+ }
6800
+
6659
6801
  startScreenCaptureBySourceType(
6660
6802
  sourceType: VideoSourceType,
6661
6803
  config: ScreenCaptureConfiguration
@@ -6682,7 +6824,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6682
6824
  sourceType: VideoSourceType,
6683
6825
  config: ScreenCaptureConfiguration
6684
6826
  ): string {
6685
- return 'RtcEngine_startScreenCaptureBySourceType';
6827
+ return 'RtcEngine_startScreenCapture_9ebb320';
6686
6828
  }
6687
6829
 
6688
6830
  stopScreenCaptureBySourceType(sourceType: VideoSourceType): number {
@@ -6703,7 +6845,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6703
6845
  protected getApiTypeFromStopScreenCaptureBySourceType(
6704
6846
  sourceType: VideoSourceType
6705
6847
  ): string {
6706
- return 'RtcEngine_stopScreenCaptureBySourceType';
6848
+ return 'RtcEngine_stopScreenCapture_4fd718e';
6707
6849
  }
6708
6850
 
6709
6851
  release(sync: boolean = false): void {
@@ -6731,7 +6873,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6731
6873
  }
6732
6874
 
6733
6875
  protected getApiTypeFromStartPreviewWithoutSourceType(): string {
6734
- return 'RtcEngine_startPreviewWithoutSourceType';
6876
+ return 'RtcEngine_startPreview';
6735
6877
  }
6736
6878
 
6737
6879
  getAudioDeviceManager(): IAudioDeviceManager {
@@ -6742,7 +6884,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6742
6884
  }
6743
6885
 
6744
6886
  protected getApiTypeFromGetAudioDeviceManager(): string {
6745
- return 'RtcEngine_getAudioDeviceManager';
6887
+ return 'RtcEngine_queryInterface_257d192';
6746
6888
  }
6747
6889
 
6748
6890
  getVideoDeviceManager(): IVideoDeviceManager {
@@ -6753,7 +6895,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6753
6895
  }
6754
6896
 
6755
6897
  protected getApiTypeFromGetVideoDeviceManager(): string {
6756
- return 'RtcEngine_getVideoDeviceManager';
6898
+ return 'RtcEngine_queryInterface_257d192';
6757
6899
  }
6758
6900
 
6759
6901
  getMusicContentCenter(): IMusicContentCenter {
@@ -6764,7 +6906,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6764
6906
  }
6765
6907
 
6766
6908
  protected getApiTypeFromGetMusicContentCenter(): string {
6767
- return 'RtcEngine_getMusicContentCenter';
6909
+ return 'RtcEngine_queryInterface_257d192';
6768
6910
  }
6769
6911
 
6770
6912
  getMediaEngine(): IMediaEngine {
@@ -6775,7 +6917,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6775
6917
  }
6776
6918
 
6777
6919
  protected getApiTypeFromGetMediaEngine(): string {
6778
- return 'RtcEngine_getMediaEngine';
6920
+ return 'RtcEngine_queryInterface_257d192';
6779
6921
  }
6780
6922
 
6781
6923
  getLocalSpatialAudioEngine(): ILocalSpatialAudioEngine {
@@ -6786,7 +6928,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6786
6928
  }
6787
6929
 
6788
6930
  protected getApiTypeFromGetLocalSpatialAudioEngine(): string {
6789
- return 'RtcEngine_getLocalSpatialAudioEngine';
6931
+ return 'RtcEngine_queryInterface_257d192';
6790
6932
  }
6791
6933
 
6792
6934
  getH265Transcoder(): IH265Transcoder {
@@ -6797,7 +6939,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6797
6939
  }
6798
6940
 
6799
6941
  protected getApiTypeFromGetH265Transcoder(): string {
6800
- return 'RtcEngine_getH265Transcoder';
6942
+ return 'RtcEngine_queryInterface_257d192';
6801
6943
  }
6802
6944
 
6803
6945
  sendMetaData(metadata: Metadata, sourceType: VideoSourceType): number {
@@ -6855,7 +6997,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6855
6997
  }
6856
6998
 
6857
6999
  protected getApiTypeFromDestroyRendererByView(view: any): string {
6858
- return 'RtcEngine_destroyRendererByView';
7000
+ return '';
6859
7001
  }
6860
7002
 
6861
7003
  destroyRendererByConfig(
@@ -6888,7 +7030,7 @@ export class IRtcEngineImpl implements IRtcEngine {
6888
7030
  channelId?: string,
6889
7031
  uid: number = 0
6890
7032
  ): string {
6891
- return 'RtcEngine_destroyRendererByConfig';
7033
+ return '';
6892
7034
  }
6893
7035
 
6894
7036
  unregisterAudioEncodedFrameObserver(
@@ -63,7 +63,7 @@ export class IAudioDeviceManagerImpl implements IAudioDeviceManager {
63
63
  }
64
64
 
65
65
  protected getApiTypeFromGetPlaybackDeviceInfo(): string {
66
- return 'AudioDeviceManager_getPlaybackDeviceInfo_5540658';
66
+ return 'AudioDeviceManager_getPlaybackDeviceInfo_ed3a96d';
67
67
  }
68
68
 
69
69
  setPlaybackDeviceVolume(volume: number): number {
@@ -134,7 +134,7 @@ export class IAudioDeviceManagerImpl implements IAudioDeviceManager {
134
134
  }
135
135
 
136
136
  protected getApiTypeFromGetRecordingDeviceInfo(): string {
137
- return 'AudioDeviceManager_getRecordingDeviceInfo_5540658';
137
+ return 'AudioDeviceManager_getRecordingDeviceInfo_ed3a96d';
138
138
  }
139
139
 
140
140
  setRecordingDeviceVolume(volume: number): number {
@@ -9,6 +9,7 @@ import {
9
9
  IAudioFrameObserver,
10
10
  IAudioPcmFrameSink,
11
11
  IAudioSpectrumObserver,
12
+ IFaceInfoObserver,
12
13
  IMediaRecorderObserver,
13
14
  IVideoEncodedFrameObserver,
14
15
  IVideoFrameObserver,
@@ -36,6 +37,7 @@ import {
36
37
  processIAudioFrameObserverBase,
37
38
  processIAudioPcmFrameSink,
38
39
  processIAudioSpectrumObserver,
40
+ processIFaceInfoObserver,
39
41
  processIMediaRecorderObserver,
40
42
  processIVideoEncodedFrameObserver,
41
43
  processIVideoFrameObserver,
@@ -126,7 +128,8 @@ type ProcessorType =
126
128
  | IDirectCdnStreamingEventHandler
127
129
  | IRtcEngineEventHandler
128
130
  | IMusicContentCenterEventHandler
129
- | IH265TranscoderObserver;
131
+ | IH265TranscoderObserver
132
+ | IFaceInfoObserver;
130
133
 
131
134
  type EventProcessors = {
132
135
  IAudioFrameObserver: EventProcessor<IAudioFrameObserver>;
@@ -143,6 +146,7 @@ type EventProcessors = {
143
146
  IRtcEngineEventHandler: EventProcessor<IRtcEngineEventHandler>;
144
147
  IMusicContentCenterEventHandler: EventProcessor<IMusicContentCenterEventHandler>;
145
148
  IH265TranscoderObserver: EventProcessor<IH265TranscoderObserver>;
149
+ IFaceInfoObserver: EventProcessor<IFaceInfoObserver>;
146
150
  };
147
151
 
148
152
  /**
@@ -368,6 +372,12 @@ export const EVENT_PROCESSORS: EventProcessors = {
368
372
  func: [processIH265TranscoderObserver],
369
373
  handlers: () => H265TranscoderInternal._h265_transcoder_observers,
370
374
  },
375
+ IFaceInfoObserver: {
376
+ suffix: 'FaceInfoObserver_',
377
+ type: () => EVENT_TYPE.IMediaEngine,
378
+ func: [processIFaceInfoObserver],
379
+ handlers: () => MediaEngineInternal._face_info_observers,
380
+ },
371
381
  };
372
382
 
373
383
  function handleEvent(...[event, data, buffers]: any) {