agora-rte-sdk 3.8.2 → 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 +12 -1
- package/lib-es/core/engine/ap-detector.js +36 -22
- package/lib-es/core/engine/index.js +134 -50
- package/lib-es/core/engine/plugin.js +1 -1
- package/lib-es/core/engine/type.js +1 -0
- package/lib-es/core/media/camera.js +38 -22
- package/lib-es/core/media/effect-enhancer.js +6 -16
- package/lib-es/core/media/index.js +44 -17
- package/lib-es/core/media/loopback.js +18 -12
- package/lib-es/core/media/microphone.js +32 -17
- package/lib-es/core/media/screen.js +46 -17
- package/lib-es/core/media/type.js +5 -1
- package/lib-es/core/processor/message-handler.js +44 -6
- package/lib-es/core/processor/sequence-msg/data.js +27 -4
- package/lib-es/core/processor/struct.js +1 -1
- package/lib-es/core/processor/synchronizer/synchronizer-manager.js +43 -4
- package/lib-es/core/rtc/constant.js +1 -7
- package/lib-es/core/rtc/publish-pool.js +274 -4
- package/lib-es/core/rtc/publisher.js +153 -9
- package/lib-es/core/rtc/subscriber.js +172 -4
- package/lib-es/core/rtc/type.js +9 -25
- 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 +817 -1373
- package/lib-es/core/scene/local-user.js +144 -146
- package/lib-es/core/scene/state-sync.js +19 -42
- package/lib-es/core/scene/stream-player.js +13 -10
- package/lib-es/core/services/api.js +97 -59
- package/lib-es/core/services/auth-headers.js +4 -1
- package/lib-es/core/services/client.js +13 -1
- package/lib-es/core/type.js +1 -0
- package/lib-es/core/utilities/abort-manager.js +146 -0
- package/lib-es/core/utilities/error.js +22 -91
- package/lib-es/core/utilities/join-manager.js +190 -0
- package/lib-es/core/utilities/logger.js +8 -13
- package/lib-es/core/utilities/package-info.js +5 -3
- 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 +9 -5
- package/lib-es/index.js +3 -2
- package/lib-es/plugin/restful-client/index.js +5 -4
- package/lib-es/plugin/rtc/electron/camera-preview-task-manager.js +117 -0
- package/lib-es/plugin/rtc/electron/canvas-helper.js +15 -12
- package/lib-es/plugin/rtc/electron/canvas-tag-pool.js +21 -13
- package/lib-es/plugin/rtc/electron/capture-enhancement.js +46 -30
- package/lib-es/plugin/rtc/electron/channel.js +49 -58
- package/lib-es/plugin/rtc/electron/client.js +107 -72
- package/lib-es/plugin/rtc/electron/constants.js +93 -25
- package/lib-es/plugin/rtc/electron/desc-type.js +1 -1
- package/lib-es/plugin/rtc/electron/downloadALD.js +10 -8
- package/lib-es/plugin/rtc/electron/publish-pool.js +111 -257
- package/lib-es/plugin/rtc/electron/publisher.js +51 -226
- package/lib-es/plugin/rtc/electron/source-manager.js +348 -218
- package/lib-es/plugin/rtc/electron/source-state-control/loopback-state-control.js +2 -18
- package/lib-es/plugin/rtc/electron/source-state-control/{camera-state-control.js → media-state-control.js} +64 -118
- package/lib-es/plugin/rtc/electron/source-state-control/microphone-state-control.js +5 -26
- package/lib-es/plugin/rtc/electron/source-state-control/source-state-control.js +69 -109
- package/lib-es/plugin/rtc/electron/subscriber.js +38 -116
- package/lib-es/plugin/rtc/electron/type.js +7 -1
- package/lib-es/plugin/rtc/electron/utils.js +37 -9
- package/lib-es/plugin/rtc/web/assembler.js +9 -2
- package/lib-es/plugin/rtc/web/audio-player.js +14 -9
- package/lib-es/plugin/rtc/web/canvas-helper.js +3 -1
- package/lib-es/plugin/rtc/web/capture-enhancement.js +14 -20
- package/lib-es/plugin/rtc/web/channel.js +234 -137
- package/lib-es/plugin/rtc/web/client.js +50 -22
- package/lib-es/plugin/rtc/web/convert-type.js +15 -0
- package/lib-es/plugin/rtc/web/device.js +3 -4
- package/lib-es/plugin/rtc/web/effect-enabler.js +3 -3
- package/lib-es/plugin/rtc/web/extension.js +4 -1
- package/lib-es/plugin/rtc/web/publish-pool.js +45 -198
- package/lib-es/plugin/rtc/web/publish.js +71 -27
- package/lib-es/plugin/rtc/web/publisher.js +122 -72
- package/lib-es/plugin/rtc/web/source-manager.js +16 -10
- package/lib-es/plugin/rtc/web/subscribe.js +26 -14
- package/lib-es/plugin/rtc/web/subscriber.js +25 -86
- package/lib-es/plugin/rtc/web/track-control/camera.js +4 -1
- package/lib-es/plugin/rtc/web/track-control/screen.js +4 -1
- package/lib-es/plugin/rtm/channel.js +112 -48
- package/lib-es/plugin/rtm/client.js +116 -57
- package/lib-es/plugin/rtm/utils.js +1 -1
- package/lib-es/plugin/synchronizer-worker/worker.js +71 -7
- package/package.json +4 -4
- 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-es/core/scene/helper.js +0 -72
- package/lib-es/plugin/rtc/electron/source-state-control/screen-state-control.js +0 -206
- package/lib-es/plugin/rtc/electron/source-state-control/window-state-control.js +0 -206
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.relayRtcChannelEvents = void 0;
|
|
8
|
+
var relayRtcChannelEvents = exports.relayRtcChannelEvents = function relayRtcChannelEvents(rtcChannelClient, observable) {
|
|
9
|
+
rtcChannelClient.addObserver({
|
|
10
|
+
onNetworkQualityUpdated: function onNetworkQualityUpdated(streamId, txQuality, rxQuality, channelId) {
|
|
11
|
+
observable.notifyObservers('onNetworkQualityUpdated', channelId, {
|
|
12
|
+
streamId: streamId,
|
|
13
|
+
txQuality: txQuality,
|
|
14
|
+
rxQuality: rxQuality
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
onNetworkStatsUpdated: function onNetworkStatsUpdated(stats, channelId) {
|
|
18
|
+
observable.notifyObservers('onNetworkStatsUpdated', channelId, stats);
|
|
19
|
+
},
|
|
20
|
+
onLocalVideoStatsUpdated: function onLocalVideoStatsUpdated(channelId, streamId, stats) {
|
|
21
|
+
observable.notifyObservers('onLocalVideoStatsUpdated', channelId, streamId, stats);
|
|
22
|
+
},
|
|
23
|
+
onLocalAudioStatsUpdated: function onLocalAudioStatsUpdated(channelId, streamId, stats) {
|
|
24
|
+
observable.notifyObservers('onLocalAudioStatsUpdated', channelId, streamId, stats);
|
|
25
|
+
},
|
|
26
|
+
onRemoteVideoStatsUpdated: function onRemoteVideoStatsUpdated(channelId, streamId, stats) {
|
|
27
|
+
observable.notifyObservers('onRemoteVideoStatsUpdated', channelId, streamId, stats);
|
|
28
|
+
},
|
|
29
|
+
onRemoteAudioStatsUpdated: function onRemoteAudioStatsUpdated(channelId, streamId, stats) {
|
|
30
|
+
observable.notifyObservers('onRemoteAudioStatsUpdated', channelId, streamId, stats);
|
|
31
|
+
},
|
|
32
|
+
onFirstRemoteVideoFrameRendered: function onFirstRemoteVideoFrameRendered(streamId, channelId) {
|
|
33
|
+
observable.notifyObservers('onFirstRemoteVideoFrameRendered', channelId, streamId);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgoraRtcChannelClient } from '../../rtc/channel';
|
|
2
|
+
import { AgoraRteMediaStreamInfo, AgoraRteLocalUser } from '../type';
|
|
3
|
+
/**
|
|
4
|
+
* Handle streams published event - republish audio/video streams through RTC
|
|
5
|
+
* @param streams Array of stream info to be published
|
|
6
|
+
* @param rtcChannelClient RTC channel client for publishing
|
|
7
|
+
* @param localUser Local user for token management
|
|
8
|
+
*/
|
|
9
|
+
export declare function handleStreamsPublished(streams: AgoraRteMediaStreamInfo[], rtcChannelClient: AgoraRtcChannelClient, localUser: AgoraRteLocalUser, screenStreamLabelMap: Map<string, Map<string, string>>): void;
|
|
10
|
+
/**
|
|
11
|
+
* Handle streams unpublished event - stop publishing audio/video streams through RTC
|
|
12
|
+
* @param streams Array of stream info to be unpublished
|
|
13
|
+
* @param rtcChannelClient RTC channel client for unpublishing
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleStreamsUnPublished(streams: AgoraRteMediaStreamInfo[], rtcChannelClient: AgoraRtcChannelClient): void;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.handleStreamsPublished = handleStreamsPublished;
|
|
9
|
+
exports.handleStreamsUnPublished = handleStreamsUnPublished;
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
require("core-js/modules/es.array.for-each.js");
|
|
13
|
+
require("core-js/modules/es.object.to-string.js");
|
|
14
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
15
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
16
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
17
|
+
var _type = require("../type");
|
|
18
|
+
var _logger = require("../../utilities/logger");
|
|
19
|
+
var _type2 = require("../../../type");
|
|
20
|
+
var logger = (0, _logger.createLogger)({
|
|
21
|
+
prefix: 'StreamHandlers'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Handle streams published event - republish audio/video streams through RTC
|
|
26
|
+
* @param streams Array of stream info to be published
|
|
27
|
+
* @param rtcChannelClient RTC channel client for publishing
|
|
28
|
+
* @param localUser Local user for token management
|
|
29
|
+
*/
|
|
30
|
+
function handleStreamsPublished(streams, rtcChannelClient, localUser, screenStreamLabelMap) {
|
|
31
|
+
streams.forEach(/*#__PURE__*/function () {
|
|
32
|
+
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(stream) {
|
|
33
|
+
var streamToken, shouldPublishAudio, shouldPublishVideo, localLabelSourceType, sourceType, observer;
|
|
34
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
35
|
+
while (1) switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
if (stream.connectorType === _type.AgoraRteRoomConnectorType.NONE) {
|
|
38
|
+
streamToken = localUser.getStreamTokenByStreamId(stream.streamId);
|
|
39
|
+
shouldPublishAudio = stream.streamType === _type.AgoraRteMediaStreamType.BOTH || stream.streamType === _type.AgoraRteMediaStreamType.AUDIO;
|
|
40
|
+
shouldPublishVideo = stream.streamType === _type.AgoraRteMediaStreamType.BOTH || stream.streamType === _type.AgoraRteMediaStreamType.VIDEO;
|
|
41
|
+
localLabelSourceType = getLocalStreamSourceTypeFromStreamLabel(stream.streamId, screenStreamLabelMap);
|
|
42
|
+
sourceType = localLabelSourceType !== null && localLabelSourceType !== void 0 ? localLabelSourceType : stream.videoSourceType;
|
|
43
|
+
if (shouldPublishVideo) {
|
|
44
|
+
rtcChannelClient.publisher.publishLocalVideoStream(streamToken, stream.streamId, stream.videoSourceId, sourceType);
|
|
45
|
+
} else {
|
|
46
|
+
rtcChannelClient.publisher.unpublishLocalVideoStream(stream.streamId, sourceType);
|
|
47
|
+
}
|
|
48
|
+
if (shouldPublishAudio) {
|
|
49
|
+
rtcChannelClient.publisher.publishLocalAudioStream(streamToken, stream.streamId, stream.audioSourceId, stream.audioSourceType);
|
|
50
|
+
} else {
|
|
51
|
+
rtcChannelClient.publisher.unpublishLocalAudioStream(stream.streamId, stream.audioSourceType);
|
|
52
|
+
}
|
|
53
|
+
if (!streamToken) {
|
|
54
|
+
observer = {
|
|
55
|
+
onStreamTokenUpdated: function onStreamTokenUpdated(streamId, token) {
|
|
56
|
+
logger.info("republish stream after token updated streamId: ".concat(streamId));
|
|
57
|
+
if (streamId === stream.streamId) {
|
|
58
|
+
if (shouldPublishAudio) {
|
|
59
|
+
rtcChannelClient === null || rtcChannelClient === void 0 || rtcChannelClient.publisher.publishLocalAudioStream(token, stream.streamId, stream.audioSourceId, stream.audioSourceType);
|
|
60
|
+
}
|
|
61
|
+
if (shouldPublishVideo) {
|
|
62
|
+
rtcChannelClient === null || rtcChannelClient === void 0 || rtcChannelClient.publisher.publishLocalVideoStream(token, stream.streamId, stream.videoSourceId, sourceType);
|
|
63
|
+
}
|
|
64
|
+
localUser.removeObserver(observer);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
onStreamTokenRemoved: function onStreamTokenRemoved() {
|
|
68
|
+
localUser.removeObserver(observer);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
localUser.addObserver(observer);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
case 1:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}, _callee);
|
|
79
|
+
}));
|
|
80
|
+
return function (_x) {
|
|
81
|
+
return _ref.apply(this, arguments);
|
|
82
|
+
};
|
|
83
|
+
}());
|
|
84
|
+
}
|
|
85
|
+
var getLocalStreamSourceTypeFromStreamLabel = function getLocalStreamSourceTypeFromStreamLabel(streamId, screenStreamLabelMap) {
|
|
86
|
+
var label = screenStreamLabelMap.get(streamId);
|
|
87
|
+
if ((label === null || label === void 0 ? void 0 : label.get('localSourceType')) === 'screen') {
|
|
88
|
+
return _type2.AgoraRteVideoSourceType.SCREEN;
|
|
89
|
+
}
|
|
90
|
+
if ((label === null || label === void 0 ? void 0 : label.get('localSourceType')) === 'camera') {
|
|
91
|
+
return _type2.AgoraRteVideoSourceType.CAMERA;
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Handle streams unpublished event - stop publishing audio/video streams through RTC
|
|
98
|
+
* @param streams Array of stream info to be unpublished
|
|
99
|
+
* @param rtcChannelClient RTC channel client for unpublishing
|
|
100
|
+
*/
|
|
101
|
+
function handleStreamsUnPublished(streams, rtcChannelClient) {
|
|
102
|
+
streams.forEach(/*#__PURE__*/function () {
|
|
103
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(stream) {
|
|
104
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
105
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
106
|
+
case 0:
|
|
107
|
+
if (stream.connectorType === _type.AgoraRteRoomConnectorType.NONE) {
|
|
108
|
+
rtcChannelClient.publisher.unpublishLocalAudioStream(stream.streamId, stream.audioSourceType);
|
|
109
|
+
rtcChannelClient.publisher.unpublishLocalVideoStream(stream.streamId, stream.videoSourceType);
|
|
110
|
+
}
|
|
111
|
+
case 1:
|
|
112
|
+
case "end":
|
|
113
|
+
return _context2.stop();
|
|
114
|
+
}
|
|
115
|
+
}, _callee2);
|
|
116
|
+
}));
|
|
117
|
+
return function (_x2) {
|
|
118
|
+
return _ref2.apply(this, arguments);
|
|
119
|
+
};
|
|
120
|
+
}());
|
|
121
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgoraRteMediaPublishState } from '../../media/type';
|
|
2
|
+
import { AgoraRteMediaStreamType } from '../type';
|
|
3
|
+
export declare const convertStreamTypeToPublishState: (type: AgoraRteMediaStreamType) => {
|
|
4
|
+
audioState: AgoraRteMediaPublishState;
|
|
5
|
+
videoState: AgoraRteMediaPublishState;
|
|
6
|
+
};
|
|
7
|
+
export declare const convertPublishStateToStreamType: (audioState: AgoraRteMediaPublishState, videoState: AgoraRteMediaPublishState) => AgoraRteMediaStreamType;
|
|
@@ -4,9 +4,9 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _type = require("
|
|
9
|
-
var _type2 = require("
|
|
7
|
+
exports.convertStreamTypeToPublishState = exports.convertPublishStateToStreamType = void 0;
|
|
8
|
+
var _type = require("../../media/type");
|
|
9
|
+
var _type2 = require("../type");
|
|
10
10
|
var convertStreamTypeToPublishState = exports.convertStreamTypeToPublishState = function convertStreamTypeToPublishState(type) {
|
|
11
11
|
switch (type) {
|
|
12
12
|
case _type2.AgoraRteMediaStreamType.NONE:
|
|
@@ -47,33 +47,4 @@ var convertPublishStateToStreamType = exports.convertPublishStateToStreamType =
|
|
|
47
47
|
return _type2.AgoraRteMediaStreamType.VIDEO;
|
|
48
48
|
}
|
|
49
49
|
return _type2.AgoraRteMediaStreamType.NONE;
|
|
50
|
-
};
|
|
51
|
-
var relayRtcChannelEvents = exports.relayRtcChannelEvents = function relayRtcChannelEvents(rtcChannelClient, observable) {
|
|
52
|
-
rtcChannelClient.addObserver({
|
|
53
|
-
onNetworkQualityUpdated: function onNetworkQualityUpdated(streamId, txQuality, rxQuality, channelId) {
|
|
54
|
-
observable.notifyObservers('onNetworkQualityUpdated', channelId, {
|
|
55
|
-
streamId: streamId,
|
|
56
|
-
txQuality: txQuality,
|
|
57
|
-
rxQuality: rxQuality
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
onNetworkStatsUpdated: function onNetworkStatsUpdated(stats, channelId) {
|
|
61
|
-
observable.notifyObservers('onNetworkStatsUpdated', channelId, stats);
|
|
62
|
-
},
|
|
63
|
-
onLocalVideoStatsUpdated: function onLocalVideoStatsUpdated(channelId, streamId, stats) {
|
|
64
|
-
observable.notifyObservers('onLocalVideoStatsUpdated', channelId, streamId, stats);
|
|
65
|
-
},
|
|
66
|
-
onLocalAudioStatsUpdated: function onLocalAudioStatsUpdated(channelId, streamId, stats) {
|
|
67
|
-
observable.notifyObservers('onLocalAudioStatsUpdated', channelId, streamId, stats);
|
|
68
|
-
},
|
|
69
|
-
onRemoteVideoStatsUpdated: function onRemoteVideoStatsUpdated(channelId, streamId, stats) {
|
|
70
|
-
observable.notifyObservers('onRemoteVideoStatsUpdated', channelId, streamId, stats);
|
|
71
|
-
},
|
|
72
|
-
onRemoteAudioStatsUpdated: function onRemoteAudioStatsUpdated(channelId, streamId, stats) {
|
|
73
|
-
observable.notifyObservers('onRemoteAudioStatsUpdated', channelId, streamId, stats);
|
|
74
|
-
},
|
|
75
|
-
onFirstRemoteVideoFrameRendered: function onFirstRemoteVideoFrameRendered(streamId, channelId) {
|
|
76
|
-
observable.notifyObservers('onFirstRemoteVideoFrameRendered', channelId, streamId);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
50
|
};
|
|
@@ -1,232 +1,114 @@
|
|
|
1
|
+
import { AgoraObservable } from '../../imports';
|
|
2
|
+
import { AgoraRteAudioSourceType, AgoraRteMediaSourceState, AgoraRteVideoSourceType } from '../../type';
|
|
1
3
|
import { AgoraRteSyncDataStore } from '../processor/sequence-msg/data';
|
|
2
|
-
import {
|
|
3
|
-
import { AgoraRtcChannelClient } from '../rtc';
|
|
4
|
+
import { AgoraRteLocalUserImpl } from './local-user';
|
|
4
5
|
import { AgoraRteStreamPlayer } from './stream-player';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { AgoraObservable, AgoraRteError } from '../../imports';
|
|
8
|
-
import { AgoraRtcMediaSourceState, AgoraRtcScreenCaptureType, AgoraRtcVideoSourceType } from '../rtc/type';
|
|
9
|
-
export declare class AgoraRteScene {
|
|
6
|
+
import { AgoraRteMediaStreamInfo, AgoraRteScene, AgoraRteSceneInfo, AgoraRteSceneInitOptions, AgoraRteSceneInternalObserver, AgoraRteSceneJoinOptions, AgoraRteSceneJoinSnapshotOptions, AgoraRteUserInfo, AgoraRteUserPageParams, AgoraRteUserPageResponse } from './type';
|
|
7
|
+
export declare class AgoraRteSceneImpl implements AgoraRteScene {
|
|
10
8
|
protected logger: import("agora-foundation/lib/logger/type").Logger;
|
|
11
|
-
protected
|
|
12
|
-
onJoinSceneSuccess(sceneId: string, localUser: AgoraRteLocalUser, streamPlayer: AgoraRteStreamPlayer): void;
|
|
13
|
-
onJoinSceneFailure(sceneId: string, error: AgoraRteError): void;
|
|
14
|
-
onSceneMessageReceived(sceneId: string, message: import("../../type").AgoraRteMessage): void;
|
|
15
|
-
onScenePropertiesUpdated(sceneId: string, event: import("./type").AgoraRteScenePropertiesUpdatedEvent): void;
|
|
16
|
-
onScenePropertiesDeleted(sceneId: string, event: import("./type").AgoraRteScenePropertiesDeletedEvent): void;
|
|
17
|
-
onUserPropertiesUpdated(sceneId: string, event: AgoraRteUserPropertiesUpdatedEvent): void;
|
|
18
|
-
onUserPropertiesDeleted(sceneId: string, event: import("./type").AgoraRteUserPropertiesDeletedEvent): void;
|
|
19
|
-
onRemoteUsersJoined(sceneId: string, events: Array<import("./type").AgoraRteUserJoinedEvent>): void;
|
|
20
|
-
onRemoteUsersLeft(sceneId: string, events: Array<import("./type").AgoraRteUserLeftEvent>): void;
|
|
21
|
-
onUserUpdated(sceneId: string, event: import("./type").AgoraRteUserUpdatedEvent): void;
|
|
22
|
-
onAllUserCountUpdated(sceneId: string, count: number): void;
|
|
23
|
-
onStreamsAdded(sceneId: string, events: Array<import("./type").AgoraRteMediaStreamEvent>): void;
|
|
24
|
-
onStreamsRemoved(sceneId: string, events: Array<import("./type").AgoraRteMediaStreamEvent>): void;
|
|
25
|
-
onStreamsUpdated(sceneId: string, events: Array<import("./type").AgoraRteMediaStreamEvent>): void;
|
|
26
|
-
onLocalVideoStatsUpdated: (sceneId: string, streamId: string, stats: import("./type").AgoraRteLocalVideoStats) => void;
|
|
27
|
-
onLocalAudioStatsUpdated: (sceneId: string, streamId: string, stats: import("./type").AgoraRteLocalAudioStats) => void;
|
|
28
|
-
onRemoteVideoStatsUpdated: (sceneId: string, streamId: string, stats: import("./type").AgoraRteRemoteVideoStats) => void;
|
|
29
|
-
onRemoteAudioStatsUpdated: (sceneId: string, streamId: string, stats: import("./type").AgoraRteRemoteAudioStats) => void;
|
|
30
|
-
onNetworkQualityUpdated: (sceneId: string, event: import("./type").AgoraRteNetworkQualityEvent) => void;
|
|
31
|
-
onNetworkStatsUpdated: (sceneId: string, networkStats: import("../rtc/type").AgoraRtcNetworkStats) => void;
|
|
32
|
-
onFirstRemoteVideoFrameRendered(sceneId: string, streamId: string): void;
|
|
33
|
-
onStreamMessageReceived: (sceneId: string, data: import("./type").AgoraRteStreamMessage) => void;
|
|
34
|
-
}>>;
|
|
9
|
+
protected observable: AgoraObservable<AgoraRteSceneInternalObserver>;
|
|
35
10
|
private _sceneId;
|
|
11
|
+
private _localUserId;
|
|
12
|
+
private _screenStreamLabelMap;
|
|
36
13
|
private _sceneInfo?;
|
|
37
14
|
private _localUser?;
|
|
38
|
-
private
|
|
15
|
+
private _streamPlayer?;
|
|
16
|
+
private _userToken?;
|
|
39
17
|
private _apiService;
|
|
40
18
|
private _rtmClient;
|
|
41
|
-
private _rtmChannelClient?;
|
|
42
19
|
private _rtcClient;
|
|
43
20
|
private _apDetector;
|
|
44
|
-
private
|
|
21
|
+
private _rtmChannelClient?;
|
|
22
|
+
private _rtcChannelClient?;
|
|
45
23
|
private _stateSynchronizer?;
|
|
46
24
|
private _messageSynchronizer?;
|
|
47
|
-
private
|
|
48
|
-
private _screenStreamLabelMap;
|
|
49
|
-
private _streamPlayer?;
|
|
25
|
+
private _rtcChannelConnectionState;
|
|
50
26
|
private _timestampGap;
|
|
51
27
|
private _totalUserCount;
|
|
52
|
-
private
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
private _localMicrophoneStateMap;
|
|
57
|
-
private _localScreenCaptureStateMap;
|
|
58
|
-
private _localLoopbackStateMap;
|
|
59
|
-
private _deviceStateSyncTimer?;
|
|
60
|
-
private _deviceSyncMutex;
|
|
61
|
-
private _connectionState;
|
|
28
|
+
private _cleanupPromise;
|
|
29
|
+
private _initialApiService;
|
|
30
|
+
private _joinManager;
|
|
31
|
+
private _abortManager;
|
|
62
32
|
private _rtmObserver;
|
|
63
|
-
private
|
|
64
|
-
private
|
|
65
|
-
get apiService(): AgoraRteServiceApi;
|
|
66
|
-
get dataStore(): AgoraRteSyncDataStore;
|
|
33
|
+
private _messageHandlerObservers;
|
|
34
|
+
private _rtcChannelObserver;
|
|
67
35
|
get sceneId(): string;
|
|
68
|
-
get
|
|
69
|
-
get
|
|
70
|
-
/**
|
|
71
|
-
* The local user of scene, you can use local user to publish stream,set scene properties, set user properties, etc.
|
|
72
|
-
*/
|
|
73
|
-
get localUser(): AgoraRteLocalUser;
|
|
74
|
-
get localStreams(): import("../processor/struct").AgoraRteMediaStream[];
|
|
75
|
-
/**
|
|
76
|
-
* The stream player of scene, you can use stream player to subscribe stream, render remote stream, etc.
|
|
77
|
-
*/
|
|
36
|
+
get localUser(): AgoraRteLocalUserImpl;
|
|
37
|
+
get dataStore(): AgoraRteSyncDataStore;
|
|
78
38
|
get streamPlayer(): AgoraRteStreamPlayer;
|
|
79
39
|
constructor(sceneId: string, options: AgoraRteSceneInitOptions);
|
|
80
|
-
join(options:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
leave(): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* Get scene info
|
|
89
|
-
* @returns {AgoraRteSceneInfo} scene info
|
|
90
|
-
*/
|
|
91
|
-
getSceneInfo(): AgoraRteSceneInfo | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Get local user info
|
|
94
|
-
* You can use local user to publish stream, subscribe stream, set user properties, etc.
|
|
95
|
-
* @returns {AgoraRteUserInfo} local user info
|
|
96
|
-
*/
|
|
97
|
-
getLocalUser(): AgoraRteLocalUser;
|
|
98
|
-
/**
|
|
99
|
-
* Get all users in scene
|
|
100
|
-
* @returns {Record<string, AgoraRteUserInfo>} all users in scene
|
|
101
|
-
*/
|
|
40
|
+
join(options: AgoraRteSceneJoinOptions): Promise<number>;
|
|
41
|
+
joinWithSnapshot(options: AgoraRteSceneJoinSnapshotOptions): Promise<number>;
|
|
42
|
+
leave(): void;
|
|
43
|
+
getSceneInfo(): AgoraRteSceneInfo;
|
|
44
|
+
getLocalUser(): AgoraRteLocalUserImpl;
|
|
102
45
|
getUsers(): {
|
|
103
46
|
[key: string]: AgoraRteUserInfo;
|
|
104
47
|
};
|
|
105
|
-
/**
|
|
106
|
-
* Get all users in scene, return as list
|
|
107
|
-
* @returns {AgoraRteUserInfo[]} all users in scene
|
|
108
|
-
*/
|
|
109
48
|
getUserList(): AgoraRteUserInfo[];
|
|
110
|
-
|
|
111
|
-
* Get user by user id
|
|
112
|
-
* @param {string} userId - The user id.
|
|
113
|
-
* @returns {AgoraRteUserInfo | undefined} user info
|
|
114
|
-
*/
|
|
115
|
-
getUser(userId?: string): AgoraRteUserInfo | undefined;
|
|
116
|
-
/**
|
|
117
|
-
* Get total user count in scene, including user not in stage
|
|
118
|
-
* @returns {number} total user count
|
|
119
|
-
*/
|
|
49
|
+
getUser(userId: string): AgoraRteUserInfo | undefined;
|
|
120
50
|
getUserCount(): number;
|
|
121
|
-
/**
|
|
122
|
-
* Get user list in scene by page
|
|
123
|
-
*
|
|
124
|
-
*/
|
|
125
51
|
fetchUserList(params: AgoraRteUserPageParams): Promise<AgoraRteUserPageResponse>;
|
|
126
52
|
addLocalStreamLabels(streamId: string, labels: Map<string, any>): void;
|
|
127
53
|
removeLocalStreamLabel(streamId: string): void;
|
|
128
|
-
getLocalStreamSourceTypeFromStreamLabel(streamId: string): AgoraRtcVideoSourceType.CAMERA | AgoraRtcVideoSourceType.SCREEN | undefined;
|
|
129
54
|
/**
|
|
130
55
|
* Get all streams in scene, return as object
|
|
131
56
|
* @returns {Record<string, AgoraRteMediaStreamInfo[]>} all streams in scene
|
|
132
57
|
*/
|
|
133
58
|
getStreams(): Record<string, AgoraRteMediaStreamInfo[]>;
|
|
134
|
-
/**
|
|
135
|
-
* Get all streams in scene, return as list
|
|
136
|
-
* @returns {AgoraRteMediaStreamInfo[]} all streams in scene
|
|
137
|
-
*/
|
|
138
59
|
getStreamList(): AgoraRteMediaStreamInfo[];
|
|
139
|
-
/**
|
|
140
|
-
* Get stream by user id
|
|
141
|
-
* @param {string} userId - The user id.
|
|
142
|
-
* @returns {AgoraRteMediaStreamInfo[]} stream array
|
|
143
|
-
*/
|
|
144
60
|
getStreamsByUserId(userId: string): AgoraRteMediaStreamInfo[];
|
|
145
|
-
/**
|
|
146
|
-
* Get stream by stream id
|
|
147
|
-
* @param {string} streamId - The stream id.
|
|
148
|
-
* @returns {AgoraRteMediaStreamInfo | undefined} stream info
|
|
149
|
-
*/
|
|
150
61
|
getStreamByStreamId(streamId: string): AgoraRteMediaStreamInfo | undefined;
|
|
151
|
-
/**
|
|
152
|
-
* Get Scene Properties
|
|
153
|
-
* @returns {Record<string, unknown>} scene properties
|
|
154
|
-
*/
|
|
155
62
|
getSceneProperties(): Record<string, unknown>;
|
|
156
|
-
|
|
157
|
-
* Get Scene Properties by key path
|
|
158
|
-
* @param {string} keyPath - The key path.
|
|
159
|
-
* @returns {unknown} scene properties
|
|
160
|
-
*/
|
|
161
|
-
getScenePropertiesByKeyPath(keyPath: string): unknown;
|
|
162
|
-
/**
|
|
163
|
-
* Get User Properties
|
|
164
|
-
* @returns {Record<string, unknown>} user properties
|
|
165
|
-
*/
|
|
63
|
+
getScenePropertiesByKeyPath<T = unknown>(keyPath: string): T;
|
|
166
64
|
getUserProperties(): Record<string, unknown>;
|
|
167
|
-
/**
|
|
168
|
-
* Get User Properties by user id
|
|
169
|
-
* @param {string} userId - The user id.
|
|
170
|
-
* @returns {Record<string, unknown>} user properties
|
|
171
|
-
*/
|
|
172
65
|
getUserPropertiesByUserId(userId: string): Record<string, unknown> | undefined;
|
|
173
|
-
|
|
174
|
-
* Get User Properties by key path
|
|
175
|
-
* @param {string} keyPath - The key path.
|
|
176
|
-
* @param {string} userId - The user id.
|
|
177
|
-
* @returns {unknown} user properties
|
|
178
|
-
*/
|
|
179
|
-
getUserPropertiesByKeyPath<T = unknown>(keyPath: string, userId: string): unknown;
|
|
180
|
-
/**
|
|
181
|
-
* Get Call Id of rtc channel client
|
|
182
|
-
* @returns {string} rtc call id
|
|
183
|
-
*/
|
|
184
|
-
getCallId(): void;
|
|
185
|
-
/**
|
|
186
|
-
* Get session id of rtm client
|
|
187
|
-
* @returns {string} rtm session id
|
|
188
|
-
*/
|
|
66
|
+
getUserPropertiesByKeyPath<T = unknown>(keyPath: string, userId: string): T;
|
|
189
67
|
getSessionId(): string;
|
|
190
|
-
/**
|
|
191
|
-
* Get timestamp from apaas server
|
|
192
|
-
* @returns
|
|
193
|
-
*/
|
|
194
68
|
getSyncTimestamp(): number;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
* remove rte scene observer
|
|
202
|
-
* @param {AgoraRteSceneObserver} observer
|
|
203
|
-
*/
|
|
204
|
-
removeObserver(observer: AgoraRteSceneObserver): void;
|
|
205
|
-
onCameraVideoStateUpdated: (deviceId: string, state: AgoraRtcMediaSourceState) => void;
|
|
206
|
-
onMicrophoneAudioStateUpdated: (deviceId: string, state: AgoraRtcMediaSourceState, error?: Error | undefined) => void;
|
|
207
|
-
onScreenCaptureVideoStateUpdated: (deviceId: string, type: AgoraRtcScreenCaptureType, state: AgoraRtcMediaSourceState) => void;
|
|
208
|
-
onLoopbackAudioStateUpdated: (deviceId: string, state: AgoraRtcMediaSourceState) => void;
|
|
209
|
-
private _joinRTMChannel;
|
|
69
|
+
addObserver(observer: AgoraRteSceneInternalObserver): void;
|
|
70
|
+
removeObserver(observer: AgoraRteSceneInternalObserver): void;
|
|
71
|
+
onTrackVideoStateUpdated(sourceId: string, sourceType: AgoraRteVideoSourceType, state: AgoraRteMediaSourceState): void;
|
|
72
|
+
onTrackAudioStateUpdated(sourceId: string, sourceType: AgoraRteAudioSourceType, state: AgoraRteMediaSourceState): void;
|
|
73
|
+
private _performJoin;
|
|
74
|
+
private _getEntryRoomData;
|
|
210
75
|
private _entryRoom;
|
|
211
|
-
private
|
|
212
|
-
private _handleConnectionStateUpdated;
|
|
76
|
+
private _handleRtcConnectionStateUpdated;
|
|
213
77
|
private _leaveRTCChannel;
|
|
214
78
|
private _leaveRTMChannel;
|
|
215
|
-
private
|
|
216
|
-
private
|
|
217
|
-
private
|
|
218
|
-
private
|
|
219
|
-
private
|
|
220
|
-
private
|
|
221
|
-
private
|
|
222
|
-
private
|
|
223
|
-
private
|
|
224
|
-
private
|
|
225
|
-
private
|
|
226
|
-
private
|
|
79
|
+
private _handleOnSnapshotUpdated;
|
|
80
|
+
private _handleOnUserCountUpdated;
|
|
81
|
+
private _handleOnRemoteUsersAdded;
|
|
82
|
+
private _handleOnLocalUserAdded;
|
|
83
|
+
private _handleOnUserUpdated;
|
|
84
|
+
private _handleOnUserSubscribe;
|
|
85
|
+
private _handleOnUserUnsubscribe;
|
|
86
|
+
private _handleOnRemoteUsersRemoved;
|
|
87
|
+
private _handleOnLocalUserRemoved;
|
|
88
|
+
private _handleOnRoomPropertyUpdated;
|
|
89
|
+
private _handleOnRoomPropertyDeleted;
|
|
90
|
+
private _handleOnUserPropertyUpdated;
|
|
91
|
+
private _handleOnUserPropertyDeleted;
|
|
92
|
+
private _handleOnUserPropertyListUpdated;
|
|
93
|
+
private _handleOnLocalStreamAdded;
|
|
94
|
+
private _handleOnLocalStreamUpdated;
|
|
95
|
+
private _handleOnLocalStreamRemoved;
|
|
96
|
+
private _handleOnRemoteStreamAdded;
|
|
97
|
+
private _handleOnRemoteStreamUpdated;
|
|
98
|
+
private _handleOnRemoteStreamRemoved;
|
|
99
|
+
private _handleOnTimeStampGapUpdate;
|
|
100
|
+
private _handleOnCustomChannelMessageRecieved;
|
|
101
|
+
private _handleOnJoinSuccess;
|
|
102
|
+
private _handleOnJoinFailure;
|
|
227
103
|
private _cleanup;
|
|
228
|
-
private
|
|
229
|
-
private _startApDetect;
|
|
230
|
-
private _restartApDetect;
|
|
104
|
+
private _beginCleanup;
|
|
231
105
|
private _handleOnRtmConnectionStateUpdated;
|
|
106
|
+
private _checkIfLocalUserIsKickedOut;
|
|
107
|
+
private _setOnlineState;
|
|
108
|
+
private _checkMediaSourceState;
|
|
109
|
+
private _checkLocalStreamBind;
|
|
110
|
+
private _unbindLocalStream;
|
|
111
|
+
private _asyncStep1EntryRoom;
|
|
112
|
+
private _asyncStep2JoinChannels;
|
|
113
|
+
private _step3InitializeComponents;
|
|
232
114
|
}
|