@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.
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +28 -6
- package/ios/HMSConstants.swift +1 -0
- package/ios/HMSManager.m +39 -0
- package/ios/HMSManager.swift +116 -1
- package/ios/HMSRNSDK.swift +270 -1
- package/ios/PIPMode/HMSPipModel.swift +18 -0
- package/ios/PIPMode/HMSPipView.swift +36 -0
- package/ios/PIPMode/HMSSampleBufferSwiftUIView.swift +45 -0
- package/lib/commonjs/classes/HMSPIPConfig.js +4 -0
- package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +52 -10
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSPIPConfig.js +1 -1
- package/lib/module/classes/HMSPIPConfig.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +52 -10
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/typescript/classes/HMSPIPConfig.d.ts +3 -0
- package/lib/typescript/classes/HMSSDK.d.ts +3 -0
- package/package.json +1 -1
- package/sdk-versions.json +2 -2
- package/src/classes/HMSPIPConfig.ts +30 -0
- package/src/classes/HMSSDK.tsx +58 -21
|
@@ -1423,15 +1423,13 @@ class HMSSDK {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
case _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_MODE_CHANGED:
|
|
1425
1425
|
{
|
|
1426
|
-
if
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
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
|
-
|
|
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,
|