@100mslive/react-native-hms 1.7.0 → 1.7.2
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/README.md +30 -39
- package/android/.gradle/6.7.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.7.1/gc.properties +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +16 -9
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +103 -104
- package/android/gradlew.bat +3 -18
- package/android/local.properties +0 -7
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +37 -9
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +2 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +7 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +39 -10
- package/ios/HMSDecoder.swift +9 -10
- package/ios/HMSHelper.swift +6 -2
- package/ios/HMSManager.m +4 -0
- package/ios/HMSManager.swift +8 -0
- package/ios/HMSRNSDK.swift +54 -24
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +3 -5
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +42 -40
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +10 -0
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -0
- package/lib/commonjs/classes/HMSHelper.js +1 -1
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +4 -4
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSManagerModule.js +18 -0
- package/lib/commonjs/classes/HMSManagerModule.js.map +1 -0
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventEmitter.js +6 -6
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +13 -0
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/commonjs/classes/HMSPeer.js +2 -15
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +3 -5
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +5 -5
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +10 -5
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +165 -170
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +9 -10
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +1 -1
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +77 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/commonjs/index.js +25 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +1 -4
- package/lib/module/classes/HMSCameraControl.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +40 -39
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSEventEmitter.js +3 -0
- package/lib/module/classes/HMSEventEmitter.js.map +1 -0
- package/lib/module/classes/HMSHelper.js +1 -1
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +2 -2
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +2 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +4 -4
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSManagerModule.js +11 -0
- package/lib/module/classes/HMSManagerModule.js.map +1 -0
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSNativeEventEmitter.js +6 -6
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSNativeEventListener.js +5 -0
- package/lib/module/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/module/classes/HMSPeer.js +2 -15
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeersCache.js +1 -4
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +5 -5
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +8 -4
- package/lib/module/classes/HMSRoomCache.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +113 -118
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +5 -7
- package/lib/module/classes/HMSSessionStore.js.map +1 -1
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HmsView.js +1 -1
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/module/hooks/useHMSPeerUpdates.js +67 -0
- package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/module/index.js +6 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -0
- package/lib/typescript/classes/HMSEventEmitter.d.ts +2 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSLocalPeer.d.ts +4 -2
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSManagerModule.d.ts +3 -0
- package/lib/typescript/classes/HMSMessage.d.ts +2 -3
- package/lib/typescript/classes/HMSNativeEventListener.d.ts +4 -0
- package/lib/typescript/classes/HMSPeer.d.ts +2 -3
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRemotePeer.d.ts +4 -2
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRoom.d.ts +1 -1
- package/lib/typescript/classes/HMSSDK.d.ts +8 -7
- package/lib/typescript/classes/HMSTrack.d.ts +3 -2
- package/lib/typescript/classes/HMSVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HmsView.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +1 -1
- package/lib/typescript/hooks/useHMSPeerUpdates.d.ts +7 -0
- package/lib/typescript/index.d.ts +2 -1
- package/package.json +2 -2
- package/sdk-versions.json +2 -2
- package/src/classes/HMSAudioTrack.ts +2 -1
- package/src/classes/HMSBrowserRecordingState.ts +3 -0
- package/src/classes/HMSCameraControl.ts +1 -2
- package/src/classes/HMSEncoder.ts +7 -5
- package/src/classes/HMSEventEmitter.ts +3 -0
- package/src/classes/HMSLocalAudioTrack.ts +2 -1
- package/src/classes/HMSLocalPeer.ts +4 -2
- package/src/classes/HMSLocalVideoTrack.ts +2 -1
- package/src/classes/HMSManagerModule.ts +18 -0
- package/src/classes/HMSMessage.ts +2 -3
- package/src/classes/HMSNativeEventEmitter.ts +2 -1
- package/src/classes/HMSNativeEventListener.ts +8 -0
- package/src/classes/HMSPeer.ts +3 -26
- package/src/classes/HMSPeersCache.ts +2 -3
- package/src/classes/HMSRemoteAudioTrack.ts +2 -1
- package/src/classes/HMSRemotePeer.ts +4 -2
- package/src/classes/HMSRemoteVideoTrack.ts +2 -1
- package/src/classes/HMSRoom.ts +1 -1
- package/src/classes/HMSRoomCache.ts +11 -3
- package/src/classes/HMSSDK.tsx +47 -52
- package/src/classes/HMSSessionStore.ts +6 -8
- package/src/classes/HMSTrack.ts +3 -2
- package/src/classes/HMSVideoTrack.ts +2 -1
- package/src/classes/HmsView.tsx +4 -2
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +36 -10
- package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +2 -3
- package/src/components/HMSHLSPlayer/hooks.ts +3 -2
- package/src/hooks/useHMSPeerUpdates.ts +85 -0
- package/src/index.ts +6 -1
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/commonjs/classes/HMSMessageType.js +0 -13
- package/lib/commonjs/classes/HMSMessageType.js.map +0 -1
- package/lib/module/classes/HMSMessageType.js +0 -6
- package/lib/module/classes/HMSMessageType.js.map +0 -1
- package/lib/typescript/classes/HMSMessageType.d.ts +0 -4
- package/src/classes/HMSMessageType.ts +0 -4
|
@@ -12,9 +12,9 @@ var _HMSLogger = require("./HMSLogger");
|
|
|
12
12
|
var _HMSTrackType = require("./HMSTrackType");
|
|
13
13
|
var _HMSUpdateListenerActions = require("./HMSUpdateListenerActions");
|
|
14
14
|
var _HmsView = require("./HmsView");
|
|
15
|
-
var
|
|
15
|
+
var _HMSManagerModule = _interopRequireDefault(require("./HMSManagerModule"));
|
|
16
16
|
var _HMSPIPListenerActions = require("./HMSPIPListenerActions");
|
|
17
|
-
var
|
|
17
|
+
var _HMSNativeEventListener = _interopRequireDefault(require("./HMSNativeEventListener"));
|
|
18
18
|
var _HMSPeersCache = require("./HMSPeersCache");
|
|
19
19
|
var _HMSRoomCache = require("./HMSRoomCache");
|
|
20
20
|
var _HMSPeerUpdate = require("./HMSPeerUpdate");
|
|
@@ -25,14 +25,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
25
25
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
26
|
// TODO: Rename to HMSPIPConfig & to be moved to a separate file
|
|
27
27
|
|
|
28
|
-
const {
|
|
29
|
-
/**
|
|
30
|
-
* @ignore
|
|
31
|
-
*/
|
|
32
|
-
HMSManager
|
|
33
|
-
} = _reactNative.NativeModules;
|
|
34
28
|
const ReactNativeVersion = require('react-native/Libraries/Core/ReactNativeVersion');
|
|
35
|
-
const HmsEventEmitter = new _HMSNativeEventEmitter.HMSNativeEventEmitter(HMSManager);
|
|
36
29
|
let HmsSdk;
|
|
37
30
|
class HMSSDK {
|
|
38
31
|
constructor(id) {
|
|
@@ -68,13 +61,13 @@ class HMSSDK {
|
|
|
68
61
|
* @memberof HMSSDK
|
|
69
62
|
*/
|
|
70
63
|
_defineProperty(this, "destroy", async () => {
|
|
71
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
64
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function destroy', {
|
|
72
65
|
id: this.id
|
|
73
66
|
});
|
|
74
67
|
(0, _HMSPeersCache.clearHmsPeersCache)();
|
|
75
68
|
(0, _HMSRoomCache.clearHmsRoomCache)();
|
|
76
69
|
this.removeAllListeners();
|
|
77
|
-
return await
|
|
70
|
+
return await _HMSManagerModule.default.destroy({
|
|
78
71
|
id: this.id
|
|
79
72
|
});
|
|
80
73
|
});
|
|
@@ -86,13 +79,13 @@ class HMSSDK {
|
|
|
86
79
|
* @memberof HMSSDK
|
|
87
80
|
*/
|
|
88
81
|
_defineProperty(this, "getAuthTokenByRoomCode", async (roomCode, userId, endpoint) => {
|
|
89
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
82
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getAuthTokenByRoomCode', {
|
|
90
83
|
id: this.id,
|
|
91
84
|
roomCode,
|
|
92
85
|
userId,
|
|
93
86
|
endpoint
|
|
94
87
|
});
|
|
95
|
-
return
|
|
88
|
+
return _HMSManagerModule.default.getAuthTokenByRoomCode({
|
|
96
89
|
id: this.id,
|
|
97
90
|
roomCode,
|
|
98
91
|
userId,
|
|
@@ -109,14 +102,14 @@ class HMSSDK {
|
|
|
109
102
|
* @memberof HMSSDK
|
|
110
103
|
*/
|
|
111
104
|
_defineProperty(this, "join", async config => {
|
|
112
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
105
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function join', {
|
|
113
106
|
config,
|
|
114
107
|
id: this.id
|
|
115
108
|
});
|
|
116
109
|
this.addAppStateListener();
|
|
117
110
|
(0, _HMSPeersCache.setHmsPeersCache)(new _HMSPeersCache.HMSPeersCache(this.id));
|
|
118
111
|
(0, _HMSRoomCache.setHmsRoomCache)(new _HMSRoomCache.HMSRoomCache(this.id));
|
|
119
|
-
await
|
|
112
|
+
await _HMSManagerModule.default.join({
|
|
120
113
|
...config,
|
|
121
114
|
id: this.id
|
|
122
115
|
});
|
|
@@ -131,11 +124,11 @@ class HMSSDK {
|
|
|
131
124
|
* @memberof HMSSDK
|
|
132
125
|
*/
|
|
133
126
|
_defineProperty(this, "preview", config => {
|
|
134
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
127
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function preview', {
|
|
135
128
|
config,
|
|
136
129
|
id: this.id
|
|
137
130
|
});
|
|
138
|
-
|
|
131
|
+
_HMSManagerModule.default.preview({
|
|
139
132
|
...config,
|
|
140
133
|
id: this.id
|
|
141
134
|
});
|
|
@@ -152,12 +145,12 @@ class HMSSDK {
|
|
|
152
145
|
* @memberof HMSSDK
|
|
153
146
|
*/
|
|
154
147
|
_defineProperty(this, "previewForRole", async role => {
|
|
155
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
148
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function previewForRole', {
|
|
156
149
|
role,
|
|
157
150
|
id: this.id
|
|
158
151
|
});
|
|
159
152
|
if (_reactNative.Platform.OS === 'ios') {
|
|
160
|
-
return await
|
|
153
|
+
return await _HMSManagerModule.default.previewForRole({
|
|
161
154
|
role: role === null || role === void 0 ? void 0 : role.name,
|
|
162
155
|
id: this.id
|
|
163
156
|
});
|
|
@@ -201,7 +194,7 @@ class HMSSDK {
|
|
|
201
194
|
_defineProperty(this, "roomLeaveCleanup", () => {
|
|
202
195
|
var _this$appStateSubscri;
|
|
203
196
|
this.muteStatus = undefined;
|
|
204
|
-
this === null || this === void 0
|
|
197
|
+
this === null || this === void 0 || (_this$appStateSubscri = this.appStateSubscription) === null || _this$appStateSubscri === void 0 || _this$appStateSubscri.remove();
|
|
205
198
|
(0, _HMSPeersCache.clearHmsPeersCache)();
|
|
206
199
|
(0, _HMSRoomCache.clearHmsRoomCache)();
|
|
207
200
|
_HMSEncoder.HMSEncoder.clearData(); // Clearing cached data in encoder
|
|
@@ -214,13 +207,13 @@ class HMSSDK {
|
|
|
214
207
|
* @memberof HMSSDK
|
|
215
208
|
*/
|
|
216
209
|
_defineProperty(this, "leave", async () => {
|
|
217
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
210
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function leave', {
|
|
218
211
|
id: this.id
|
|
219
212
|
});
|
|
220
213
|
const data = {
|
|
221
214
|
id: this.id
|
|
222
215
|
};
|
|
223
|
-
const op = await
|
|
216
|
+
const op = await _HMSManagerModule.default.leave(data);
|
|
224
217
|
this.roomLeaveCleanup();
|
|
225
218
|
return op;
|
|
226
219
|
});
|
|
@@ -229,17 +222,18 @@ class HMSSDK {
|
|
|
229
222
|
*
|
|
230
223
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
|
|
231
224
|
*
|
|
232
|
-
* @param {message: string} and @param {type: string}
|
|
233
225
|
* @memberof HMSSDK
|
|
226
|
+
* @param message the message that is to be sent
|
|
227
|
+
* @param type the default type is set to CHAT. You can pass a custom type here for sending events like Emoji Reactions, Notifications, etc
|
|
234
228
|
*/
|
|
235
229
|
_defineProperty(this, "sendBroadcastMessage", async function (message) {
|
|
236
|
-
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
237
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
230
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'chat';
|
|
231
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function sendBroadcastMessage', {
|
|
238
232
|
message,
|
|
239
233
|
type: type || null,
|
|
240
234
|
id: _this.id
|
|
241
235
|
});
|
|
242
|
-
const data = await
|
|
236
|
+
const data = await _HMSManagerModule.default.sendBroadcastMessage({
|
|
243
237
|
message,
|
|
244
238
|
type: type || null,
|
|
245
239
|
id: _this.id
|
|
@@ -255,14 +249,14 @@ class HMSSDK {
|
|
|
255
249
|
* @memberof HMSSDK
|
|
256
250
|
*/
|
|
257
251
|
_defineProperty(this, "sendGroupMessage", async function (message, roles) {
|
|
258
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
259
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
252
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'chat';
|
|
253
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function sendGroupMessage', {
|
|
260
254
|
message,
|
|
261
255
|
roles,
|
|
262
256
|
id: _this.id,
|
|
263
257
|
type: type || null
|
|
264
258
|
});
|
|
265
|
-
const data = await
|
|
259
|
+
const data = await _HMSManagerModule.default.sendGroupMessage({
|
|
266
260
|
message,
|
|
267
261
|
roles: _HMSHelper.HMSHelper.getRoleNames(roles),
|
|
268
262
|
id: _this.id,
|
|
@@ -279,14 +273,14 @@ class HMSSDK {
|
|
|
279
273
|
* @memberof HMSSDK
|
|
280
274
|
*/
|
|
281
275
|
_defineProperty(this, "sendDirectMessage", async function (message, peer) {
|
|
282
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
283
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
276
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'chat';
|
|
277
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function sendDirectMessage', {
|
|
284
278
|
message,
|
|
285
279
|
peerId: peer.peerID,
|
|
286
280
|
id: _this.id,
|
|
287
281
|
type: type || null
|
|
288
282
|
});
|
|
289
|
-
const data = await
|
|
283
|
+
const data = await _HMSManagerModule.default.sendDirectMessage({
|
|
290
284
|
message,
|
|
291
285
|
peerId: peer.peerID,
|
|
292
286
|
id: _this.id,
|
|
@@ -307,11 +301,11 @@ class HMSSDK {
|
|
|
307
301
|
* @memberof HMSSDK
|
|
308
302
|
*/
|
|
309
303
|
_defineProperty(this, "changeMetadata", async metadata => {
|
|
310
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
304
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeMetadata', {
|
|
311
305
|
metadata,
|
|
312
306
|
id: this.id
|
|
313
307
|
});
|
|
314
|
-
return await
|
|
308
|
+
return await _HMSManagerModule.default.changeMetadata({
|
|
315
309
|
metadata,
|
|
316
310
|
id: this.id
|
|
317
311
|
});
|
|
@@ -326,11 +320,11 @@ class HMSSDK {
|
|
|
326
320
|
* @memberof HMSSDK
|
|
327
321
|
*/
|
|
328
322
|
_defineProperty(this, "startRTMPOrRecording", async data => {
|
|
329
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
323
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function startRTMPOrRecording', {
|
|
330
324
|
...data,
|
|
331
325
|
id: this.id
|
|
332
326
|
});
|
|
333
|
-
const op = await
|
|
327
|
+
const op = await _HMSManagerModule.default.startRTMPOrRecording({
|
|
334
328
|
...data,
|
|
335
329
|
id: this.id
|
|
336
330
|
});
|
|
@@ -345,8 +339,8 @@ class HMSSDK {
|
|
|
345
339
|
* @memberof HMSSDK
|
|
346
340
|
*/
|
|
347
341
|
_defineProperty(this, "stopRtmpAndRecording", async () => {
|
|
348
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
349
|
-
const op = await
|
|
342
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function stopRtmpAndRecording', {});
|
|
343
|
+
const op = await _HMSManagerModule.default.stopRtmpAndRecording({
|
|
350
344
|
id: this.id
|
|
351
345
|
});
|
|
352
346
|
return op;
|
|
@@ -361,11 +355,11 @@ class HMSSDK {
|
|
|
361
355
|
* @memberof HMSSDK
|
|
362
356
|
*/
|
|
363
357
|
_defineProperty(this, "startHLSStreaming", async data => {
|
|
364
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
358
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function startHLSStreaming', {
|
|
365
359
|
...data,
|
|
366
360
|
id: this.id
|
|
367
361
|
});
|
|
368
|
-
return await
|
|
362
|
+
return await _HMSManagerModule.default.startHLSStreaming({
|
|
369
363
|
...data,
|
|
370
364
|
id: this.id
|
|
371
365
|
});
|
|
@@ -379,8 +373,8 @@ class HMSSDK {
|
|
|
379
373
|
* @memberof HMSSDK
|
|
380
374
|
*/
|
|
381
375
|
_defineProperty(this, "stopHLSStreaming", async () => {
|
|
382
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
383
|
-
return await
|
|
376
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function stopHLSStreaming', {});
|
|
377
|
+
return await _HMSManagerModule.default.stopHLSStreaming({
|
|
384
378
|
id: this.id
|
|
385
379
|
});
|
|
386
380
|
});
|
|
@@ -408,8 +402,8 @@ class HMSSDK {
|
|
|
408
402
|
force: force,
|
|
409
403
|
id: _this.id
|
|
410
404
|
};
|
|
411
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
412
|
-
return await
|
|
405
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeRole', data);
|
|
406
|
+
return await _HMSManagerModule.default.changeRole(data);
|
|
413
407
|
});
|
|
414
408
|
/**
|
|
415
409
|
* - This function can be used in a situation when we want to change role hence manipulate their
|
|
@@ -433,8 +427,8 @@ class HMSSDK {
|
|
|
433
427
|
force: force,
|
|
434
428
|
id: _this.id
|
|
435
429
|
};
|
|
436
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
437
|
-
return
|
|
430
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeRoleOfPeer', data);
|
|
431
|
+
return _HMSManagerModule.default.changeRoleOfPeer(data);
|
|
438
432
|
});
|
|
439
433
|
/**
|
|
440
434
|
* - This function can be used in a situation when we want to change role of multiple peers by specifying their roles.
|
|
@@ -455,8 +449,8 @@ class HMSSDK {
|
|
|
455
449
|
toRole: toRole.name,
|
|
456
450
|
id: this.id
|
|
457
451
|
};
|
|
458
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
459
|
-
return
|
|
452
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeRoleOfPeersWithRoles', data);
|
|
453
|
+
return _HMSManagerModule.default.changeRoleOfPeersWithRoles(data);
|
|
460
454
|
});
|
|
461
455
|
/**
|
|
462
456
|
* - This function can be used to manipulate mute status of any track.
|
|
@@ -468,7 +462,7 @@ class HMSSDK {
|
|
|
468
462
|
* @memberof HMSSDK
|
|
469
463
|
*/
|
|
470
464
|
_defineProperty(this, "changeTrackState", async (track, mute) => {
|
|
471
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
465
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeTrackState', {
|
|
472
466
|
track,
|
|
473
467
|
mute,
|
|
474
468
|
id: this.id
|
|
@@ -478,7 +472,7 @@ class HMSSDK {
|
|
|
478
472
|
mute,
|
|
479
473
|
id: this.id
|
|
480
474
|
};
|
|
481
|
-
return await
|
|
475
|
+
return await _HMSManagerModule.default.changeTrackState(data);
|
|
482
476
|
});
|
|
483
477
|
/**
|
|
484
478
|
* - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
|
|
@@ -493,7 +487,7 @@ class HMSSDK {
|
|
|
493
487
|
if (roles) {
|
|
494
488
|
roleNames = _HMSHelper.HMSHelper.getRoleNames(roles);
|
|
495
489
|
}
|
|
496
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
490
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeTrackStateRoles', {
|
|
497
491
|
source,
|
|
498
492
|
mute,
|
|
499
493
|
type,
|
|
@@ -507,7 +501,7 @@ class HMSSDK {
|
|
|
507
501
|
roles: roleNames,
|
|
508
502
|
id: this.id
|
|
509
503
|
};
|
|
510
|
-
return await
|
|
504
|
+
return await _HMSManagerModule.default.changeTrackStateForRoles(data);
|
|
511
505
|
});
|
|
512
506
|
/**
|
|
513
507
|
* - removePeer can forcefully disconnect a Peer from the room.
|
|
@@ -518,7 +512,7 @@ class HMSSDK {
|
|
|
518
512
|
* @memberof HMSSDK
|
|
519
513
|
*/
|
|
520
514
|
_defineProperty(this, "removePeer", async (peer, reason) => {
|
|
521
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
515
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function removePeer', {
|
|
522
516
|
peerId: peer.peerID,
|
|
523
517
|
reason,
|
|
524
518
|
id: this.id
|
|
@@ -528,7 +522,7 @@ class HMSSDK {
|
|
|
528
522
|
reason,
|
|
529
523
|
id: this.id
|
|
530
524
|
};
|
|
531
|
-
return await
|
|
525
|
+
return await _HMSManagerModule.default.removePeer(data);
|
|
532
526
|
});
|
|
533
527
|
/**
|
|
534
528
|
* - endRoom can be used in a situation where we want to disconnect all the peers from current room
|
|
@@ -541,7 +535,7 @@ class HMSSDK {
|
|
|
541
535
|
*/
|
|
542
536
|
_defineProperty(this, "endRoom", async function (reason) {
|
|
543
537
|
let lock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
544
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
538
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function endRoom', {
|
|
545
539
|
lock,
|
|
546
540
|
reason,
|
|
547
541
|
id: _this.id
|
|
@@ -551,7 +545,7 @@ class HMSSDK {
|
|
|
551
545
|
reason,
|
|
552
546
|
id: _this.id
|
|
553
547
|
};
|
|
554
|
-
return await
|
|
548
|
+
return await _HMSManagerModule.default.endRoom(data);
|
|
555
549
|
});
|
|
556
550
|
/**
|
|
557
551
|
* - This function can be used to change name of localPeer.
|
|
@@ -561,7 +555,7 @@ class HMSSDK {
|
|
|
561
555
|
* @memberof HMSSDK
|
|
562
556
|
*/
|
|
563
557
|
_defineProperty(this, "changeName", async name => {
|
|
564
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
558
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeName', {
|
|
565
559
|
name,
|
|
566
560
|
id: this.id
|
|
567
561
|
});
|
|
@@ -569,7 +563,7 @@ class HMSSDK {
|
|
|
569
563
|
name,
|
|
570
564
|
id: this.id
|
|
571
565
|
};
|
|
572
|
-
return await
|
|
566
|
+
return await _HMSManagerModule.default.changeName(data);
|
|
573
567
|
});
|
|
574
568
|
/**
|
|
575
569
|
* - Calling this function will accept the most recent roleChange request made by anyone in the room
|
|
@@ -579,10 +573,10 @@ class HMSSDK {
|
|
|
579
573
|
* @memberof HMSSDK
|
|
580
574
|
*/
|
|
581
575
|
_defineProperty(this, "acceptRoleChange", async () => {
|
|
582
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
576
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function acceptRoleChange', {
|
|
583
577
|
id: this.id
|
|
584
578
|
});
|
|
585
|
-
return await
|
|
579
|
+
return await _HMSManagerModule.default.acceptRoleChange({
|
|
586
580
|
id: this.id
|
|
587
581
|
});
|
|
588
582
|
});
|
|
@@ -595,12 +589,12 @@ class HMSSDK {
|
|
|
595
589
|
* @memberof HMSSDK
|
|
596
590
|
*/
|
|
597
591
|
_defineProperty(this, "setPlaybackForAllAudio", mute => {
|
|
598
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
592
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setPlaybackForAllAudio', {
|
|
599
593
|
mute,
|
|
600
594
|
id: this.id
|
|
601
595
|
});
|
|
602
596
|
this.muteStatus = mute;
|
|
603
|
-
|
|
597
|
+
_HMSManagerModule.default.setPlaybackForAllAudio({
|
|
604
598
|
mute,
|
|
605
599
|
id: this.id
|
|
606
600
|
});
|
|
@@ -611,10 +605,10 @@ class HMSSDK {
|
|
|
611
605
|
* @memberof HMSSDK
|
|
612
606
|
*/
|
|
613
607
|
_defineProperty(this, "remoteMuteAllAudio", async () => {
|
|
614
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
608
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function remoteMuteAllAudio', {
|
|
615
609
|
id: this.id
|
|
616
610
|
});
|
|
617
|
-
return await
|
|
611
|
+
return await _HMSManagerModule.default.remoteMuteAllAudio({
|
|
618
612
|
id: this.id
|
|
619
613
|
});
|
|
620
614
|
});
|
|
@@ -629,13 +623,13 @@ class HMSSDK {
|
|
|
629
623
|
*/
|
|
630
624
|
_defineProperty(this, "getRoom", async () => {
|
|
631
625
|
var _getHmsRoomCache;
|
|
632
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
626
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getRoom', {
|
|
633
627
|
id: this.id
|
|
634
628
|
});
|
|
635
|
-
const hmsRoom = await
|
|
629
|
+
const hmsRoom = await _HMSManagerModule.default.getRoom({
|
|
636
630
|
id: this.id
|
|
637
631
|
});
|
|
638
|
-
(_getHmsRoomCache = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache === void 0
|
|
632
|
+
(_getHmsRoomCache = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache === void 0 || _getHmsRoomCache.updateRoomCache(hmsRoom);
|
|
639
633
|
const encodedHmsRoom = _HMSEncoder.HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
|
|
640
634
|
return encodedHmsRoom;
|
|
641
635
|
});
|
|
@@ -647,10 +641,10 @@ class HMSSDK {
|
|
|
647
641
|
* @return Promise<HMSLocalPeer>
|
|
648
642
|
*/
|
|
649
643
|
_defineProperty(this, "getLocalPeer", async () => {
|
|
650
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
644
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getLocalPeer', {
|
|
651
645
|
id: this.id
|
|
652
646
|
});
|
|
653
|
-
const localPeer = await
|
|
647
|
+
const localPeer = await _HMSManagerModule.default.getLocalPeer({
|
|
654
648
|
id: this.id
|
|
655
649
|
});
|
|
656
650
|
const encodedLocalPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(localPeer, this.id);
|
|
@@ -664,10 +658,10 @@ class HMSSDK {
|
|
|
664
658
|
* @return Promise<HMSRemotePeer[]>
|
|
665
659
|
*/
|
|
666
660
|
_defineProperty(this, "getRemotePeers", async () => {
|
|
667
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
661
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getRemotePeers', {
|
|
668
662
|
id: this.id
|
|
669
663
|
});
|
|
670
|
-
const remotePeers = await
|
|
664
|
+
const remotePeers = await _HMSManagerModule.default.getRemotePeers({
|
|
671
665
|
id: this.id
|
|
672
666
|
});
|
|
673
667
|
const encodedRemotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(remotePeers, this.id);
|
|
@@ -681,10 +675,10 @@ class HMSSDK {
|
|
|
681
675
|
* @return Promise<HMSRole[]>
|
|
682
676
|
*/
|
|
683
677
|
_defineProperty(this, "getRoles", async () => {
|
|
684
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
678
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getRoles', {
|
|
685
679
|
id: this.id
|
|
686
680
|
});
|
|
687
|
-
const roles = await
|
|
681
|
+
const roles = await _HMSManagerModule.default.getRoles({
|
|
688
682
|
id: this.id
|
|
689
683
|
});
|
|
690
684
|
const encodedRoles = _HMSEncoder.HMSEncoder.encodeHmsRoles(roles);
|
|
@@ -698,22 +692,22 @@ class HMSSDK {
|
|
|
698
692
|
* @memberof HMSSDK
|
|
699
693
|
*/
|
|
700
694
|
_defineProperty(this, "setVolume", (track, volume) => {
|
|
701
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
695
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setVolume', {
|
|
702
696
|
track,
|
|
703
697
|
volume,
|
|
704
698
|
id: this.id
|
|
705
699
|
});
|
|
706
|
-
|
|
700
|
+
_HMSManagerModule.default.setVolume({
|
|
707
701
|
id: this.id,
|
|
708
702
|
trackId: track.trackId,
|
|
709
703
|
volume
|
|
710
704
|
});
|
|
711
705
|
});
|
|
712
706
|
_defineProperty(this, "resetVolume", () => {
|
|
713
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
707
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function resetVolume', {
|
|
714
708
|
id: this.id
|
|
715
709
|
});
|
|
716
|
-
if (_reactNative.Platform.OS === 'android')
|
|
710
|
+
if (_reactNative.Platform.OS === 'android') _HMSManagerModule.default.resetVolume({
|
|
717
711
|
id: this.id
|
|
718
712
|
});
|
|
719
713
|
});
|
|
@@ -725,7 +719,7 @@ class HMSSDK {
|
|
|
725
719
|
* @memberof HMSSDK
|
|
726
720
|
*/
|
|
727
721
|
_defineProperty(this, "addAppStateListener", () => {
|
|
728
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
722
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function addAppStateListener', {
|
|
729
723
|
id: this.id
|
|
730
724
|
});
|
|
731
725
|
this.appStateSubscription = _reactNative.AppState.addEventListener('change', nextAppState => {
|
|
@@ -742,10 +736,10 @@ class HMSSDK {
|
|
|
742
736
|
* @memberof HMSSDK
|
|
743
737
|
*/
|
|
744
738
|
_defineProperty(this, "startScreenshare", async () => {
|
|
745
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
739
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function startScreenshare', {
|
|
746
740
|
id: this.id
|
|
747
741
|
});
|
|
748
|
-
return await
|
|
742
|
+
return await _HMSManagerModule.default.startScreenshare({
|
|
749
743
|
id: this.id
|
|
750
744
|
});
|
|
751
745
|
});
|
|
@@ -757,10 +751,10 @@ class HMSSDK {
|
|
|
757
751
|
* @memberof HMSSDK
|
|
758
752
|
*/
|
|
759
753
|
_defineProperty(this, "isScreenShared", async () => {
|
|
760
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
754
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function isScreenShared', {
|
|
761
755
|
id: this.id
|
|
762
756
|
});
|
|
763
|
-
return await
|
|
757
|
+
return await _HMSManagerModule.default.isScreenShared({
|
|
764
758
|
id: this.id
|
|
765
759
|
});
|
|
766
760
|
});
|
|
@@ -772,26 +766,26 @@ class HMSSDK {
|
|
|
772
766
|
* @memberof HMSSDK
|
|
773
767
|
*/
|
|
774
768
|
_defineProperty(this, "stopScreenshare", async () => {
|
|
775
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
769
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function stopScreenshare', {
|
|
776
770
|
id: this.id
|
|
777
771
|
});
|
|
778
|
-
return await
|
|
772
|
+
return await _HMSManagerModule.default.stopScreenshare({
|
|
779
773
|
id: this.id
|
|
780
774
|
});
|
|
781
775
|
});
|
|
782
776
|
_defineProperty(this, "enableNetworkQualityUpdates", () => {
|
|
783
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
777
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function enableNetworkQualityUpdates', {
|
|
784
778
|
id: this.id
|
|
785
779
|
});
|
|
786
|
-
|
|
780
|
+
_HMSManagerModule.default.enableNetworkQualityUpdates({
|
|
787
781
|
id: this.id
|
|
788
782
|
});
|
|
789
783
|
});
|
|
790
784
|
_defineProperty(this, "disableNetworkQualityUpdates", () => {
|
|
791
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
785
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function disableNetworkQualityUpdates', {
|
|
792
786
|
id: this.id
|
|
793
787
|
});
|
|
794
|
-
|
|
788
|
+
_HMSManagerModule.default.disableNetworkQualityUpdates({
|
|
795
789
|
id: this.id
|
|
796
790
|
});
|
|
797
791
|
});
|
|
@@ -804,12 +798,12 @@ class HMSSDK {
|
|
|
804
798
|
* @memberof HMSSDK
|
|
805
799
|
*/
|
|
806
800
|
_defineProperty(this, "startAudioshare", async audioMixingMode => {
|
|
807
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
801
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function startAudioshare', {
|
|
808
802
|
id: this.id,
|
|
809
803
|
audioMixingMode
|
|
810
804
|
});
|
|
811
805
|
if (_reactNative.Platform.OS === 'android') {
|
|
812
|
-
return await
|
|
806
|
+
return await _HMSManagerModule.default.startAudioshare({
|
|
813
807
|
id: this.id,
|
|
814
808
|
audioMixingMode
|
|
815
809
|
});
|
|
@@ -826,11 +820,11 @@ class HMSSDK {
|
|
|
826
820
|
* @memberof HMSSDK
|
|
827
821
|
*/
|
|
828
822
|
_defineProperty(this, "isAudioShared", async () => {
|
|
829
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
823
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function isAudioShared', {
|
|
830
824
|
id: this.id
|
|
831
825
|
});
|
|
832
826
|
if (_reactNative.Platform.OS === 'android') {
|
|
833
|
-
return await
|
|
827
|
+
return await _HMSManagerModule.default.isAudioShared({
|
|
834
828
|
id: this.id
|
|
835
829
|
});
|
|
836
830
|
} else {
|
|
@@ -846,11 +840,11 @@ class HMSSDK {
|
|
|
846
840
|
* @memberof HMSSDK
|
|
847
841
|
*/
|
|
848
842
|
_defineProperty(this, "stopAudioshare", async () => {
|
|
849
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
843
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function stopAudioshare', {
|
|
850
844
|
id: this.id
|
|
851
845
|
});
|
|
852
846
|
if (_reactNative.Platform.OS === 'android') {
|
|
853
|
-
return await
|
|
847
|
+
return await _HMSManagerModule.default.stopAudioshare({
|
|
854
848
|
id: this.id
|
|
855
849
|
});
|
|
856
850
|
} else {
|
|
@@ -865,11 +859,11 @@ class HMSSDK {
|
|
|
865
859
|
* @return HMSAudioMixingMode
|
|
866
860
|
*/
|
|
867
861
|
_defineProperty(this, "getAudioMixingMode", async () => {
|
|
868
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
862
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getAudioMixingMode', {
|
|
869
863
|
id: this.id
|
|
870
864
|
});
|
|
871
865
|
if (_reactNative.Platform.OS === 'android') {
|
|
872
|
-
return await
|
|
866
|
+
return await _HMSManagerModule.default.getAudioMixingMode({
|
|
873
867
|
id: this.id
|
|
874
868
|
});
|
|
875
869
|
} else {
|
|
@@ -886,12 +880,12 @@ class HMSSDK {
|
|
|
886
880
|
* @memberof HMSSDK
|
|
887
881
|
*/
|
|
888
882
|
_defineProperty(this, "setAudioMixingMode", async audioMixingMode => {
|
|
889
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
883
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setAudioMixingMode', {
|
|
890
884
|
id: this.id,
|
|
891
885
|
audioMixingMode
|
|
892
886
|
});
|
|
893
887
|
if (_reactNative.Platform.OS === 'android') {
|
|
894
|
-
return await
|
|
888
|
+
return await _HMSManagerModule.default.setAudioMixingMode({
|
|
895
889
|
id: this.id,
|
|
896
890
|
audioMixingMode
|
|
897
891
|
});
|
|
@@ -910,11 +904,11 @@ class HMSSDK {
|
|
|
910
904
|
* @return HMSAudioDevice[]
|
|
911
905
|
*/
|
|
912
906
|
_defineProperty(this, "getAudioDevicesList", async () => {
|
|
913
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
907
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getAudioDevicesList', {
|
|
914
908
|
id: this.id
|
|
915
909
|
});
|
|
916
910
|
if (_reactNative.Platform.OS === 'android') {
|
|
917
|
-
return await
|
|
911
|
+
return await _HMSManagerModule.default.getAudioDevicesList({
|
|
918
912
|
id: this.id
|
|
919
913
|
});
|
|
920
914
|
} else {
|
|
@@ -932,11 +926,11 @@ class HMSSDK {
|
|
|
932
926
|
* @return HMSAudioDevice
|
|
933
927
|
*/
|
|
934
928
|
_defineProperty(this, "getAudioOutputRouteType", async () => {
|
|
935
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
929
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getAudioOutputRouteType', {
|
|
936
930
|
id: this.id
|
|
937
931
|
});
|
|
938
932
|
if (_reactNative.Platform.OS === 'android') {
|
|
939
|
-
return await
|
|
933
|
+
return await _HMSManagerModule.default.getAudioOutputRouteType({
|
|
940
934
|
id: this.id
|
|
941
935
|
});
|
|
942
936
|
} else {
|
|
@@ -950,16 +944,16 @@ class HMSSDK {
|
|
|
950
944
|
*
|
|
951
945
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
|
|
952
946
|
*
|
|
953
|
-
* @param {HMSAudioDevice}
|
|
954
947
|
* @memberof HMSSDK
|
|
948
|
+
* @param audioDevice
|
|
955
949
|
*/
|
|
956
950
|
_defineProperty(this, "switchAudioOutput", audioDevice => {
|
|
957
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
951
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function switchAudioOutput', {
|
|
958
952
|
id: this.id,
|
|
959
953
|
audioDevice
|
|
960
954
|
});
|
|
961
955
|
if (_reactNative.Platform.OS === 'android') {
|
|
962
|
-
return
|
|
956
|
+
return _HMSManagerModule.default.switchAudioOutput({
|
|
963
957
|
id: this.id,
|
|
964
958
|
audioDevice
|
|
965
959
|
});
|
|
@@ -969,13 +963,13 @@ class HMSSDK {
|
|
|
969
963
|
}
|
|
970
964
|
});
|
|
971
965
|
_defineProperty(this, "switchAudioOutputUsingIOSUI", () => {
|
|
972
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
966
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function switchAudioOutputUsingIOSUI', {
|
|
973
967
|
id: this.id
|
|
974
968
|
});
|
|
975
969
|
if (_reactNative.Platform.OS !== 'ios') {
|
|
976
970
|
throw new Error('#Function `switchAudioOutputUsingIOSUI` is only available on iOS, use `switchAudioOutput` method instead!');
|
|
977
971
|
}
|
|
978
|
-
return
|
|
972
|
+
return _HMSManagerModule.default.switchAudioOutputUsingIOSUI({
|
|
979
973
|
id: this.id
|
|
980
974
|
});
|
|
981
975
|
});
|
|
@@ -988,12 +982,12 @@ class HMSSDK {
|
|
|
988
982
|
* @memberof HMSSDK
|
|
989
983
|
*/
|
|
990
984
|
_defineProperty(this, "setAudioMode", audioMode => {
|
|
991
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
985
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setAudioMode', {
|
|
992
986
|
id: this.id,
|
|
993
987
|
audioMode
|
|
994
988
|
});
|
|
995
989
|
if (_reactNative.Platform.OS === 'android') {
|
|
996
|
-
return
|
|
990
|
+
return _HMSManagerModule.default.setAudioMode({
|
|
997
991
|
id: this.id,
|
|
998
992
|
audioMode
|
|
999
993
|
});
|
|
@@ -1011,12 +1005,12 @@ class HMSSDK {
|
|
|
1011
1005
|
* @memberof HMSSDK
|
|
1012
1006
|
*/
|
|
1013
1007
|
_defineProperty(this, "setAudioDeviceChangeListener", callback => {
|
|
1014
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1008
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setAudioDeviceChangeListener', {
|
|
1015
1009
|
id: this.id
|
|
1016
1010
|
});
|
|
1017
1011
|
if (_reactNative.Platform.OS === 'android') {
|
|
1018
1012
|
this.addEventListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, callback);
|
|
1019
|
-
return
|
|
1013
|
+
return _HMSManagerModule.default.setAudioDeviceChangeListener({
|
|
1020
1014
|
id: this.id
|
|
1021
1015
|
});
|
|
1022
1016
|
} else {
|
|
@@ -1025,29 +1019,29 @@ class HMSSDK {
|
|
|
1025
1019
|
}
|
|
1026
1020
|
});
|
|
1027
1021
|
_defineProperty(this, "getRemoteVideoTrackFromTrackId", async trackId => {
|
|
1028
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1022
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getRemoteVideoTrackFromTrackId', {
|
|
1029
1023
|
id: this.id,
|
|
1030
1024
|
trackId
|
|
1031
1025
|
});
|
|
1032
|
-
const remoteVideoTrackData = await
|
|
1026
|
+
const remoteVideoTrackData = await _HMSManagerModule.default.getRemoteVideoTrackFromTrackId({
|
|
1033
1027
|
id: this.id,
|
|
1034
1028
|
trackId
|
|
1035
1029
|
});
|
|
1036
1030
|
return _HMSEncoder.HMSEncoder.encodeHmsRemoteVideoTrack(remoteVideoTrackData, this.id);
|
|
1037
1031
|
});
|
|
1038
1032
|
_defineProperty(this, "getRemoteAudioTrackFromTrackId", async trackId => {
|
|
1039
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1033
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getRemoteAudioTrackFromTrackId', {
|
|
1040
1034
|
id: this.id,
|
|
1041
1035
|
trackId
|
|
1042
1036
|
});
|
|
1043
|
-
const remoteAudioTrackData = await
|
|
1037
|
+
const remoteAudioTrackData = await _HMSManagerModule.default.getRemoteAudioTrackFromTrackId({
|
|
1044
1038
|
id: this.id,
|
|
1045
1039
|
trackId
|
|
1046
1040
|
});
|
|
1047
1041
|
return _HMSEncoder.HMSEncoder.encodeHmsRemoteAudioTrack(remoteAudioTrackData, this.id);
|
|
1048
1042
|
});
|
|
1049
1043
|
_defineProperty(this, "getPeerFromPeerId", peerId => {
|
|
1050
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1044
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getPeerFromPeerId', {
|
|
1051
1045
|
id: this.id,
|
|
1052
1046
|
peerId
|
|
1053
1047
|
});
|
|
@@ -1072,7 +1066,7 @@ class HMSSDK {
|
|
|
1072
1066
|
* @memberof HMSSDK
|
|
1073
1067
|
*/
|
|
1074
1068
|
_defineProperty(this, "addEventListener", (action, callback) => {
|
|
1075
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1069
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function addEventListener', {
|
|
1076
1070
|
action,
|
|
1077
1071
|
id: this.id
|
|
1078
1072
|
});
|
|
@@ -1082,7 +1076,7 @@ class HMSSDK {
|
|
|
1082
1076
|
// Checking if we already have ON_PREVIEW subscription
|
|
1083
1077
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW]) {
|
|
1084
1078
|
// Adding ON_PREVIEW native listener
|
|
1085
|
-
const previewSubscription =
|
|
1079
|
+
const previewSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
1086
1080
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW] = previewSubscription;
|
|
1087
1081
|
}
|
|
1088
1082
|
// Adding App Delegate listener
|
|
@@ -1094,7 +1088,7 @@ class HMSSDK {
|
|
|
1094
1088
|
// Checking if we already have ON_JOIN subscription
|
|
1095
1089
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN]) {
|
|
1096
1090
|
// Adding ON_JOIN native listener
|
|
1097
|
-
const joinSubscription =
|
|
1091
|
+
const joinSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN, this.onJoinListener);
|
|
1098
1092
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN] = joinSubscription;
|
|
1099
1093
|
}
|
|
1100
1094
|
// Adding App Delegate listener
|
|
@@ -1106,7 +1100,7 @@ class HMSSDK {
|
|
|
1106
1100
|
// Checking if we already have ON_ROOM_UPDATE subscription
|
|
1107
1101
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE]) {
|
|
1108
1102
|
// Adding ON_ROOM_UPDATE native listener
|
|
1109
|
-
const roomSubscription =
|
|
1103
|
+
const roomSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE, this.onRoomListener);
|
|
1110
1104
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE] = roomSubscription;
|
|
1111
1105
|
}
|
|
1112
1106
|
// Adding App Delegate listener
|
|
@@ -1118,7 +1112,7 @@ class HMSSDK {
|
|
|
1118
1112
|
// Checking if we already have ON_PEER_UPDATE subscription
|
|
1119
1113
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE]) {
|
|
1120
1114
|
// Adding ON_PEER_UPDATE native listener
|
|
1121
|
-
const peerSubscription =
|
|
1115
|
+
const peerSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE, this.onPeerListener);
|
|
1122
1116
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE] = peerSubscription;
|
|
1123
1117
|
}
|
|
1124
1118
|
// Adding App Delegate listener
|
|
@@ -1130,7 +1124,7 @@ class HMSSDK {
|
|
|
1130
1124
|
// Checking if we already have ON_TRACK_UPDATE subscription
|
|
1131
1125
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE]) {
|
|
1132
1126
|
// Adding ON_TRACK_UPDATE native listener
|
|
1133
|
-
const trackSubscription =
|
|
1127
|
+
const trackSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE, this.onTrackListener);
|
|
1134
1128
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE] = trackSubscription;
|
|
1135
1129
|
}
|
|
1136
1130
|
// Adding App Delegate listener
|
|
@@ -1142,7 +1136,7 @@ class HMSSDK {
|
|
|
1142
1136
|
// Checking if we already have ON_ERROR subscription
|
|
1143
1137
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR]) {
|
|
1144
1138
|
// Adding ON_ERROR native listener
|
|
1145
|
-
const errorSubscription =
|
|
1139
|
+
const errorSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR, this.onErrorListener);
|
|
1146
1140
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR] = errorSubscription;
|
|
1147
1141
|
}
|
|
1148
1142
|
// Adding App Delegate listener
|
|
@@ -1154,7 +1148,7 @@ class HMSSDK {
|
|
|
1154
1148
|
// Checking if we already have ON_MESSAGE subscription
|
|
1155
1149
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE]) {
|
|
1156
1150
|
// Adding ON_MESSAGE native listener
|
|
1157
|
-
const messageSubscription =
|
|
1151
|
+
const messageSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE, this.onMessageListener);
|
|
1158
1152
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE] = messageSubscription;
|
|
1159
1153
|
}
|
|
1160
1154
|
// Adding App Delegate listener
|
|
@@ -1166,7 +1160,7 @@ class HMSSDK {
|
|
|
1166
1160
|
// Checking if we already have ON_SPEAKER subscription
|
|
1167
1161
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER]) {
|
|
1168
1162
|
// Adding ON_SPEAKER native listener
|
|
1169
|
-
const speakerSubscription =
|
|
1163
|
+
const speakerSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER, this.onSpeakerListener);
|
|
1170
1164
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER] = speakerSubscription;
|
|
1171
1165
|
}
|
|
1172
1166
|
// Adding App Delegate listener
|
|
@@ -1178,7 +1172,7 @@ class HMSSDK {
|
|
|
1178
1172
|
// Checking if we already have RECONNECTING subscription
|
|
1179
1173
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING]) {
|
|
1180
1174
|
// Adding RECONNECTING native listener
|
|
1181
|
-
const reconnectingSubscription =
|
|
1175
|
+
const reconnectingSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING, this.reconnectingListener);
|
|
1182
1176
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING] = reconnectingSubscription;
|
|
1183
1177
|
}
|
|
1184
1178
|
// Adding App Delegate listener
|
|
@@ -1190,7 +1184,7 @@ class HMSSDK {
|
|
|
1190
1184
|
// Checking if we already have RECONNECTED subscription
|
|
1191
1185
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED]) {
|
|
1192
1186
|
// Adding RECONNECTED native listener
|
|
1193
|
-
const reconnectedSubscription =
|
|
1187
|
+
const reconnectedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED, this.reconnectedListener);
|
|
1194
1188
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED] = reconnectedSubscription;
|
|
1195
1189
|
}
|
|
1196
1190
|
// Adding App Delegate listener
|
|
@@ -1202,7 +1196,7 @@ class HMSSDK {
|
|
|
1202
1196
|
// Checking if we already have ON_ROLE_CHANGE_REQUEST subscription
|
|
1203
1197
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST]) {
|
|
1204
1198
|
// Adding ON_ROLE_CHANGE_REQUEST native listener
|
|
1205
|
-
const roleChangeReqSubscription =
|
|
1199
|
+
const roleChangeReqSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST, this.onRoleChangeRequestListener);
|
|
1206
1200
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST] = roleChangeReqSubscription;
|
|
1207
1201
|
}
|
|
1208
1202
|
// Adding App Delegate listener
|
|
@@ -1214,7 +1208,7 @@ class HMSSDK {
|
|
|
1214
1208
|
// Checking if we already have ON_CHANGE_TRACK_STATE_REQUEST subscription
|
|
1215
1209
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST]) {
|
|
1216
1210
|
// Adding ON_CHANGE_TRACK_STATE_REQUEST native listener
|
|
1217
|
-
const changeTrackReqSubscription =
|
|
1211
|
+
const changeTrackReqSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST, this.onChangeTrackStateRequestListener);
|
|
1218
1212
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST] = changeTrackReqSubscription;
|
|
1219
1213
|
}
|
|
1220
1214
|
// Adding App Delegate listener
|
|
@@ -1226,7 +1220,7 @@ class HMSSDK {
|
|
|
1226
1220
|
// Checking if we already have ON_REMOVED_FROM_ROOM subscription
|
|
1227
1221
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM]) {
|
|
1228
1222
|
// Adding ON_REMOVED_FROM_ROOM native listener
|
|
1229
|
-
const removedFromRoomSubscription =
|
|
1223
|
+
const removedFromRoomSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM, this.onRemovedFromRoomListener);
|
|
1230
1224
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM] = removedFromRoomSubscription;
|
|
1231
1225
|
}
|
|
1232
1226
|
// Adding App Delegate listener
|
|
@@ -1238,7 +1232,7 @@ class HMSSDK {
|
|
|
1238
1232
|
// Checking if we already have ON_RTC_STATS subscription
|
|
1239
1233
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS]) {
|
|
1240
1234
|
// Adding ON_RTC_STATS native listener
|
|
1241
|
-
const rtcStatsSubscription =
|
|
1235
|
+
const rtcStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS, this.RTCStatsListener);
|
|
1242
1236
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS] = rtcStatsSubscription;
|
|
1243
1237
|
}
|
|
1244
1238
|
// Adding App Delegate listener
|
|
@@ -1250,7 +1244,7 @@ class HMSSDK {
|
|
|
1250
1244
|
// Checking if we already have ON_LOCAL_AUDIO_STATS subscription
|
|
1251
1245
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS]) {
|
|
1252
1246
|
// Adding ON_LOCAL_AUDIO_STATS native listener
|
|
1253
|
-
const lclAudioStatsSubscription =
|
|
1247
|
+
const lclAudioStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS, this.onLocalAudioStatsListener);
|
|
1254
1248
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS] = lclAudioStatsSubscription;
|
|
1255
1249
|
}
|
|
1256
1250
|
// Adding App Delegate listener
|
|
@@ -1262,7 +1256,7 @@ class HMSSDK {
|
|
|
1262
1256
|
// Checking if we already have ON_LOCAL_VIDEO_STATS subscription
|
|
1263
1257
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS]) {
|
|
1264
1258
|
// Adding ON_LOCAL_VIDEO_STATS native listener
|
|
1265
|
-
const lclVideoStatsSubscription =
|
|
1259
|
+
const lclVideoStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS, this.onLocalVideoStatsListener);
|
|
1266
1260
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS] = lclVideoStatsSubscription;
|
|
1267
1261
|
}
|
|
1268
1262
|
// Adding App Delegate listener
|
|
@@ -1274,7 +1268,7 @@ class HMSSDK {
|
|
|
1274
1268
|
// Checking if we already have ON_REMOTE_AUDIO_STATS subscription
|
|
1275
1269
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS]) {
|
|
1276
1270
|
// Adding ON_REMOTE_AUDIO_STATS native listener
|
|
1277
|
-
const rmAudioStatsSubscription =
|
|
1271
|
+
const rmAudioStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS, this.onRemoteAudioStatsListener);
|
|
1278
1272
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS] = rmAudioStatsSubscription;
|
|
1279
1273
|
}
|
|
1280
1274
|
// Adding App Delegate listener
|
|
@@ -1286,7 +1280,7 @@ class HMSSDK {
|
|
|
1286
1280
|
// Checking if we already have ON_REMOTE_VIDEO_STATS subscription
|
|
1287
1281
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS]) {
|
|
1288
1282
|
// Adding ON_REMOTE_VIDEO_STATS native listener
|
|
1289
|
-
const rmVideoStatsSubscription =
|
|
1283
|
+
const rmVideoStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS, this.onRemoteVideoStatsListener);
|
|
1290
1284
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS] = rmVideoStatsSubscription;
|
|
1291
1285
|
}
|
|
1292
1286
|
// Adding App Delegate listener
|
|
@@ -1298,7 +1292,7 @@ class HMSSDK {
|
|
|
1298
1292
|
// Checking if we already have ON_AUDIO_DEVICE_CHANGED subscription
|
|
1299
1293
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED]) {
|
|
1300
1294
|
// Adding ON_AUDIO_DEVICE_CHANGED native listener
|
|
1301
|
-
const audDeviceChgSubscription =
|
|
1295
|
+
const audDeviceChgSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, this.onAudioDeviceChangedListener);
|
|
1302
1296
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED] = audDeviceChgSubscription;
|
|
1303
1297
|
}
|
|
1304
1298
|
// Adding App Delegate listener
|
|
@@ -1310,7 +1304,7 @@ class HMSSDK {
|
|
|
1310
1304
|
// Checking if we already have ON_SESSION_STORE_AVAILABLE subscription
|
|
1311
1305
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE]) {
|
|
1312
1306
|
// Adding ON_SESSION_STORE_AVAILABLE native listener
|
|
1313
|
-
const sessionStoreAvailableSubscription =
|
|
1307
|
+
const sessionStoreAvailableSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE, this.onSessionStoreAvailableListener);
|
|
1314
1308
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE] = sessionStoreAvailableSubscription;
|
|
1315
1309
|
}
|
|
1316
1310
|
// Adding Session Store Available App Delegate listener
|
|
@@ -1323,7 +1317,7 @@ class HMSSDK {
|
|
|
1323
1317
|
// Checking if we already have ON_PIP_ROOM_LEAVE subscription
|
|
1324
1318
|
if (!this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE]) {
|
|
1325
1319
|
// Adding ON_PIP_ROOM_LEAVE native listener
|
|
1326
|
-
const pipRoomLeaveSubscription =
|
|
1320
|
+
const pipRoomLeaveSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE, this.onPIPRoomLeaveListener);
|
|
1327
1321
|
this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE] = pipRoomLeaveSubscription;
|
|
1328
1322
|
}
|
|
1329
1323
|
// Adding App Delegate listener
|
|
@@ -1342,7 +1336,7 @@ class HMSSDK {
|
|
|
1342
1336
|
* @memberof HMSSDK
|
|
1343
1337
|
*/
|
|
1344
1338
|
_defineProperty(this, "removeEventListener", action => {
|
|
1345
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1339
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function removeEventListener', {
|
|
1346
1340
|
action,
|
|
1347
1341
|
id: this.id
|
|
1348
1342
|
});
|
|
@@ -1632,7 +1626,7 @@ class HMSSDK {
|
|
|
1632
1626
|
|
|
1633
1627
|
// clearing reference of all `emitterSubscription` objects
|
|
1634
1628
|
this.emitterSubscriptions = {};
|
|
1635
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1629
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function REMOVE_ALL_LISTENER', {
|
|
1636
1630
|
id: this.id
|
|
1637
1631
|
});
|
|
1638
1632
|
});
|
|
@@ -1657,7 +1651,7 @@ class HMSSDK {
|
|
|
1657
1651
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
1658
1652
|
const previewTracks = _HMSEncoder.HMSEncoder.encodeHmsPreviewTracks(data.previewTracks, this.id);
|
|
1659
1653
|
if (this.onPreviewDelegate) {
|
|
1660
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1654
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_PREVIEW_LISTENER_CALL', {
|
|
1661
1655
|
room,
|
|
1662
1656
|
previewTracks
|
|
1663
1657
|
});
|
|
@@ -1673,7 +1667,7 @@ class HMSSDK {
|
|
|
1673
1667
|
}
|
|
1674
1668
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
1675
1669
|
if (this.onJoinDelegate) {
|
|
1676
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1670
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_JOIN_LISTENER_CALL', {
|
|
1677
1671
|
room
|
|
1678
1672
|
});
|
|
1679
1673
|
this.onJoinDelegate({
|
|
@@ -1688,9 +1682,9 @@ class HMSSDK {
|
|
|
1688
1682
|
}
|
|
1689
1683
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
1690
1684
|
const type = data.type;
|
|
1691
|
-
(_getHmsRoomCache2 = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache2 === void 0
|
|
1685
|
+
(_getHmsRoomCache2 = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache2 === void 0 || _getHmsRoomCache2.updateRoomCache(data.room, data.type);
|
|
1692
1686
|
if (this.onRoomDelegate) {
|
|
1693
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1687
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_ROOM_LISTENER_CALL', {
|
|
1694
1688
|
room,
|
|
1695
1689
|
type
|
|
1696
1690
|
});
|
|
@@ -1715,9 +1709,9 @@ class HMSSDK {
|
|
|
1715
1709
|
}
|
|
1716
1710
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1717
1711
|
const type = _HMSEncoder.HMSEncoder.encodeHmsPeerUpdate(data.type) || data.type;
|
|
1718
|
-
(_getHmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache === void 0
|
|
1712
|
+
(_getHmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache === void 0 || _getHmsPeersCache.updatePeerCache(data.peer.peerID, data.peer, type);
|
|
1719
1713
|
if (this.onPeerDelegate) {
|
|
1720
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1714
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_PEER_LISTENER_CALL', {
|
|
1721
1715
|
peer,
|
|
1722
1716
|
type
|
|
1723
1717
|
});
|
|
@@ -1735,14 +1729,14 @@ class HMSSDK {
|
|
|
1735
1729
|
const track = _HMSEncoder.HMSEncoder.encodeHmsTrack(data.track, this.id);
|
|
1736
1730
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1737
1731
|
const type = data.type;
|
|
1738
|
-
(_getHmsPeersCache2 = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache2 === void 0
|
|
1732
|
+
(_getHmsPeersCache2 = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache2 === void 0 || _getHmsPeersCache2.updatePeerCache(data.peer.peerID, {
|
|
1739
1733
|
track
|
|
1740
1734
|
}, data.type);
|
|
1741
1735
|
if (this.muteStatus && (data === null || data === void 0 ? void 0 : data.type) === 'TRACK_ADDED' && track.type === _HMSTrackType.HMSTrackType.AUDIO) {
|
|
1742
1736
|
this.setPlaybackForAllAudio(this.muteStatus);
|
|
1743
1737
|
}
|
|
1744
1738
|
if (this.onTrackDelegate) {
|
|
1745
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1739
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_TRACK_LISTENER_CALL', {
|
|
1746
1740
|
peer,
|
|
1747
1741
|
track,
|
|
1748
1742
|
type
|
|
@@ -1760,7 +1754,7 @@ class HMSSDK {
|
|
|
1760
1754
|
}
|
|
1761
1755
|
const message = _HMSEncoder.HMSEncoder.encodeHMSMessage(data);
|
|
1762
1756
|
if (this.onMessageDelegate) {
|
|
1763
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1757
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_MESSAGE_LISTENER_CALL', message);
|
|
1764
1758
|
this.onMessageDelegate(message);
|
|
1765
1759
|
}
|
|
1766
1760
|
});
|
|
@@ -1769,7 +1763,7 @@ class HMSSDK {
|
|
|
1769
1763
|
return;
|
|
1770
1764
|
}
|
|
1771
1765
|
if (this.onSpeakerDelegate) {
|
|
1772
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1766
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_SPEAKER_LISTENER_CALL', data === null || data === void 0 ? void 0 : data.speakers);
|
|
1773
1767
|
this.onSpeakerDelegate(_HMSEncoder.HMSEncoder.encodeHmsSpeakers(data === null || data === void 0 ? void 0 : data.speakers, this.id));
|
|
1774
1768
|
}
|
|
1775
1769
|
});
|
|
@@ -1778,8 +1772,8 @@ class HMSSDK {
|
|
|
1778
1772
|
return;
|
|
1779
1773
|
}
|
|
1780
1774
|
if (this.onErrorDelegate) {
|
|
1781
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1782
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1775
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
1776
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.warn('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
1783
1777
|
this.onErrorDelegate(_HMSEncoder.HMSEncoder.encodeHMSException(data));
|
|
1784
1778
|
}
|
|
1785
1779
|
});
|
|
@@ -1789,7 +1783,7 @@ class HMSSDK {
|
|
|
1789
1783
|
}
|
|
1790
1784
|
if (this.onRoleChangeRequestDelegate) {
|
|
1791
1785
|
const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsRoleChangeRequest(data);
|
|
1792
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1786
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_ROLE_CHANGE_LISTENER_CALL', encodedRoleChangeRequest);
|
|
1793
1787
|
this.onRoleChangeRequestDelegate(encodedRoleChangeRequest);
|
|
1794
1788
|
}
|
|
1795
1789
|
});
|
|
@@ -1799,7 +1793,7 @@ class HMSSDK {
|
|
|
1799
1793
|
}
|
|
1800
1794
|
if (this.onChangeTrackStateRequestDelegate) {
|
|
1801
1795
|
const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsChangeTrackStateRequest(data);
|
|
1802
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1796
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL', encodedRoleChangeRequest);
|
|
1803
1797
|
this.onChangeTrackStateRequestDelegate(encodedRoleChangeRequest);
|
|
1804
1798
|
}
|
|
1805
1799
|
});
|
|
@@ -1815,7 +1809,7 @@ class HMSSDK {
|
|
|
1815
1809
|
}
|
|
1816
1810
|
const reason = data.reason;
|
|
1817
1811
|
const roomEnded = data.roomEnded;
|
|
1818
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1812
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_REMOVED_FROM_ROOM_LISTENER_CALL', {
|
|
1819
1813
|
requestedBy,
|
|
1820
1814
|
reason,
|
|
1821
1815
|
roomEnded,
|
|
@@ -1833,7 +1827,7 @@ class HMSSDK {
|
|
|
1833
1827
|
return;
|
|
1834
1828
|
}
|
|
1835
1829
|
if (this.onReconnectingDelegate) {
|
|
1836
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1830
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_RECONNECTING_CALL', data);
|
|
1837
1831
|
this.onReconnectingDelegate(data);
|
|
1838
1832
|
}
|
|
1839
1833
|
});
|
|
@@ -1842,7 +1836,7 @@ class HMSSDK {
|
|
|
1842
1836
|
return;
|
|
1843
1837
|
}
|
|
1844
1838
|
if (this.onReconnectedDelegate) {
|
|
1845
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1839
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_RECONNECTED_CALL', data);
|
|
1846
1840
|
this.onReconnectedDelegate(data);
|
|
1847
1841
|
}
|
|
1848
1842
|
});
|
|
@@ -1852,7 +1846,7 @@ class HMSSDK {
|
|
|
1852
1846
|
}
|
|
1853
1847
|
let rtcStats = _HMSEncoder.HMSEncoder.encodeRTCStats(data);
|
|
1854
1848
|
if (this.onRtcStatsDelegate) {
|
|
1855
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1849
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener RTCStatsListener_CALL', {
|
|
1856
1850
|
rtcStats
|
|
1857
1851
|
});
|
|
1858
1852
|
this.onRtcStatsDelegate({
|
|
@@ -1868,7 +1862,7 @@ class HMSSDK {
|
|
|
1868
1862
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1869
1863
|
let track = _HMSEncoder.HMSEncoder.encodeHmsLocalAudioTrack(data.track, this.id);
|
|
1870
1864
|
if (this.onLocalAudioStatsDelegate) {
|
|
1871
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1865
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onLocalAudioStatsListener_CALL', {
|
|
1872
1866
|
...data,
|
|
1873
1867
|
localAudioStats,
|
|
1874
1868
|
peer,
|
|
@@ -1890,7 +1884,7 @@ class HMSSDK {
|
|
|
1890
1884
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1891
1885
|
let track = _HMSEncoder.HMSEncoder.encodeHmsLocalVideoTrack(data.track, this.id);
|
|
1892
1886
|
if (this.onLocalVideoStatsDelegate) {
|
|
1893
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1887
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onLocalVideoStatsListener_CALL', {
|
|
1894
1888
|
...data,
|
|
1895
1889
|
localVideoStats,
|
|
1896
1890
|
peer,
|
|
@@ -1912,7 +1906,7 @@ class HMSSDK {
|
|
|
1912
1906
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1913
1907
|
let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteAudioTrack(data.track, this.id);
|
|
1914
1908
|
if (this.onRemoteAudioStatsDelegate) {
|
|
1915
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1909
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onRemoteAudioStatsListener_CALL', {
|
|
1916
1910
|
...data,
|
|
1917
1911
|
remoteAudioStats,
|
|
1918
1912
|
peer,
|
|
@@ -1934,7 +1928,7 @@ class HMSSDK {
|
|
|
1934
1928
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1935
1929
|
let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteVideoTrack(data.track, this.id);
|
|
1936
1930
|
if (this.onRemoteVideoStatsDelegate) {
|
|
1937
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1931
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onRemoteVideoStatsListener_CALL', {
|
|
1938
1932
|
...data,
|
|
1939
1933
|
remoteVideoStats,
|
|
1940
1934
|
peer,
|
|
@@ -1953,7 +1947,7 @@ class HMSSDK {
|
|
|
1953
1947
|
return;
|
|
1954
1948
|
}
|
|
1955
1949
|
if (this.onAudioDeviceChangedDelegate) {
|
|
1956
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1950
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onAudioDeviceChangedListener_CALL', data);
|
|
1957
1951
|
this.onAudioDeviceChangedDelegate({
|
|
1958
1952
|
...data
|
|
1959
1953
|
});
|
|
@@ -1964,7 +1958,7 @@ class HMSSDK {
|
|
|
1964
1958
|
return;
|
|
1965
1959
|
}
|
|
1966
1960
|
if (this.onSessionStoreAvailableDelegate) {
|
|
1967
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1961
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_SESSION_STORE_AVAILABLE_LISTENER_CALL', data);
|
|
1968
1962
|
this.onSessionStoreAvailableDelegate({
|
|
1969
1963
|
...data,
|
|
1970
1964
|
sessionStore: new _HMSSessionStore.HMSSessionStore()
|
|
@@ -1977,7 +1971,7 @@ class HMSSDK {
|
|
|
1977
1971
|
}
|
|
1978
1972
|
this.roomLeaveCleanup();
|
|
1979
1973
|
if (this.onPIPRoomLeaveDelegate) {
|
|
1980
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0
|
|
1974
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onPIPRoomLeave_CALL', data);
|
|
1981
1975
|
this.onPIPRoomLeaveDelegate({
|
|
1982
1976
|
...data
|
|
1983
1977
|
});
|
|
@@ -2020,7 +2014,7 @@ class HMSSDK {
|
|
|
2020
2014
|
minor,
|
|
2021
2015
|
patch
|
|
2022
2016
|
} = ReactNativeVersion.version;
|
|
2023
|
-
let id = await
|
|
2017
|
+
let id = await _HMSManagerModule.default.build({
|
|
2024
2018
|
trackSettings: params === null || params === void 0 ? void 0 : params.trackSettings,
|
|
2025
2019
|
appGroup: params === null || params === void 0 ? void 0 : params.appGroup,
|
|
2026
2020
|
// required for iOS Screenshare, not required for Android
|
|
@@ -2028,7 +2022,8 @@ class HMSSDK {
|
|
|
2028
2022
|
// required for iOS Screenshare, not required for Android
|
|
2029
2023
|
frameworkInfo: {
|
|
2030
2024
|
version: major + '.' + minor + '.' + patch,
|
|
2031
|
-
sdkVersion: version
|
|
2025
|
+
sdkVersion: version,
|
|
2026
|
+
isPrebuilt: (params === null || params === void 0 ? void 0 : params.isPrebuilt) || false
|
|
2032
2027
|
},
|
|
2033
2028
|
logSettings: params === null || params === void 0 ? void 0 : params.logSettings
|
|
2034
2029
|
});
|
|
@@ -2036,18 +2031,18 @@ class HMSSDK {
|
|
|
2036
2031
|
return HmsSdk;
|
|
2037
2032
|
}
|
|
2038
2033
|
async isPipModeSupported() {
|
|
2039
|
-
return
|
|
2034
|
+
return _HMSManagerModule.default.handlePipActions('isPipModeSupported', {
|
|
2040
2035
|
id: this.id
|
|
2041
2036
|
});
|
|
2042
2037
|
}
|
|
2043
2038
|
async enablePipMode(data) {
|
|
2044
|
-
return
|
|
2039
|
+
return _HMSManagerModule.default.handlePipActions('enablePipMode', {
|
|
2045
2040
|
...data,
|
|
2046
2041
|
id: this.id
|
|
2047
2042
|
});
|
|
2048
2043
|
}
|
|
2049
2044
|
async setPipParams(data) {
|
|
2050
|
-
return
|
|
2045
|
+
return _HMSManagerModule.default.handlePipActions('setPictureInPictureParams', {
|
|
2051
2046
|
...data,
|
|
2052
2047
|
id: this.id
|
|
2053
2048
|
});
|