@stream-io/video-react-native-sdk 1.43.0 → 1.44.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/CHANGELOG.md +22 -1
- package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/Lobby.js +4 -9
- package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/LobbyCameraPreview.js +93 -0
- package/dist/commonjs/components/Call/Lobby/LobbyCameraPreview.js.map +1 -0
- package/dist/commonjs/components/Call/Lobby/index.js +11 -0
- package/dist/commonjs/components/Call/Lobby/index.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +4 -15
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js +10 -4
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +37 -54
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +26 -37
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/internal/registerMediaEngine.js +41 -0
- package/dist/commonjs/utils/internal/registerMediaEngine.js.map +1 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +93 -35
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +6 -8
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +0 -9
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/module/components/Call/Lobby/Lobby.js +4 -9
- package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/module/components/Call/Lobby/LobbyCameraPreview.js +87 -0
- package/dist/module/components/Call/Lobby/LobbyCameraPreview.js.map +1 -0
- package/dist/module/components/Call/Lobby/index.js +1 -0
- package/dist/module/components/Call/Lobby/index.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +6 -17
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js +11 -5
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +36 -53
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +25 -38
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/internal/registerMediaEngine.js +37 -0
- package/dist/module/utils/internal/registerMediaEngine.js.map +1 -0
- package/dist/module/utils/internal/registerSDKGlobals.js +95 -37
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +7 -9
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js +0 -8
- package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/LobbyCameraPreview.d.ts +28 -0
- package/dist/typescript/components/Call/Lobby/LobbyCameraPreview.d.ts.map +1 -0
- package/dist/typescript/components/Call/Lobby/index.d.ts +1 -0
- package/dist/typescript/components/Call/Lobby/index.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts +11 -6
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +28 -6
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/types.d.ts +0 -1
- package/dist/typescript/modules/call-manager/types.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +3 -0
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts +2 -0
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerMediaEngine.d.ts +15 -0
- package/dist/typescript/utils/internal/registerMediaEngine.d.ts.map +1 -0
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +0 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/ios/StreamInCallManager.m +4 -0
- package/ios/StreamInCallManager.swift +42 -10
- package/package.json +8 -8
- package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +2 -2
- package/src/components/Call/Lobby/Lobby.tsx +4 -11
- package/src/components/Call/Lobby/LobbyCameraPreview.tsx +99 -0
- package/src/components/Call/Lobby/index.ts +1 -0
- package/src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx +56 -75
- package/src/components/Participant/ParticipantView/VideoRenderer/index.tsx +18 -7
- package/src/modules/call-manager/CallManager.ts +40 -71
- package/src/modules/call-manager/native-module.d.ts +13 -0
- package/src/modules/call-manager/types.ts +0 -1
- package/src/utils/StreamVideoRN/types.ts +3 -0
- package/src/utils/internal/callingx/callingx.ts +35 -44
- package/src/utils/internal/registerMediaEngine.ts +42 -0
- package/src/utils/internal/registerSDKGlobals.ts +115 -42
- package/src/utils/push/android.ts +9 -17
- package/src/utils/push/libs/firebaseMessaging/index.ts +0 -19
- package/src/version.ts +1 -1
|
@@ -4,8 +4,8 @@ import React, { useMemo } from 'react';
|
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { useCallStateHooks, useConnectedUser, useI18n } from '@stream-io/video-react-bindings';
|
|
6
6
|
import { Avatar } from '../../utility/Avatar';
|
|
7
|
-
import { RTCView } from '@stream-io/react-native-webrtc';
|
|
8
7
|
import { LobbyControls as DefaultLobbyControls } from '../CallControls/LobbyControls';
|
|
8
|
+
import { LobbyCameraPreview } from './LobbyCameraPreview';
|
|
9
9
|
import { JoinCallButton as DefaultJoinCallButton } from './JoinCallButton';
|
|
10
10
|
import { useTheme } from '../../../contexts/ThemeContext';
|
|
11
11
|
import { LobbyFooter as DefaultLobbyFooter } from './LobbyFooter';
|
|
@@ -40,13 +40,11 @@ export const Lobby = ({
|
|
|
40
40
|
const callSettings = useCallSettings();
|
|
41
41
|
const isVideoEnabledInCall = callSettings?.video.enabled;
|
|
42
42
|
const {
|
|
43
|
-
|
|
44
|
-
mediaStream
|
|
43
|
+
optimisticIsMute: cameraIsMuted
|
|
45
44
|
} = useCameraState();
|
|
46
45
|
const {
|
|
47
46
|
t
|
|
48
47
|
} = useI18n();
|
|
49
|
-
const localVideoStream = mediaStream;
|
|
50
48
|
const connectedUserAsParticipant = useMemo(() => ({
|
|
51
49
|
userId: connectedUser?.id,
|
|
52
50
|
image: connectedUser?.image,
|
|
@@ -67,11 +65,8 @@ export const Lobby = ({
|
|
|
67
65
|
}, lobby.videoContainer],
|
|
68
66
|
children: [/*#__PURE__*/_jsx(View, {
|
|
69
67
|
style: styles.topView
|
|
70
|
-
}), !cameraIsMuted
|
|
71
|
-
|
|
72
|
-
streamURL: localVideoStream.toURL(),
|
|
73
|
-
objectFit: "cover",
|
|
74
|
-
style: StyleSheet.absoluteFill
|
|
68
|
+
}), !cameraIsMuted ? /*#__PURE__*/_jsx(LobbyCameraPreview, {
|
|
69
|
+
objectFit: "cover"
|
|
75
70
|
}) : /*#__PURE__*/_jsx(View, {
|
|
76
71
|
style: [styles.avatarContainer, lobby.avatarContainer],
|
|
77
72
|
children: /*#__PURE__*/_jsx(Avatar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","StyleSheet","Text","View","useCallStateHooks","useConnectedUser","useI18n","Avatar","
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","Text","View","useCallStateHooks","useConnectedUser","useI18n","Avatar","LobbyControls","DefaultLobbyControls","LobbyCameraPreview","JoinCallButton","DefaultJoinCallButton","useTheme","LobbyFooter","DefaultLobbyFooter","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Lobby","onJoinCallHandler","landscape","theme","colors","lobby","typefaces","styles","useStyles","connectedUser","useCameraState","useCallSettings","callSettings","isVideoEnabledInCall","video","enabled","optimisticIsMute","cameraIsMuted","t","connectedUserAsParticipant","userId","id","image","name","style","container","children","heading","heading5","subHeading","videoContainer","backgroundColor","sheetTertiary","topView","objectFit","avatarContainer","participant","ParticipantStatus","participantLabel","participantStatusContainer","sheetOverlay","userNameLabel","color","textPrimary","caption","numberOfLines","create","textAlign","paddingBottom","variants","spacingSizes","xs","md","textSecondary","flex","justifyContent","sheetPrimary","paddingRight","insets","right","sm","paddingLeft","left","paddingTop","top","bottom","height","borderRadius","borderRadiusSizes","alignItems","overflow","alignSelf","flexDirection","padding","borderTopRightRadius","flexShrink"],"sourceRoot":"../../../../../src","sources":["components/Call/Lobby/Lobby.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAwBC,OAAO,QAAQ,OAAO;AAC1D,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SACEC,iBAAiB,EACjBC,gBAAgB,EAChBC,OAAO,QACF,iCAAiC;AACxC,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SAASC,aAAa,IAAIC,oBAAoB,QAAQ,+BAA+B;AACrF,SAASC,kBAAkB,QAAQ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IACDzB,eAAe,EAAE;MACfmB,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE;IAClB,CAAC;IACDd,aAAa,EAAE;MACbkC,UAAU,EAAE;IACd;EACF,CAAC,CAAC,EACJ,CAACxE,KAAK,EAAED,SAAS,CACnB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { Platform, StyleSheet } from 'react-native';
|
|
5
|
+
import { permissions, RTCCameraPreviewView } from '@stream-io/react-native-webrtc';
|
|
6
|
+
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Props for the {@link LobbyCameraPreview} component.
|
|
10
|
+
*/
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
/**
|
|
13
|
+
* The lobby runs before the call is joined. This component drives the native
|
|
14
|
+
* camera capturer directly via {@link RTCCameraPreviewView} which requires
|
|
15
|
+
* no track/peer connection factory to be created.
|
|
16
|
+
*
|
|
17
|
+
* It is driven by the *intended* camera state (optimistic): the lobby camera
|
|
18
|
+
* toggle only updates `optimisticStatus`; the real WebRTC track is acquired and
|
|
19
|
+
* published at join.
|
|
20
|
+
*/
|
|
21
|
+
export const LobbyCameraPreview = ({
|
|
22
|
+
style,
|
|
23
|
+
objectFit = 'cover'
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
useCameraState,
|
|
27
|
+
useCallSettings
|
|
28
|
+
} = useCallStateHooks();
|
|
29
|
+
const {
|
|
30
|
+
optimisticIsMute,
|
|
31
|
+
direction,
|
|
32
|
+
selectedDevice
|
|
33
|
+
} = useCameraState();
|
|
34
|
+
const settings = useCallSettings();
|
|
35
|
+
const wantsCamera = !optimisticIsMute;
|
|
36
|
+
const hasCameraPermission = useEnsureCameraPermission(wantsCamera);
|
|
37
|
+
const facing = direction === 'back' ? 'back' : 'front';
|
|
38
|
+
|
|
39
|
+
// Capture at the call's target resolution so the running preview capturer matches
|
|
40
|
+
// what the track publishes and can be adopted at join without reconfiguring.
|
|
41
|
+
// Normalize to landscape, matching CameraManager.selectTargetResolution.
|
|
42
|
+
const targetResolution = settings?.video.target_resolution;
|
|
43
|
+
let captureWidth = targetResolution?.width ?? 1280;
|
|
44
|
+
let captureHeight = targetResolution?.height ?? 720;
|
|
45
|
+
if (captureWidth < captureHeight) {
|
|
46
|
+
[captureWidth, captureHeight] = [captureHeight, captureWidth];
|
|
47
|
+
}
|
|
48
|
+
return /*#__PURE__*/_jsx(RTCCameraPreviewView, {
|
|
49
|
+
style: [StyleSheet.absoluteFill, style],
|
|
50
|
+
isActive: wantsCamera && hasCameraPermission,
|
|
51
|
+
facing: facing,
|
|
52
|
+
deviceId: selectedDevice,
|
|
53
|
+
mirror: Platform.OS === 'ios' ? true : facing === 'front',
|
|
54
|
+
objectFit: objectFit,
|
|
55
|
+
captureWidth: captureWidth,
|
|
56
|
+
captureHeight: captureHeight
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const useEnsureCameraPermission = enabled => {
|
|
60
|
+
const [granted, setGranted] = useState(false);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (!enabled || granted) return;
|
|
63
|
+
let cancelled = false;
|
|
64
|
+
(async () => {
|
|
65
|
+
try {
|
|
66
|
+
const status = await permissions.query({
|
|
67
|
+
name: 'camera'
|
|
68
|
+
});
|
|
69
|
+
if (status === 'granted') {
|
|
70
|
+
if (!cancelled) setGranted(true);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const result = await permissions.request({
|
|
74
|
+
name: 'camera'
|
|
75
|
+
});
|
|
76
|
+
if (!cancelled) setGranted(!!result);
|
|
77
|
+
} catch {
|
|
78
|
+
if (!cancelled) setGranted(false);
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
return () => {
|
|
82
|
+
cancelled = true;
|
|
83
|
+
};
|
|
84
|
+
}, [enabled, granted]);
|
|
85
|
+
return granted;
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=LobbyCameraPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Platform","StyleSheet","permissions","RTCCameraPreviewView","useCallStateHooks","jsx","_jsx","LobbyCameraPreview","style","objectFit","useCameraState","useCallSettings","optimisticIsMute","direction","selectedDevice","settings","wantsCamera","hasCameraPermission","useEnsureCameraPermission","facing","targetResolution","video","target_resolution","captureWidth","width","captureHeight","height","absoluteFill","isActive","deviceId","mirror","OS","enabled","granted","setGranted","cancelled","status","query","name","result","request"],"sourceRoot":"../../../../../src","sources":["components/Call/Lobby/LobbyCameraPreview.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,QAAQ,EAAEC,UAAU,QAAmB,cAAc;AAC9D,SACEC,WAAW,EACXC,oBAAoB,QACf,gCAAgC;AACvC,SAASC,iBAAiB,QAAQ,iCAAiC;;AAEnE;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK;EACLC,SAAS,GAAG;AACW,CAAC,KAAK;EAC7B,MAAM;IAAEC,cAAc;IAAEC;EAAgB,CAAC,GAAGP,iBAAiB,CAAC,CAAC;EAE/D,MAAM;IAAEQ,gBAAgB;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAGJ,cAAc,CAAC,CAAC;EACxE,MAAMK,QAAQ,GAAGJ,eAAe,CAAC,CAAC;EAElC,MAAMK,WAAW,GAAG,CAACJ,gBAAgB;EACrC,MAAMK,mBAAmB,GAAGC,yBAAyB,CAACF,WAAW,CAAC;EAElE,MAAMG,MAAM,GAAGN,SAAS,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO;;E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UAAEF,IAAI,EAAE;QAAS,CAAC,CAAC;QAC5D,IAAI,CAACH,SAAS,EAAED,UAAU,CAAC,CAAC,CAACK,MAAM,CAAC;MACtC,CAAC,CAAC,MAAM;QACN,IAAI,CAACJ,SAAS,EAAED,UAAU,CAAC,KAAK,CAAC;MACnC;IACF,CAAC,EAAE,CAAC;IAEJ,OAAO,MAAM;MACXC,SAAS,GAAG,IAAI;IAClB,CAAC;EACH,CAAC,EAAE,CAACH,OAAO,EAAEC,OAAO,CAAC,CAAC;EAEtB,OAAOA,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Call/Lobby/index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC,cAAc,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/Call/Lobby/index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,eAAe","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
import { CallingState, DebounceType, hasScreenShare, hasVideo } from '@stream-io/video-client';
|
|
5
|
-
import {
|
|
5
|
+
import { combineLatest, distinctUntilChanged, distinctUntilKeyChanged, filter, map } from 'rxjs';
|
|
6
6
|
/**
|
|
7
7
|
* This component is used to subscribe to the video + audio track of the participant in the following cases:
|
|
8
8
|
* 1. When the participant starts publishing the video track
|
|
@@ -14,16 +14,14 @@ import { BehaviorSubject, combineLatest, distinctUntilChanged, distinctUntilKeyC
|
|
|
14
14
|
* 1. When the participant stops publishing the video track
|
|
15
15
|
* 2. When the participant becomes invisible
|
|
16
16
|
*/
|
|
17
|
-
const TrackSubscriber =
|
|
17
|
+
const TrackSubscriber = props => {
|
|
18
18
|
const {
|
|
19
19
|
call,
|
|
20
20
|
participantSessionId,
|
|
21
21
|
trackType,
|
|
22
|
-
isVisible
|
|
22
|
+
isVisible,
|
|
23
|
+
dimensions$
|
|
23
24
|
} = props;
|
|
24
|
-
const dimensions$ = useMemo(() => {
|
|
25
|
-
return new BehaviorSubject(undefined);
|
|
26
|
-
}, []);
|
|
27
25
|
useEffect(() => {
|
|
28
26
|
const requestTrackWithDimensions = (debounceType, dimension) => {
|
|
29
27
|
if (dimension && (dimension.width === 0 || dimension.height === 0)) {
|
|
@@ -55,17 +53,8 @@ const TrackSubscriber = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
55
53
|
subscription.unsubscribe();
|
|
56
54
|
};
|
|
57
55
|
}, [call, participantSessionId, trackType, isVisible, dimensions$]);
|
|
58
|
-
useImperativeHandle(ref, () => ({
|
|
59
|
-
onLayoutUpdate: event => {
|
|
60
|
-
const dimension = {
|
|
61
|
-
width: Math.trunc(event.nativeEvent.layout.width),
|
|
62
|
-
height: Math.trunc(event.nativeEvent.layout.height)
|
|
63
|
-
};
|
|
64
|
-
dimensions$.next(dimension);
|
|
65
|
-
}
|
|
66
|
-
}), [dimensions$]);
|
|
67
56
|
return null;
|
|
68
|
-
}
|
|
57
|
+
};
|
|
69
58
|
TrackSubscriber.displayName = 'TrackSubscriber';
|
|
70
59
|
export default TrackSubscriber;
|
|
71
60
|
//# sourceMappingURL=TrackSubscriber.js.map
|
package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useEffect","CallingState","DebounceType","hasScreenShare","hasVideo","combineLatest","distinctUntilChanged","distinctUntilKeyChanged","filter","map","TrackSubscriber","props","call","participantSessionId","trackType","isVisible","dimensions$","requestTrackWithDimensions","debounceType","dimension","width","height","undefined","state","updateParticipantTracks","trackSubscriptionManager","apply","isPublishingTrack$","participants$","pipe","ps","find","p","sessionId","isJoinedState$","callingState$","callingState","JOINED","subscription","subscribe","isPublishing","isJoined","MEDIUM","IMMEDIATE","unsubscribe","displayName"],"sourceRoot":"../../../../../../src","sources":["components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAEEC,YAAY,EACZC,YAAY,EACZC,cAAc,EACdC,QAAQ,QAIH,yBAAyB;AAChC,SAEEC,aAAa,EACbC,oBAAoB,EACpBC,uBAAuB,EACvBC,MAAM,EACNC,GAAG,QACE,MAAM;AAcb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAIC,KAA2B,IAAK;EACvD,MAAM;IAAEC,IAAI;IAAEC,oBAAoB;IAAEC,SAAS;IAAEC,SAAS;IAAEC;EAAY,CAAC,GACrEL,KAAK;EAEPX,SAAS,CAAC,MAAM;IACd,MAAMiB,0BAA0B,GAAGA,CACjCC,YAA0B,EAC1BC,SAA+C,KAC5C;MACH,IAAIA,SAAS,KAAKA,SAAS,CAACC,KAAK,KAAK,CAAC,IAAID,SAAS,CAACE,MAAM,KAAK,CAAC,CAAC,EAAE;QAClE;QACA;QACA;QACA;QACAF,SAAS,GAAGG,SAAS;MACvB;MACAV,IAAI,CAACW,KAAK,CAACC,uBAAuB,CAACV,SAAS,EAAE;QAC5C,CAACD,oBAAoB,GAAG;UAAEM;QAAU;MACtC,CAAC,CAAC;MACFP,IAAI,CAACa,wBAAwB,CAACC,KAAK,CAACR,YAAY,CAAC;IACnD,CAAC;IACD,MAAMS,kBAAkB,GAAGf,IAAI,CAACW,KAAK,CAACK,aAAa,CAACC,IAAI,CACtDpB,GAAG,CAAEqB,EAAE,IAAKA,EAAE,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,SAAS,KAAKpB,oBAAoB,CAAC,CAAC,EACjEL,MAAM,CAAEwB,CAAC,IAAkC,CAAC,CAACA,CAAC,CAAC,EAC/CzB,uBAAuB,CAAC,iBAAiB,CAAC,EAC1CE,GAAG,CAAEuB,CAAC,IACJlB,SAAS,KAAK,YAAY,GAAGV,QAAQ,CAAC4B,CAAC,CAAC,GAAG7B,cAAc,CAAC6B,CAAC,CAC7D,CAAC,EACD1B,oBAAoB,CAAC,CACvB,CAAC;IACD,MAAM4B,cAAc,GAAGtB,IAAI,CAACW,KAAK,CAACY,aAAa,CAACN,IAAI,CAClDpB,GAAG,CAAE2B,YAAY,IAAKA,YAAY,KAAKnC,YAAY,CAACoC,MAAM,CAC5D,CAAC;IAED,MAAMC,YAAY,GAAGjC,aAAa,CAAC,CACjCW,WAAW,EACXW,kBAAkB,EAClBO,cAAc,CACf,CAAC,CAACK,SAAS,CAAC,CAAC,CAACpB,SAAS,EAAEqB,YAAY,EAAEC,QAAQ,CAAC,KAAK;MACpD,IAAIA,QAAQ,EAAE;QACZ,IAAI,CAAC1B,SAAS,IAAI,CAACyB,YAAY,EAAE;UAC/BvB,0BAA0B,CAACf,YAAY,CAACwC,MAAM,EAAEpB,SAAS,CAAC;QAC5D,CAAC,MAAM,IAAIH,SAAS,EAAE;UACpBF,0BAA0B,CAACf,YAAY,CAACyC,SAAS,EAAExB,SAAS,CAAC;QAC/D;MACF;IACF,CAAC,CAAC;IAEF,OAAO,MAAM;MACXmB,YAAY,CAACM,WAAW,CAAC,CAAC;IAC5B,CAAC;EACH,CAAC,EAAE,CAAChC,IAAI,EAAEC,oBAAoB,EAAEC,SAAS,EAAEC,SAAS,EAAEC,WAAW,CAAC,CAAC;EAEnE,OAAO,IAAI;AACb,CAAC;AAEDN,eAAe,CAACmC,WAAW,GAAG,iBAAiB;AAE/C,eAAenC,eAAe","ignoreList":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useEffect, useRef } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
4
4
|
import { Platform, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { RTCView } from '@stream-io/react-native-webrtc';
|
|
6
6
|
import { hasPausedTrack, hasScreenShare, hasVideo, VisibilityState } from '@stream-io/video-client';
|
|
7
7
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
8
|
+
import { BehaviorSubject } from 'rxjs';
|
|
8
9
|
import { ParticipantVideoFallback as DefaultParticipantVideoFallback } from '../ParticipantVideoFallback';
|
|
9
10
|
import { useTheme } from '../../../../contexts/ThemeContext';
|
|
10
11
|
import { useTrackDimensions } from '../../../../hooks/useTrackDimensions';
|
|
@@ -44,7 +45,9 @@ export const VideoRenderer = /*#__PURE__*/React.memo(({
|
|
|
44
45
|
useCameraState,
|
|
45
46
|
useIncomingVideoSettings
|
|
46
47
|
} = useCallStateHooks();
|
|
47
|
-
|
|
48
|
+
// a sticky note of the dimensions of the RTCView from onLayout
|
|
49
|
+
// to reuse for a new participant even if dimensions dont change
|
|
50
|
+
const dimensions$ = useMemo(() => new BehaviorSubject(undefined), []);
|
|
48
51
|
const {
|
|
49
52
|
isParticipantVideoEnabled
|
|
50
53
|
} = useIncomingVideoSettings();
|
|
@@ -130,17 +133,20 @@ export const VideoRenderer = /*#__PURE__*/React.memo(({
|
|
|
130
133
|
}
|
|
131
134
|
}, [sessionId, videoTrackVisibility, screenShareTrackVisibility, isVisible, call, trackType, isLocalParticipant]);
|
|
132
135
|
const onLayout = event => {
|
|
133
|
-
|
|
136
|
+
dimensions$.next({
|
|
137
|
+
width: Math.trunc(event.nativeEvent.layout.width),
|
|
138
|
+
height: Math.trunc(event.nativeEvent.layout.height)
|
|
139
|
+
});
|
|
134
140
|
};
|
|
135
141
|
return /*#__PURE__*/_jsxs(View, {
|
|
136
142
|
onLayout: onLayout,
|
|
137
143
|
style: [StyleSheet.absoluteFill, videoRenderer.container],
|
|
138
144
|
children: [call && !isLocalParticipant && /*#__PURE__*/_jsx(TrackSubscriber, {
|
|
139
|
-
ref: trackSubscriberRef,
|
|
140
145
|
call: call,
|
|
141
146
|
participantSessionId: sessionId,
|
|
142
147
|
trackType: trackType,
|
|
143
|
-
isVisible: isVisible
|
|
148
|
+
isVisible: isVisible,
|
|
149
|
+
dimensions$: dimensions$
|
|
144
150
|
}), canShowVideo && videoStreamToRender && (objectFit || isVideoDimensionsValid) ? /*#__PURE__*/_jsx(RTCView, {
|
|
145
151
|
style: [StyleSheet.absoluteFill, videoRenderer.videoStream],
|
|
146
152
|
streamURL: videoStreamToRender.toURL(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","Platform","StyleSheet","View","RTCView","hasPausedTrack","hasScreenShare","hasVideo","VisibilityState","useCall","useCallStateHooks","ParticipantVideoFallback","DefaultParticipantVideoFallback","useTheme","useTrackDimensions","useScreenshotIosContext","TrackSubscriber","jsx","_jsx","jsxs","_jsxs","DEFAULT_VIEWPORT_VISIBILITY_STATE","videoTrack","UNKNOWN","screenShareTrack","VideoRenderer","memo","trackType","participant","isVisible","objectFit","videoZOrder","mirror","mirrorOverride","theme","videoRenderer","call","useCameraState","useIncomingVideoSettings","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","useRef","Platform","StyleSheet","View","RTCView","hasPausedTrack","hasScreenShare","hasVideo","VisibilityState","useCall","useCallStateHooks","BehaviorSubject","ParticipantVideoFallback","DefaultParticipantVideoFallback","useTheme","useTrackDimensions","useScreenshotIosContext","TrackSubscriber","jsx","_jsx","jsxs","_jsxs","DEFAULT_VIEWPORT_VISIBILITY_STATE","videoTrack","UNKNOWN","screenShareTrack","VideoRenderer","memo","trackType","participant","isVisible","objectFit","videoZOrder","mirror","mirrorOverride","theme","videoRenderer","call","useCameraState","useIncomingVideoSettings","dimensions$","undefined","isParticipantVideoEnabled","direction","viewRef","register","registerIosScreenshot","deregister","deregisterIosScreenshot","videoDimensions","isVideoDimensionsValid","width","height","isLocalParticipant","sessionId","viewportVisibilityState","videoStream","screenShareStream","isScreenSharing","isPublishingVideoTrack","videoStreamToRender","hasVideoTrackInStream","getVideoTracks","length","canShowVideo","OS","videoTrackVisibility","screenShareTrackVisibility","VISIBLE","state","updateParticipant","p","INVISIBLE","onLayout","event","next","Math","trunc","nativeEvent","layout","style","absoluteFill","container","children","participantSessionId","streamURL","toURL","ref","zOrder","displayName"],"sourceRoot":"../../../../../../src","sources":["components/Participant/ParticipantView/VideoRenderer/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACzD,SAA4BC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE5E,SAASC,OAAO,QAAQ,gCAAgC;AAExD,SACEC,cAAc,EACdC,cAAc,EACdC,QAAQ,EAGRC,eAAe,QACV,yBAAyB;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SAASC,eAAe,QAAQ,MAAM;AACtC,SAASC,wBAAwB,IAAIC,+BAA+B,QAAQ,6BAA6B;AACzG,SAASC,QAAQ,QAAQ,mCAAmC;AAC5D,SAASC,kBAAkB,QAAQ,sCAAsC;AACzE,SAASC,uBAAuB,QAAQ,oDAAoD;AAC5F,OAAOC,eAAe,MAAM,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,MAAMC,iCAGL,GAAG;EACFC,UAAU,EAAEf,eAAe,CAACgB,OAAO;EACnCC,gBAAgB,EAAEjB,eAAe,CAACgB;AACpC,CAAU;;AAEV;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAAa,gBAAG7B,KAAK,CAAC8B,IAAI,CACrC,CAAC;EACCC,SAAS,GAAG,YAAY;EACxBC,WAAW;EACXC,SAAS,GAAG,IAAI;EAChBlB,wBAAwB,GAAGC,+BAA+B;EAC1DkB,SAAS;EACTC,WAAW,GAAG,CAAC;EACfC,MAAM,EAAEC;AACU,CAAC,KAAK;EACxB,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C5B,KAAK,CAAC;MACjDC,MAAM,EAAEwB,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,WAAW,CAACC,MAAM,CAAC3B,MAAM;IACpD,CAAC,CAAC;EACJ,CAAC;EAED,oBACE/B,KAAA,CAAClB,IAAI;IACHsE,QAAQ,EAAEA,QAAS;IACnBO,KAAK,EAAE,CAAC9E,UAAU,CAAC+E,YAAY,EAAE7C,aAAa,CAAC8C,SAAS,CAAE;IAAAC,QAAA,GAEzD9C,IAAI,IAAI,CAACgB,kBAAkB,iBAC1BlC,IAAA,CAACF,eAAe;MACdoB,IAAI,EAAEA,IAAK;MACX+C,oBAAoB,EAAE9B,SAAU;MAChC1B,SAAS,EAAEA,SAAU;MACrBE,SAAS,EAAEA,SAAU;MACrBU,WAAW,EAAEA;IAAY,CAC1B,CACF,EACAwB,YAAY,IACbJ,mBAAmB,KAClB7B,SAAS,IAAImB,sBAAsB,CAAC,gBACnC/B,IAAA,CAACf,OAAO;MACN4E,KAAK,EAAE,CAAC9E,UAAU,CAAC+E,YAAY,EAAE7C,aAAa,CAACoB,WAAW,CAAE;MAC5D6B,SAAS,EAAEzB,mBAAmB,CAAC0B,KAAK,CAAC,CAAE;MACvCrD,MAAM,EAAEA,MAAO;MACfsD,GAAG,EAAE3C,OAAQ;MACbb,SAAS,EACPA,SAAS,KACRkB,eAAe,CAACE,KAAK,GAAGF,eAAe,CAACG,MAAM,GAC3C,SAAS,GACT,OAAO,CACZ;MACDoC,MAAM,EAAExD;IAAY,CACrB,CAAC,GAEFpB,wBAAwB,iBACtBO,IAAA,CAACP,wBAAwB;MAACiB,WAAW,EAAEA;IAAY,CAAE,CAExD;EAAA,CACG,CAAC;AAEX,CACF,CAAC;AAEDH,aAAa,CAAC+D,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
|
|
4
|
-
import { getCallingxLibIfAvailable } from '../../utils/push/libs/callingx';
|
|
5
4
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
5
|
+
import { getCallingxLibIfAvailable } from '../../utils/push/libs';
|
|
6
6
|
const NativeManager = NativeModules.StreamInCallManager;
|
|
7
7
|
const CallingxModule = getCallingxLibIfAvailable();
|
|
8
8
|
const AUDIO_INTERRUPTION_EVENT = 'StreamInCallManagerAudioInterruption';
|
|
@@ -245,22 +245,30 @@ class SpeakerManager {
|
|
|
245
245
|
NativeManager.setForceSpeakerphoneOn(force);
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
const shouldBypassForCallKit = () => {
|
|
249
|
-
if (Platform.OS !== 'ios') {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
if (!CallingxModule) {
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
return CallingxModule.isSetup && (CallingxModule.hasRegisteredCall() || CallingxModule.isOngoingCallsEnabled);
|
|
256
|
-
};
|
|
257
248
|
export class CallManager {
|
|
258
249
|
audioDevices = new AudioDevicesManager();
|
|
259
250
|
ios = new IOSCallManager();
|
|
260
251
|
speaker = new SpeakerManager();
|
|
261
252
|
|
|
262
253
|
/**
|
|
263
|
-
*
|
|
254
|
+
* The audio config recorded via {@link start}. The SDK's internal call manager reads it at the
|
|
255
|
+
* next join-time start and applies it before the native audio manager is activated.
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The config recorded via {@link start}.
|
|
260
|
+
*
|
|
261
|
+
* @internal Read by the SDK's internal call manager at join; not intended for app use.
|
|
262
|
+
*/
|
|
263
|
+
getStoredConfig = () => this.storedConfig;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Records the desired audio config for the call.
|
|
267
|
+
*
|
|
268
|
+
* This does NOT start the native audio manager — the SDK owns native start/stop and applies this
|
|
269
|
+
* config at the next join-time start (before the audio manager is activated). Call it **before**
|
|
270
|
+
* joining. Calling it mid-call only updates the stored config; it does not change the running
|
|
271
|
+
* call's audio, and the new config takes effect on the next call/rejoin.
|
|
264
272
|
*
|
|
265
273
|
* @param config.audioRole The audio role to set. It can be one of the following:
|
|
266
274
|
* - `'communicator'`: (Default) For use cases like video or voice calls.
|
|
@@ -270,66 +278,41 @@ export class CallManager {
|
|
|
270
278
|
* It prioritizes high-quality stereo audio streaming.
|
|
271
279
|
* Audio routing is controlled by the OS, and manual switching is not supported.
|
|
272
280
|
*
|
|
273
|
-
* @param config.deviceEndpointType
|
|
274
|
-
*
|
|
281
|
+
* @param config.deviceEndpointType Overrides the default audio device endpoint. When omitted,
|
|
282
|
+
* the SDK uses the device derived from the call settings. It can be one of the following:
|
|
283
|
+
* - `'speaker'`: For normal video or voice calls.
|
|
275
284
|
* - `'earpiece'`: For voice-only mobile call type scenarios.
|
|
276
|
-
*
|
|
277
|
-
* @param config.enableStereoAudioOutput Whether to enable stereo audio output. Only supported for listener audio role.
|
|
278
285
|
*/
|
|
279
286
|
start = config => {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
safeNativeCall('setDefaultAudioDeviceEndpointType', () => NativeManager.setDefaultAudioDeviceEndpointType(type));
|
|
285
|
-
}
|
|
286
|
-
videoLoggerSystem.getLogger('CallManager').debug('start: skipping start as callkit is handling the audio session');
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (isAndroidTelecomManaged()) {
|
|
290
|
-
// Telecom owns routing/focus; forward the sticky preference to callingx and run in
|
|
291
|
-
// telecom-managed mode (StreamInCallManager keeps proximity/keep-screen-on only).
|
|
292
|
-
if (config?.audioRole !== 'listener' && CallingxModule) {
|
|
293
|
-
safeNativeCall('setDefaultAudioDeviceEndpointType (callingx)', () => CallingxModule.setDefaultAudioDeviceEndpointType(config?.deviceEndpointType ?? 'speaker'));
|
|
294
|
-
}
|
|
295
|
-
NativeManager.setTelecomManagedMode(true);
|
|
296
|
-
NativeManager.setAudioRole(config?.audioRole ?? 'communicator');
|
|
297
|
-
NativeManager.start();
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
if (Platform.OS === 'android') {
|
|
301
|
-
NativeManager.setTelecomManagedMode(false);
|
|
302
|
-
}
|
|
303
|
-
NativeManager.setAudioRole(config?.audioRole ?? 'communicator');
|
|
304
|
-
if (config?.audioRole === 'communicator') {
|
|
305
|
-
const type = config.deviceEndpointType ?? 'speaker';
|
|
306
|
-
NativeManager.setDefaultAudioDeviceEndpointType(type);
|
|
307
|
-
}
|
|
308
|
-
if (config?.audioRole === 'listener' && config.enableStereoAudioOutput) {
|
|
309
|
-
NativeManager.setEnableStereoAudioOutput(true);
|
|
310
|
-
}
|
|
311
|
-
NativeManager.start();
|
|
287
|
+
this.storedConfig = config;
|
|
288
|
+
videoLoggerSystem.getLogger('CallManager').debug('start: stored call manager config', {
|
|
289
|
+
config
|
|
290
|
+
});
|
|
312
291
|
};
|
|
313
292
|
|
|
314
293
|
/**
|
|
315
|
-
*
|
|
294
|
+
* Clears the stored audio config.
|
|
316
295
|
*/
|
|
317
296
|
stop = () => {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
NativeManager.stop();
|
|
297
|
+
this.storedConfig = undefined;
|
|
298
|
+
videoLoggerSystem.getLogger('CallManager').debug('[public] stop(): cleared stored config');
|
|
323
299
|
};
|
|
324
300
|
|
|
325
301
|
/**
|
|
326
302
|
* For debugging purposes, will emit a log event with the current audio state.
|
|
327
303
|
* in the native layer.
|
|
304
|
+
*
|
|
305
|
+
* NOTE: This method might be called outside of the call JOIN/LEFT window,
|
|
306
|
+
* so it may lead to default peer connection factory and adm being created.
|
|
328
307
|
*/
|
|
329
308
|
logAudioState = () => NativeManager.logAudioState();
|
|
330
309
|
|
|
331
310
|
/**
|
|
332
311
|
* For debugging purposes, returns the current audio state as a string.
|
|
312
|
+
*
|
|
313
|
+
* NOTE: This method might be called outside of the call JOIN/LEFT window,
|
|
314
|
+
* so it may lead to default peer connection factory and adm being created.
|
|
315
|
+
*
|
|
333
316
|
* @returns A string containing the current audio state information.
|
|
334
317
|
*/
|
|
335
318
|
getAudioStateLog = () => NativeManager.getAudioStateLog();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","videoLoggerSystem","getCallingxLibIfAvailable","NativeManager","StreamInCallManager","CallingxModule","AUDIO_INTERRUPTION_EVENT","AUDIO_DEVICE_CHANGED_EVENT","invariant","condition","message","Error","safeNativeCall","label","fn","error","getLogger","warn","isAndroidTelecomManaged","OS","isSetup","isTelecomBacked","hasRegisteredCall","isOngoingCallsEnabled","getTelecomContext","undefined","callId","getRegisteredCallIds","cx","endpointTypeToDisplayName","type","snapshotToState","snapshot","devices","endpoints","map","e","id","name","selectedDeviceId","currentEndpoint","currentEndpointType","AudioDevicesManager","interruptionReassertSetup","ensureInterruptionReassert","addEventListener","event","phase","reapplyAudioRoute","getStatus","tc","getAvailableAudioEndpoints","getAudioDeviceStatus","select","deviceId","requestAudioEndpointChange","catch","chooseAudioDeviceEndpoint","addChangeListener","onChange","active","unsubscribes","cxSub","then","state","push","remove","eventEmitter","sdkSub","addListener","forEach","unsubscribe","IOSCallManager","showDeviceSelector","showAudioRoutePicker","addAudioInterruptionListener","onInterruption","s","SpeakerManager","setMute","mute","muteAudioOutput","unmuteAudioOutput","setForceSpeakerphoneOn","force","target","find","CallManager","audioDevices","ios","speaker","getStoredConfig","storedConfig","start","config","debug","stop","logAudioState","getAudioStateLog"],"sourceRoot":"../../../../src","sources":["modules/call-manager/CallManager.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAW1E,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,yBAAyB,QAAQ,uBAAuB;AAEjE,MAAMC,aAAa,GAAGJ,aAAa,CAACK,m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