agora-electron-sdk 4.2.2-dev.7 → 4.2.3-dev.3
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 +6 -1
- package/README.md +2 -2
- package/js/Private/AgoraBase.js +18 -2
- package/js/Private/AgoraMediaBase.js +4 -0
- package/js/Private/IAgoraMusicContentCenter.js +4 -0
- package/js/Private/IAgoraRtcEngine.js +15 -1
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +20 -0
- package/js/Private/impl/IAgoraRtcEngineImpl.js +16 -0
- package/js/Private/internal/IrisApiEngine.js +74 -57
- package/js/Renderer/RendererManager.js +1 -1
- package/package.json +3 -3
- package/ts/Private/AgoraBase.ts +18 -2
- package/ts/Private/AgoraMediaBase.ts +8 -8
- package/ts/Private/IAgoraMusicContentCenter.ts +8 -0
- package/ts/Private/IAgoraRtcEngine.ts +31 -14
- package/ts/Private/IAgoraRtcEngineEx.ts +13 -5
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +35 -1
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +21 -0
- package/ts/Private/internal/IrisApiEngine.ts +74 -59
- package/ts/Renderer/RendererManager.ts +1 -1
- package/types/Private/AgoraBase.d.ts +20 -4
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +9 -9
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +9 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +29 -14
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +8 -5
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +3 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +3 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/internal/IrisApiEngine.d.ts +2 -2
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
## [4.2.
|
|
3
|
+
## [4.2.3-dev.3](https://github.com/AgoraIO-Extensions/Electron-SDK/compare/v4.2.2...v4.2.3-dev.3) (2023-09-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* `GetVideoFrame ret is` log too much ([43e6519](https://github.com/AgoraIO-Extensions/Electron-SDK/commit/43e6519c630acf3e4233a891bf5b4f7d938813b3))
|
|
4
9
|
|
|
5
10
|
## [4.2.2](https://github.com/AgoraIO-Extensions/Electron-SDK/compare/v4.2.1...v4.2.2) (2023-08-01)
|
|
6
11
|
|
package/README.md
CHANGED
|
@@ -126,10 +126,10 @@ $ npm install #or yarn
|
|
|
126
126
|
$ npm install --agora_electron_sdk_pre_built=false
|
|
127
127
|
|
|
128
128
|
# build 32 bit architecture on Windows
|
|
129
|
-
$ npm install --
|
|
129
|
+
$ npm install --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=ia32
|
|
130
130
|
|
|
131
131
|
# build 64 bit architecture on Windows
|
|
132
|
-
$ npm install --
|
|
132
|
+
$ npm install --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=x64
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
## 🤝 Contributing [](https://github.com/AgoraIO-Extensions/Electron-SDK/pulls)
|
package/js/Private/AgoraBase.js
CHANGED
|
@@ -443,6 +443,10 @@ var ErrorCodeType;
|
|
|
443
443
|
* 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
|
|
444
444
|
*/
|
|
445
445
|
ErrorCodeType[ErrorCodeType["ErrVdmCameraNotAuthorized"] = 1501] = "ErrVdmCameraNotAuthorized";
|
|
446
|
+
/**
|
|
447
|
+
* @ignore
|
|
448
|
+
*/
|
|
449
|
+
ErrorCodeType[ErrorCodeType["ErrAdmApplicationLoopback"] = 2007] = "ErrAdmApplicationLoopback";
|
|
446
450
|
})(ErrorCodeType = exports.ErrorCodeType || (exports.ErrorCodeType = {}));
|
|
447
451
|
/**
|
|
448
452
|
* @ignore
|
|
@@ -1748,7 +1752,15 @@ var LocalVideoStreamError;
|
|
|
1748
1752
|
/**
|
|
1749
1753
|
* @ignore
|
|
1750
1754
|
*/
|
|
1751
|
-
LocalVideoStreamError[LocalVideoStreamError["
|
|
1755
|
+
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCaptureWindowHidden"] = 25] = "LocalVideoStreamErrorScreenCaptureWindowHidden";
|
|
1756
|
+
/**
|
|
1757
|
+
* @ignore
|
|
1758
|
+
*/
|
|
1759
|
+
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden"] = 26] = "LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden";
|
|
1760
|
+
/**
|
|
1761
|
+
* @ignore
|
|
1762
|
+
*/
|
|
1763
|
+
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized"] = 27] = "LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized";
|
|
1752
1764
|
})(LocalVideoStreamError = exports.LocalVideoStreamError || (exports.LocalVideoStreamError = {}));
|
|
1753
1765
|
/**
|
|
1754
1766
|
* Remote audio states.
|
|
@@ -2428,7 +2440,7 @@ var ConnectionChangedReasonType;
|
|
|
2428
2440
|
*/
|
|
2429
2441
|
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedClientIpAddressChanged"] = 13] = "ConnectionChangedClientIpAddressChanged";
|
|
2430
2442
|
/**
|
|
2431
|
-
* 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The
|
|
2443
|
+
* 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The SDK tries to reconnect to the server automatically.
|
|
2432
2444
|
*/
|
|
2433
2445
|
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedKeepAliveTimeout"] = 14] = "ConnectionChangedKeepAliveTimeout";
|
|
2434
2446
|
/**
|
|
@@ -2564,6 +2576,10 @@ var NetworkType;
|
|
|
2564
2576
|
* 5: The network type is mobile 4G.
|
|
2565
2577
|
*/
|
|
2566
2578
|
NetworkType[NetworkType["NetworkTypeMobile4g"] = 5] = "NetworkTypeMobile4g";
|
|
2579
|
+
/**
|
|
2580
|
+
* @ignore
|
|
2581
|
+
*/
|
|
2582
|
+
NetworkType[NetworkType["NetworkTypeMobile5g"] = 6] = "NetworkTypeMobile5g";
|
|
2567
2583
|
})(NetworkType = exports.NetworkType || (exports.NetworkType = {}));
|
|
2568
2584
|
/**
|
|
2569
2585
|
* Setting mode of the view.
|
|
@@ -260,6 +260,10 @@ var ContentInspectType;
|
|
|
260
260
|
* @ignore
|
|
261
261
|
*/
|
|
262
262
|
ContentInspectType[ContentInspectType["ContentInspectSupervision"] = 2] = "ContentInspectSupervision";
|
|
263
|
+
/**
|
|
264
|
+
* @ignore
|
|
265
|
+
*/
|
|
266
|
+
ContentInspectType[ContentInspectType["ContentInspectImageModeration"] = 3] = "ContentInspectImageModeration";
|
|
263
267
|
})(ContentInspectType = exports.ContentInspectType || (exports.ContentInspectType = {}));
|
|
264
268
|
/**
|
|
265
269
|
* A ContentInspectModule structure used to configure the frequency of video screenshot and upload.
|
|
@@ -73,6 +73,10 @@ var MusicContentCenterStatusCode;
|
|
|
73
73
|
* @ignore
|
|
74
74
|
*/
|
|
75
75
|
MusicContentCenterStatusCode[MusicContentCenterStatusCode["KMusicContentCenterStatusErrMusicDecryption"] = 6] = "KMusicContentCenterStatusErrMusicDecryption";
|
|
76
|
+
/**
|
|
77
|
+
* @ignore
|
|
78
|
+
*/
|
|
79
|
+
MusicContentCenterStatusCode[MusicContentCenterStatusCode["KMusicContentCenterStatusErrHttpInternalError"] = 7] = "KMusicContentCenterStatusErrHttpInternalError";
|
|
76
80
|
})(MusicContentCenterStatusCode = exports.MusicContentCenterStatusCode || (exports.MusicContentCenterStatusCode = {}));
|
|
77
81
|
/**
|
|
78
82
|
* @ignore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AudioDeviceInfo = exports.VideoDeviceInfo = exports.SDKBuildInfo = exports.VideoProfileType = exports.MediaDeviceStateType = exports.QualityReportFormatType = exports.IRtcEngine = exports.ExtensionInfo = exports.DirectCdnStreamingMediaOptions = exports.DirectCdnStreamingStats = exports.DirectCdnStreamingState = exports.DirectCdnStreamingError = exports.Metadata = exports.MaxMetadataSizeType = exports.MetadataType = exports.RtcEngineContext = exports.IVideoDeviceManager = exports.LeaveChannelOptions = exports.ProxyType = exports.ChannelMediaOptions = exports.ImageTrackOptions = exports.AdvancedAudioOptions = exports.ScreenCaptureSourceInfo = exports.ScreenCaptureSourceType = exports.ThumbImageBuffer = exports.Size = exports.ScreenCaptureConfiguration = exports.CameraCapturerConfiguration = exports.CloudProxyType = exports.CameraDirection = exports.PublisherConfiguration = exports.RtmpStreamLifeCycleType = exports.InjectStreamConfig = exports.VideoCompositingLayout = exports.Region = exports.RemoteVideoStats = exports.RemoteAudioStats = exports.LocalVideoStats = exports.PriorityType = exports.StreamFallbackOptions = exports.AudioReverbType = exports.AudioEqualizationBandFrequency = exports.InjectStreamStatus = exports.AudioMixingReasonType = exports.AudioMixingStateType = exports.MediaDeviceType = void 0;
|
|
3
|
+
exports.AudioDeviceInfo = exports.VideoDeviceInfo = exports.SDKBuildInfo = exports.VideoProfileType = exports.MediaDeviceStateType = exports.QualityReportFormatType = exports.IRtcEngine = exports.ExtensionInfo = exports.DirectCdnStreamingMediaOptions = exports.DirectCdnStreamingStats = exports.DirectCdnStreamingState = exports.DirectCdnStreamingError = exports.Metadata = exports.MaxMetadataSizeType = exports.MetadataType = exports.RtcEngineContext = exports.IVideoDeviceManager = exports.LeaveChannelOptions = exports.FeatureType = exports.ProxyType = exports.ChannelMediaOptions = exports.ImageTrackOptions = exports.AdvancedAudioOptions = exports.ScreenCaptureSourceInfo = exports.ScreenCaptureSourceType = exports.ThumbImageBuffer = exports.Size = exports.ScreenCaptureConfiguration = exports.CameraCapturerConfiguration = exports.CloudProxyType = exports.CameraDirection = exports.PublisherConfiguration = exports.RtmpStreamLifeCycleType = exports.InjectStreamConfig = exports.VideoCompositingLayout = exports.Region = exports.RemoteVideoStats = exports.RemoteAudioStats = exports.LocalVideoStats = exports.PriorityType = exports.StreamFallbackOptions = exports.AudioReverbType = exports.AudioEqualizationBandFrequency = exports.InjectStreamStatus = exports.AudioMixingReasonType = exports.AudioMixingStateType = exports.MediaDeviceType = void 0;
|
|
4
4
|
require("./extension/IAgoraRtcEngineExtension");
|
|
5
5
|
/**
|
|
6
6
|
* Media device types.
|
|
@@ -493,6 +493,20 @@ var ProxyType;
|
|
|
493
493
|
*/
|
|
494
494
|
ProxyType[ProxyType["HttpsProxyType"] = 6] = "HttpsProxyType";
|
|
495
495
|
})(ProxyType = exports.ProxyType || (exports.ProxyType = {}));
|
|
496
|
+
/**
|
|
497
|
+
* @ignore
|
|
498
|
+
*/
|
|
499
|
+
var FeatureType;
|
|
500
|
+
(function (FeatureType) {
|
|
501
|
+
/**
|
|
502
|
+
* @ignore
|
|
503
|
+
*/
|
|
504
|
+
FeatureType[FeatureType["VideoVirtualBackground"] = 1] = "VideoVirtualBackground";
|
|
505
|
+
/**
|
|
506
|
+
* @ignore
|
|
507
|
+
*/
|
|
508
|
+
FeatureType[FeatureType["VideoBeautyEffect"] = 2] = "VideoBeautyEffect";
|
|
509
|
+
})(FeatureType = exports.FeatureType || (exports.FeatureType = {}));
|
|
496
510
|
/**
|
|
497
511
|
* The options for leaving a channel.
|
|
498
512
|
*/
|
|
@@ -943,6 +943,26 @@ var IRtcEngineExImpl = /** @class */ (function (_super) {
|
|
|
943
943
|
IRtcEngineExImpl.prototype.getApiTypeFromTakeSnapshotEx = function (connection, uid, filePath) {
|
|
944
944
|
return 'RtcEngineEx_takeSnapshotEx';
|
|
945
945
|
};
|
|
946
|
+
IRtcEngineExImpl.prototype.enableContentInspectEx = function (enabled, config, connection) {
|
|
947
|
+
var apiType = this.getApiTypeFromEnableContentInspectEx(enabled, config, connection);
|
|
948
|
+
var jsonParams = {
|
|
949
|
+
enabled: enabled,
|
|
950
|
+
config: config,
|
|
951
|
+
connection: connection,
|
|
952
|
+
toJSON: function () {
|
|
953
|
+
return {
|
|
954
|
+
enabled: enabled,
|
|
955
|
+
config: config,
|
|
956
|
+
connection: connection,
|
|
957
|
+
};
|
|
958
|
+
},
|
|
959
|
+
};
|
|
960
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
961
|
+
return jsonResults.result;
|
|
962
|
+
};
|
|
963
|
+
IRtcEngineExImpl.prototype.getApiTypeFromEnableContentInspectEx = function (enabled, config, connection) {
|
|
964
|
+
return 'RtcEngineEx_enableContentInspectEx';
|
|
965
|
+
};
|
|
946
966
|
IRtcEngineExImpl.prototype.startMediaRenderingTracingEx = function (connection) {
|
|
947
967
|
var apiType = this.getApiTypeFromStartMediaRenderingTracingEx(connection);
|
|
948
968
|
var jsonParams = {
|
|
@@ -4743,6 +4743,22 @@ var IRtcEngineImpl = /** @class */ (function () {
|
|
|
4743
4743
|
IRtcEngineImpl.prototype.getApiTypeFromGetNtpWallTimeInMs = function () {
|
|
4744
4744
|
return 'RtcEngine_getNtpWallTimeInMs';
|
|
4745
4745
|
};
|
|
4746
|
+
IRtcEngineImpl.prototype.isFeatureAvailableOnDevice = function (type) {
|
|
4747
|
+
var apiType = this.getApiTypeFromIsFeatureAvailableOnDevice(type);
|
|
4748
|
+
var jsonParams = {
|
|
4749
|
+
type: type,
|
|
4750
|
+
toJSON: function () {
|
|
4751
|
+
return {
|
|
4752
|
+
type: type,
|
|
4753
|
+
};
|
|
4754
|
+
},
|
|
4755
|
+
};
|
|
4756
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
4757
|
+
return jsonResults.result;
|
|
4758
|
+
};
|
|
4759
|
+
IRtcEngineImpl.prototype.getApiTypeFromIsFeatureAvailableOnDevice = function (type) {
|
|
4760
|
+
return 'RtcEngine_isFeatureAvailableOnDevice';
|
|
4761
|
+
};
|
|
4746
4762
|
IRtcEngineImpl.prototype.getAudioDeviceManager = function () {
|
|
4747
4763
|
var apiType = this.getApiTypeFromGetAudioDeviceManager();
|
|
4748
4764
|
var jsonParams = {};
|
|
@@ -80,7 +80,9 @@ exports.EVENT_PROCESSORS = {
|
|
|
80
80
|
data.audioFrame.buffer = buffers[0];
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
handlers: function () {
|
|
83
|
+
handlers: function (event, data) {
|
|
84
|
+
return MediaEngineInternal_1.MediaEngineInternal._audio_frame_observers;
|
|
85
|
+
},
|
|
84
86
|
},
|
|
85
87
|
IVideoFrameObserver: {
|
|
86
88
|
suffix: 'VideoFrameObserver_',
|
|
@@ -95,7 +97,9 @@ exports.EVENT_PROCESSORS = {
|
|
|
95
97
|
data.videoFrame.alphaBuffer = buffers[4];
|
|
96
98
|
}
|
|
97
99
|
},
|
|
98
|
-
handlers: function () {
|
|
100
|
+
handlers: function (event, data) {
|
|
101
|
+
return MediaEngineInternal_1.MediaEngineInternal._video_frame_observers;
|
|
102
|
+
},
|
|
99
103
|
},
|
|
100
104
|
IAudioSpectrumObserver: {
|
|
101
105
|
suffix: 'AudioSpectrumObserver_',
|
|
@@ -103,7 +107,7 @@ exports.EVENT_PROCESSORS = {
|
|
|
103
107
|
return data.playerId === 0 ? EVENT_TYPE.IRtcEngine : EVENT_TYPE.IMediaPlayer;
|
|
104
108
|
},
|
|
105
109
|
func: [AgoraMediaBaseImpl_1.processIAudioSpectrumObserver],
|
|
106
|
-
handlers: function (data) {
|
|
110
|
+
handlers: function (event, data) {
|
|
107
111
|
return data.playerId === 0
|
|
108
112
|
? RtcEngineExInternal_1.RtcEngineExInternal._audio_spectrum_observers
|
|
109
113
|
: MediaPlayerInternal_1.MediaPlayerInternal._audio_spectrum_observers.get(data.playerId);
|
|
@@ -122,7 +126,9 @@ exports.EVENT_PROCESSORS = {
|
|
|
122
126
|
break;
|
|
123
127
|
}
|
|
124
128
|
},
|
|
125
|
-
handlers: function () {
|
|
129
|
+
handlers: function (event, data) {
|
|
130
|
+
return RtcEngineExInternal_1.RtcEngineExInternal._audio_encoded_frame_observers;
|
|
131
|
+
},
|
|
126
132
|
},
|
|
127
133
|
IVideoEncodedFrameObserver: {
|
|
128
134
|
suffix: 'VideoEncodedFrameObserver_',
|
|
@@ -135,13 +141,15 @@ exports.EVENT_PROCESSORS = {
|
|
|
135
141
|
break;
|
|
136
142
|
}
|
|
137
143
|
},
|
|
138
|
-
handlers: function () {
|
|
144
|
+
handlers: function (event, data) {
|
|
145
|
+
return MediaEngineInternal_1.MediaEngineInternal._video_encoded_frame_observers;
|
|
146
|
+
},
|
|
139
147
|
},
|
|
140
148
|
IMediaPlayerSourceObserver: {
|
|
141
149
|
suffix: 'MediaPlayerSourceObserver_',
|
|
142
150
|
type: function () { return EVENT_TYPE.IMediaPlayer; },
|
|
143
151
|
func: [IAgoraMediaPlayerSourceImpl_1.processIMediaPlayerSourceObserver],
|
|
144
|
-
handlers: function (data) {
|
|
152
|
+
handlers: function (event, data) {
|
|
145
153
|
return MediaPlayerInternal_1.MediaPlayerInternal._source_observers.get(data.playerId);
|
|
146
154
|
},
|
|
147
155
|
},
|
|
@@ -155,7 +163,7 @@ exports.EVENT_PROCESSORS = {
|
|
|
155
163
|
data.frame.data_ = Array.from((_a = buffers[0]) !== null && _a !== void 0 ? _a : []);
|
|
156
164
|
}
|
|
157
165
|
},
|
|
158
|
-
handlers: function (data) {
|
|
166
|
+
handlers: function (event, data) {
|
|
159
167
|
return MediaPlayerInternal_1.MediaPlayerInternal._audio_frame_observers.get(data.playerId);
|
|
160
168
|
},
|
|
161
169
|
},
|
|
@@ -172,7 +180,7 @@ exports.EVENT_PROCESSORS = {
|
|
|
172
180
|
data.frame.alphaBuffer = buffers[4];
|
|
173
181
|
}
|
|
174
182
|
},
|
|
175
|
-
handlers: function (data) {
|
|
183
|
+
handlers: function (event, data) {
|
|
176
184
|
return MediaPlayerInternal_1.MediaPlayerInternal._video_frame_observers.get(data.playerId);
|
|
177
185
|
},
|
|
178
186
|
},
|
|
@@ -180,7 +188,7 @@ exports.EVENT_PROCESSORS = {
|
|
|
180
188
|
suffix: 'MediaRecorderObserver_',
|
|
181
189
|
type: function () { return EVENT_TYPE.IMediaRecorder; },
|
|
182
190
|
func: [AgoraMediaBaseImpl_1.processIMediaRecorderObserver],
|
|
183
|
-
handlers: function (data) { return [
|
|
191
|
+
handlers: function (event, data) { return [
|
|
184
192
|
MediaRecorderInternal_1.MediaRecorderInternal._observers.get(data.nativeHandle),
|
|
185
193
|
]; },
|
|
186
194
|
},
|
|
@@ -197,13 +205,17 @@ exports.EVENT_PROCESSORS = {
|
|
|
197
205
|
break;
|
|
198
206
|
}
|
|
199
207
|
},
|
|
200
|
-
handlers: function () {
|
|
208
|
+
handlers: function (event, data) {
|
|
209
|
+
return RtcEngineExInternal_1.RtcEngineExInternal._metadata_observer;
|
|
210
|
+
},
|
|
201
211
|
},
|
|
202
212
|
IDirectCdnStreamingEventHandler: {
|
|
203
213
|
suffix: 'DirectCdnStreamingEventHandler_',
|
|
204
214
|
type: function () { return EVENT_TYPE.IRtcEngine; },
|
|
205
215
|
func: [IAgoraRtcEngineImpl_1.processIDirectCdnStreamingEventHandler],
|
|
206
|
-
handlers: function () {
|
|
216
|
+
handlers: function (event, data) {
|
|
217
|
+
return RtcEngineExInternal_1.RtcEngineExInternal._direct_cdn_streaming_event_handler;
|
|
218
|
+
},
|
|
207
219
|
},
|
|
208
220
|
IRtcEngineEventHandler: {
|
|
209
221
|
suffix: 'RtcEngineEventHandler_',
|
|
@@ -217,7 +229,12 @@ exports.EVENT_PROCESSORS = {
|
|
|
217
229
|
break;
|
|
218
230
|
}
|
|
219
231
|
},
|
|
220
|
-
handlers: function () {
|
|
232
|
+
handlers: function (event, data) {
|
|
233
|
+
if (event === 'onLocalVideoStats' && 'connection' in data) {
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
return RtcEngineExInternal_1.RtcEngineExInternal._event_handlers;
|
|
237
|
+
},
|
|
221
238
|
},
|
|
222
239
|
IMusicContentCenterEventHandler: {
|
|
223
240
|
suffix: 'MusicContentCenterEventHandler_',
|
|
@@ -232,28 +249,35 @@ exports.EVENT_PROCESSORS = {
|
|
|
232
249
|
}
|
|
233
250
|
}
|
|
234
251
|
},
|
|
235
|
-
handlers: function () {
|
|
252
|
+
handlers: function (event, data) {
|
|
253
|
+
return MusicContentCenterInternal_1.MusicContentCenterInternal._event_handlers;
|
|
254
|
+
},
|
|
236
255
|
},
|
|
237
256
|
};
|
|
238
|
-
// some events are not needed, so ignore them
|
|
239
|
-
function isIgnoredEvent(event, data) {
|
|
240
|
-
if (event === 'onLocalVideoStats' && 'connection' in data) {
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
257
|
function handleEvent() {
|
|
248
|
-
var _a
|
|
249
|
-
var
|
|
258
|
+
var _a;
|
|
259
|
+
var _b = [];
|
|
250
260
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
251
|
-
|
|
261
|
+
_b[_i] = arguments[_i];
|
|
252
262
|
}
|
|
253
|
-
var event =
|
|
263
|
+
var event = _b[0], data = _b[1], buffers = _b[2];
|
|
254
264
|
if (isDebuggable()) {
|
|
255
265
|
console.info('onEvent', event, data, buffers);
|
|
256
266
|
}
|
|
267
|
+
var _event = event;
|
|
268
|
+
var processor = Object.values(exports.EVENT_PROCESSORS).find(function (it) {
|
|
269
|
+
return _event.startsWith(it.suffix);
|
|
270
|
+
});
|
|
271
|
+
if (processor === undefined) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
// allow replace preprocess to undefined for avoid call more than once
|
|
275
|
+
processor = __assign({}, processor);
|
|
276
|
+
var reg = new RegExp("^".concat(processor.suffix), 'g');
|
|
277
|
+
_event = _event.replace(reg, '');
|
|
278
|
+
if (_event.endsWith('Ex')) {
|
|
279
|
+
_event = _event.replace(/Ex$/g, '');
|
|
280
|
+
}
|
|
257
281
|
var _data;
|
|
258
282
|
try {
|
|
259
283
|
_data = (_a = json_bigint_1.default.parse(data)) !== null && _a !== void 0 ? _a : {};
|
|
@@ -261,40 +285,25 @@ function handleEvent() {
|
|
|
261
285
|
catch (e) {
|
|
262
286
|
_data = {};
|
|
263
287
|
}
|
|
264
|
-
var _event = event;
|
|
265
|
-
var processor = exports.EVENT_PROCESSORS.IRtcEngineEventHandler;
|
|
266
|
-
Object.values(exports.EVENT_PROCESSORS).some(function (it) {
|
|
267
|
-
var p = it;
|
|
268
|
-
if (_event.startsWith(p.suffix) &&
|
|
269
|
-
processor.handlers(_data) !== undefined) {
|
|
270
|
-
processor = p;
|
|
271
|
-
var reg = new RegExp("^".concat(processor.suffix), 'g');
|
|
272
|
-
_event = _event.replace(reg, '');
|
|
273
|
-
return true;
|
|
274
|
-
}
|
|
275
|
-
return false;
|
|
276
|
-
});
|
|
277
|
-
if (_event.endsWith('Ex')) {
|
|
278
|
-
_event = _event.replace(/Ex$/g, '');
|
|
279
|
-
}
|
|
280
|
-
if (isIgnoredEvent(_event, _data)) {
|
|
281
|
-
return false;
|
|
282
|
-
}
|
|
283
288
|
var _buffers = buffers;
|
|
284
|
-
if (processor.preprocess) {
|
|
285
|
-
processor.preprocess(_event, _data, _buffers);
|
|
286
|
-
}
|
|
287
289
|
if (processor.handlers) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
var handlers = processor.handlers(_event, _data, _buffers);
|
|
291
|
+
if (handlers !== undefined) {
|
|
292
|
+
if (processor.preprocess) {
|
|
293
|
+
processor.preprocess(_event, _data, _buffers);
|
|
294
|
+
// call preprocess only once
|
|
295
|
+
processor.preprocess = undefined;
|
|
293
296
|
}
|
|
294
|
-
|
|
297
|
+
handlers.map(function (value) {
|
|
298
|
+
if (value) {
|
|
299
|
+
processor.func.map(function (it) {
|
|
300
|
+
it(value, _event, _data);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
295
305
|
}
|
|
296
|
-
emitEvent(_event, processor, _data);
|
|
297
|
-
return true;
|
|
306
|
+
emitEvent(_event, processor, _data, _buffers);
|
|
298
307
|
}
|
|
299
308
|
/**
|
|
300
309
|
* @internal
|
|
@@ -416,7 +425,15 @@ exports.callIrisApi = callIrisApi;
|
|
|
416
425
|
/**
|
|
417
426
|
* @internal
|
|
418
427
|
*/
|
|
419
|
-
function emitEvent(eventType, eventProcessor, data) {
|
|
428
|
+
function emitEvent(eventType, eventProcessor, data, buffers) {
|
|
429
|
+
if (exports.DeviceEventEmitter.listenerCount(eventType) === 0) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
if (eventProcessor.preprocess) {
|
|
433
|
+
eventProcessor.preprocess(eventType, data, buffers !== null && buffers !== void 0 ? buffers : []);
|
|
434
|
+
// call preprocess only once
|
|
435
|
+
eventProcessor.preprocess = undefined;
|
|
436
|
+
}
|
|
420
437
|
exports.DeviceEventEmitter.emit(eventType, eventProcessor, data);
|
|
421
438
|
}
|
|
422
439
|
exports.emitEvent = emitEvent;
|
|
@@ -316,7 +316,7 @@ var RendererManager = /** @class */ (function (_super) {
|
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
if (finalResult.ret !== 0) {
|
|
319
|
-
(0, Utils_1.
|
|
319
|
+
(0, Utils_1.logDebug)('GetVideoFrame ret is', finalResult.ret, rendererItem);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
if (!finalResult.isNewFrame) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-electron-sdk",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3-dev.3",
|
|
4
4
|
"description": "agora-electron-sdk",
|
|
5
5
|
"main": "js/AgoraSdk",
|
|
6
6
|
"types": "types/AgoraSdk.d.ts",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"yuv-canvas": "1.2.6"
|
|
135
135
|
},
|
|
136
136
|
"agora_electron": {
|
|
137
|
-
"iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.
|
|
138
|
-
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.
|
|
137
|
+
"iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.3-dev.3_DCG_Windows_Video_20230912_0437.zip",
|
|
138
|
+
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.3-dev.3_DCG_Mac_Video_20230912_0437.zip"
|
|
139
139
|
}
|
|
140
140
|
}
|
package/ts/Private/AgoraBase.ts
CHANGED
|
@@ -438,6 +438,10 @@ export enum ErrorCodeType {
|
|
|
438
438
|
* 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
|
|
439
439
|
*/
|
|
440
440
|
ErrVdmCameraNotAuthorized = 1501,
|
|
441
|
+
/**
|
|
442
|
+
* @ignore
|
|
443
|
+
*/
|
|
444
|
+
ErrAdmApplicationLoopback = 2007,
|
|
441
445
|
}
|
|
442
446
|
|
|
443
447
|
/**
|
|
@@ -2092,7 +2096,15 @@ export enum LocalVideoStreamError {
|
|
|
2092
2096
|
/**
|
|
2093
2097
|
* @ignore
|
|
2094
2098
|
*/
|
|
2095
|
-
|
|
2099
|
+
LocalVideoStreamErrorScreenCaptureWindowHidden = 25,
|
|
2100
|
+
/**
|
|
2101
|
+
* @ignore
|
|
2102
|
+
*/
|
|
2103
|
+
LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden = 26,
|
|
2104
|
+
/**
|
|
2105
|
+
* @ignore
|
|
2106
|
+
*/
|
|
2107
|
+
LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized = 27,
|
|
2096
2108
|
}
|
|
2097
2109
|
|
|
2098
2110
|
/**
|
|
@@ -3107,7 +3119,7 @@ export enum ConnectionChangedReasonType {
|
|
|
3107
3119
|
*/
|
|
3108
3120
|
ConnectionChangedClientIpAddressChanged = 13,
|
|
3109
3121
|
/**
|
|
3110
|
-
* 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The
|
|
3122
|
+
* 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The SDK tries to reconnect to the server automatically.
|
|
3111
3123
|
*/
|
|
3112
3124
|
ConnectionChangedKeepAliveTimeout = 14,
|
|
3113
3125
|
/**
|
|
@@ -3252,6 +3264,10 @@ export enum NetworkType {
|
|
|
3252
3264
|
* 5: The network type is mobile 4G.
|
|
3253
3265
|
*/
|
|
3254
3266
|
NetworkTypeMobile4g = 5,
|
|
3267
|
+
/**
|
|
3268
|
+
* @ignore
|
|
3269
|
+
*/
|
|
3270
|
+
NetworkTypeMobile5g = 6,
|
|
3255
3271
|
}
|
|
3256
3272
|
|
|
3257
3273
|
/**
|
|
@@ -267,6 +267,10 @@ export enum ContentInspectType {
|
|
|
267
267
|
* @ignore
|
|
268
268
|
*/
|
|
269
269
|
ContentInspectSupervision = 2,
|
|
270
|
+
/**
|
|
271
|
+
* @ignore
|
|
272
|
+
*/
|
|
273
|
+
ContentInspectImageModeration = 3,
|
|
270
274
|
}
|
|
271
275
|
|
|
272
276
|
/**
|
|
@@ -291,6 +295,10 @@ export class ContentInspectConfig {
|
|
|
291
295
|
* Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
|
|
292
296
|
*/
|
|
293
297
|
extraInfo?: string;
|
|
298
|
+
/**
|
|
299
|
+
* @ignore
|
|
300
|
+
*/
|
|
301
|
+
serverConfig?: string;
|
|
294
302
|
/**
|
|
295
303
|
* Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
|
|
296
304
|
*/
|
|
@@ -579,10 +587,6 @@ export class ExternalVideoFrame {
|
|
|
579
587
|
* @ignore
|
|
580
588
|
*/
|
|
581
589
|
alphaBuffer?: Uint8Array;
|
|
582
|
-
/**
|
|
583
|
-
* @ignore
|
|
584
|
-
*/
|
|
585
|
-
d3d11_texture_2d?: any;
|
|
586
590
|
/**
|
|
587
591
|
* @ignore
|
|
588
592
|
*/
|
|
@@ -655,10 +659,6 @@ export class VideoFrame {
|
|
|
655
659
|
* This parameter only applies to video data in Texture format. Texture ID.
|
|
656
660
|
*/
|
|
657
661
|
textureId?: number;
|
|
658
|
-
/**
|
|
659
|
-
* @ignore
|
|
660
|
-
*/
|
|
661
|
-
d3d11Texture2d?: any;
|
|
662
662
|
/**
|
|
663
663
|
* This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
|
|
664
664
|
*/
|
|
@@ -55,6 +55,10 @@ export enum MusicContentCenterStatusCode {
|
|
|
55
55
|
* @ignore
|
|
56
56
|
*/
|
|
57
57
|
KMusicContentCenterStatusErrMusicDecryption = 6,
|
|
58
|
+
/**
|
|
59
|
+
* @ignore
|
|
60
|
+
*/
|
|
61
|
+
KMusicContentCenterStatusErrHttpInternalError = 7,
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
/**
|
|
@@ -309,6 +313,10 @@ export class MusicContentCenterConfiguration {
|
|
|
309
313
|
* @ignore
|
|
310
314
|
*/
|
|
311
315
|
maxCacheSize?: number;
|
|
316
|
+
/**
|
|
317
|
+
* @ignore
|
|
318
|
+
*/
|
|
319
|
+
mccDomain?: string;
|
|
312
320
|
}
|
|
313
321
|
|
|
314
322
|
/**
|