@100mslive/react-native-hms 1.10.7 → 1.10.8

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.
@@ -1423,15 +1423,13 @@ class HMSSDK {
1423
1423
  }
1424
1424
  case _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED:
1425
1425
  {
1426
- if (_reactNative.Platform.OS === 'android') {
1427
- // Checking if we already have ON_PIP_MODE_CHANGED subscription
1428
- if (!this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED]) {
1429
- const pipModeChangedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED, this.onPIPModeChangedListener);
1430
- this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = pipModeChangedSubscription;
1431
- }
1432
- // Adding PIP mode changed Delegate listener
1433
- this.onPIPModeChangedDelegate = callback;
1426
+ // Checking if we already have ON_PIP_MODE_CHANGED subscription
1427
+ if (!this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED]) {
1428
+ const pipModeChangedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED, this.onPIPModeChangedListener);
1429
+ this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = pipModeChangedSubscription;
1434
1430
  }
1431
+ // Adding PIP mode changed Delegate listener
1432
+ this.onPIPModeChangedDelegate = callback;
1435
1433
  break;
1436
1434
  }
1437
1435
  default:
@@ -2136,6 +2134,9 @@ class HMSSDK {
2136
2134
  });
2137
2135
  }
2138
2136
  });
2137
+ /*
2138
+ * - This listener is fired when Room is left from the Picture in Picture mode. Android only.
2139
+ */
2139
2140
  _defineProperty(this, "onPIPRoomLeaveListener", data => {
2140
2141
  if (data.id !== this.id) {
2141
2142
  return;
@@ -2148,6 +2149,9 @@ class HMSSDK {
2148
2149
  });
2149
2150
  }
2150
2151
  });
2152
+ /*
2153
+ * - Attach this listener to get notified when Picture in Picture mode is changed
2154
+ */
2151
2155
  _defineProperty(this, "onPIPModeChangedListener", data => {
2152
2156
  if (this.onPIPModeChangedDelegate) {
2153
2157
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Listener onPIPModeChanged_CALL', data);
@@ -2207,23 +2211,61 @@ class HMSSDK {
2207
2211
  HmsSdk = new HMSSDK(id);
2208
2212
  return HmsSdk;
2209
2213
  }
2214
+ /*
2215
+ * - This function is used to check if Picture in Picture mode is supported on the device
2216
+ */
2210
2217
  async isPipModeSupported() {
2211
- return _HMSManagerModule.default.handlePipActions('isPipModeSupported', {
2218
+ const data = {
2212
2219
  id: this.id
2213
- });
2220
+ };
2221
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function isPipModeSupported', data);
2222
+ return _HMSManagerModule.default.handlePipActions('isPipModeSupported', data);
2214
2223
  }
2224
+
2225
+ /*
2226
+ * - This function can be used to manually enter Picture in Picture mode
2227
+ */
2215
2228
  async enterPipMode(data) {
2229
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function enterPipMode', data);
2216
2230
  return _HMSManagerModule.default.handlePipActions('enterPipMode', {
2217
2231
  ...data,
2218
2232
  id: this.id
2219
2233
  });
2220
2234
  }
2235
+
2236
+ /*
2237
+ * - This function is to be used to configure the Picture in Picture window
2238
+ */
2221
2239
  async setPipParams(data) {
2222
2240
  return _HMSManagerModule.default.handlePipActions('setPictureInPictureParams', {
2223
2241
  ...data,
2224
2242
  id: this.id
2225
2243
  });
2226
2244
  }
2245
+
2246
+ /*
2247
+ * - Use this function to set Video Track for Picture in Picture mode. iOS Only.
2248
+ */
2249
+ async changeIOSPIPVideoTrack(track) {
2250
+ const data = {
2251
+ id: this.id,
2252
+ trackId: track.trackId
2253
+ };
2254
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function changeIOSPIPVideoTrack', data);
2255
+ return await _HMSManagerModule.default.changeIOSPIPVideoTrack(data);
2256
+ }
2257
+
2258
+ /*
2259
+ * - Use this function to automatically show the current Active Speaker Peer video in the PIP Mode window. iOS Only.
2260
+ */
2261
+ async setActiveSpeakerInIOSPIP(enable) {
2262
+ const data = {
2263
+ id: this.id,
2264
+ enable
2265
+ };
2266
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 || _HMSLogger.logger.verbose('#Function setActiveSpeakerInIOSPIP', data);
2267
+ return await _HMSManagerModule.default.setActiveSpeakerInIOSPIP(data);
2268
+ }
2227
2269
  async startRealTimeTranscription() {
2228
2270
  const data = {
2229
2271
  id: this.id,