@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.
@@ -1,2 +1,2 @@
1
-
1
+ export {};
2
2
  //# sourceMappingURL=HMSPIPConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["HMSPIPConfig.ts"],"sourcesContent":["export interface HMSPIPConfig {\n autoEnterPipMode?: boolean;\n aspectRatio?: [number, number];\n endButton?: boolean;\n audioButton?: boolean;\n videoButton?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["HMSPIPConfig.ts"],"sourcesContent":["import type { HMSVideoViewMode } from './HMSVideoViewMode';\n\nexport interface HMSPIPConfig {\n /*\n * Whether to automatically enter PIP mode when app enters background.\n */\n autoEnterPipMode?: boolean;\n\n /*\n * The aspect ratio of the PIP window. Default is [9, 16]. Other values can be [3, 4], [1, 1], [4, 3], [16, 9].\n */\n aspectRatio?: [number, number];\n\n /*\n * The scale type of the PIP window. Default is ASPECT_FILL. Other values can be ASPECT_FIT, ASPECT_BALANCED. iOS Only.\n */\n scaleType?: HMSVideoViewMode;\n\n /*\n * Whether to show the Active Speaker in the PIP window. Default is true. iOS only.\n */\n useActiveSpeaker?: boolean;\n /*\n * Whether to show the end button in the PIP window. Default is true. Android only.\n */\n endButton?: boolean;\n\n /*\n * Whether to show the audio mute/unmute button in the PIP window. Default is true. Android only.\n */\n audioButton?: boolean;\n\n /*\n * Whether to show the video mute/unmute button in the PIP window. Default is true. Android only.\n */\n videoButton?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1416,15 +1416,13 @@ export class HMSSDK {
1416
1416
  }
1417
1417
  case HMSPIPListenerActions.ON_PIP_MODE_CHANGED:
1418
1418
  {
1419
- if (Platform.OS === 'android') {
1420
- // Checking if we already have ON_PIP_MODE_CHANGED subscription
1421
- if (!this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_MODE_CHANGED]) {
1422
- const pipModeChangedSubscription = HMSNativeEventListener.addListener(this.id, HMSPIPListenerActions.ON_PIP_MODE_CHANGED, this.onPIPModeChangedListener);
1423
- this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = pipModeChangedSubscription;
1424
- }
1425
- // Adding PIP mode changed Delegate listener
1426
- this.onPIPModeChangedDelegate = callback;
1419
+ // Checking if we already have ON_PIP_MODE_CHANGED subscription
1420
+ if (!this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_MODE_CHANGED]) {
1421
+ const pipModeChangedSubscription = HMSNativeEventListener.addListener(this.id, HMSPIPListenerActions.ON_PIP_MODE_CHANGED, this.onPIPModeChangedListener);
1422
+ this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_MODE_CHANGED] = pipModeChangedSubscription;
1427
1423
  }
1424
+ // Adding PIP mode changed Delegate listener
1425
+ this.onPIPModeChangedDelegate = callback;
1428
1426
  break;
1429
1427
  }
1430
1428
  default:
@@ -2129,6 +2127,9 @@ export class HMSSDK {
2129
2127
  });
2130
2128
  }
2131
2129
  });
2130
+ /*
2131
+ * - This listener is fired when Room is left from the Picture in Picture mode. Android only.
2132
+ */
2132
2133
  _defineProperty(this, "onPIPRoomLeaveListener", data => {
2133
2134
  if (data.id !== this.id) {
2134
2135
  return;
@@ -2141,6 +2142,9 @@ export class HMSSDK {
2141
2142
  });
2142
2143
  }
2143
2144
  });
2145
+ /*
2146
+ * - Attach this listener to get notified when Picture in Picture mode is changed
2147
+ */
2144
2148
  _defineProperty(this, "onPIPModeChangedListener", data => {
2145
2149
  if (this.onPIPModeChangedDelegate) {
2146
2150
  logger === null || logger === void 0 || logger.verbose('#Listener onPIPModeChanged_CALL', data);
@@ -2200,23 +2204,61 @@ export class HMSSDK {
2200
2204
  HmsSdk = new HMSSDK(id);
2201
2205
  return HmsSdk;
2202
2206
  }
2207
+ /*
2208
+ * - This function is used to check if Picture in Picture mode is supported on the device
2209
+ */
2203
2210
  async isPipModeSupported() {
2204
- return HMSManager.handlePipActions('isPipModeSupported', {
2211
+ const data = {
2205
2212
  id: this.id
2206
- });
2213
+ };
2214
+ logger === null || logger === void 0 || logger.verbose('#Function isPipModeSupported', data);
2215
+ return HMSManager.handlePipActions('isPipModeSupported', data);
2207
2216
  }
2217
+
2218
+ /*
2219
+ * - This function can be used to manually enter Picture in Picture mode
2220
+ */
2208
2221
  async enterPipMode(data) {
2222
+ logger === null || logger === void 0 || logger.verbose('#Function enterPipMode', data);
2209
2223
  return HMSManager.handlePipActions('enterPipMode', {
2210
2224
  ...data,
2211
2225
  id: this.id
2212
2226
  });
2213
2227
  }
2228
+
2229
+ /*
2230
+ * - This function is to be used to configure the Picture in Picture window
2231
+ */
2214
2232
  async setPipParams(data) {
2215
2233
  return HMSManager.handlePipActions('setPictureInPictureParams', {
2216
2234
  ...data,
2217
2235
  id: this.id
2218
2236
  });
2219
2237
  }
2238
+
2239
+ /*
2240
+ * - Use this function to set Video Track for Picture in Picture mode. iOS Only.
2241
+ */
2242
+ async changeIOSPIPVideoTrack(track) {
2243
+ const data = {
2244
+ id: this.id,
2245
+ trackId: track.trackId
2246
+ };
2247
+ logger === null || logger === void 0 || logger.verbose('#Function changeIOSPIPVideoTrack', data);
2248
+ return await HMSManager.changeIOSPIPVideoTrack(data);
2249
+ }
2250
+
2251
+ /*
2252
+ * - Use this function to automatically show the current Active Speaker Peer video in the PIP Mode window. iOS Only.
2253
+ */
2254
+ async setActiveSpeakerInIOSPIP(enable) {
2255
+ const data = {
2256
+ id: this.id,
2257
+ enable
2258
+ };
2259
+ logger === null || logger === void 0 || logger.verbose('#Function setActiveSpeakerInIOSPIP', data);
2260
+ return await HMSManager.setActiveSpeakerInIOSPIP(data);
2261
+ }
2220
2262
  async startRealTimeTranscription() {
2221
2263
  const data = {
2222
2264
  id: this.id,