agora-electron-sdk 4.2.6 → 4.3.0-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 (172) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/js/Private/AgoraBase.js +139 -174
  3. package/js/Private/AgoraMediaBase.js +49 -20
  4. package/js/Private/AgoraMediaPlayerTypes.js +32 -23
  5. package/js/Private/IAgoraH265Transcoder.js +39 -0
  6. package/js/Private/IAgoraMediaStreamingSource.js +32 -32
  7. package/js/Private/IAgoraMusicContentCenter.js +19 -19
  8. package/js/Private/IAgoraRhythmPlayer.js +9 -9
  9. package/js/Private/IAgoraRtcEngine.js +12 -12
  10. package/js/Private/IAgoraSpatialAudio.js +3 -31
  11. package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
  12. package/js/Private/impl/AgoraMediaBaseImpl.js +26 -2
  13. package/js/Private/impl/IAgoraH265TranscoderImpl.js +119 -0
  14. package/js/Private/impl/IAgoraMediaEngineImpl.js +13 -13
  15. package/js/Private/impl/IAgoraMediaPlayerImpl.js +92 -74
  16. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +12 -2
  17. package/js/Private/impl/IAgoraMediaRecorderImpl.js +2 -2
  18. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +20 -20
  19. package/js/Private/impl/IAgoraRtcEngineExImpl.js +66 -84
  20. package/js/Private/impl/IAgoraRtcEngineImpl.js +456 -440
  21. package/js/Private/impl/IAgoraSpatialAudioImpl.js +157 -181
  22. package/js/Private/impl/IAudioDeviceManagerImpl.js +22 -22
  23. package/js/Private/internal/AgoraH265TranscoderInternal.js +86 -0
  24. package/js/Private/internal/AgoraMediaBaseInternal.js +34 -0
  25. package/js/Private/internal/IrisApiEngine.js +35 -20
  26. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +0 -39
  27. package/js/Private/internal/MediaPlayerInternal.js +22 -21
  28. package/js/Private/internal/MusicContentCenterInternal.js +1 -4
  29. package/js/Private/internal/RtcEngineExInternal.js +101 -134
  30. package/js/Private/ti/AgoraMediaBase-ti.js +1 -1
  31. package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
  32. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +4 -2
  33. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -5
  34. package/js/Private/ti/IAgoraRtcEngine-ti.js +12 -11
  35. package/js/Renderer/AgoraView.js +28 -14
  36. package/js/Renderer/IRenderer.js +65 -17
  37. package/js/Renderer/IRendererManager.js +230 -0
  38. package/js/Renderer/RendererCache.js +170 -0
  39. package/js/Renderer/RendererManager.js +49 -460
  40. package/js/Renderer/WebGLRenderer/index.js +82 -234
  41. package/js/Renderer/YUVCanvasRenderer/index.js +27 -147
  42. package/js/Types.js +6 -6
  43. package/js/Utils.js +37 -88
  44. package/package.json +4 -3
  45. package/scripts/clean.js +12 -0
  46. package/scripts/synclib.js +8 -2
  47. package/ts/Private/AgoraBase.ts +225 -201
  48. package/ts/Private/AgoraMediaBase.ts +63 -25
  49. package/ts/Private/AgoraMediaPlayerTypes.ts +67 -24
  50. package/ts/Private/IAgoraH265Transcoder.ts +73 -0
  51. package/ts/Private/IAgoraLog.ts +1 -0
  52. package/ts/Private/IAgoraMediaEngine.ts +12 -7
  53. package/ts/Private/IAgoraMediaPlayer.ts +47 -21
  54. package/ts/Private/IAgoraMediaPlayerSource.ts +27 -6
  55. package/ts/Private/IAgoraMediaStreamingSource.ts +38 -37
  56. package/ts/Private/IAgoraMusicContentCenter.ts +20 -20
  57. package/ts/Private/IAgoraRhythmPlayer.ts +7 -6
  58. package/ts/Private/IAgoraRtcEngine.ts +407 -364
  59. package/ts/Private/IAgoraRtcEngineEx.ts +25 -61
  60. package/ts/Private/IAgoraSpatialAudio.ts +80 -191
  61. package/ts/Private/IAudioDeviceManager.ts +27 -14
  62. package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
  63. package/ts/Private/impl/AgoraMediaBaseImpl.ts +25 -1
  64. package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
  65. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +13 -13
  66. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +110 -81
  67. package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +17 -2
  68. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +2 -2
  69. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +21 -21
  70. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +71 -106
  71. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +589 -572
  72. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +211 -218
  73. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +22 -22
  74. package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
  75. package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
  76. package/ts/Private/internal/IrisApiEngine.ts +42 -27
  77. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +1 -86
  78. package/ts/Private/internal/MediaPlayerInternal.ts +20 -29
  79. package/ts/Private/internal/MusicContentCenterInternal.ts +1 -5
  80. package/ts/Private/internal/RtcEngineExInternal.ts +91 -204
  81. package/ts/Private/ti/AgoraMediaBase-ti.ts +1 -1
  82. package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
  83. package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +4 -2
  84. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +5 -5
  85. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +12 -11
  86. package/ts/Renderer/AgoraView.ts +29 -19
  87. package/ts/Renderer/IRenderer.ts +71 -22
  88. package/ts/Renderer/IRendererManager.ts +273 -19
  89. package/ts/Renderer/RendererCache.ts +167 -0
  90. package/ts/Renderer/RendererManager.ts +62 -607
  91. package/ts/Renderer/WebGLRenderer/index.ts +117 -295
  92. package/ts/Renderer/YUVCanvasRenderer/index.ts +45 -198
  93. package/ts/Types.ts +17 -194
  94. package/ts/Utils.ts +36 -100
  95. package/types/Private/AgoraBase.d.ts +219 -200
  96. package/types/Private/AgoraBase.d.ts.map +1 -1
  97. package/types/Private/AgoraMediaBase.d.ts +63 -27
  98. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  99. package/types/Private/AgoraMediaPlayerTypes.d.ts +65 -24
  100. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
  101. package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
  102. package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
  103. package/types/Private/IAgoraLog.d.ts.map +1 -1
  104. package/types/Private/IAgoraMediaEngine.d.ts +11 -6
  105. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  106. package/types/Private/IAgoraMediaPlayer.d.ts +42 -20
  107. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  108. package/types/Private/IAgoraMediaPlayerSource.d.ts +23 -6
  109. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  110. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -1
  111. package/types/Private/IAgoraMusicContentCenter.d.ts +19 -19
  112. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  113. package/types/Private/IAgoraRhythmPlayer.d.ts +6 -6
  114. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -1
  115. package/types/Private/IAgoraRtcEngine.d.ts +329 -293
  116. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  117. package/types/Private/IAgoraRtcEngineEx.d.ts +21 -53
  118. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  119. package/types/Private/IAgoraSpatialAudio.d.ts +56 -167
  120. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  121. package/types/Private/IAudioDeviceManager.d.ts +27 -14
  122. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  123. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
  124. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
  125. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +5 -1
  126. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
  127. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
  128. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
  129. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +6 -4
  130. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -1
  131. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -1
  132. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +2 -4
  133. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
  134. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +30 -25
  135. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  136. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +20 -22
  137. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -1
  138. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
  139. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
  140. package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
  141. package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
  142. package/types/Private/internal/IrisApiEngine.d.ts +5 -2
  143. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
  144. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -15
  145. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -1
  146. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
  147. package/types/Private/internal/MusicContentCenterInternal.d.ts +0 -1
  148. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  149. package/types/Private/internal/RtcEngineExInternal.d.ts +7 -13
  150. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  151. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
  152. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
  153. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -1
  154. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
  155. package/types/Renderer/AgoraView.d.ts +4 -4
  156. package/types/Renderer/AgoraView.d.ts.map +1 -1
  157. package/types/Renderer/IRenderer.d.ts +11 -9
  158. package/types/Renderer/IRenderer.d.ts.map +1 -1
  159. package/types/Renderer/IRendererManager.d.ts +50 -12
  160. package/types/Renderer/IRendererManager.d.ts.map +1 -1
  161. package/types/Renderer/RendererCache.d.ts +36 -0
  162. package/types/Renderer/RendererCache.d.ts.map +1 -0
  163. package/types/Renderer/RendererManager.d.ts +13 -139
  164. package/types/Renderer/RendererManager.d.ts.map +1 -1
  165. package/types/Renderer/WebGLRenderer/index.d.ts +3 -18
  166. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
  167. package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -10
  168. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
  169. package/types/Types.d.ts +11 -187
  170. package/types/Types.d.ts.map +1 -1
  171. package/types/Utils.d.ts +3 -20
  172. package/types/Utils.d.ts.map +1 -1
