@stream-io/video-react-native-sdk 0.0.1-alpha.316 → 0.0.1-alpha.318
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 +18 -0
- package/dist/src/components/call/internal/CallParticipantsSpotlightView.js +6 -0
- package/dist/src/components/call/internal/CallParticipantsSpotlightView.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/src/components/call/internal/CallParticipantsSpotlightView.tsx +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.1-alpha.318](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.317...@stream-io/video-react-native-sdk-0.0.1-alpha.318) (2023-07-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **react-native:** CallContentView UI when there is no remote participants in spotlight mode ([#818](https://github.com/GetStream/stream-video-js/issues/818)) ([f64f9a0](https://github.com/GetStream/stream-video-js/commit/f64f9a0789df8040e72921ad85cb165350c96d36))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.0.1-alpha.317](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.316...@stream-io/video-react-native-sdk-0.0.1-alpha.317) (2023-07-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **react-native:** add/improve existing deep linking guide ([#796](https://github.com/GetStream/stream-video-js/issues/796)) ([467ba23](https://github.com/GetStream/stream-video-js/commit/467ba233c02e8f6cdef0bff88e887506a1909275))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
## [0.0.1-alpha.316](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.315...@stream-io/video-react-native-sdk-0.0.1-alpha.316) (2023-07-19)
|
|
6
24
|
|
|
7
25
|
|
|
@@ -13,14 +13,20 @@ const theme_1 = require("../../../theme");
|
|
|
13
13
|
const useDebouncedValue_1 = require("../../../utils/hooks/useDebouncedValue");
|
|
14
14
|
const A11yLabels_1 = require("../../../constants/A11yLabels");
|
|
15
15
|
const CallParticipantsListView_1 = require("../../call/CallParticipantsListView");
|
|
16
|
+
const participants_1 = require("../../participants");
|
|
16
17
|
const hasScreenShare = (p) => p.publishedTracks.includes(video_client_1.SfuModels.TrackType.SCREEN_SHARE);
|
|
17
18
|
const CallParticipantsSpotlightView = () => {
|
|
18
19
|
const _allParticipants = (0, video_react_bindings_1.useParticipants)({
|
|
19
20
|
sortBy: video_client_1.speakerLayoutSortPreset,
|
|
20
21
|
});
|
|
22
|
+
const _remoteParticipants = (0, video_react_bindings_1.useRemoteParticipants)();
|
|
21
23
|
const allParticipants = (0, useDebouncedValue_1.useDebouncedValue)(_allParticipants, 300); // we debounce the participants to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
|
|
22
24
|
const [participantInSpotlight, ...otherParticipants] = allParticipants;
|
|
23
25
|
const isScreenShareOnSpotlight = hasScreenShare(participantInSpotlight);
|
|
26
|
+
const isUserAloneInCall = _remoteParticipants?.length === 0;
|
|
27
|
+
if (isUserAloneInCall) {
|
|
28
|
+
return <participants_1.LocalParticipantView layout={'fullscreen'}/>;
|
|
29
|
+
}
|
|
24
30
|
return (<react_native_1.View accessibilityLabel={A11yLabels_1.A11yComponents.CALL_PARTICIPANTS_SPOTLIGHT_VIEW} style={styles.container}>
|
|
25
31
|
{participantInSpotlight && (<ParticipantView_1.ParticipantView participant={participantInSpotlight} containerStyle={styles.participantView} kind={isScreenShareOnSpotlight ? 'screen' : 'video'}/>)}
|
|
26
32
|
<react_native_1.View style={styles.participantVideoContainer}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallParticipantsSpotlightView.js","sourceRoot":"","sources":["../../../../../src/components/call/internal/CallParticipantsSpotlightView.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,0DAIiC;AACjC,
|
|
1
|
+
{"version":3,"file":"CallParticipantsSpotlightView.js","sourceRoot":"","sources":["../../../../../src/components/call/internal/CallParticipantsSpotlightView.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,0DAIiC;AACjC,0EAGyC;AACzC,+CAAgD;AAChD,wEAAqE;AACrE,0CAAuC;AACvC,8EAA2E;AAC3E,8DAA+D;AAC/D,kFAA+E;AAC/E,qDAA0D;AAE1D,MAAM,cAAc,GAAG,CAAC,CAAyB,EAAE,EAAE,CACnD,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,wBAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AAExD,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,MAAM,gBAAgB,GAAG,IAAA,sCAAe,EAAC;QACvC,MAAM,EAAE,sCAAuB;KAChC,CAAC,CAAC;IACH,MAAM,mBAAmB,GAAG,IAAA,4CAAqB,GAAE,CAAC;IACpD,MAAM,eAAe,GAAG,IAAA,qCAAiB,EAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,oIAAoI;IACtM,MAAM,CAAC,sBAAsB,EAAE,GAAG,iBAAiB,CAAC,GAAG,eAAe,CAAC;IACvE,MAAM,wBAAwB,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;IACxE,MAAM,iBAAiB,GAAG,mBAAmB,EAAE,MAAM,KAAK,CAAC,CAAC;IAE5D,IAAI,iBAAiB,EAAE;QACrB,OAAO,CAAC,mCAAoB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAG,CAAC;KACvD;IAED,OAAO,CACL,CAAC,mBAAI,CACH,kBAAkB,CAAC,CAAC,2BAAc,CAAC,gCAAgC,CAAC,CACpE,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAExB;MAAA,CAAC,sBAAsB,IAAI,CACzB,CAAC,iCAAe,CACd,WAAW,CAAC,CAAC,sBAAsB,CAAC,CACpC,cAAc,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CACvC,IAAI,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,EACpD,CACH,CACD;MAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAC5C;QAAA,CAAC,mDAAwB,CACvB,YAAY,CAAC,CACX,wBAAwB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAC/D,CACD,UAAU,EAEd;MAAA,EAAE,mBAAI,CACR;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,6BAA6B,iCAoCxC;AAEF,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACtB,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;QAC9B,gBAAgB,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;KACnC;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;KAClC;CACF,CAAC,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.1-alpha.
|
|
1
|
+
export declare const version = "0.0.1-alpha.318";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.318",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@stream-io/i18n": "^0.1.1",
|
|
27
|
-
"@stream-io/video-client": "^0.1.
|
|
28
|
-
"@stream-io/video-react-bindings": "^0.1.
|
|
27
|
+
"@stream-io/video-client": "^0.1.2",
|
|
28
|
+
"@stream-io/video-react-bindings": "^0.1.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@notifee/react-native": ">=7.7.0",
|
|
@@ -4,13 +4,17 @@ import {
|
|
|
4
4
|
StreamVideoParticipant,
|
|
5
5
|
speakerLayoutSortPreset,
|
|
6
6
|
} from '@stream-io/video-client';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
useParticipants,
|
|
9
|
+
useRemoteParticipants,
|
|
10
|
+
} from '@stream-io/video-react-bindings';
|
|
8
11
|
import { StyleSheet, View } from 'react-native';
|
|
9
12
|
import { ParticipantView } from '../../participants/ParticipantView';
|
|
10
13
|
import { theme } from '../../../theme';
|
|
11
14
|
import { useDebouncedValue } from '../../../utils/hooks/useDebouncedValue';
|
|
12
15
|
import { A11yComponents } from '../../../constants/A11yLabels';
|
|
13
16
|
import { CallParticipantsListView } from '../../call/CallParticipantsListView';
|
|
17
|
+
import { LocalParticipantView } from '../../participants';
|
|
14
18
|
|
|
15
19
|
const hasScreenShare = (p: StreamVideoParticipant) =>
|
|
16
20
|
p.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE);
|
|
@@ -19,9 +23,15 @@ export const CallParticipantsSpotlightView = () => {
|
|
|
19
23
|
const _allParticipants = useParticipants({
|
|
20
24
|
sortBy: speakerLayoutSortPreset,
|
|
21
25
|
});
|
|
26
|
+
const _remoteParticipants = useRemoteParticipants();
|
|
22
27
|
const allParticipants = useDebouncedValue(_allParticipants, 300); // we debounce the participants to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
|
|
23
28
|
const [participantInSpotlight, ...otherParticipants] = allParticipants;
|
|
24
29
|
const isScreenShareOnSpotlight = hasScreenShare(participantInSpotlight);
|
|
30
|
+
const isUserAloneInCall = _remoteParticipants?.length === 0;
|
|
31
|
+
|
|
32
|
+
if (isUserAloneInCall) {
|
|
33
|
+
return <LocalParticipantView layout={'fullscreen'} />;
|
|
34
|
+
}
|
|
25
35
|
|
|
26
36
|
return (
|
|
27
37
|
<View
|