agora-electron-sdk 4.2.2 → 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 +7 -0
- package/README.md +2 -2
- package/js/Private/AgoraBase.js +33 -1
- package/js/Private/AgoraMediaBase.js +8 -0
- package/js/Private/IAgoraMusicContentCenter.js +4 -0
- package/js/Private/IAgoraRtcEngine.js +16 -2
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +20 -0
- package/js/Private/impl/IAgoraRtcEngineImpl.js +17 -3
- package/js/Private/internal/IrisApiEngine.js +74 -44
- package/js/Renderer/RendererManager.js +1 -1
- package/package.json +3 -3
- package/ts/Private/AgoraBase.ts +33 -1
- package/ts/Private/AgoraMediaBase.ts +16 -0
- package/ts/Private/IAgoraMusicContentCenter.ts +8 -0
- package/ts/Private/IAgoraRtcEngine.ts +47 -25
- package/ts/Private/IAgoraRtcEngineEx.ts +14 -6
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +35 -1
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +22 -3
- package/ts/Private/internal/IrisApiEngine.ts +75 -46
- package/ts/Renderer/RendererManager.ts +1 -1
- package/types/Private/AgoraBase.d.ts +37 -5
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +18 -2
- 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 +45 -25
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +9 -6
- 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,5 +1,12 @@
|
|
|
1
1
|
|
|
2
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))
|
|
9
|
+
|
|
3
10
|
## [4.2.2](https://github.com/AgoraIO-Extensions/Electron-SDK/compare/v4.2.1...v4.2.2) (2023-08-01)
|
|
4
11
|
|
|
5
12
|
|
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
|
|
@@ -1737,6 +1741,26 @@ var LocalVideoStreamError;
|
|
|
1737
1741
|
* @ignore
|
|
1738
1742
|
*/
|
|
1739
1743
|
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCaptureNoPermission"] = 22] = "LocalVideoStreamErrorScreenCaptureNoPermission";
|
|
1744
|
+
/**
|
|
1745
|
+
* @ignore
|
|
1746
|
+
*/
|
|
1747
|
+
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCapturePaused"] = 23] = "LocalVideoStreamErrorScreenCapturePaused";
|
|
1748
|
+
/**
|
|
1749
|
+
* @ignore
|
|
1750
|
+
*/
|
|
1751
|
+
LocalVideoStreamError[LocalVideoStreamError["LocalVideoStreamErrorScreenCaptureResumed"] = 24] = "LocalVideoStreamErrorScreenCaptureResumed";
|
|
1752
|
+
/**
|
|
1753
|
+
* @ignore
|
|
1754
|
+
*/
|
|
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";
|
|
1740
1764
|
})(LocalVideoStreamError = exports.LocalVideoStreamError || (exports.LocalVideoStreamError = {}));
|
|
1741
1765
|
/**
|
|
1742
1766
|
* Remote audio states.
|
|
@@ -2416,7 +2440,7 @@ var ConnectionChangedReasonType;
|
|
|
2416
2440
|
*/
|
|
2417
2441
|
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedClientIpAddressChanged"] = 13] = "ConnectionChangedClientIpAddressChanged";
|
|
2418
2442
|
/**
|
|
2419
|
-
* 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.
|
|
2420
2444
|
*/
|
|
2421
2445
|
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedKeepAliveTimeout"] = 14] = "ConnectionChangedKeepAliveTimeout";
|
|
2422
2446
|
/**
|
|
@@ -2447,6 +2471,10 @@ var ConnectionChangedReasonType;
|
|
|
2447
2471
|
* @ignore
|
|
2448
2472
|
*/
|
|
2449
2473
|
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedLicenseValidationFailure"] = 21] = "ConnectionChangedLicenseValidationFailure";
|
|
2474
|
+
/**
|
|
2475
|
+
* @ignore
|
|
2476
|
+
*/
|
|
2477
|
+
ConnectionChangedReasonType[ConnectionChangedReasonType["ConnectionChangedCertificationVeryfyFailure"] = 22] = "ConnectionChangedCertificationVeryfyFailure";
|
|
2450
2478
|
})(ConnectionChangedReasonType = exports.ConnectionChangedReasonType || (exports.ConnectionChangedReasonType = {}));
|
|
2451
2479
|
/**
|
|
2452
2480
|
* The reason for a user role switch failure.
|
|
@@ -2548,6 +2576,10 @@ var NetworkType;
|
|
|
2548
2576
|
* 5: The network type is mobile 4G.
|
|
2549
2577
|
*/
|
|
2550
2578
|
NetworkType[NetworkType["NetworkTypeMobile4g"] = 5] = "NetworkTypeMobile4g";
|
|
2579
|
+
/**
|
|
2580
|
+
* @ignore
|
|
2581
|
+
*/
|
|
2582
|
+
NetworkType[NetworkType["NetworkTypeMobile5g"] = 6] = "NetworkTypeMobile5g";
|
|
2551
2583
|
})(NetworkType = exports.NetworkType || (exports.NetworkType = {}));
|
|
2552
2584
|
/**
|
|
2553
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.
|
|
@@ -381,6 +385,10 @@ var VideoPixelFormat;
|
|
|
381
385
|
* 16: The format is I422.
|
|
382
386
|
*/
|
|
383
387
|
VideoPixelFormat[VideoPixelFormat["VideoPixelI422"] = 16] = "VideoPixelI422";
|
|
388
|
+
/**
|
|
389
|
+
* @ignore
|
|
390
|
+
*/
|
|
391
|
+
VideoPixelFormat[VideoPixelFormat["VideoTextureId3d11texture2d"] = 17] = "VideoTextureId3d11texture2d";
|
|
384
392
|
})(VideoPixelFormat = exports.VideoPixelFormat || (exports.VideoPixelFormat = {}));
|
|
385
393
|
/**
|
|
386
394
|
* Video display modes.
|
|
@@ -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.
|
|
@@ -451,7 +451,7 @@ exports.ImageTrackOptions = ImageTrackOptions;
|
|
|
451
451
|
/**
|
|
452
452
|
* The channel media options.
|
|
453
453
|
*
|
|
454
|
-
* Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack,
|
|
454
|
+
* Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters.
|
|
455
455
|
*/
|
|
456
456
|
var ChannelMediaOptions = /** @class */ (function () {
|
|
457
457
|
function ChannelMediaOptions() {
|
|
@@ -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 = {
|
|
@@ -182,9 +182,7 @@ function processIRtcEngineEventHandler(handler, event, jsonParams) {
|
|
|
182
182
|
break;
|
|
183
183
|
case 'onLocalVideoStats':
|
|
184
184
|
if (handler.onLocalVideoStats !== undefined) {
|
|
185
|
-
|
|
186
|
-
handler.onLocalVideoStats(jsonParams.source, jsonParams.stats);
|
|
187
|
-
}
|
|
185
|
+
handler.onLocalVideoStats(jsonParams.source, jsonParams.stats);
|
|
188
186
|
}
|
|
189
187
|
break;
|
|
190
188
|
case 'onRemoteVideoStats':
|
|
@@ -4745,6 +4743,22 @@ var IRtcEngineImpl = /** @class */ (function () {
|
|
|
4745
4743
|
IRtcEngineImpl.prototype.getApiTypeFromGetNtpWallTimeInMs = function () {
|
|
4746
4744
|
return 'RtcEngine_getNtpWallTimeInMs';
|
|
4747
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
|
+
};
|
|
4748
4762
|
IRtcEngineImpl.prototype.getAudioDeviceManager = function () {
|
|
4749
4763
|
var apiType = this.getApiTypeFromGetAudioDeviceManager();
|
|
4750
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,19 +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
257
|
function handleEvent() {
|
|
239
|
-
var _a
|
|
240
|
-
var
|
|
258
|
+
var _a;
|
|
259
|
+
var _b = [];
|
|
241
260
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
242
|
-
|
|
261
|
+
_b[_i] = arguments[_i];
|
|
243
262
|
}
|
|
244
|
-
var event =
|
|
263
|
+
var event = _b[0], data = _b[1], buffers = _b[2];
|
|
245
264
|
if (isDebuggable()) {
|
|
246
265
|
console.info('onEvent', event, data, buffers);
|
|
247
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
|
+
}
|
|
248
281
|
var _data;
|
|
249
282
|
try {
|
|
250
283
|
_data = (_a = json_bigint_1.default.parse(data)) !== null && _a !== void 0 ? _a : {};
|
|
@@ -252,36 +285,25 @@ function handleEvent() {
|
|
|
252
285
|
catch (e) {
|
|
253
286
|
_data = {};
|
|
254
287
|
}
|
|
255
|
-
var _event = event;
|
|
256
|
-
var processor = exports.EVENT_PROCESSORS.IRtcEngineEventHandler;
|
|
257
|
-
Object.values(exports.EVENT_PROCESSORS).some(function (it) {
|
|
258
|
-
var p = it;
|
|
259
|
-
if (_event.startsWith(p.suffix) &&
|
|
260
|
-
processor.handlers(_data) !== undefined) {
|
|
261
|
-
processor = p;
|
|
262
|
-
var reg = new RegExp("^".concat(processor.suffix), 'g');
|
|
263
|
-
_event = _event.replace(reg, '');
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
return false;
|
|
267
|
-
});
|
|
268
|
-
if (_event.endsWith('Ex')) {
|
|
269
|
-
_event = _event.replace(/Ex$/g, '');
|
|
270
|
-
}
|
|
271
288
|
var _buffers = buffers;
|
|
272
|
-
if (processor.preprocess) {
|
|
273
|
-
processor.preprocess(_event, _data, _buffers);
|
|
274
|
-
}
|
|
275
289
|
if (processor.handlers) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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;
|
|
281
296
|
}
|
|
282
|
-
|
|
297
|
+
handlers.map(function (value) {
|
|
298
|
+
if (value) {
|
|
299
|
+
processor.func.map(function (it) {
|
|
300
|
+
it(value, _event, _data);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
283
305
|
}
|
|
284
|
-
emitEvent(_event, processor, _data);
|
|
306
|
+
emitEvent(_event, processor, _data, _buffers);
|
|
285
307
|
}
|
|
286
308
|
/**
|
|
287
309
|
* @internal
|
|
@@ -403,7 +425,15 @@ exports.callIrisApi = callIrisApi;
|
|
|
403
425
|
/**
|
|
404
426
|
* @internal
|
|
405
427
|
*/
|
|
406
|
-
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
|
+
}
|
|
407
437
|
exports.DeviceEventEmitter.emit(eventType, eventProcessor, data);
|
|
408
438
|
}
|
|
409
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
|
/**
|
|
@@ -2081,6 +2085,26 @@ export enum LocalVideoStreamError {
|
|
|
2081
2085
|
* @ignore
|
|
2082
2086
|
*/
|
|
2083
2087
|
LocalVideoStreamErrorScreenCaptureNoPermission = 22,
|
|
2088
|
+
/**
|
|
2089
|
+
* @ignore
|
|
2090
|
+
*/
|
|
2091
|
+
LocalVideoStreamErrorScreenCapturePaused = 23,
|
|
2092
|
+
/**
|
|
2093
|
+
* @ignore
|
|
2094
|
+
*/
|
|
2095
|
+
LocalVideoStreamErrorScreenCaptureResumed = 24,
|
|
2096
|
+
/**
|
|
2097
|
+
* @ignore
|
|
2098
|
+
*/
|
|
2099
|
+
LocalVideoStreamErrorScreenCaptureWindowHidden = 25,
|
|
2100
|
+
/**
|
|
2101
|
+
* @ignore
|
|
2102
|
+
*/
|
|
2103
|
+
LocalVideoStreamErrorScreenCaptureWindowRecoverFromHidden = 26,
|
|
2104
|
+
/**
|
|
2105
|
+
* @ignore
|
|
2106
|
+
*/
|
|
2107
|
+
LocalVideoStreamErrorScreenCaptureWindowRecoverFromMinimized = 27,
|
|
2084
2108
|
}
|
|
2085
2109
|
|
|
2086
2110
|
/**
|
|
@@ -3095,7 +3119,7 @@ export enum ConnectionChangedReasonType {
|
|
|
3095
3119
|
*/
|
|
3096
3120
|
ConnectionChangedClientIpAddressChanged = 13,
|
|
3097
3121
|
/**
|
|
3098
|
-
* 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.
|
|
3099
3123
|
*/
|
|
3100
3124
|
ConnectionChangedKeepAliveTimeout = 14,
|
|
3101
3125
|
/**
|
|
@@ -3126,6 +3150,10 @@ export enum ConnectionChangedReasonType {
|
|
|
3126
3150
|
* @ignore
|
|
3127
3151
|
*/
|
|
3128
3152
|
ConnectionChangedLicenseValidationFailure = 21,
|
|
3153
|
+
/**
|
|
3154
|
+
* @ignore
|
|
3155
|
+
*/
|
|
3156
|
+
ConnectionChangedCertificationVeryfyFailure = 22,
|
|
3129
3157
|
}
|
|
3130
3158
|
|
|
3131
3159
|
/**
|
|
@@ -3236,6 +3264,10 @@ export enum NetworkType {
|
|
|
3236
3264
|
* 5: The network type is mobile 4G.
|
|
3237
3265
|
*/
|
|
3238
3266
|
NetworkTypeMobile4g = 5,
|
|
3267
|
+
/**
|
|
3268
|
+
* @ignore
|
|
3269
|
+
*/
|
|
3270
|
+
NetworkTypeMobile5g = 6,
|
|
3239
3271
|
}
|
|
3240
3272
|
|
|
3241
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
|
*/
|
|
@@ -433,6 +441,10 @@ export enum VideoPixelFormat {
|
|
|
433
441
|
* 16: The format is I422.
|
|
434
442
|
*/
|
|
435
443
|
VideoPixelI422 = 16,
|
|
444
|
+
/**
|
|
445
|
+
* @ignore
|
|
446
|
+
*/
|
|
447
|
+
VideoTextureId3d11texture2d = 17,
|
|
436
448
|
}
|
|
437
449
|
|
|
438
450
|
/**
|
|
@@ -575,6 +587,10 @@ export class ExternalVideoFrame {
|
|
|
575
587
|
* @ignore
|
|
576
588
|
*/
|
|
577
589
|
alphaBuffer?: Uint8Array;
|
|
590
|
+
/**
|
|
591
|
+
* @ignore
|
|
592
|
+
*/
|
|
593
|
+
texture_slice_index?: number;
|
|
578
594
|
}
|
|
579
595
|
|
|
580
596
|
/**
|
|
@@ -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
|
/**
|