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.
- package/CHANGELOG.md +20 -0
- package/js/Private/AgoraBase.js +139 -174
- package/js/Private/AgoraMediaBase.js +49 -20
- package/js/Private/AgoraMediaPlayerTypes.js +32 -23
- package/js/Private/IAgoraH265Transcoder.js +39 -0
- package/js/Private/IAgoraMediaStreamingSource.js +32 -32
- package/js/Private/IAgoraMusicContentCenter.js +19 -19
- package/js/Private/IAgoraRhythmPlayer.js +9 -9
- package/js/Private/IAgoraRtcEngine.js +12 -12
- package/js/Private/IAgoraSpatialAudio.js +3 -31
- package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
- package/js/Private/impl/AgoraMediaBaseImpl.js +26 -2
- package/js/Private/impl/IAgoraH265TranscoderImpl.js +119 -0
- package/js/Private/impl/IAgoraMediaEngineImpl.js +13 -13
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +92 -74
- package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +12 -2
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +2 -2
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +20 -20
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +66 -84
- package/js/Private/impl/IAgoraRtcEngineImpl.js +456 -440
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +157 -181
- package/js/Private/impl/IAudioDeviceManagerImpl.js +22 -22
- package/js/Private/internal/AgoraH265TranscoderInternal.js +86 -0
- package/js/Private/internal/AgoraMediaBaseInternal.js +34 -0
- package/js/Private/internal/IrisApiEngine.js +35 -20
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +0 -39
- package/js/Private/internal/MediaPlayerInternal.js +22 -21
- package/js/Private/internal/MusicContentCenterInternal.js +1 -4
- package/js/Private/internal/RtcEngineExInternal.js +101 -134
- package/js/Private/ti/AgoraMediaBase-ti.js +1 -1
- package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +4 -2
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -5
- package/js/Private/ti/IAgoraRtcEngine-ti.js +12 -11
- package/js/Renderer/AgoraView.js +28 -14
- package/js/Renderer/IRenderer.js +65 -17
- package/js/Renderer/IRendererManager.js +230 -0
- package/js/Renderer/RendererCache.js +170 -0
- package/js/Renderer/RendererManager.js +49 -460
- package/js/Renderer/WebGLRenderer/index.js +82 -234
- package/js/Renderer/YUVCanvasRenderer/index.js +27 -147
- package/js/Types.js +6 -6
- package/js/Utils.js +37 -88
- package/package.json +4 -3
- package/scripts/clean.js +12 -0
- package/scripts/synclib.js +8 -2
- package/ts/Private/AgoraBase.ts +225 -201
- package/ts/Private/AgoraMediaBase.ts +63 -25
- package/ts/Private/AgoraMediaPlayerTypes.ts +67 -24
- package/ts/Private/IAgoraH265Transcoder.ts +73 -0
- package/ts/Private/IAgoraLog.ts +1 -0
- package/ts/Private/IAgoraMediaEngine.ts +12 -7
- package/ts/Private/IAgoraMediaPlayer.ts +47 -21
- package/ts/Private/IAgoraMediaPlayerSource.ts +27 -6
- package/ts/Private/IAgoraMediaStreamingSource.ts +38 -37
- package/ts/Private/IAgoraMusicContentCenter.ts +20 -20
- package/ts/Private/IAgoraRhythmPlayer.ts +7 -6
- package/ts/Private/IAgoraRtcEngine.ts +407 -364
- package/ts/Private/IAgoraRtcEngineEx.ts +25 -61
- package/ts/Private/IAgoraSpatialAudio.ts +80 -191
- package/ts/Private/IAudioDeviceManager.ts +27 -14
- package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
- package/ts/Private/impl/AgoraMediaBaseImpl.ts +25 -1
- package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +13 -13
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +110 -81
- package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +17 -2
- package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +2 -2
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +21 -21
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +71 -106
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +589 -572
- package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +211 -218
- package/ts/Private/impl/IAudioDeviceManagerImpl.ts +22 -22
- package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
- package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
- package/ts/Private/internal/IrisApiEngine.ts +42 -27
- package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +1 -86
- package/ts/Private/internal/MediaPlayerInternal.ts +20 -29
- package/ts/Private/internal/MusicContentCenterInternal.ts +1 -5
- package/ts/Private/internal/RtcEngineExInternal.ts +91 -204
- package/ts/Private/ti/AgoraMediaBase-ti.ts +1 -1
- package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
- package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +4 -2
- package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +5 -5
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +12 -11
- package/ts/Renderer/AgoraView.ts +29 -19
- package/ts/Renderer/IRenderer.ts +71 -22
- package/ts/Renderer/IRendererManager.ts +273 -19
- package/ts/Renderer/RendererCache.ts +167 -0
- package/ts/Renderer/RendererManager.ts +62 -607
- package/ts/Renderer/WebGLRenderer/index.ts +117 -295
- package/ts/Renderer/YUVCanvasRenderer/index.ts +45 -198
- package/ts/Types.ts +17 -194
- package/ts/Utils.ts +36 -100
- package/types/Private/AgoraBase.d.ts +219 -200
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +63 -27
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +65 -24
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
- package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
- package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
- package/types/Private/IAgoraLog.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +11 -6
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +42 -20
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +23 -6
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
- package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +19 -19
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRhythmPlayer.d.ts +6 -6
- package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +329 -293
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +21 -53
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +56 -167
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +27 -14
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
- package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +5 -1
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
- package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +6 -4
- package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +2 -4
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +30 -25
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +20 -22
- package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -1
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
- package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
- package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
- package/types/Private/internal/IrisApiEngine.d.ts +5 -2
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -15
- package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -1
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts +0 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +7 -13
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
- package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
- package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -1
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
- package/types/Renderer/AgoraView.d.ts +4 -4
- package/types/Renderer/AgoraView.d.ts.map +1 -1
- package/types/Renderer/IRenderer.d.ts +11 -9
- package/types/Renderer/IRenderer.d.ts.map +1 -1
- package/types/Renderer/IRendererManager.d.ts +50 -12
- package/types/Renderer/IRendererManager.d.ts.map +1 -1
- package/types/Renderer/RendererCache.d.ts +36 -0
- package/types/Renderer/RendererCache.d.ts.map +1 -0
- package/types/Renderer/RendererManager.d.ts +13 -139
- package/types/Renderer/RendererManager.d.ts.map +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts +3 -18
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
- package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -10
- package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
- package/types/Types.d.ts +11 -187
- package/types/Types.d.ts.map +1 -1
- package/types/Utils.d.ts +3 -20
- 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
|
|
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 '
|
|
17
|
+
return 'LocalSpatialAudioEngine_release';
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
const apiType = this.
|
|
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
|
-
|
|
34
|
+
uid: uid,
|
|
35
|
+
posInfo: posInfo,
|
|
25
36
|
toJSON: () => {
|
|
26
37
|
return {
|
|
27
|
-
|
|
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
|
|
36
|
-
|
|
47
|
+
protected getApiTypeFromUpdateRemotePosition(
|
|
48
|
+
uid: number,
|
|
49
|
+
posInfo: RemoteVoicePositionInfo
|
|
50
|
+
): string {
|
|
51
|
+
return 'LocalSpatialAudioEngine_updateRemotePosition_adc0909';
|
|
37
52
|
}
|
|
38
53
|
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
65
|
+
uid: uid,
|
|
66
|
+
posInfo: posInfo,
|
|
67
|
+
connection: connection,
|
|
43
68
|
toJSON: () => {
|
|
44
69
|
return {
|
|
45
|
-
|
|
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
|
|
54
|
-
|
|
80
|
+
protected getApiTypeFromUpdateRemotePositionEx(
|
|
81
|
+
uid: number,
|
|
82
|
+
posInfo: RemoteVoicePositionInfo,
|
|
83
|
+
connection: RtcConnection
|
|
84
|
+
): string {
|
|
85
|
+
return 'LocalSpatialAudioEngine_updateRemotePositionEx_f0252d9';
|
|
55
86
|
}
|
|
56
87
|
|
|
57
|
-
|
|
58
|
-
const apiType = this.
|
|
88
|
+
removeRemotePosition(uid: number): number {
|
|
89
|
+
const apiType = this.getApiTypeFromRemoveRemotePosition(uid);
|
|
59
90
|
const jsonParams = {
|
|
60
|
-
|
|
91
|
+
uid: uid,
|
|
61
92
|
toJSON: () => {
|
|
62
93
|
return {
|
|
63
|
-
|
|
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
|
|
72
|
-
return '
|
|
102
|
+
protected getApiTypeFromRemoveRemotePosition(uid: number): string {
|
|
103
|
+
return 'LocalSpatialAudioEngine_removeRemotePosition_c8d091a';
|
|
73
104
|
}
|
|
74
105
|
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
axisRight: axisRight,
|
|
91
|
-
axisUp: axisUp,
|
|
109
|
+
uid: uid,
|
|
110
|
+
connection: connection,
|
|
92
111
|
toJSON: () => {
|
|
93
112
|
return {
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
axisRight: number[],
|
|
109
|
-
axisUp: number[]
|
|
122
|
+
protected getApiTypeFromRemoveRemotePositionEx(
|
|
123
|
+
uid: number,
|
|
124
|
+
connection: RtcConnection
|
|
110
125
|
): string {
|
|
111
|
-
return '
|
|
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 '
|
|
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
|
-
|
|
188
|
-
const apiType = this.
|
|
193
|
+
setMaxAudioRecvCount(maxCount: number): number {
|
|
194
|
+
const apiType = this.getApiTypeFromSetMaxAudioRecvCount(maxCount);
|
|
189
195
|
const jsonParams = {
|
|
190
|
-
|
|
196
|
+
maxCount: maxCount,
|
|
191
197
|
toJSON: () => {
|
|
192
198
|
return {
|
|
193
|
-
|
|
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
|
|
202
|
-
return '
|
|
207
|
+
protected getApiTypeFromSetMaxAudioRecvCount(maxCount: number): string {
|
|
208
|
+
return 'LocalSpatialAudioEngine_setMaxAudioRecvCount_46f8ab7';
|
|
203
209
|
}
|
|
204
210
|
|
|
205
|
-
|
|
206
|
-
const apiType = this.
|
|
211
|
+
setAudioRecvRange(range: number): number {
|
|
212
|
+
const apiType = this.getApiTypeFromSetAudioRecvRange(range);
|
|
207
213
|
const jsonParams = {
|
|
208
|
-
|
|
214
|
+
range: range,
|
|
209
215
|
toJSON: () => {
|
|
210
216
|
return {
|
|
211
|
-
|
|
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
|
|
220
|
-
return '
|
|
225
|
+
protected getApiTypeFromSetAudioRecvRange(range: number): string {
|
|
226
|
+
return 'LocalSpatialAudioEngine_setAudioRecvRange_685e803';
|
|
221
227
|
}
|
|
222
228
|
|
|
223
|
-
|
|
224
|
-
const apiType = this.
|
|
229
|
+
setDistanceUnit(unit: number): number {
|
|
230
|
+
const apiType = this.getApiTypeFromSetDistanceUnit(unit);
|
|
225
231
|
const jsonParams = {
|
|
226
|
-
|
|
232
|
+
unit: unit,
|
|
227
233
|
toJSON: () => {
|
|
228
234
|
return {
|
|
229
|
-
|
|
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
|
|
238
|
-
return '
|
|
243
|
+
protected getApiTypeFromSetDistanceUnit(unit: number): string {
|
|
244
|
+
return 'LocalSpatialAudioEngine_setDistanceUnit_685e803';
|
|
239
245
|
}
|
|
240
246
|
|
|
241
|
-
|
|
242
|
-
|
|
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
|
-
|
|
245
|
-
|
|
260
|
+
position: position,
|
|
261
|
+
axisForward: axisForward,
|
|
262
|
+
axisRight: axisRight,
|
|
263
|
+
axisUp: axisUp,
|
|
246
264
|
toJSON: () => {
|
|
247
265
|
return {
|
|
248
|
-
|
|
249
|
-
|
|
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
|
|
258
|
-
|
|
259
|
-
|
|
277
|
+
protected getApiTypeFromUpdateSelfPosition(
|
|
278
|
+
position: number[],
|
|
279
|
+
axisForward: number[],
|
|
280
|
+
axisRight: number[],
|
|
281
|
+
axisUp: number[]
|
|
260
282
|
): string {
|
|
261
|
-
return '
|
|
283
|
+
return 'LocalSpatialAudioEngine_updateSelfPosition_9c9930f';
|
|
262
284
|
}
|
|
263
285
|
|
|
264
|
-
|
|
286
|
+
updatePlayerPositionInfo(
|
|
265
287
|
playerId: number,
|
|
266
|
-
|
|
267
|
-
forceSet: boolean
|
|
288
|
+
positionInfo: RemoteVoicePositionInfo
|
|
268
289
|
): number {
|
|
269
|
-
const apiType = this.
|
|
290
|
+
const apiType = this.getApiTypeFromUpdatePlayerPositionInfo(
|
|
270
291
|
playerId,
|
|
271
|
-
|
|
272
|
-
forceSet
|
|
292
|
+
positionInfo
|
|
273
293
|
);
|
|
274
294
|
const jsonParams = {
|
|
275
295
|
playerId: playerId,
|
|
276
|
-
|
|
277
|
-
forceSet: forceSet,
|
|
296
|
+
positionInfo: positionInfo,
|
|
278
297
|
toJSON: () => {
|
|
279
298
|
return {
|
|
280
299
|
playerId: playerId,
|
|
281
|
-
|
|
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
|
|
308
|
+
protected getApiTypeFromUpdatePlayerPositionInfo(
|
|
291
309
|
playerId: number,
|
|
292
|
-
|
|
293
|
-
forceSet: boolean
|
|
310
|
+
positionInfo: RemoteVoicePositionInfo
|
|
294
311
|
): string {
|
|
295
|
-
return '
|
|
312
|
+
return 'LocalSpatialAudioEngine_updatePlayerPositionInfo_b37c59d';
|
|
296
313
|
}
|
|
297
314
|
|
|
298
|
-
|
|
299
|
-
const apiType = this.
|
|
315
|
+
setParameters(params: string): number {
|
|
316
|
+
const apiType = this.getApiTypeFromSetParameters(params);
|
|
300
317
|
const jsonParams = {
|
|
301
|
-
|
|
302
|
-
mute: mute,
|
|
318
|
+
params: params,
|
|
303
319
|
toJSON: () => {
|
|
304
320
|
return {
|
|
305
|
-
|
|
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
|
|
315
|
-
|
|
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
|
-
|
|
339
|
-
const apiType = this.
|
|
333
|
+
muteLocalAudioStream(mute: boolean): number {
|
|
334
|
+
const apiType = this.getApiTypeFromMuteLocalAudioStream(mute);
|
|
340
335
|
const jsonParams = {
|
|
341
|
-
|
|
342
|
-
posInfo: posInfo,
|
|
336
|
+
mute: mute,
|
|
343
337
|
toJSON: () => {
|
|
344
338
|
return {
|
|
345
|
-
|
|
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
|
|
355
|
-
|
|
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
|
-
|
|
362
|
-
|
|
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
|
-
|
|
373
|
-
posInfo: posInfo,
|
|
374
|
-
connection: connection,
|
|
354
|
+
mute: mute,
|
|
375
355
|
toJSON: () => {
|
|
376
356
|
return {
|
|
377
|
-
|
|
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
|
|
388
|
-
|
|
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
|
-
|
|
396
|
-
const apiType = this.
|
|
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
|
|
410
|
-
|
|
385
|
+
protected getApiTypeFromMuteRemoteAudioStream(
|
|
386
|
+
uid: number,
|
|
387
|
+
mute: boolean
|
|
388
|
+
): string {
|
|
389
|
+
return 'LocalSpatialAudioEngine_muteRemoteAudioStream_dbdc15a';
|
|
411
390
|
}
|
|
412
391
|
|
|
413
|
-
|
|
414
|
-
|
|
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
|
-
|
|
404
|
+
attenuation: attenuation,
|
|
405
|
+
forceSet: forceSet,
|
|
418
406
|
toJSON: () => {
|
|
419
407
|
return {
|
|
420
408
|
uid: uid,
|
|
421
|
-
|
|
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
|
|
418
|
+
protected getApiTypeFromSetRemoteAudioAttenuation(
|
|
430
419
|
uid: number,
|
|
431
|
-
|
|
420
|
+
attenuation: number,
|
|
421
|
+
forceSet: boolean
|
|
432
422
|
): string {
|
|
433
|
-
return '
|
|
423
|
+
return 'LocalSpatialAudioEngine_setRemoteAudioAttenuation_74c3e98';
|
|
434
424
|
}
|
|
435
425
|
|
|
436
|
-
|
|
437
|
-
const apiType = this.
|
|
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
|
-
|
|
429
|
+
zones: zones,
|
|
430
|
+
zoneCount: zoneCount,
|
|
451
431
|
toJSON: () => {
|
|
452
432
|
return {
|
|
453
|
-
|
|
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
|
|
462
|
-
|
|
442
|
+
protected getApiTypeFromSetZones(
|
|
443
|
+
zones: SpatialAudioZone[],
|
|
444
|
+
zoneCount: number
|
|
463
445
|
): string {
|
|
464
|
-
return '
|
|
446
|
+
return 'LocalSpatialAudioEngine_setZones_414a27e';
|
|
465
447
|
}
|
|
466
448
|
|
|
467
|
-
|
|
468
|
-
|
|
449
|
+
setPlayerAttenuation(
|
|
450
|
+
playerId: number,
|
|
469
451
|
attenuation: number,
|
|
470
452
|
forceSet: boolean
|
|
471
453
|
): number {
|
|
472
|
-
const apiType = this.
|
|
473
|
-
|
|
454
|
+
const apiType = this.getApiTypeFromSetPlayerAttenuation(
|
|
455
|
+
playerId,
|
|
474
456
|
attenuation,
|
|
475
457
|
forceSet
|
|
476
458
|
);
|
|
477
459
|
const jsonParams = {
|
|
478
|
-
|
|
460
|
+
playerId: playerId,
|
|
479
461
|
attenuation: attenuation,
|
|
480
462
|
forceSet: forceSet,
|
|
481
463
|
toJSON: () => {
|
|
482
464
|
return {
|
|
483
|
-
|
|
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
|
|
494
|
-
|
|
475
|
+
protected getApiTypeFromSetPlayerAttenuation(
|
|
476
|
+
playerId: number,
|
|
495
477
|
attenuation: number,
|
|
496
478
|
forceSet: boolean
|
|
497
479
|
): string {
|
|
498
|
-
return '
|
|
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
|
|