agora-rte-sdk 3.8.1 → 3.9.0-alpha
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/lib/constant.d.ts +9 -0
- package/lib/constant.js +13 -2
- package/lib/core/engine/ap-detector.d.ts +4 -4
- package/lib/core/engine/ap-detector.js +33 -20
- package/lib/core/engine/index.d.ts +19 -11
- package/lib/core/engine/index.js +132 -48
- package/lib/core/engine/plugin.js +2 -2
- package/lib/core/engine/type.d.ts +29 -0
- package/lib/core/engine/type.js +6 -0
- package/lib/core/media/camera.d.ts +8 -8
- package/lib/core/media/camera.js +38 -21
- package/lib/core/media/effect-enhancer.d.ts +5 -6
- package/lib/core/media/effect-enhancer.js +6 -16
- package/lib/core/media/index.d.ts +1 -155
- package/lib/core/media/index.js +44 -15
- package/lib/core/media/loopback.d.ts +3 -3
- package/lib/core/media/loopback.js +18 -11
- package/lib/core/media/microphone.d.ts +6 -6
- package/lib/core/media/microphone.js +32 -16
- package/lib/core/media/screen.d.ts +13 -5
- package/lib/core/media/screen.js +46 -16
- package/lib/core/media/type.d.ts +159 -2
- package/lib/core/media/type.js +4 -1
- package/lib/core/processor/message-handler.d.ts +4 -4
- package/lib/core/processor/message-handler.js +66 -28
- package/lib/core/processor/sequence-msg/data.d.ts +9 -7
- package/lib/core/processor/sequence-msg/data.js +26 -3
- package/lib/core/processor/struct.js +2 -2
- package/lib/core/processor/synchronizer/synchronizer-manager.d.ts +10 -0
- package/lib/core/processor/synchronizer/synchronizer-manager.js +43 -4
- package/lib/core/rtc/capture-enhancement.d.ts +4 -14
- package/lib/core/rtc/channel.d.ts +4 -4
- package/lib/core/rtc/constant.d.ts +1 -5
- package/lib/core/rtc/constant.js +2 -8
- package/lib/core/rtc/publish-pool.d.ts +20 -8
- package/lib/core/rtc/publish-pool.js +272 -3
- package/lib/core/rtc/publisher.d.ts +20 -14
- package/lib/core/rtc/publisher.js +151 -7
- package/lib/core/rtc/source-manager.d.ts +12 -2
- package/lib/core/rtc/subscriber.d.ts +14 -6
- package/lib/core/rtc/subscriber.js +171 -4
- package/lib/core/rtc/type.d.ts +6 -17
- package/lib/core/rtc/type.js +10 -26
- package/lib/core/rtm/channel.d.ts +3 -3
- package/lib/core/rtm/client.d.ts +4 -4
- package/lib/core/rtm/type.d.ts +1 -2
- package/lib/core/scene/helpers/ap-detect.d.ts +5 -0
- package/lib/core/scene/helpers/ap-detect.js +153 -0
- package/lib/core/scene/helpers/join.d.ts +8 -0
- package/lib/core/scene/helpers/join.js +105 -0
- package/lib/core/scene/helpers/rtc-event.d.ts +4 -0
- package/lib/core/scene/helpers/rtc-event.js +36 -0
- package/lib/core/scene/helpers/stream-publish-handlers.d.ts +15 -0
- package/lib/core/scene/helpers/stream-publish-handlers.js +121 -0
- package/lib/core/scene/helpers/stream-type.d.ts +7 -0
- package/lib/core/scene/{helper.js → helpers/stream-type.js} +3 -32
- package/lib/core/scene/index.d.ts +69 -187
- package/lib/core/scene/index.js +813 -1368
- package/lib/core/scene/local-user.d.ts +19 -85
- package/lib/core/scene/local-user.js +151 -152
- package/lib/core/scene/state-sync.d.ts +5 -7
- package/lib/core/scene/state-sync.js +20 -43
- package/lib/core/scene/stream-player.d.ts +9 -8
- package/lib/core/scene/stream-player.js +13 -10
- package/lib/core/scene/type.d.ts +359 -9
- package/lib/core/services/api.d.ts +9 -0
- package/lib/core/services/api.js +96 -58
- package/lib/core/services/auth-headers.d.ts +1 -0
- package/lib/core/services/auth-headers.js +5 -2
- package/lib/core/services/client.d.ts +3 -0
- package/lib/core/services/client.js +14 -2
- package/lib/core/services/type.d.ts +1 -0
- package/lib/core/type.d.ts +1 -0
- package/lib/core/type.js +6 -0
- package/lib/core/utilities/abort-manager.d.ts +18 -0
- package/lib/core/utilities/abort-manager.js +154 -0
- package/lib/core/utilities/error.d.ts +5 -36
- package/lib/core/utilities/error.js +23 -92
- package/lib/core/utilities/join-manager.d.ts +54 -0
- package/lib/core/utilities/join-manager.js +198 -0
- package/lib/core/utilities/logger.d.ts +2 -0
- package/lib/core/utilities/logger.js +8 -13
- package/lib/core/utilities/package-info.d.ts +1 -0
- package/lib/core/utilities/package-info.js +6 -4
- package/lib/core/utilities/property-extract.d.ts +2 -0
- package/lib/core/utilities/property-extract.js +79 -0
- package/lib/core/utilities/weak-invoker.d.ts +11 -0
- package/lib/core/utilities/weak-invoker.js +121 -0
- package/lib/imports.d.ts +6 -4
- package/lib/imports.js +42 -17
- package/lib/index.d.ts +7 -5
- package/lib/index.js +6 -5
- package/lib/plugin/restful-client/index.d.ts +1 -1
- package/lib/plugin/restful-client/index.js +11 -10
- package/lib/plugin/rtc/electron/camera-preview-task-manager.d.ts +14 -0
- package/lib/plugin/rtc/electron/camera-preview-task-manager.js +125 -0
- package/lib/plugin/rtc/electron/canvas-helper.d.ts +2 -2
- package/lib/plugin/rtc/electron/canvas-helper.js +15 -12
- package/lib/plugin/rtc/electron/canvas-tag-pool.d.ts +4 -4
- package/lib/plugin/rtc/electron/canvas-tag-pool.js +21 -13
- package/lib/plugin/rtc/electron/capture-enhancement.d.ts +3 -5
- package/lib/plugin/rtc/electron/capture-enhancement.js +45 -29
- package/lib/plugin/rtc/electron/channel.d.ts +13 -16
- package/lib/plugin/rtc/electron/channel.js +48 -57
- package/lib/plugin/rtc/electron/client.d.ts +8 -4
- package/lib/plugin/rtc/electron/client.js +107 -72
- package/lib/plugin/rtc/electron/constants.d.ts +12 -1
- package/lib/plugin/rtc/electron/constants.js +94 -26
- package/lib/plugin/rtc/electron/desc-type.js +1 -1
- package/lib/plugin/rtc/electron/downloadALD.js +9 -7
- package/lib/plugin/rtc/electron/publish-pool.d.ts +9 -17
- package/lib/plugin/rtc/electron/publish-pool.js +110 -256
- package/lib/plugin/rtc/electron/publisher.d.ts +9 -21
- package/lib/plugin/rtc/electron/publisher.js +80 -254
- package/lib/plugin/rtc/electron/source-manager.d.ts +22 -16
- package/lib/plugin/rtc/electron/source-manager.js +345 -215
- package/lib/plugin/rtc/electron/source-state-control/loopback-state-control.d.ts +1 -5
- package/lib/plugin/rtc/electron/source-state-control/loopback-state-control.js +2 -18
- package/lib/plugin/rtc/electron/source-state-control/media-state-control.d.ts +18 -0
- package/lib/plugin/rtc/electron/source-state-control/{camera-state-control.js → media-state-control.js} +50 -104
- package/lib/plugin/rtc/electron/source-state-control/microphone-state-control.d.ts +4 -10
- package/lib/plugin/rtc/electron/source-state-control/microphone-state-control.js +5 -26
- package/lib/plugin/rtc/electron/source-state-control/source-state-control.d.ts +30 -26
- package/lib/plugin/rtc/electron/source-state-control/source-state-control.js +68 -110
- package/lib/plugin/rtc/electron/subscriber.d.ts +7 -16
- package/lib/plugin/rtc/electron/subscriber.js +34 -112
- package/lib/plugin/rtc/electron/type.d.ts +7 -3
- package/lib/plugin/rtc/electron/type.js +8 -2
- package/lib/plugin/rtc/electron/utils.d.ts +9 -6
- package/lib/plugin/rtc/electron/utils.js +37 -9
- package/lib/plugin/rtc/web/assembler.d.ts +2 -1
- package/lib/plugin/rtc/web/assembler.js +9 -2
- package/lib/plugin/rtc/web/audio-player.d.ts +1 -1
- package/lib/plugin/rtc/web/audio-player.js +13 -8
- package/lib/plugin/rtc/web/canvas-helper.d.ts +1 -1
- package/lib/plugin/rtc/web/canvas-helper.js +3 -1
- package/lib/plugin/rtc/web/capture-enhancement.d.ts +3 -5
- package/lib/plugin/rtc/web/capture-enhancement.js +14 -20
- package/lib/plugin/rtc/web/channel.d.ts +17 -13
- package/lib/plugin/rtc/web/channel.js +221 -124
- package/lib/plugin/rtc/web/client.d.ts +5 -3
- package/lib/plugin/rtc/web/client.js +49 -21
- package/lib/plugin/rtc/web/convert-type.d.ts +3 -0
- package/lib/plugin/rtc/web/convert-type.js +22 -0
- package/lib/plugin/rtc/web/device.js +2 -3
- package/lib/plugin/rtc/web/effect-enabler.js +3 -3
- package/lib/plugin/rtc/web/extension.d.ts +1 -1
- package/lib/plugin/rtc/web/extension.js +4 -1
- package/lib/plugin/rtc/web/publish-pool.d.ts +4 -17
- package/lib/plugin/rtc/web/publish-pool.js +41 -194
- package/lib/plugin/rtc/web/publish.d.ts +9 -8
- package/lib/plugin/rtc/web/publish.js +71 -27
- package/lib/plugin/rtc/web/publisher.d.ts +20 -12
- package/lib/plugin/rtc/web/publisher.js +118 -69
- package/lib/plugin/rtc/web/source-manager.d.ts +1 -0
- package/lib/plugin/rtc/web/source-manager.js +15 -9
- package/lib/plugin/rtc/web/subscribe.d.ts +10 -10
- package/lib/plugin/rtc/web/subscribe.js +26 -14
- package/lib/plugin/rtc/web/subscriber.d.ts +5 -10
- package/lib/plugin/rtc/web/subscriber.js +21 -82
- package/lib/plugin/rtc/web/track-control/camera.d.ts +1 -1
- package/lib/plugin/rtc/web/track-control/camera.js +4 -1
- package/lib/plugin/rtc/web/track-control/screen.d.ts +1 -1
- package/lib/plugin/rtc/web/track-control/screen.js +4 -1
- package/lib/plugin/rtm/channel.d.ts +8 -5
- package/lib/plugin/rtm/channel.js +113 -49
- package/lib/plugin/rtm/client.d.ts +10 -5
- package/lib/plugin/rtm/client.js +120 -61
- package/lib/plugin/rtm/utils.js +1 -1
- package/lib/plugin/synchronizer-worker/worker.js +71 -7
- package/lib/type.d.ts +0 -5
- package/lib-es/constant.js +75 -0
- package/lib-es/core/engine/ap-detector.js +677 -0
- package/lib-es/core/engine/index.js +534 -0
- package/lib-es/core/engine/plugin.js +84 -0
- package/lib-es/core/engine/registry.js +7 -0
- package/lib-es/core/engine/type.js +1 -0
- package/lib-es/core/media/base-track.js +22 -0
- package/lib-es/core/media/camera.js +250 -0
- package/lib-es/core/media/effect-enhancer.js +143 -0
- package/lib-es/core/media/index.js +344 -0
- package/lib-es/core/media/loopback.js +167 -0
- package/lib-es/core/media/microphone.js +225 -0
- package/lib-es/core/media/screen.js +225 -0
- package/lib-es/core/media/type.js +37 -0
- package/lib-es/core/monitor/index.js +1 -0
- package/lib-es/core/monitor/type.js +1 -0
- package/lib-es/core/processor/message-handler.js +888 -0
- package/lib-es/core/processor/sequence-msg/data.js +176 -0
- package/lib-es/core/processor/sequence-msg/message-parser.js +27 -0
- package/lib-es/core/processor/sequence-msg/synchronizer.js +328 -0
- package/lib-es/core/processor/struct.js +220 -0
- package/lib-es/core/processor/synchronizer/base-synchronizer.js +364 -0
- package/lib-es/core/processor/synchronizer/fallback-synchronizer.js +70 -0
- package/lib-es/core/processor/synchronizer/index.js +4 -0
- package/lib-es/core/processor/synchronizer/synchronizer-manager.js +536 -0
- package/lib-es/core/processor/synchronizer/types.js +84 -0
- package/lib-es/core/processor/type.js +59 -0
- package/lib-es/core/rtc/canvas.js +63 -0
- package/lib-es/core/rtc/capture-enhancement.js +5 -0
- package/lib-es/core/rtc/channel.js +45 -0
- package/lib-es/core/rtc/client.js +153 -0
- package/lib-es/core/rtc/constant.js +1 -0
- package/lib-es/core/rtc/index.js +3 -0
- package/lib-es/core/rtc/publish-pool.js +292 -0
- package/lib-es/core/rtc/publisher.js +174 -0
- package/lib-es/core/rtc/source-manager.js +23 -0
- package/lib-es/core/rtc/subscriber.js +173 -0
- package/lib-es/core/rtc/type.js +195 -0
- package/lib-es/core/rtm/channel.js +8 -0
- package/lib-es/core/rtm/client.js +8 -0
- package/lib-es/core/rtm/index.js +1 -0
- package/lib-es/core/rtm/type.js +15 -0
- package/lib-es/core/scene/helpers/ap-detect.js +143 -0
- package/lib-es/core/scene/helpers/join.js +97 -0
- package/lib-es/core/scene/helpers/rtc-event.js +29 -0
- package/lib-es/core/scene/helpers/stream-publish-handlers.js +112 -0
- package/lib-es/core/scene/helpers/stream-type.js +43 -0
- package/lib-es/core/scene/index.js +1329 -0
- package/lib-es/core/scene/local-user.js +445 -0
- package/lib-es/core/scene/state-sync.js +88 -0
- package/lib-es/core/scene/stream-player.js +199 -0
- package/lib-es/core/scene/type.js +40 -0
- package/lib-es/core/services/api.js +830 -0
- package/lib-es/core/services/auth-headers.js +54 -0
- package/lib-es/core/services/client.js +61 -0
- package/lib-es/core/services/domain-holder.js +67 -0
- package/lib-es/core/services/domain-region-map.js +4 -0
- package/lib-es/core/services/type.js +1 -0
- package/lib-es/core/type.js +1 -0
- package/lib-es/core/utilities/abort-manager.js +146 -0
- package/lib-es/core/utilities/clone.js +5 -0
- package/lib-es/core/utilities/constants.js +7 -0
- package/lib-es/core/utilities/diff.js +155 -0
- package/lib-es/core/utilities/error.js +60 -0
- package/lib-es/core/utilities/fetch.js +53 -0
- package/lib-es/core/utilities/join-manager.js +190 -0
- package/lib-es/core/utilities/logger.js +13 -0
- package/lib-es/core/utilities/package-info.js +6 -0
- package/lib-es/core/utilities/parameters.js +116 -0
- package/lib-es/core/utilities/property-extract.js +71 -0
- package/lib-es/core/utilities/weak-invoker.js +113 -0
- package/lib-es/imports.js +55 -0
- package/lib-es/index.js +4 -0
- package/lib-es/plugin/monitor/index.js +226 -0
- package/lib-es/plugin/monitor/log-upload/handler.js +244 -0
- package/lib-es/plugin/monitor/log-upload/scheduler.js +86 -0
- package/lib-es/plugin/monitor/log-upload/type.js +1 -0
- package/lib-es/plugin/monitor/type.js +1 -0
- package/lib-es/plugin/restful-client/index.js +334 -0
- package/lib-es/plugin/rtc/electron/camera-preview-task-manager.js +117 -0
- package/lib-es/plugin/rtc/electron/canvas-helper.js +148 -0
- package/lib-es/plugin/rtc/electron/canvas-tag-pool.js +391 -0
- package/lib-es/plugin/rtc/electron/capture-enhancement.js +513 -0
- package/lib-es/plugin/rtc/electron/channel.js +725 -0
- package/lib-es/plugin/rtc/electron/client.js +1347 -0
- package/lib-es/plugin/rtc/electron/constants.js +189 -0
- package/lib-es/plugin/rtc/electron/convert-type.js +42 -0
- package/lib-es/plugin/rtc/electron/desc-type.js +8 -0
- package/lib-es/plugin/rtc/electron/downloadALD.js +188 -0
- package/lib-es/plugin/rtc/electron/index.js +49 -0
- package/lib-es/plugin/rtc/electron/polling.js +110 -0
- package/lib-es/plugin/rtc/electron/publish-pool.js +263 -0
- package/lib-es/plugin/rtc/electron/publisher.js +581 -0
- package/lib-es/plugin/rtc/electron/source-manager.js +1420 -0
- package/lib-es/plugin/rtc/electron/source-state-control/loopback-state-control.js +107 -0
- package/lib-es/plugin/rtc/electron/source-state-control/media-state-control.js +143 -0
- package/lib-es/plugin/rtc/electron/source-state-control/microphone-state-control.js +110 -0
- package/lib-es/plugin/rtc/electron/source-state-control/source-state-control.js +224 -0
- package/lib-es/plugin/rtc/electron/subscriber.js +185 -0
- package/lib-es/plugin/rtc/electron/type.js +233 -0
- package/lib-es/plugin/rtc/electron/utils.js +591 -0
- package/lib-es/plugin/rtc/web/assembler.js +123 -0
- package/lib-es/plugin/rtc/web/audio-player.js +290 -0
- package/lib-es/plugin/rtc/web/canvas-helper.js +141 -0
- package/lib-es/plugin/rtc/web/capture-enhancement.js +225 -0
- package/lib-es/plugin/rtc/web/channel.js +728 -0
- package/lib-es/plugin/rtc/web/client.js +588 -0
- package/lib-es/plugin/rtc/web/constants.js +5 -0
- package/lib-es/plugin/rtc/web/convert-type.js +15 -0
- package/lib-es/plugin/rtc/web/device.js +900 -0
- package/lib-es/plugin/rtc/web/effect-enabler.js +229 -0
- package/lib-es/plugin/rtc/web/extension.js +158 -0
- package/lib-es/plugin/rtc/web/index.js +50 -0
- package/lib-es/plugin/rtc/web/publish-pool.js +108 -0
- package/lib-es/plugin/rtc/web/publish.js +772 -0
- package/lib-es/plugin/rtc/web/publisher.js +712 -0
- package/lib-es/plugin/rtc/web/source-manager.js +512 -0
- package/lib-es/plugin/rtc/web/struct.js +75 -0
- package/lib-es/plugin/rtc/web/subscribe.js +760 -0
- package/lib-es/plugin/rtc/web/subscriber.js +105 -0
- package/lib-es/plugin/rtc/web/track-control/camera.js +602 -0
- package/lib-es/plugin/rtc/web/track-control/microphone.js +484 -0
- package/lib-es/plugin/rtc/web/track-control/screen.js +341 -0
- package/lib-es/plugin/rtc/web/type.js +1 -0
- package/lib-es/plugin/rtc/web/utils.js +6 -0
- package/lib-es/plugin/rtm/channel.js +305 -0
- package/lib-es/plugin/rtm/client.js +550 -0
- package/lib-es/plugin/rtm/constants.js +1 -0
- package/lib-es/plugin/rtm/convert-type.js +31 -0
- package/lib-es/plugin/rtm/index.js +64 -0
- package/lib-es/plugin/rtm/type.js +1 -0
- package/lib-es/plugin/rtm/utils.js +9 -0
- package/lib-es/plugin/synchronizer-worker/index.js +15 -0
- package/lib-es/plugin/synchronizer-worker/worker.js +217 -0
- package/lib-es/type.js +35 -0
- package/package.json +7 -6
- package/lib/core/scene/helper.d.ts +0 -10
- package/lib/plugin/rtc/electron/source-state-control/camera-state-control.d.ts +0 -28
- package/lib/plugin/rtc/electron/source-state-control/screen-state-control.d.ts +0 -31
- package/lib/plugin/rtc/electron/source-state-control/screen-state-control.js +0 -213
- package/lib/plugin/rtc/electron/source-state-control/window-state-control.d.ts +0 -31
- package/lib/plugin/rtc/electron/source-state-control/window-state-control.js +0 -213
package/lib/constant.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ export declare const DEFAULT_AP_DETECT_TIMEOUT = 300;
|
|
|
3
3
|
export declare const DEFAULT_AP_DETECT_IS_REDETECT = true;
|
|
4
4
|
export declare const DEFAULT_RTC_CLIENT_IS_DISABLED = false;
|
|
5
5
|
export declare const DEFAULT_RTM_CLIENT_IS_DISABLED = false;
|
|
6
|
+
export declare enum AgoraRteReturnCode {
|
|
7
|
+
UNDEFINED = -1,
|
|
8
|
+
SUCCESS = 0
|
|
9
|
+
}
|
|
10
|
+
export declare enum AgoraRtmReturnCode {
|
|
11
|
+
UNDEFINED = -1,
|
|
12
|
+
SUCCESS = 0
|
|
13
|
+
}
|
|
6
14
|
export declare enum AgoraRtcErrorCode {
|
|
7
15
|
UNDEFINED = -1,
|
|
8
16
|
SUCCESS = 0,
|
|
@@ -34,3 +42,4 @@ export declare enum AgoraRtcErrorCode {
|
|
|
34
42
|
SOURCE_ID_IS_NOT_VALID = 26,
|
|
35
43
|
CANNOT_SET_DUAL_STREAM_MODE = 27
|
|
36
44
|
}
|
|
45
|
+
export declare const DEFAULT_ONLINE_STATE_ENSURE_DELAY = 5000;
|
package/lib/constant.js
CHANGED
|
@@ -4,7 +4,7 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TIMEOUT_ONE_AND_HALF_MINUTES = exports.DEFAULT_RTM_CLIENT_IS_DISABLED = exports.DEFAULT_RTC_CLIENT_IS_DISABLED = exports.DEFAULT_AP_DETECT_TIMEOUT = exports.DEFAULT_AP_DETECT_IS_REDETECT = exports.AgoraRtcErrorCode = void 0;
|
|
7
|
+
exports.TIMEOUT_ONE_AND_HALF_MINUTES = exports.DEFAULT_RTM_CLIENT_IS_DISABLED = exports.DEFAULT_RTC_CLIENT_IS_DISABLED = exports.DEFAULT_ONLINE_STATE_ENSURE_DELAY = exports.DEFAULT_AP_DETECT_TIMEOUT = exports.DEFAULT_AP_DETECT_IS_REDETECT = exports.AgoraRtmReturnCode = exports.AgoraRteReturnCode = exports.AgoraRtcErrorCode = void 0;
|
|
8
8
|
var TIMEOUT_ONE_AND_HALF_MINUTES = exports.TIMEOUT_ONE_AND_HALF_MINUTES = 15000;
|
|
9
9
|
|
|
10
10
|
// milliseconds
|
|
@@ -12,6 +12,16 @@ var DEFAULT_AP_DETECT_TIMEOUT = exports.DEFAULT_AP_DETECT_TIMEOUT = 300;
|
|
|
12
12
|
var DEFAULT_AP_DETECT_IS_REDETECT = exports.DEFAULT_AP_DETECT_IS_REDETECT = true;
|
|
13
13
|
var DEFAULT_RTC_CLIENT_IS_DISABLED = exports.DEFAULT_RTC_CLIENT_IS_DISABLED = false;
|
|
14
14
|
var DEFAULT_RTM_CLIENT_IS_DISABLED = exports.DEFAULT_RTM_CLIENT_IS_DISABLED = false;
|
|
15
|
+
var AgoraRteReturnCode = exports.AgoraRteReturnCode = /*#__PURE__*/function (AgoraRteReturnCode) {
|
|
16
|
+
AgoraRteReturnCode[AgoraRteReturnCode["UNDEFINED"] = -1] = "UNDEFINED";
|
|
17
|
+
AgoraRteReturnCode[AgoraRteReturnCode["SUCCESS"] = 0] = "SUCCESS";
|
|
18
|
+
return AgoraRteReturnCode;
|
|
19
|
+
}({});
|
|
20
|
+
var AgoraRtmReturnCode = exports.AgoraRtmReturnCode = /*#__PURE__*/function (AgoraRtmReturnCode) {
|
|
21
|
+
AgoraRtmReturnCode[AgoraRtmReturnCode["UNDEFINED"] = -1] = "UNDEFINED";
|
|
22
|
+
AgoraRtmReturnCode[AgoraRtmReturnCode["SUCCESS"] = 0] = "SUCCESS";
|
|
23
|
+
return AgoraRtmReturnCode;
|
|
24
|
+
}({});
|
|
15
25
|
var AgoraRtcErrorCode = exports.AgoraRtcErrorCode = /*#__PURE__*/function (AgoraRtcErrorCode) {
|
|
16
26
|
AgoraRtcErrorCode[AgoraRtcErrorCode["UNDEFINED"] = -1] = "UNDEFINED";
|
|
17
27
|
AgoraRtcErrorCode[AgoraRtcErrorCode["SUCCESS"] = 0] = "SUCCESS";
|
|
@@ -68,4 +78,5 @@ var AgoraRtcErrorCode = exports.AgoraRtcErrorCode = /*#__PURE__*/function (Agora
|
|
|
68
78
|
// 无法设置双流模式
|
|
69
79
|
AgoraRtcErrorCode[AgoraRtcErrorCode["CANNOT_SET_DUAL_STREAM_MODE"] = 27] = "CANNOT_SET_DUAL_STREAM_MODE";
|
|
70
80
|
return AgoraRtcErrorCode;
|
|
71
|
-
}({});
|
|
81
|
+
}({});
|
|
82
|
+
var DEFAULT_ONLINE_STATE_ENSURE_DELAY = exports.DEFAULT_ONLINE_STATE_ENSURE_DELAY = 5000; // 5 seconds
|
|
@@ -31,7 +31,7 @@ export interface AgoraRteApDetector {
|
|
|
31
31
|
/**
|
|
32
32
|
* 开始探测可用IP
|
|
33
33
|
*/
|
|
34
|
-
start(success
|
|
34
|
+
start(success?: () => void, failure?: (agoraRteError: AgoraRteError) => void): Promise<boolean>;
|
|
35
35
|
/**
|
|
36
36
|
* 停止探测可用IP
|
|
37
37
|
*/
|
|
@@ -57,7 +57,7 @@ export interface AgoraRteApDetector {
|
|
|
57
57
|
/**
|
|
58
58
|
* 重新探测可用IP
|
|
59
59
|
*/
|
|
60
|
-
restart(success
|
|
60
|
+
restart(success?: () => void, failure?: (agoraRteError: AgoraRteError) => void): Promise<boolean>;
|
|
61
61
|
addObserver(observer: AgoraRteApDetectorObserver): void;
|
|
62
62
|
removeObserver(observer: AgoraRteApDetectorObserver): void;
|
|
63
63
|
}
|
|
@@ -94,8 +94,8 @@ export declare class AgoraRteApDetectorImpl implements AgoraRteApDetector {
|
|
|
94
94
|
isDetectRequired(): boolean;
|
|
95
95
|
setConfig(internalRtcConfig?: AgoraRtcAccessPointConfig, externalRtcConfig?: AgoraRtcAccessPointConfig, detectTimeout?: number, isRedetect?: boolean): void;
|
|
96
96
|
stop(): void;
|
|
97
|
-
restart(success
|
|
98
|
-
start(success
|
|
97
|
+
restart(success?: () => void, failure?: (agoraRteError: AgoraRteError) => void): Promise<boolean>;
|
|
98
|
+
start(success?: () => void, failure?: (agoraRteError: AgoraRteError) => void): Promise<boolean>;
|
|
99
99
|
private _setConfigIsValid;
|
|
100
100
|
private _executeDetect;
|
|
101
101
|
private _runAllDetectTask;
|
|
@@ -69,7 +69,7 @@ var _imports = require("../../imports");
|
|
|
69
69
|
var _error2 = require("../utilities/error");
|
|
70
70
|
var _logger = require("../utilities/logger");
|
|
71
71
|
var _AgoraRteApDetectorImpl;
|
|
72
|
-
var _initProto;
|
|
72
|
+
var _initProto, _restartDecs, _startDecs, _executeDetectDecs, _ref;
|
|
73
73
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
74
74
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
75
75
|
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof3(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
@@ -114,8 +114,9 @@ var transformUrlToRequestUrl = exports.transformUrlToRequestUrl = function trans
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
var generateApDetectorError = function generateApDetectorError(code, message) {
|
|
117
|
-
return (0, _error2.generateRteClientErrorNew)(
|
|
117
|
+
return (0, _error2.generateRteClientErrorNew)(_imports.ErrorModuleCode.RTE_AP_DETECTOR, code, message);
|
|
118
118
|
};
|
|
119
|
+
_ref = (_restartDecs = (0, _imports.trace)(['success', 'failure']), _startDecs = (0, _imports.trace)(['success', 'failure']), _executeDetectDecs = (0, _imports.trace)(['success', 'failure', 'type', 'successNotifyName', 'failureNotifyName']), "logger");
|
|
119
120
|
var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/function () {
|
|
120
121
|
// ==================== 构造函数 ====================
|
|
121
122
|
/**
|
|
@@ -127,7 +128,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
127
128
|
*/
|
|
128
129
|
function AgoraRteApDetectorImpl(internalRtcConfig, externalRtcConfig, detectTimeout, isRedetect) {
|
|
129
130
|
(0, _classCallCheck2["default"])(this, AgoraRteApDetectorImpl);
|
|
130
|
-
(0, _defineProperty2["default"])(this,
|
|
131
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
131
132
|
prefix: 'AgoraRteApDetectorImpl'
|
|
132
133
|
})));
|
|
133
134
|
// ==================== 私有属性 ====================
|
|
@@ -148,7 +149,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
148
149
|
this._externalRtcConfig = this._resolveParamsRtcConfig('externalRtcConfig', externalRtcConfig);
|
|
149
150
|
this._detectTimeout = this._resolveParamsDetecTimeout(detectTimeout);
|
|
150
151
|
this._isRedetect = this._resolveParamsIsRedetect(isRedetect);
|
|
151
|
-
this.addObserver((0,
|
|
152
|
+
this.addObserver((0, _logger.generateLogObserver)(this.logger, ['onDetectionFailure', 'onDetectionSuccess', 'onRedetectionFailure', 'onRedetectionSuccess']));
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
// ==================== 公有方法 ====================
|
|
@@ -249,17 +250,23 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
249
250
|
}, {
|
|
250
251
|
key: "restart",
|
|
251
252
|
value: function () {
|
|
252
|
-
var _restart = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(
|
|
253
|
-
var
|
|
253
|
+
var _restart = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
254
|
+
var success,
|
|
255
|
+
failure,
|
|
256
|
+
errorMsg,
|
|
257
|
+
error,
|
|
258
|
+
_args = arguments;
|
|
254
259
|
return _regenerator["default"].wrap(function (_context) {
|
|
255
260
|
while (1) switch (_context.prev = _context.next) {
|
|
256
261
|
case 0:
|
|
262
|
+
success = _args.length > 0 && _args[0] !== undefined ? _args[0] : function () {};
|
|
263
|
+
failure = _args.length > 1 && _args[1] !== undefined ? _args[1] : function () {};
|
|
257
264
|
if (this._isRedetect) {
|
|
258
265
|
_context.next = 1;
|
|
259
266
|
break;
|
|
260
267
|
}
|
|
261
268
|
errorMsg = 'restart: redetect is disabled, please check the isRedetect config';
|
|
262
|
-
error = generateApDetectorError(
|
|
269
|
+
error = generateApDetectorError(_imports.DetailErrorCode.UNDEFINED_ERROR, errorMsg);
|
|
263
270
|
this.logger.error(errorMsg);
|
|
264
271
|
failure(error);
|
|
265
272
|
this._apDetectorObserver.notifyObservers('onRedetectionFailure');
|
|
@@ -275,7 +282,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
275
282
|
}
|
|
276
283
|
}, _callee, this);
|
|
277
284
|
}));
|
|
278
|
-
function restart(
|
|
285
|
+
function restart() {
|
|
279
286
|
return _restart.apply(this, arguments);
|
|
280
287
|
}
|
|
281
288
|
return restart;
|
|
@@ -283,10 +290,15 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
283
290
|
}, {
|
|
284
291
|
key: "start",
|
|
285
292
|
value: function () {
|
|
286
|
-
var _start = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(
|
|
293
|
+
var _start = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
294
|
+
var success,
|
|
295
|
+
failure,
|
|
296
|
+
_args2 = arguments;
|
|
287
297
|
return _regenerator["default"].wrap(function (_context2) {
|
|
288
298
|
while (1) switch (_context2.prev = _context2.next) {
|
|
289
299
|
case 0:
|
|
300
|
+
success = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : function () {};
|
|
301
|
+
failure = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : function () {};
|
|
290
302
|
_context2.next = 1;
|
|
291
303
|
return this._executeDetect(success, failure, 'start', 'onDetectionSuccess', 'onDetectionFailure');
|
|
292
304
|
case 1:
|
|
@@ -297,7 +309,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
297
309
|
}
|
|
298
310
|
}, _callee2, this);
|
|
299
311
|
}));
|
|
300
|
-
function start(
|
|
312
|
+
function start() {
|
|
301
313
|
return _start.apply(this, arguments);
|
|
302
314
|
}
|
|
303
315
|
return start;
|
|
@@ -326,7 +338,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
326
338
|
break;
|
|
327
339
|
}
|
|
328
340
|
errorMsg = "".concat(type, ": detection is already in progress, please do not call repeatedly");
|
|
329
|
-
error = generateApDetectorError(
|
|
341
|
+
error = generateApDetectorError(_imports.DetailErrorCode.UNDEFINED_ERROR, errorMsg);
|
|
330
342
|
this.logger.error(errorMsg);
|
|
331
343
|
failure(error);
|
|
332
344
|
this._apDetectorObserver.notifyObservers(failureNotifyName);
|
|
@@ -358,7 +370,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
358
370
|
return _context3.abrupt("return", true);
|
|
359
371
|
case 3:
|
|
360
372
|
_errorMsg = signal.aborted ? 'start: task is aborted' : 'start: no available access point detected';
|
|
361
|
-
_error = generateApDetectorError(
|
|
373
|
+
_error = generateApDetectorError(_imports.DetailErrorCode.AP_DETECT_FAILED, _errorMsg);
|
|
362
374
|
this.logger.error(_errorMsg);
|
|
363
375
|
failure(_error);
|
|
364
376
|
this._apDetectorObserver.notifyObservers(failureNotifyName);
|
|
@@ -369,7 +381,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
369
381
|
}
|
|
370
382
|
}, _callee3, this);
|
|
371
383
|
}));
|
|
372
|
-
function _executeDetect(
|
|
384
|
+
function _executeDetect(_x, _x2, _x3, _x4, _x5) {
|
|
373
385
|
return _executeDetect2.apply(this, arguments);
|
|
374
386
|
}
|
|
375
387
|
return _executeDetect;
|
|
@@ -427,7 +439,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
427
439
|
}
|
|
428
440
|
}, _callee4, this);
|
|
429
441
|
}));
|
|
430
|
-
function _runAllDetectTask(
|
|
442
|
+
function _runAllDetectTask(_x6) {
|
|
431
443
|
return _runAllDetectTask2.apply(this, arguments);
|
|
432
444
|
}
|
|
433
445
|
return _runAllDetectTask;
|
|
@@ -453,7 +465,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
453
465
|
workers = [];
|
|
454
466
|
currentIndex = 0;
|
|
455
467
|
createPromiseWorker = /*#__PURE__*/function () {
|
|
456
|
-
var
|
|
468
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
457
469
|
var url, result, _t;
|
|
458
470
|
return _regenerator["default"].wrap(function (_context5) {
|
|
459
471
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -465,6 +477,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
465
477
|
url = urlList[currentIndex];
|
|
466
478
|
currentIndex++;
|
|
467
479
|
_context5.prev = 1;
|
|
480
|
+
_this.logger.info('start to detect url: ' + url);
|
|
468
481
|
_context5.next = 2;
|
|
469
482
|
return _this._runOnceDetectTask(url);
|
|
470
483
|
case 2:
|
|
@@ -488,7 +501,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
488
501
|
}, _callee5, null, [[1, 3]]);
|
|
489
502
|
}));
|
|
490
503
|
return function createPromiseWorker() {
|
|
491
|
-
return
|
|
504
|
+
return _ref2.apply(this, arguments);
|
|
492
505
|
};
|
|
493
506
|
}();
|
|
494
507
|
for (i = 0; i < concurrency; i++) {
|
|
@@ -511,7 +524,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
511
524
|
}
|
|
512
525
|
}, _callee6, this);
|
|
513
526
|
}));
|
|
514
|
-
function _runBatchDetectTask(
|
|
527
|
+
function _runBatchDetectTask(_x7, _x8) {
|
|
515
528
|
return _runBatchDetectTask2.apply(this, arguments);
|
|
516
529
|
}
|
|
517
530
|
return _runBatchDetectTask;
|
|
@@ -543,7 +556,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
543
556
|
}
|
|
544
557
|
}, _callee7, this);
|
|
545
558
|
}));
|
|
546
|
-
function _runOnceDetectTask(
|
|
559
|
+
function _runOnceDetectTask(_x9) {
|
|
547
560
|
return _runOnceDetectTask2.apply(this, arguments);
|
|
548
561
|
}
|
|
549
562
|
return _runOnceDetectTask;
|
|
@@ -601,7 +614,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
601
614
|
}
|
|
602
615
|
}, _callee8, null, [[1, 6]]);
|
|
603
616
|
}));
|
|
604
|
-
function _fetchWithTimeoutAndCheck(
|
|
617
|
+
function _fetchWithTimeoutAndCheck(_x0, _x1) {
|
|
605
618
|
return _fetchWithTimeoutAndCheck2.apply(this, arguments);
|
|
606
619
|
}
|
|
607
620
|
return _fetchWithTimeoutAndCheck;
|
|
@@ -665,7 +678,7 @@ var AgoraRteApDetectorImpl = exports.AgoraRteApDetectorImpl = /*#__PURE__*/funct
|
|
|
665
678
|
}]);
|
|
666
679
|
}();
|
|
667
680
|
_AgoraRteApDetectorImpl = AgoraRteApDetectorImpl;
|
|
668
|
-
var _applyDecs$e = _applyDecs(_AgoraRteApDetectorImpl, [[_imports.trace, 2, "isDetectRequired"], [
|
|
681
|
+
var _applyDecs$e = _applyDecs(_AgoraRteApDetectorImpl, [[_imports.trace, 2, "isDetectRequired"], [_restartDecs, 2, "restart"], [_startDecs, 2, "start"], [_executeDetectDecs, 2, "_executeDetect"]], []).e;
|
|
669
682
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 1);
|
|
670
683
|
_initProto = _applyDecs$e2[0];
|
|
671
684
|
_applyDecs$e;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { AgoraRteMediaControl } from '../media';
|
|
2
1
|
import { AgoraRequestScheduler } from '../../imports';
|
|
3
|
-
import { AgoraRteEngineConfig,
|
|
2
|
+
import { AgoraRteEngineConfig, AgoraRteSceneConfig } from '../../type';
|
|
4
3
|
import { AgoraRteMonitor } from '../monitor';
|
|
5
4
|
import { AgoraHttpAuthHeadersProvider } from '../services/type';
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { AgoraRteSceneImpl } from '../scene';
|
|
6
|
+
import { AgoraRteReturnCode } from '../../constant';
|
|
7
|
+
import { AgoraRteEngine, AgoraRteEngineObserver } from './type';
|
|
8
|
+
import { AgoraRteMediaControl } from '../media/type';
|
|
9
|
+
export declare class AgoraRteEngineImpl implements AgoraRteEngine {
|
|
8
10
|
private logger;
|
|
9
11
|
private _observable;
|
|
12
|
+
private _sceneRefs;
|
|
10
13
|
private _rtmClientObserver;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
14
|
+
private _sceneObserver;
|
|
15
|
+
private _mediaControlObserver;
|
|
16
|
+
private _mediaControl;
|
|
17
|
+
private _monitor;
|
|
13
18
|
private _rtcClient?;
|
|
14
19
|
private _rtmClient?;
|
|
15
20
|
private _config;
|
|
@@ -27,13 +32,13 @@ export declare class AgoraRteEngine {
|
|
|
27
32
|
getConfig(): AgoraRteEngineConfig;
|
|
28
33
|
getVersion(): string;
|
|
29
34
|
getDependencyVersions(): Record<string, string>;
|
|
30
|
-
createScene(config: AgoraRteSceneConfig):
|
|
35
|
+
createScene(config: AgoraRteSceneConfig): AgoraRteSceneImpl;
|
|
31
36
|
getMediaControl(): AgoraRteMediaControl;
|
|
32
37
|
getMonitor(): AgoraRteMonitor;
|
|
33
|
-
sendPeerMessage(payload: Record<string, unknown>, cmd: string, guaranteedDelivery: boolean, receiverId: string): Promise<
|
|
34
|
-
setParameters(parameters: Record<string, unknown>):
|
|
35
|
-
renewUserToken(token: string):
|
|
36
|
-
release():
|
|
38
|
+
sendPeerMessage(payload: Record<string, unknown>, cmd: string, guaranteedDelivery: boolean, receiverId: string): Promise<AgoraRteReturnCode>;
|
|
39
|
+
setParameters(parameters: Record<string, unknown>): AgoraRteReturnCode;
|
|
40
|
+
renewUserToken(token: string): Promise<number>;
|
|
41
|
+
release(): AgoraRteReturnCode;
|
|
37
42
|
addObserver(observer: AgoraRteEngineObserver): void;
|
|
38
43
|
removeObserver(observer: AgoraRteEngineObserver): void;
|
|
39
44
|
getHttpAuthHeadersProvider(): AgoraHttpAuthHeadersProvider;
|
|
@@ -46,4 +51,7 @@ export declare class AgoraRteEngine {
|
|
|
46
51
|
private _setRteIpList;
|
|
47
52
|
private _updateApDetector;
|
|
48
53
|
private _createDefaultApDetector;
|
|
54
|
+
private _handleTrackAudioStateUpdated;
|
|
55
|
+
private _handleTrackVideoStateUpdated;
|
|
56
|
+
private _handleCheckMediaSourceState;
|
|
49
57
|
}
|