@100mslive/react-native-hms 1.8.0 → 1.9.0
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/android/build.gradle +3 -3
- package/android/local.properties +8 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +15 -5
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +43 -5
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +120 -25
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +220 -26
- package/ios/HMSConstants.swift +1 -0
- package/ios/HMSDecoder.swift +16 -5
- package/ios/HMSHelper.swift +33 -4
- package/ios/HMSManager.m +26 -0
- package/ios/HMSManager.swift +45 -1
- package/ios/HMSRNSDK.swift +158 -15
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/jatinnagar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/classes/HMSAudioCodec.js +1 -2
- package/lib/commonjs/classes/HMSAudioCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioDevice.js +1 -2
- package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMixingMode.js +1 -2
- package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMode.js +1 -2
- package/lib/commonjs/classes/HMSAudioMode.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraFacing.js +1 -2
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -1
- package/lib/commonjs/classes/HMSConstants.js +1 -2
- package/lib/commonjs/classes/HMSConstants.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +1 -2
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSIOSAudioMode.js +1 -2
- package/lib/commonjs/classes/HMSIOSAudioMode.js.map +1 -1
- package/lib/commonjs/classes/HMSLayer.js +1 -2
- package/lib/commonjs/classes/HMSLayer.js.map +1 -1
- package/lib/commonjs/classes/HMSLogAlarmManager.js +1 -2
- package/lib/commonjs/classes/HMSLogAlarmManager.js.map +1 -1
- package/lib/commonjs/classes/HMSLogLevel.js +1 -2
- package/lib/commonjs/classes/HMSLogLevel.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +1 -2
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSManagerModule.js +1 -2
- package/lib/commonjs/classes/HMSManagerModule.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipientType.js +1 -2
- package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +1 -2
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -1
- package/lib/commonjs/classes/HMSPIPListenerActions.js +2 -2
- package/lib/commonjs/classes/HMSPIPListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +15 -0
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerListIterator.js +64 -0
- package/lib/commonjs/classes/HMSPeerListIterator.js.map +1 -0
- package/lib/commonjs/classes/HMSPeerListIteratorOptions.js +2 -0
- package/lib/commonjs/classes/HMSPeerListIteratorOptions.js.map +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js +3 -4
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +8 -2
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSQualityLimitationReason.js +1 -2
- package/lib/commonjs/classes/HMSQualityLimitationReason.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +1 -2
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js +1 -2
- package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +152 -6
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js +1 -2
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSource.js +1 -2
- package/lib/commonjs/classes/HMSTrackSource.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +1 -2
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackUpdate.js +1 -2
- package/lib/commonjs/classes/HMSTrackUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +2 -2
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoCodec.js +1 -2
- package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoViewMode.js +1 -2
- package/lib/commonjs/classes/HMSVideoViewMode.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +3 -4
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +3 -4
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +2 -4
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js +5 -10
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +2 -2
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stores/hls-player-stats-store.js +1 -2
- package/lib/commonjs/stores/hls-player-stats-store.js.map +1 -1
- package/lib/commonjs/stores/hms-store.js +1 -2
- package/lib/commonjs/stores/hms-store.js.map +1 -1
- package/lib/commonjs/types.js +3 -6
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/classes/HMSPIPListenerActions.js +1 -0
- package/lib/module/classes/HMSPIPListenerActions.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +15 -0
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerListIterator.js +58 -0
- package/lib/module/classes/HMSPeerListIterator.js.map +1 -0
- package/lib/module/classes/HMSPeerListIteratorOptions.js +2 -0
- package/lib/module/classes/HMSPeerListIteratorOptions.js.map +1 -0
- package/lib/module/classes/HMSPeerUpdate.js +2 -1
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPeersCache.js +7 -0
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +153 -7
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +1 -0
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/typescript/classes/HMSPIPListenerActions.d.ts +1 -0
- package/lib/typescript/classes/HMSPeer.d.ts +3 -0
- package/lib/typescript/classes/HMSPeerListIterator.d.ts +9 -0
- package/lib/typescript/classes/HMSPeerListIteratorOptions.d.ts +24 -0
- package/lib/typescript/classes/HMSPeerUpdate.d.ts +2 -1
- package/lib/typescript/classes/HMSPeersCache.d.ts +1 -0
- package/lib/typescript/classes/HMSSDK.d.ts +46 -1
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +2 -1
- package/package.json +1 -1
- package/sdk-versions.json +2 -2
- package/src/classes/HMSPIPListenerActions.ts +1 -0
- package/src/classes/HMSPeer.ts +25 -0
- package/src/classes/HMSPeerListIterator.ts +60 -0
- package/src/classes/HMSPeerListIteratorOptions.ts +26 -0
- package/src/classes/HMSPeerUpdate.ts +2 -0
- package/src/classes/HMSPeersCache.ts +7 -0
- package/src/classes/HMSSDK.tsx +187 -4
- package/src/classes/HMSUpdateListenerActions.ts +1 -0
- 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 +0 -2
- 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
|
@@ -19,6 +19,7 @@ var _HMSPeersCache = require("./HMSPeersCache");
|
|
|
19
19
|
var _HMSRoomCache = require("./HMSRoomCache");
|
|
20
20
|
var _HMSPeerUpdate = require("./HMSPeerUpdate");
|
|
21
21
|
var _HMSSessionStore = require("./HMSSessionStore");
|
|
22
|
+
var _HMSPeerListIterator = require("./HMSPeerListIterator");
|
|
22
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
24
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
25
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
@@ -37,6 +38,7 @@ class HMSSDK {
|
|
|
37
38
|
_defineProperty(this, "onJoinDelegate", void 0);
|
|
38
39
|
_defineProperty(this, "onRoomDelegate", void 0);
|
|
39
40
|
_defineProperty(this, "onPeerDelegate", void 0);
|
|
41
|
+
_defineProperty(this, "onPeerListUpdatedDelegate", void 0);
|
|
40
42
|
_defineProperty(this, "onTrackDelegate", void 0);
|
|
41
43
|
_defineProperty(this, "onErrorDelegate", void 0);
|
|
42
44
|
_defineProperty(this, "onMessageDelegate", void 0);
|
|
@@ -54,6 +56,7 @@ class HMSSDK {
|
|
|
54
56
|
_defineProperty(this, "onAudioDeviceChangedDelegate", void 0);
|
|
55
57
|
_defineProperty(this, "onSessionStoreAvailableDelegate", void 0);
|
|
56
58
|
_defineProperty(this, "onPIPRoomLeaveDelegate", void 0);
|
|
59
|
+
_defineProperty(this, "onPIPModeChangedDelegate", void 0);
|
|
57
60
|
_defineProperty(this, "emitterSubscriptions", {});
|
|
58
61
|
/**
|
|
59
62
|
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
@@ -1072,6 +1075,75 @@ class HMSSDK {
|
|
|
1072
1075
|
peerID: peerId
|
|
1073
1076
|
});
|
|
1074
1077
|
});
|
|
1078
|
+
/**
|
|
1079
|
+
* - This function is used to raise hand for the local peer
|
|
1080
|
+
* @memberof HMSSDK
|
|
1081
|
+
*/
|
|
1082
|
+
_defineProperty(this, "raiseLocalPeerHand", async () => {
|
|
1083
|
+
const data = {
|
|
1084
|
+
id: this.id
|
|
1085
|
+
};
|
|
1086
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function raiseLocalPeerHand', data);
|
|
1087
|
+
return _HMSManagerModule.default.raiseLocalPeerHand(data);
|
|
1088
|
+
});
|
|
1089
|
+
/**
|
|
1090
|
+
* - This function is used to lower hand for the local peer
|
|
1091
|
+
* @memberof HMSSDK
|
|
1092
|
+
*/
|
|
1093
|
+
_defineProperty(this, "lowerLocalPeerHand", async () => {
|
|
1094
|
+
const data = {
|
|
1095
|
+
id: this.id
|
|
1096
|
+
};
|
|
1097
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function lowerLocalPeerHand', data);
|
|
1098
|
+
return _HMSManagerModule.default.lowerLocalPeerHand(data);
|
|
1099
|
+
});
|
|
1100
|
+
/**
|
|
1101
|
+
* - This function is used to lower hand for the remote peer
|
|
1102
|
+
* @param peer
|
|
1103
|
+
*/
|
|
1104
|
+
_defineProperty(this, "lowerRemotePeerHand", async peer => {
|
|
1105
|
+
const data = {
|
|
1106
|
+
peerId: peer.peerID,
|
|
1107
|
+
id: this.id
|
|
1108
|
+
};
|
|
1109
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function lowerRemotePeerHand', data);
|
|
1110
|
+
return _HMSManagerModule.default.lowerRemotePeerHand(data);
|
|
1111
|
+
});
|
|
1112
|
+
/**
|
|
1113
|
+
* `getPeerListIterator` method returns an instance of `HMSPeerListIterator` class
|
|
1114
|
+
*
|
|
1115
|
+
* @param options options for configuring iterator
|
|
1116
|
+
* @returns instance of HMSPeerListIterator class
|
|
1117
|
+
*
|
|
1118
|
+
* Example usage:
|
|
1119
|
+
* ```
|
|
1120
|
+
* const peerListIterator = hmsInstance.getPeerListIterator();
|
|
1121
|
+
* ```
|
|
1122
|
+
* OR
|
|
1123
|
+
* ```
|
|
1124
|
+
* const peerListIterator = hmsInstance.getPeerListIterator({
|
|
1125
|
+
* limit: 10,
|
|
1126
|
+
* byRoleName: 'viewer-realtime',
|
|
1127
|
+
* });
|
|
1128
|
+
* ```
|
|
1129
|
+
*/
|
|
1130
|
+
_defineProperty(this, "getPeerListIterator", options => {
|
|
1131
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function getPeerListIterator', {
|
|
1132
|
+
id: this.id,
|
|
1133
|
+
options
|
|
1134
|
+
});
|
|
1135
|
+
const uniqueId = Math.random().toString(16).slice(2);
|
|
1136
|
+
const data = _HMSManagerModule.default.getPeerListIterator({
|
|
1137
|
+
id: this.id,
|
|
1138
|
+
...options,
|
|
1139
|
+
limit: (options === null || options === void 0 ? void 0 : options.limit) ?? 10,
|
|
1140
|
+
uniqueId
|
|
1141
|
+
});
|
|
1142
|
+
if (!data) {
|
|
1143
|
+
throw new Error('Unable to create PeerListIterator');
|
|
1144
|
+
}
|
|
1145
|
+
return new _HMSPeerListIterator.HMSPeerListIterator(data.uniqueId, data.totalCount);
|
|
1146
|
+
});
|
|
1075
1147
|
/**
|
|
1076
1148
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
1077
1149
|
*
|
|
@@ -1133,6 +1205,18 @@ class HMSSDK {
|
|
|
1133
1205
|
this.onPeerDelegate = callback;
|
|
1134
1206
|
break;
|
|
1135
1207
|
}
|
|
1208
|
+
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED:
|
|
1209
|
+
{
|
|
1210
|
+
// Checking if we already have ON_PEER_LIST_UPDATED subscription
|
|
1211
|
+
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED]) {
|
|
1212
|
+
// Adding ON_PEER_LIST_UPDATED native listener
|
|
1213
|
+
const peerListUpdatedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED, this.onPeerListUpdatedListener);
|
|
1214
|
+
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED] = peerListUpdatedSubscription;
|
|
1215
|
+
}
|
|
1216
|
+
// Adding App Delegate listener
|
|
1217
|
+
this.onPeerListUpdatedDelegate = callback;
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1136
1220
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE:
|
|
1137
1221
|
{
|
|
1138
1222
|
// Checking if we already have ON_TRACK_UPDATE subscription
|
|
@@ -1339,6 +1423,19 @@ class HMSSDK {
|
|
|
1339
1423
|
}
|
|
1340
1424
|
break;
|
|
1341
1425
|
}
|
|
1426
|
+
case _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED:
|
|
1427
|
+
{
|
|
1428
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
1429
|
+
// Checking if we already have ON_PIP_MODE_CHANGED subscription
|
|
1430
|
+
if (!this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED]) {
|
|
1431
|
+
const pipModeChangedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED, this.onPIPModeChangedListener);
|
|
1432
|
+
this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = pipModeChangedSubscription;
|
|
1433
|
+
}
|
|
1434
|
+
// Adding PIP mode changed Delegate listener
|
|
1435
|
+
this.onPIPModeChangedDelegate = callback;
|
|
1436
|
+
}
|
|
1437
|
+
break;
|
|
1438
|
+
}
|
|
1342
1439
|
default:
|
|
1343
1440
|
}
|
|
1344
1441
|
});
|
|
@@ -1609,6 +1706,20 @@ class HMSSDK {
|
|
|
1609
1706
|
}
|
|
1610
1707
|
break;
|
|
1611
1708
|
}
|
|
1709
|
+
case _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED:
|
|
1710
|
+
{
|
|
1711
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
1712
|
+
const subscription = this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED];
|
|
1713
|
+
// Removing ON_PIP_MODE_CHANGED native listener
|
|
1714
|
+
if (subscription) {
|
|
1715
|
+
subscription.remove();
|
|
1716
|
+
this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = undefined;
|
|
1717
|
+
}
|
|
1718
|
+
// Removing App Delegate listener
|
|
1719
|
+
this.onPIPModeChangedDelegate = null;
|
|
1720
|
+
}
|
|
1721
|
+
break;
|
|
1722
|
+
}
|
|
1612
1723
|
default:
|
|
1613
1724
|
}
|
|
1614
1725
|
});
|
|
@@ -1709,7 +1820,6 @@ class HMSSDK {
|
|
|
1709
1820
|
}
|
|
1710
1821
|
});
|
|
1711
1822
|
_defineProperty(this, "onPeerListener", peerData => {
|
|
1712
|
-
var _getHmsPeersCache;
|
|
1713
1823
|
const data = {
|
|
1714
1824
|
peer: peerData,
|
|
1715
1825
|
type: null
|
|
@@ -1723,7 +1833,15 @@ class HMSSDK {
|
|
|
1723
1833
|
}
|
|
1724
1834
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1725
1835
|
const type = _HMSEncoder.HMSEncoder.encodeHmsPeerUpdate(data.type) || data.type;
|
|
1726
|
-
|
|
1836
|
+
if (type === _HMSPeerUpdate.HMSPeerUpdate.PEER_LEFT) {
|
|
1837
|
+
this.sendPeerUpdateWhenPeerLeaves(data, peer, type);
|
|
1838
|
+
} else {
|
|
1839
|
+
var _getHmsPeersCache;
|
|
1840
|
+
(_getHmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache === void 0 || _getHmsPeersCache.updatePeerCache(data.peer.peerID, data.peer, type);
|
|
1841
|
+
this.sendPeerUpdate(peer, type);
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
_defineProperty(this, "sendPeerUpdate", (peer, type) => {
|
|
1727
1845
|
if (this.onPeerDelegate) {
|
|
1728
1846
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_PEER_LISTENER_CALL', {
|
|
1729
1847
|
peer,
|
|
@@ -1735,15 +1853,37 @@ class HMSSDK {
|
|
|
1735
1853
|
});
|
|
1736
1854
|
}
|
|
1737
1855
|
});
|
|
1738
|
-
_defineProperty(this, "
|
|
1856
|
+
_defineProperty(this, "sendPeerUpdateWhenPeerLeaves", (data, peer, type) => {
|
|
1739
1857
|
var _getHmsPeersCache2;
|
|
1858
|
+
this.sendPeerUpdate(peer, type);
|
|
1859
|
+
(_getHmsPeersCache2 = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache2 === void 0 || _getHmsPeersCache2.updatePeerCache(data.peer.peerID, data.peer, type);
|
|
1860
|
+
});
|
|
1861
|
+
_defineProperty(this, "onPeerListUpdatedListener", data => {
|
|
1862
|
+
if (data.id !== this.id) {
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
const addedPeers = _HMSEncoder.HMSEncoder.encodeHmsPeers(data.addedPeers);
|
|
1866
|
+
const removedPeers = _HMSEncoder.HMSEncoder.encodeHmsPeers(data.removedPeers);
|
|
1867
|
+
if (this.onPeerListUpdatedDelegate) {
|
|
1868
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener ON_PEER_LIST_UPDATED_LISTENER_CALL', {
|
|
1869
|
+
totalAddedPeers: addedPeers.length,
|
|
1870
|
+
totalRemovedPeers: removedPeers.length
|
|
1871
|
+
});
|
|
1872
|
+
this.onPeerListUpdatedDelegate({
|
|
1873
|
+
addedPeers,
|
|
1874
|
+
removedPeers
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
_defineProperty(this, "onTrackListener", data => {
|
|
1879
|
+
var _getHmsPeersCache3;
|
|
1740
1880
|
if (data.id !== this.id) {
|
|
1741
1881
|
return;
|
|
1742
1882
|
}
|
|
1743
1883
|
const track = _HMSEncoder.HMSEncoder.encodeHmsTrack(data.track, this.id);
|
|
1744
1884
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
|
|
1745
1885
|
const type = data.type;
|
|
1746
|
-
(
|
|
1886
|
+
(_getHmsPeersCache3 = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache3 === void 0 || _getHmsPeersCache3.updatePeerCache(data.peer.peerID, {
|
|
1747
1887
|
track
|
|
1748
1888
|
}, data.type);
|
|
1749
1889
|
if (this.muteStatus && (data === null || data === void 0 ? void 0 : data.type) === 'TRACK_ADDED' && track.type === _HMSTrackType.HMSTrackType.AUDIO) {
|
|
@@ -1991,6 +2131,12 @@ class HMSSDK {
|
|
|
1991
2131
|
});
|
|
1992
2132
|
}
|
|
1993
2133
|
});
|
|
2134
|
+
_defineProperty(this, "onPIPModeChangedListener", data => {
|
|
2135
|
+
if (this.onPIPModeChangedDelegate) {
|
|
2136
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onPIPModeChanged_CALL', data);
|
|
2137
|
+
this.onPIPModeChangedDelegate(data);
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
1994
2140
|
/**
|
|
1995
2141
|
* - Updates the logger for this instance of HMSSDK
|
|
1996
2142
|
* @param {HMSLogger} hmsLogger
|
|
@@ -2049,8 +2195,8 @@ class HMSSDK {
|
|
|
2049
2195
|
id: this.id
|
|
2050
2196
|
});
|
|
2051
2197
|
}
|
|
2052
|
-
async
|
|
2053
|
-
return _HMSManagerModule.default.handlePipActions('
|
|
2198
|
+
async enterPipMode(data) {
|
|
2199
|
+
return _HMSManagerModule.default.handlePipActions('enterPipMode', {
|
|
2054
2200
|
...data,
|
|
2055
2201
|
id: this.id
|
|
2056
2202
|
});
|