@@ -1,13 +1,12 @@
1
1
  import { RtcConnection } from '../IAgoraRtcEngineEx';
2
2
  import {
3
- IBaseSpatialAudioEngine,
4
3
  ILocalSpatialAudioEngine,
5
4
  RemoteVoicePositionInfo,
6
5
  SpatialAudioZone,
7
6
  } from '../IAgoraSpatialAudio';
8
7
 
9
8
  // @ts-ignore
10
- export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
9
+ export class ILocalSpatialAudioEngineImpl implements ILocalSpatialAudioEngine {
11
10
  release(): void {
12
11
  const apiType = this.getApiTypeFromRelease();
13
12
  const jsonParams = {};
@@ -15,16 +14,29 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
15
14
  }
16
15
 
17
16
  protected getApiTypeFromRelease(): string {
18
- return 'BaseSpatialAudioEngine_release';
17
+ return 'LocalSpatialAudioEngine_release';
19
18
  }
20
19
 
21
- setMaxAudioRecvCount(maxCount: number): number {
22
- const apiType = this.getApiTypeFromSetMaxAudioRecvCount(maxCount);
20
+ initialize(): number {
21
+ const apiType = this.getApiTypeFromInitialize();
22
+ const jsonParams = {};
23
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
24
+ return jsonResults.result;
25
+ }
26
+
27
+ protected getApiTypeFromInitialize(): string {
28
+ return 'LocalSpatialAudioEngine_initialize_cf94fbf';
29
+ }
30
+
31
+ updateRemotePosition(uid: number, posInfo: RemoteVoicePositionInfo): number {
32
+ const apiType = this.getApiTypeFromUpdateRemotePosition(uid, posInfo);
23
33
  const jsonParams = {
24
- maxCount: maxCount,
34
+ uid: uid,
35
+ posInfo: posInfo,
25
36
  toJSON: () => {
26
37
  return {
27
- maxCount: maxCount,
38
+ uid: uid,
39
+ posInfo: posInfo,
28
40
  };
29
41
  },
30
42
  };
@@ -32,17 +44,32 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
32
44
  return jsonResults.result;
33
45
  }
34
46
 
35
- protected getApiTypeFromSetMaxAudioRecvCount(maxCount: number): string {
36
- return 'BaseSpatialAudioEngine_setMaxAudioRecvCount';
47
+ protected getApiTypeFromUpdateRemotePosition(
48
+ uid: number,
49
+ posInfo: RemoteVoicePositionInfo
50
+ ): string {
51
+ return 'LocalSpatialAudioEngine_updateRemotePosition_adc0909';
37
52
  }
38
53
 
39
- setAudioRecvRange(range: number): number {
40
- const apiType = this.getApiTypeFromSetAudioRecvRange(range);
54
+ updateRemotePositionEx(
55
+ uid: number,
56
+ posInfo: RemoteVoicePositionInfo,
57
+ connection: RtcConnection
58
+ ): number {
59
+ const apiType = this.getApiTypeFromUpdateRemotePositionEx(
60
+ uid,
61
+ posInfo,
62
+ connection
63
+ );
41
64
  const jsonParams = {
42
- range: range,
65
+ uid: uid,
66
+ posInfo: posInfo,
67
+ connection: connection,
43
68
  toJSON: () => {
44
69
  return {
45
- range: range,
70
+ uid: uid,
71
+ posInfo: posInfo,
72
+ connection: connection,
46
73
  };
47
74
  },
48
75
  };
@@ -50,17 +77,21 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
50
77
  return jsonResults.result;
51
78
  }
52
79
 
53
- protected getApiTypeFromSetAudioRecvRange(range: number): string {
54
- return 'BaseSpatialAudioEngine_setAudioRecvRange';
80
+ protected getApiTypeFromUpdateRemotePositionEx(
81
+ uid: number,
82
+ posInfo: RemoteVoicePositionInfo,
83
+ connection: RtcConnection
84
+ ): string {
85
+ return 'LocalSpatialAudioEngine_updateRemotePositionEx_f0252d9';
55
86
  }
56
87
 
57
- setDistanceUnit(unit: number): number {
58
- const apiType = this.getApiTypeFromSetDistanceUnit(unit);
88
+ removeRemotePosition(uid: number): number {
89
+ const apiType = this.getApiTypeFromRemoveRemotePosition(uid);
59
90
  const jsonParams = {
60
- unit: unit,
91
+ uid: uid,
61
92
  toJSON: () => {
62
93
  return {
63
- unit: unit,
94
+ uid: uid,
64
95
  };
65
96
  },
66
97
  };
@@ -68,33 +99,19 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
68
99
  return jsonResults.result;
69
100
  }
70
101
 
71
- protected getApiTypeFromSetDistanceUnit(unit: number): string {
72
- return 'BaseSpatialAudioEngine_setDistanceUnit';
102
+ protected getApiTypeFromRemoveRemotePosition(uid: number): string {
103
+ return 'LocalSpatialAudioEngine_removeRemotePosition_c8d091a';
73
104
  }
74
105
 
75
- updateSelfPosition(
76
- position: number[],
77
- axisForward: number[],
78
- axisRight: number[],
79
- axisUp: number[]
80
- ): number {
81
- const apiType = this.getApiTypeFromUpdateSelfPosition(
82
- position,
83
- axisForward,
84
- axisRight,
85
- axisUp
86
- );
106
+ removeRemotePositionEx(uid: number, connection: RtcConnection): number {
107
+ const apiType = this.getApiTypeFromRemoveRemotePositionEx(uid, connection);
87
108
  const jsonParams = {
88
- position: position,
89
- axisForward: axisForward,
90
- axisRight: axisRight,
91
- axisUp: axisUp,
109
+ uid: uid,
110
+ connection: connection,
92
111
  toJSON: () => {
93
112
  return {
94
- position: position,
95
- axisForward: axisForward,
96
- axisRight: axisRight,
97
- axisUp: axisUp,
113
+ uid: uid,
114
+ connection: connection,
98
115
  };
99
116
  },
100
117
  };
@@ -102,13 +119,31 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
102
119
  return jsonResults.result;
103
120
  }
104
121
 
105
- protected getApiTypeFromUpdateSelfPosition(
106
- position: number[],
107
- axisForward: number[],
108
- axisRight: number[],
109
- axisUp: number[]
122
+ protected getApiTypeFromRemoveRemotePositionEx(
123
+ uid: number,
124
+ connection: RtcConnection
110
125
  ): string {
111
- return 'BaseSpatialAudioEngine_updateSelfPosition';
126
+ return 'LocalSpatialAudioEngine_removeRemotePositionEx_58a9850';
127
+ }
128
+
129
+ clearRemotePositionsEx(connection: RtcConnection): number {
130
+ const apiType = this.getApiTypeFromClearRemotePositionsEx(connection);
131
+ const jsonParams = {
132
+ connection: connection,
133
+ toJSON: () => {
134
+ return {
135
+ connection: connection,
136
+ };
137
+ },
138
+ };
139
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
140
+ return jsonResults.result;
141
+ }
142
+
143
+ protected getApiTypeFromClearRemotePositionsEx(
144
+ connection: RtcConnection
145
+ ): string {
146
+ return 'LocalSpatialAudioEngine_clearRemotePositionsEx_c81e1a4';
112
147
  }
113
148
 
114
149
  updateSelfPositionEx(
@@ -152,45 +187,16 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
152
187
  axisUp: number[],
153
188
  connection: RtcConnection
154
189
  ): string {
155
- return 'BaseSpatialAudioEngine_updateSelfPositionEx';
156
- }
157
-
158
- updatePlayerPositionInfo(
159
- playerId: number,
160
- positionInfo: RemoteVoicePositionInfo
161
- ): number {
162
- const apiType = this.getApiTypeFromUpdatePlayerPositionInfo(
163
- playerId,
164
- positionInfo
165
- );
166
- const jsonParams = {
167
- playerId: playerId,
168
- positionInfo: positionInfo,
169
- toJSON: () => {
170
- return {
171
- playerId: playerId,
172
- positionInfo: positionInfo,
173
- };
174
- },
175
- };
176
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
177
- return jsonResults.result;
178
- }
179
-
180
- protected getApiTypeFromUpdatePlayerPositionInfo(
181
- playerId: number,
182
- positionInfo: RemoteVoicePositionInfo
183
- ): string {
184
- return 'BaseSpatialAudioEngine_updatePlayerPositionInfo';
190
+ return 'LocalSpatialAudioEngine_updateSelfPositionEx_502183a';
185
191
  }
186
192
 
187
- setParameters(params: string): number {
188
- const apiType = this.getApiTypeFromSetParameters(params);
193
+ setMaxAudioRecvCount(maxCount: number): number {
194
+ const apiType = this.getApiTypeFromSetMaxAudioRecvCount(maxCount);
189
195
  const jsonParams = {
190
- params: params,
196
+ maxCount: maxCount,
191
197
  toJSON: () => {
192
198
  return {
193
- params: params,
199
+ maxCount: maxCount,
194
200
  };
195
201
  },
196
202
  };
@@ -198,17 +204,17 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
198
204
  return jsonResults.result;
199
205
  }
200
206
 
201
- protected getApiTypeFromSetParameters(params: string): string {
202
- return 'BaseSpatialAudioEngine_setParameters';
207
+ protected getApiTypeFromSetMaxAudioRecvCount(maxCount: number): string {
208
+ return 'LocalSpatialAudioEngine_setMaxAudioRecvCount_46f8ab7';
203
209
  }
204
210
 
205
- muteLocalAudioStream(mute: boolean): number {
206
- const apiType = this.getApiTypeFromMuteLocalAudioStream(mute);
211
+ setAudioRecvRange(range: number): number {
212
+ const apiType = this.getApiTypeFromSetAudioRecvRange(range);
207
213
  const jsonParams = {
208
- mute: mute,
214
+ range: range,
209
215
  toJSON: () => {
210
216
  return {
211
- mute: mute,
217
+ range: range,
212
218
  };
213
219
  },
214
220
  };
@@ -216,17 +222,17 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
216
222
  return jsonResults.result;
217
223
  }
218
224
 
219
- protected getApiTypeFromMuteLocalAudioStream(mute: boolean): string {
220
- return 'BaseSpatialAudioEngine_muteLocalAudioStream';
225
+ protected getApiTypeFromSetAudioRecvRange(range: number): string {
226
+ return 'LocalSpatialAudioEngine_setAudioRecvRange_685e803';
221
227
  }
222
228
 
223
- muteAllRemoteAudioStreams(mute: boolean): number {
224
- const apiType = this.getApiTypeFromMuteAllRemoteAudioStreams(mute);
229
+ setDistanceUnit(unit: number): number {
230
+ const apiType = this.getApiTypeFromSetDistanceUnit(unit);
225
231
  const jsonParams = {
226
- mute: mute,
232
+ unit: unit,
227
233
  toJSON: () => {
228
234
  return {
229
- mute: mute,
235
+ unit: unit,
230
236
  };
231
237
  },
232
238
  };
@@ -234,19 +240,33 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
234
240
  return jsonResults.result;
235
241
  }
236
242
 
237
- protected getApiTypeFromMuteAllRemoteAudioStreams(mute: boolean): string {
238
- return 'BaseSpatialAudioEngine_muteAllRemoteAudioStreams';
243
+ protected getApiTypeFromSetDistanceUnit(unit: number): string {
244
+ return 'LocalSpatialAudioEngine_setDistanceUnit_685e803';
239
245
  }
240
246
 
241
- setZones(zones: SpatialAudioZone[], zoneCount: number): number {
242
- const apiType = this.getApiTypeFromSetZones(zones, zoneCount);
247
+ updateSelfPosition(
248
+ position: number[],
249
+ axisForward: number[],
250
+ axisRight: number[],
251
+ axisUp: number[]
252
+ ): number {
253
+ const apiType = this.getApiTypeFromUpdateSelfPosition(
254
+ position,
255
+ axisForward,
256
+ axisRight,
257
+ axisUp
258
+ );
243
259
  const jsonParams = {
244
- zones: zones,
245
- zoneCount: zoneCount,
260
+ position: position,
261
+ axisForward: axisForward,
262
+ axisRight: axisRight,
263
+ axisUp: axisUp,
246
264
  toJSON: () => {
247
265
  return {
248
- zones: zones,
249
- zoneCount: zoneCount,
266
+ position: position,
267
+ axisForward: axisForward,
268
+ axisRight: axisRight,
269
+ axisUp: axisUp,
250
270
  };
251
271
  },
252
272
  };
@@ -254,32 +274,30 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
254
274
  return jsonResults.result;
255
275
  }
256
276
 
257
- protected getApiTypeFromSetZones(
258
- zones: SpatialAudioZone[],
259
- zoneCount: number
277
+ protected getApiTypeFromUpdateSelfPosition(
278
+ position: number[],
279
+ axisForward: number[],
280
+ axisRight: number[],
281
+ axisUp: number[]
260
282
  ): string {
261
- return 'BaseSpatialAudioEngine_setZones';
283
+ return 'LocalSpatialAudioEngine_updateSelfPosition_9c9930f';
262
284
  }
263
285
 
264
- setPlayerAttenuation(
286
+ updatePlayerPositionInfo(
265
287
  playerId: number,
266
- attenuation: number,
267
- forceSet: boolean
288
+ positionInfo: RemoteVoicePositionInfo
268
289
  ): number {
269
- const apiType = this.getApiTypeFromSetPlayerAttenuation(
290
+ const apiType = this.getApiTypeFromUpdatePlayerPositionInfo(
270
291
  playerId,
271
- attenuation,
272
- forceSet
292
+ positionInfo
273
293
  );
274
294
  const jsonParams = {
275
295
  playerId: playerId,
276
- attenuation: attenuation,
277
- forceSet: forceSet,
296
+ positionInfo: positionInfo,
278
297
  toJSON: () => {
279
298
  return {
280
299
  playerId: playerId,
281
- attenuation: attenuation,
282
- forceSet: forceSet,
300
+ positionInfo: positionInfo,
283
301
  };
284
302
  },
285
303
  };
@@ -287,23 +305,20 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
287
305
  return jsonResults.result;
288
306
  }
289
307
 
290
- protected getApiTypeFromSetPlayerAttenuation(
308
+ protected getApiTypeFromUpdatePlayerPositionInfo(
291
309
  playerId: number,
292
- attenuation: number,
293
- forceSet: boolean
310
+ positionInfo: RemoteVoicePositionInfo
294
311
  ): string {
295
- return 'BaseSpatialAudioEngine_setPlayerAttenuation';
312
+ return 'LocalSpatialAudioEngine_updatePlayerPositionInfo_b37c59d';
296
313
  }
297
314
 
298
- muteRemoteAudioStream(uid: number, mute: boolean): number {
299
- const apiType = this.getApiTypeFromMuteRemoteAudioStream(uid, mute);
315
+ setParameters(params: string): number {
316
+ const apiType = this.getApiTypeFromSetParameters(params);
300
317
  const jsonParams = {
301
- uid: uid,
302
- mute: mute,
318
+ params: params,
303
319
  toJSON: () => {
304
320
  return {
305
- uid: uid,
306
- mute: mute,
321
+ params: params,
307
322
  };
308
323
  },
309
324
  };
@@ -311,39 +326,17 @@ export class IBaseSpatialAudioEngineImpl implements IBaseSpatialAudioEngine {
311
326
  return jsonResults.result;
312
327
  }
313
328
 
314
- protected getApiTypeFromMuteRemoteAudioStream(
315
- uid: number,
316
- mute: boolean
317
- ): string {
318
- return 'BaseSpatialAudioEngine_muteRemoteAudioStream';
319
- }
320
- }
321
-
322
- // @ts-ignore
323
- export class ILocalSpatialAudioEngineImpl
324
- extends IBaseSpatialAudioEngineImpl
325
- implements ILocalSpatialAudioEngine
326
- {
327
- initialize(): number {
328
- const apiType = this.getApiTypeFromInitialize();
329
- const jsonParams = {};
330
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
331
- return jsonResults.result;
332
- }
333
-
334
- protected getApiTypeFromInitialize(): string {
335
- return 'LocalSpatialAudioEngine_initialize';
329
+ protected getApiTypeFromSetParameters(params: string): string {
330
+ return 'LocalSpatialAudioEngine_setParameters_3a2037f';
336
331
  }
337
332
 
338
- updateRemotePosition(uid: number, posInfo: RemoteVoicePositionInfo): number {
339
- const apiType = this.getApiTypeFromUpdateRemotePosition(uid, posInfo);
333
+ muteLocalAudioStream(mute: boolean): number {
334
+ const apiType = this.getApiTypeFromMuteLocalAudioStream(mute);
340
335
  const jsonParams = {
341
- uid: uid,
342
- posInfo: posInfo,
336
+ mute: mute,
343
337
  toJSON: () => {
344
338
  return {
345
- uid: uid,
346
- posInfo: posInfo,
339
+ mute: mute,
347
340
  };
348
341
  },
349
342
  };
@@ -351,32 +344,17 @@ export class ILocalSpatialAudioEngineImpl
351
344
  return jsonResults.result;
352
345
  }
353
346
 
354
- protected getApiTypeFromUpdateRemotePosition(
355
- uid: number,
356
- posInfo: RemoteVoicePositionInfo
357
- ): string {
358
- return 'LocalSpatialAudioEngine_updateRemotePosition';
347
+ protected getApiTypeFromMuteLocalAudioStream(mute: boolean): string {
348
+ return 'LocalSpatialAudioEngine_muteLocalAudioStream_5039d15';
359
349
  }
360
350
 
361
- updateRemotePositionEx(
362
- uid: number,
363
- posInfo: RemoteVoicePositionInfo,
364
- connection: RtcConnection
365
- ): number {
366
- const apiType = this.getApiTypeFromUpdateRemotePositionEx(
367
- uid,
368
- posInfo,
369
- connection
370
- );
351
+ muteAllRemoteAudioStreams(mute: boolean): number {
352
+ const apiType = this.getApiTypeFromMuteAllRemoteAudioStreams(mute);
371
353
  const jsonParams = {
372
- uid: uid,
373
- posInfo: posInfo,
374
- connection: connection,
354
+ mute: mute,
375
355
  toJSON: () => {
376
356
  return {
377
- uid: uid,
378
- posInfo: posInfo,
379
- connection: connection,
357
+ mute: mute,
380
358
  };
381
359
  },
382
360
  };
@@ -384,21 +362,19 @@ export class ILocalSpatialAudioEngineImpl
384
362
  return jsonResults.result;
385
363
  }
386
364
 
387
- protected getApiTypeFromUpdateRemotePositionEx(
388
- uid: number,
389
- posInfo: RemoteVoicePositionInfo,
390
- connection: RtcConnection
391
- ): string {
392
- return 'LocalSpatialAudioEngine_updateRemotePositionEx';
365
+ protected getApiTypeFromMuteAllRemoteAudioStreams(mute: boolean): string {
366
+ return 'LocalSpatialAudioEngine_muteAllRemoteAudioStreams_5039d15';
393
367
  }
394
368
 
395
- removeRemotePosition(uid: number): number {
396
- const apiType = this.getApiTypeFromRemoveRemotePosition(uid);
369
+ muteRemoteAudioStream(uid: number, mute: boolean): number {
370
+ const apiType = this.getApiTypeFromMuteRemoteAudioStream(uid, mute);
397
371
  const jsonParams = {
398
372
  uid: uid,
373
+ mute: mute,
399
374
  toJSON: () => {
400
375
  return {
401
376
  uid: uid,
377
+ mute: mute,
402
378
  };
403
379
  },
404
380
  };
@@ -406,19 +382,32 @@ export class ILocalSpatialAudioEngineImpl
406
382
  return jsonResults.result;
407
383
  }
408
384
 
409
- protected getApiTypeFromRemoveRemotePosition(uid: number): string {
410
- return 'LocalSpatialAudioEngine_removeRemotePosition';
385
+ protected getApiTypeFromMuteRemoteAudioStream(
386
+ uid: number,
387
+ mute: boolean
388
+ ): string {
389
+ return 'LocalSpatialAudioEngine_muteRemoteAudioStream_dbdc15a';
411
390
  }
412
391
 
413
- removeRemotePositionEx(uid: number, connection: RtcConnection): number {
414
- const apiType = this.getApiTypeFromRemoveRemotePositionEx(uid, connection);
392
+ setRemoteAudioAttenuation(
393
+ uid: number,
394
+ attenuation: number,
395
+ forceSet: boolean
396
+ ): number {
397
+ const apiType = this.getApiTypeFromSetRemoteAudioAttenuation(
398
+ uid,
399
+ attenuation,
400
+ forceSet
401
+ );
415
402
  const jsonParams = {
416
403
  uid: uid,
417
- connection: connection,
404
+ attenuation: attenuation,
405
+ forceSet: forceSet,
418
406
  toJSON: () => {
419
407
  return {
420
408
  uid: uid,
421
- connection: connection,
409
+ attenuation: attenuation,
410
+ forceSet: forceSet,
422
411
  };
423
412
  },
424
413
  };
@@ -426,31 +415,23 @@ export class ILocalSpatialAudioEngineImpl
426
415
  return jsonResults.result;
427
416
  }
428
417
 
429
- protected getApiTypeFromRemoveRemotePositionEx(
418
+ protected getApiTypeFromSetRemoteAudioAttenuation(
430
419
  uid: number,
431
- connection: RtcConnection
420
+ attenuation: number,
421
+ forceSet: boolean
432
422
  ): string {
433
- return 'LocalSpatialAudioEngine_removeRemotePositionEx';
423
+ return 'LocalSpatialAudioEngine_setRemoteAudioAttenuation_74c3e98';
434
424
  }
435
425
 
436
- clearRemotePositions(): number {
437
- const apiType = this.getApiTypeFromClearRemotePositions();
438
- const jsonParams = {};
439
- const jsonResults = callIrisApi.call(this, apiType, jsonParams);
440
- return jsonResults.result;
441
- }
442
-
443
- protected getApiTypeFromClearRemotePositions(): string {
444
- return 'LocalSpatialAudioEngine_clearRemotePositions';
445
- }
446
-
447
- clearRemotePositionsEx(connection: RtcConnection): number {
448
- const apiType = this.getApiTypeFromClearRemotePositionsEx(connection);
426
+ setZones(zones: SpatialAudioZone[], zoneCount: number): number {
427
+ const apiType = this.getApiTypeFromSetZones(zones, zoneCount);
449
428
  const jsonParams = {
450
- connection: connection,
429
+ zones: zones,
430
+ zoneCount: zoneCount,
451
431
  toJSON: () => {
452
432
  return {
453
- connection: connection,
433
+ zones: zones,
434
+ zoneCount: zoneCount,
454
435
  };
455
436
  },
456
437
  };
@@ -458,29 +439,30 @@ export class ILocalSpatialAudioEngineImpl
458
439
  return jsonResults.result;
459
440
  }
460
441
 
461
- protected getApiTypeFromClearRemotePositionsEx(
462
- connection: RtcConnection
442
+ protected getApiTypeFromSetZones(
443
+ zones: SpatialAudioZone[],
444
+ zoneCount: number
463
445
  ): string {
464
- return 'LocalSpatialAudioEngine_clearRemotePositionsEx';
446
+ return 'LocalSpatialAudioEngine_setZones_414a27e';
465
447
  }
466
448
 
467
- setRemoteAudioAttenuation(
468
- uid: number,
449
+ setPlayerAttenuation(
450
+ playerId: number,
469
451
  attenuation: number,
470
452
  forceSet: boolean
471
453
  ): number {
472
- const apiType = this.getApiTypeFromSetRemoteAudioAttenuation(
473
- uid,
454
+ const apiType = this.getApiTypeFromSetPlayerAttenuation(
455
+ playerId,
474
456
  attenuation,
475
457
  forceSet
476
458
  );
477
459
  const jsonParams = {
478
- uid: uid,
460
+ playerId: playerId,
479
461
  attenuation: attenuation,
480
462
  forceSet: forceSet,
481
463
  toJSON: () => {
482
464
  return {
483
- uid: uid,
465
+ playerId: playerId,
484
466
  attenuation: attenuation,
485
467
  forceSet: forceSet,
486
468
  };
@@ -490,12 +472,23 @@ export class ILocalSpatialAudioEngineImpl
490
472
  return jsonResults.result;
491
473
  }
492
474
 
493
- protected getApiTypeFromSetRemoteAudioAttenuation(
494
- uid: number,
475
+ protected getApiTypeFromSetPlayerAttenuation(
476
+ playerId: number,
495
477
  attenuation: number,
496
478
  forceSet: boolean
497
479
  ): string {
498
- return 'LocalSpatialAudioEngine_setRemoteAudioAttenuation';
480
+ return 'LocalSpatialAudioEngine_setPlayerAttenuation_a15bc51';
481
+ }
482
+
483
+ clearRemotePositions(): number {
484
+ const apiType = this.getApiTypeFromClearRemotePositions();
485
+ const jsonParams = {};
486
+ const jsonResults = callIrisApi.call(this, apiType, jsonParams);
487
+ return jsonResults.result;
488
+ }
489
+
490
+ protected getApiTypeFromClearRemotePositions(): string {
491
+ return 'LocalSpatialAudioEngine_clearRemotePositions';
499
492
  }
500
493
  }
501
494