@stream-io/video-react-native-sdk 0.0.26 → 0.0.28
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 +13 -0
- package/dist/commonjs/components/Call/CallContent/CallContent.js +10 -3
- package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/CallControls.js +8 -4
- package/dist/commonjs/components/Call/CallControls/CallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +8 -3
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +15 -8
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js +9 -2
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/commonjs/components/Call/CallTopView/CallTopView.js +5 -2
- package/dist/commonjs/components/Call/CallTopView/CallTopView.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js +4 -2
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js +2 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js +2 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js +10 -3
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallControls/CallControls.js +8 -4
- package/dist/module/components/Call/CallControls/CallControls.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +8 -3
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +15 -8
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js +9 -2
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/module/components/Call/CallTopView/CallTopView.js +5 -2
- package/dist/module/components/Call/CallTopView/CallTopView.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js +4 -2
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/index.js +2 -1
- package/dist/module/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js +2 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts +6 -1
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/CallControls.d.ts +6 -1
- package/dist/typescript/components/Call/CallControls/CallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts +6 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts +6 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts +6 -1
- package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallTopView/CallTopView.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts +5 -0
- package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/Call/CallContent/CallContent.tsx +18 -3
- package/src/components/Call/CallControls/CallControls.tsx +14 -4
- package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +12 -1
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +20 -4
- package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +13 -1
- package/src/components/Call/CallTopView/CallTopView.tsx +4 -2
- package/src/components/Call/RingingCallContent/RingingCallContent.tsx +11 -1
- package/src/components/Participant/FloatingParticipantView/index.tsx +1 -0
- package/src/components/Participant/ParticipantView/ParticipantView.tsx +2 -1
- package/src/version.ts +1 -1
|
@@ -8,10 +8,15 @@ export type CallParticipantsSpotlightProps = CallParticipantsListComponentProps
|
|
|
8
8
|
* Component to customize the CallParticipantsList.
|
|
9
9
|
*/
|
|
10
10
|
CallParticipantsList?: React.ComponentType<CallParticipantsListProps> | null;
|
|
11
|
+
/**
|
|
12
|
+
* Check if device is in landscape mode.
|
|
13
|
+
* This will apply the landscape mode styles to the component.
|
|
14
|
+
*/
|
|
15
|
+
landscape?: boolean;
|
|
11
16
|
};
|
|
12
17
|
/**
|
|
13
18
|
* Component used to display the list of participants in a spotlight mode.
|
|
14
19
|
* This can be used when you want to render the screen sharing stream.
|
|
15
20
|
*/
|
|
16
|
-
export declare const CallParticipantsSpotlight: ({ CallParticipantsList, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, ParticipantView, VideoRenderer, }: CallParticipantsSpotlightProps) => JSX.Element;
|
|
21
|
+
export declare const CallParticipantsSpotlight: ({ CallParticipantsList, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, ParticipantView, VideoRenderer, landscape, }: CallParticipantsSpotlightProps) => JSX.Element;
|
|
17
22
|
//# sourceMappingURL=CallParticipantsSpotlight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallParticipantsSpotlight.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallLayout/CallParticipantsSpotlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAEL,kCAAkC,EAClC,yBAAyB,EAC1B,MAAM,8CAA8C,CAAC;AAOtD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACxC,kCAAkC,GAAG;IACnC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"CallParticipantsSpotlight.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallLayout/CallParticipantsSpotlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAEL,kCAAkC,EAClC,yBAAyB,EAC1B,MAAM,8CAA8C,CAAC;AAOtD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACxC,kCAAkC,GAAG;IACnC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC;IAC7E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAKJ;;;GAGG;AACH,eAAO,MAAM,yBAAyB,8KASnC,8BAA8B,gBAyFhC,CAAC"}
|
|
@@ -24,6 +24,11 @@ export type CallParticipantsListProps = CallParticipantsListComponentProps & {
|
|
|
24
24
|
* If true, the list will be displayed in horizontal scrolling mode
|
|
25
25
|
*/
|
|
26
26
|
horizontal?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Check if phone is in landscape mode.
|
|
29
|
+
* This will apply the landscape mode styles to the component.
|
|
30
|
+
*/
|
|
31
|
+
landscape?: boolean;
|
|
27
32
|
};
|
|
28
33
|
/**
|
|
29
34
|
* This component displays a list of participants in a FlatList.
|
|
@@ -31,5 +36,5 @@ export type CallParticipantsListProps = CallParticipantsListComponentProps & {
|
|
|
31
36
|
* NOTE: this component depends on a flex container to calculate the width and height of the participant view,
|
|
32
37
|
* hence it should be used only in a flex parent container
|
|
33
38
|
*/
|
|
34
|
-
export declare const CallParticipantsList: ({ numberOfColumns, horizontal, participants, ParticipantView, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, VideoRenderer, }: CallParticipantsListProps) => JSX.Element;
|
|
39
|
+
export declare const CallParticipantsList: ({ numberOfColumns, horizontal, participants, ParticipantView, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, VideoRenderer, landscape, }: CallParticipantsListProps) => JSX.Element;
|
|
35
40
|
//# sourceMappingURL=CallParticipantsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallParticipantsList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallParticipantsList/CallParticipantsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EAGvB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAEL,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,mCAAmC,CAAC;AAW3C,MAAM,MAAM,kCAAkC,GAC5C,6BAA6B,GAAG;IAC9B;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;CACpE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kCAAkC,GAAG;IAC3E;;OAEG;IACH,YAAY,EAAE,CAAC,sBAAsB,GAAG,2BAA2B,CAAC,EAAE,CAAC;IACvE;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CallParticipantsList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallParticipantsList/CallParticipantsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EAGvB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAEL,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,mCAAmC,CAAC;AAW3C,MAAM,MAAM,kCAAkC,GAC5C,6BAA6B,GAAG;IAC9B;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;CACpE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kCAAkC,GAAG;IAC3E;;OAEG;IACH,YAAY,EAAE,CAAC,sBAAsB,GAAG,2BAA2B,CAAC,EAAE,CAAC;IACvE;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,mMAW9B,yBAAyB,gBAqK3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallTopView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallTopView/CallTopView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AAOjC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC;CAChF,CAAC;AAEF,eAAO,MAAM,WAAW,+FAMrB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"CallTopView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallTopView/CallTopView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AAOjC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC;CAChF,CAAC;AAEF,eAAO,MAAM,WAAW,+FAMrB,gBAAgB,gBAmFlB,CAAC"}
|
|
@@ -27,6 +27,11 @@ export type RingingCallContentProps = {
|
|
|
27
27
|
* Prop to customize the JoiningCallIndicator component in the RingingCallContent. It is shown when the call is accepted and is waiting to be joined.
|
|
28
28
|
*/
|
|
29
29
|
JoiningCallIndicator?: React.ComponentType | null;
|
|
30
|
+
/**
|
|
31
|
+
* Check if device is in landscape mode.
|
|
32
|
+
* This will apply the landscape mode styles to the component.
|
|
33
|
+
*/
|
|
34
|
+
landscape?: boolean;
|
|
30
35
|
};
|
|
31
36
|
/**
|
|
32
37
|
* Component to show the Incoming, Outgoing and CalContent component depending upon the Call states when the call is in ringing mode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RingingCallContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/RingingCallContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAEL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAIxB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAC3D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAC3D;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"RingingCallContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/RingingCallContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAEL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAIxB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAC3D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAC3D;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;IAClD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAkCF;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,gBAShE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.28";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@stream-io/i18n": "^0.1.2",
|
|
49
|
-
"@stream-io/video-client": "^0.3.
|
|
50
|
-
"@stream-io/video-react-bindings": "^0.2.
|
|
49
|
+
"@stream-io/video-client": "^0.3.28",
|
|
50
|
+
"@stream-io/video-react-bindings": "^0.2.29",
|
|
51
51
|
"intl-pluralrules": "2.0.1",
|
|
52
52
|
"lodash.merge": "^4.6.2",
|
|
53
53
|
"react-native-url-polyfill": "1.3.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
CallTopView as DefaultCallTopView,
|
|
5
5
|
CallTopViewProps,
|
|
@@ -60,6 +60,11 @@ export type CallContentProps = Pick<CallControlProps, 'onHangupCallHandler'> &
|
|
|
60
60
|
* This switches the participant's layout between the grid and the spotlight mode.
|
|
61
61
|
*/
|
|
62
62
|
layout?: 'grid' | 'spotlight';
|
|
63
|
+
/**
|
|
64
|
+
* Check if device is in landscape mode.
|
|
65
|
+
* This will apply the landscape mode styles to the component.
|
|
66
|
+
*/
|
|
67
|
+
landscape?: boolean;
|
|
63
68
|
};
|
|
64
69
|
|
|
65
70
|
export const CallContent = ({
|
|
@@ -78,6 +83,7 @@ export const CallContent = ({
|
|
|
78
83
|
ParticipantsInfoBadge,
|
|
79
84
|
VideoRenderer,
|
|
80
85
|
layout = 'grid',
|
|
86
|
+
landscape = true,
|
|
81
87
|
}: CallContentProps) => {
|
|
82
88
|
const [
|
|
83
89
|
showRemoteParticipantInFloatingView,
|
|
@@ -140,6 +146,7 @@ export const CallContent = ({
|
|
|
140
146
|
|
|
141
147
|
const callParticipantsGridProps: CallParticipantsGridProps = {
|
|
142
148
|
...participantViewProps,
|
|
149
|
+
landscape,
|
|
143
150
|
showLocalParticipant: isRemoteParticipantInFloatingView,
|
|
144
151
|
ParticipantView,
|
|
145
152
|
CallParticipantsList,
|
|
@@ -147,12 +154,17 @@ export const CallContent = ({
|
|
|
147
154
|
|
|
148
155
|
const callParticipantsSpotlightProps: CallParticipantsSpotlightProps = {
|
|
149
156
|
...participantViewProps,
|
|
157
|
+
landscape,
|
|
150
158
|
ParticipantView,
|
|
151
159
|
CallParticipantsList,
|
|
152
160
|
};
|
|
153
161
|
|
|
162
|
+
const landScapeStyles: ViewStyle = {
|
|
163
|
+
flexDirection: landscape ? 'row' : 'column',
|
|
164
|
+
};
|
|
165
|
+
|
|
154
166
|
return (
|
|
155
|
-
<View style={[styles.container, callContent.container]}>
|
|
167
|
+
<View style={[styles.container, callContent.container, landScapeStyles]}>
|
|
156
168
|
<View style={[styles.container, callContent.callParticipantsContainer]}>
|
|
157
169
|
<View
|
|
158
170
|
style={[styles.view, callContent.topContainer]}
|
|
@@ -187,7 +199,10 @@ export const CallContent = ({
|
|
|
187
199
|
</View>
|
|
188
200
|
|
|
189
201
|
{CallControls && (
|
|
190
|
-
<CallControls
|
|
202
|
+
<CallControls
|
|
203
|
+
onHangupCallHandler={onHangupCallHandler}
|
|
204
|
+
landscape={landscape}
|
|
205
|
+
/>
|
|
191
206
|
)}
|
|
192
207
|
</View>
|
|
193
208
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StyleSheet, View, ViewProps } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, ViewProps, ViewStyle } from 'react-native';
|
|
3
3
|
import { ToggleAudioPublishingButton } from './ToggleAudioPublishingButton';
|
|
4
4
|
import { ToggleVideoPublishingButton } from './ToggleVideoPublishingButton';
|
|
5
5
|
import { ToggleCameraFaceButton } from './ToggleCameraFaceButton';
|
|
@@ -16,6 +16,11 @@ export type CallControlProps = Pick<ViewProps, 'style'> & {
|
|
|
16
16
|
* @returns void
|
|
17
17
|
*/
|
|
18
18
|
onHangupCallHandler?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Check if device is in landscape mode.
|
|
21
|
+
* This will apply the landscape mode styles to the component.
|
|
22
|
+
*/
|
|
23
|
+
landscape?: boolean;
|
|
19
24
|
};
|
|
20
25
|
|
|
21
26
|
/**
|
|
@@ -25,17 +30,24 @@ export type CallControlProps = Pick<ViewProps, 'style'> & {
|
|
|
25
30
|
export const CallControls = ({
|
|
26
31
|
style,
|
|
27
32
|
onHangupCallHandler,
|
|
33
|
+
landscape,
|
|
28
34
|
}: CallControlProps) => {
|
|
29
35
|
const {
|
|
30
36
|
theme: { colors, callControls },
|
|
31
37
|
} = useTheme();
|
|
38
|
+
const landScapeStyles: ViewStyle = {
|
|
39
|
+
flexDirection: landscape ? 'column-reverse' : 'row',
|
|
40
|
+
paddingHorizontal: landscape ? 12 : 0,
|
|
41
|
+
paddingVertical: landscape ? 0 : 12,
|
|
42
|
+
};
|
|
32
43
|
return (
|
|
33
44
|
<View
|
|
34
45
|
style={[
|
|
35
46
|
styles.container,
|
|
36
47
|
{ backgroundColor: colors.static_grey },
|
|
37
|
-
style,
|
|
38
48
|
callControls.container,
|
|
49
|
+
landScapeStyles,
|
|
50
|
+
style,
|
|
39
51
|
]}
|
|
40
52
|
>
|
|
41
53
|
<ToggleVideoPublishingButton />
|
|
@@ -48,8 +60,6 @@ export const CallControls = ({
|
|
|
48
60
|
|
|
49
61
|
const styles = StyleSheet.create({
|
|
50
62
|
container: {
|
|
51
|
-
paddingVertical: 12,
|
|
52
|
-
flexDirection: 'row',
|
|
53
63
|
justifyContent: 'space-evenly',
|
|
54
64
|
zIndex: Z_INDEX.IN_FRONT,
|
|
55
65
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
3
|
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
4
4
|
import { useDebouncedValue } from '../../../utils/hooks/useDebouncedValue';
|
|
5
5
|
import {
|
|
@@ -22,6 +22,11 @@ export type CallParticipantsGridProps = CallParticipantsListComponentProps & {
|
|
|
22
22
|
* Boolean to decide if local participant will be visible in the grid when there is 1:1 call.
|
|
23
23
|
*/
|
|
24
24
|
showLocalParticipant?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Check if device is in landscape mode.
|
|
27
|
+
* This will apply the landscape mode styles to the component.
|
|
28
|
+
*/
|
|
29
|
+
landscape?: boolean;
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
/**
|
|
@@ -36,6 +41,7 @@ export const CallParticipantsGrid = ({
|
|
|
36
41
|
ParticipantView,
|
|
37
42
|
VideoRenderer,
|
|
38
43
|
showLocalParticipant = false,
|
|
44
|
+
landscape,
|
|
39
45
|
}: CallParticipantsGridProps) => {
|
|
40
46
|
const {
|
|
41
47
|
theme: { colors, callParticipantsGrid },
|
|
@@ -48,6 +54,9 @@ export const CallParticipantsGrid = ({
|
|
|
48
54
|
// we debounce the participants arrays to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
|
|
49
55
|
const remoteParticipants = useDebouncedValue(_remoteParticipants, 300);
|
|
50
56
|
const allParticipants = useDebouncedValue(_allParticipants, 300);
|
|
57
|
+
const landScapeStyles: ViewStyle = {
|
|
58
|
+
flexDirection: landscape ? 'row' : 'column',
|
|
59
|
+
};
|
|
51
60
|
|
|
52
61
|
const showFloatingView =
|
|
53
62
|
remoteParticipants.length > 0 && remoteParticipants.length < 3;
|
|
@@ -71,6 +80,7 @@ export const CallParticipantsGrid = ({
|
|
|
71
80
|
<View
|
|
72
81
|
style={[
|
|
73
82
|
styles.container,
|
|
83
|
+
landScapeStyles,
|
|
74
84
|
{ backgroundColor: colors.dark_gray },
|
|
75
85
|
callParticipantsGrid.container,
|
|
76
86
|
]}
|
|
@@ -79,6 +89,7 @@ export const CallParticipantsGrid = ({
|
|
|
79
89
|
{CallParticipantsList && (
|
|
80
90
|
<CallParticipantsList
|
|
81
91
|
participants={participants}
|
|
92
|
+
landscape={landscape}
|
|
82
93
|
{...participantViewProps}
|
|
83
94
|
/>
|
|
84
95
|
)}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
StreamVideoParticipant,
|
|
6
6
|
} from '@stream-io/video-client';
|
|
7
7
|
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
8
|
-
import { StyleSheet, View } from 'react-native';
|
|
8
|
+
import { StyleSheet, View, ViewStyle } from 'react-native';
|
|
9
9
|
import { useDebouncedValue } from '../../../utils/hooks/useDebouncedValue';
|
|
10
10
|
import { ComponentTestIds } from '../../../constants/TestIds';
|
|
11
11
|
import {
|
|
@@ -28,6 +28,11 @@ export type CallParticipantsSpotlightProps =
|
|
|
28
28
|
* Component to customize the CallParticipantsList.
|
|
29
29
|
*/
|
|
30
30
|
CallParticipantsList?: React.ComponentType<CallParticipantsListProps> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Check if device is in landscape mode.
|
|
33
|
+
* This will apply the landscape mode styles to the component.
|
|
34
|
+
*/
|
|
35
|
+
landscape?: boolean;
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
const hasScreenShare = (p: StreamVideoParticipant) =>
|
|
@@ -45,6 +50,7 @@ export const CallParticipantsSpotlight = ({
|
|
|
45
50
|
ParticipantVideoFallback,
|
|
46
51
|
ParticipantView = DefaultParticipantView,
|
|
47
52
|
VideoRenderer,
|
|
53
|
+
landscape,
|
|
48
54
|
}: CallParticipantsSpotlightProps) => {
|
|
49
55
|
const {
|
|
50
56
|
theme: { colors, callParticipantsSpotlight },
|
|
@@ -71,11 +77,20 @@ export const CallParticipantsSpotlight = ({
|
|
|
71
77
|
ParticipantView,
|
|
72
78
|
};
|
|
73
79
|
|
|
80
|
+
const landScapeStyles: ViewStyle = {
|
|
81
|
+
flexDirection: landscape ? 'row' : 'column',
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const spotlightContainerLandscapeStyles: ViewStyle = {
|
|
85
|
+
marginHorizontal: landscape ? 0 : 8,
|
|
86
|
+
};
|
|
87
|
+
|
|
74
88
|
return (
|
|
75
89
|
<View
|
|
76
90
|
testID={ComponentTestIds.CALL_PARTICIPANTS_SPOTLIGHT}
|
|
77
91
|
style={[
|
|
78
92
|
styles.container,
|
|
93
|
+
landScapeStyles,
|
|
79
94
|
{
|
|
80
95
|
backgroundColor: colors.dark_gray,
|
|
81
96
|
},
|
|
@@ -93,6 +108,7 @@ export const CallParticipantsSpotlight = ({
|
|
|
93
108
|
]
|
|
94
109
|
: [
|
|
95
110
|
styles.spotlightContainer,
|
|
111
|
+
spotlightContainerLandscapeStyles,
|
|
96
112
|
callParticipantsSpotlight.spotlightContainer,
|
|
97
113
|
]
|
|
98
114
|
}
|
|
@@ -114,7 +130,9 @@ export const CallParticipantsSpotlight = ({
|
|
|
114
130
|
participants={
|
|
115
131
|
isScreenShareOnSpotlight ? allParticipants : otherParticipants
|
|
116
132
|
}
|
|
117
|
-
horizontal
|
|
133
|
+
horizontal={!landscape}
|
|
134
|
+
numberOfColumns={!landscape ? 2 : 1}
|
|
135
|
+
landscape={landscape}
|
|
118
136
|
{...callParticipantsListProps}
|
|
119
137
|
/>
|
|
120
138
|
)}
|
|
@@ -127,7 +145,6 @@ export const CallParticipantsSpotlight = ({
|
|
|
127
145
|
const styles = StyleSheet.create({
|
|
128
146
|
container: {
|
|
129
147
|
flex: 1,
|
|
130
|
-
paddingVertical: 8,
|
|
131
148
|
},
|
|
132
149
|
fullScreenSpotlightContainer: {
|
|
133
150
|
flex: 1,
|
|
@@ -137,7 +154,6 @@ const styles = StyleSheet.create({
|
|
|
137
154
|
overflow: 'hidden',
|
|
138
155
|
borderRadius: 10,
|
|
139
156
|
marginHorizontal: 8,
|
|
140
|
-
marginBottom: 8,
|
|
141
157
|
},
|
|
142
158
|
callParticipantsListContainer: {
|
|
143
159
|
flex: 1,
|
|
@@ -56,6 +56,11 @@ export type CallParticipantsListProps = CallParticipantsListComponentProps & {
|
|
|
56
56
|
* If true, the list will be displayed in horizontal scrolling mode
|
|
57
57
|
*/
|
|
58
58
|
horizontal?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Check if phone is in landscape mode.
|
|
61
|
+
* This will apply the landscape mode styles to the component.
|
|
62
|
+
*/
|
|
63
|
+
landscape?: boolean;
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
/**
|
|
@@ -74,6 +79,7 @@ export const CallParticipantsList = ({
|
|
|
74
79
|
ParticipantReaction,
|
|
75
80
|
ParticipantVideoFallback,
|
|
76
81
|
VideoRenderer,
|
|
82
|
+
landscape,
|
|
77
83
|
}: CallParticipantsListProps) => {
|
|
78
84
|
const [containerLayout, setContainerLayout] = useState({
|
|
79
85
|
width: 0,
|
|
@@ -162,8 +168,11 @@ export const CallParticipantsList = ({
|
|
|
162
168
|
if (horizontal) {
|
|
163
169
|
return [styles.participantWrapperHorizontal, style];
|
|
164
170
|
}
|
|
171
|
+
if (landscape) {
|
|
172
|
+
return [styles.landScapeStyle, style];
|
|
173
|
+
}
|
|
165
174
|
return style;
|
|
166
|
-
}, [itemWidth, itemHeight, horizontal]);
|
|
175
|
+
}, [itemWidth, itemHeight, horizontal, landscape]);
|
|
167
176
|
|
|
168
177
|
const participantProps: ParticipantViewComponentProps = {
|
|
169
178
|
ParticipantLabel,
|
|
@@ -247,6 +256,9 @@ const styles = StyleSheet.create({
|
|
|
247
256
|
marginHorizontal: 8,
|
|
248
257
|
borderRadius: 10,
|
|
249
258
|
},
|
|
259
|
+
landScapeStyle: {
|
|
260
|
+
borderRadius: 10,
|
|
261
|
+
},
|
|
250
262
|
});
|
|
251
263
|
|
|
252
264
|
/**
|
|
@@ -50,6 +50,7 @@ export const CallTopView = ({
|
|
|
50
50
|
ParticipantsInfoBadge = DefaultParticipantsInfoBadge,
|
|
51
51
|
}: CallTopViewProps) => {
|
|
52
52
|
const [callTopViewHeight, setCallTopViewHeight] = useState<number>(0);
|
|
53
|
+
const [callTopViewWidth, setCallTopViewWidth] = useState<number>(0);
|
|
53
54
|
const {
|
|
54
55
|
theme: {
|
|
55
56
|
colors,
|
|
@@ -64,16 +65,17 @@ export const CallTopView = ({
|
|
|
64
65
|
const isCallReconnecting = callingState === CallingState.RECONNECTING;
|
|
65
66
|
|
|
66
67
|
const onLayout: React.ComponentProps<typeof View>['onLayout'] = (event) => {
|
|
67
|
-
const { height } = event.nativeEvent.layout;
|
|
68
|
+
const { height, width } = event.nativeEvent.layout;
|
|
68
69
|
if (setCallTopViewHeight) {
|
|
69
70
|
setCallTopViewHeight(height);
|
|
71
|
+
setCallTopViewWidth(width);
|
|
70
72
|
}
|
|
71
73
|
};
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
76
|
<View style={[styleProp, callTopView.container]}>
|
|
75
77
|
{/* Component for the background of the CallTopView. Since it has a Linear Gradient, an SVG is used to render it. */}
|
|
76
|
-
<TopViewBackground height={callTopViewHeight} width={
|
|
78
|
+
<TopViewBackground height={callTopViewHeight} width={callTopViewWidth} />
|
|
77
79
|
<View style={[styles.content, callTopView.content]} onLayout={onLayout}>
|
|
78
80
|
<View style={styles.leftElement}>
|
|
79
81
|
{onBackPressed && (
|
|
@@ -42,6 +42,11 @@ export type RingingCallContentProps = {
|
|
|
42
42
|
* Prop to customize the JoiningCallIndicator component in the RingingCallContent. It is shown when the call is accepted and is waiting to be joined.
|
|
43
43
|
*/
|
|
44
44
|
JoiningCallIndicator?: React.ComponentType | null;
|
|
45
|
+
/**
|
|
46
|
+
* Check if device is in landscape mode.
|
|
47
|
+
* This will apply the landscape mode styles to the component.
|
|
48
|
+
*/
|
|
49
|
+
landscape?: boolean;
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
const RingingCallPanel = ({
|
|
@@ -50,6 +55,7 @@ const RingingCallPanel = ({
|
|
|
50
55
|
CallContent = DefaultCallContent,
|
|
51
56
|
JoiningCallIndicator = DefaultJoiningCallIndicator,
|
|
52
57
|
CallTopView,
|
|
58
|
+
landscape,
|
|
53
59
|
}: RingingCallContentProps) => {
|
|
54
60
|
const call = useCall();
|
|
55
61
|
const isCallCreatedByMe = call?.isCreatedByMe;
|
|
@@ -63,7 +69,11 @@ const RingingCallPanel = ({
|
|
|
63
69
|
? OutgoingCall && <OutgoingCall CallTopView={CallTopView} />
|
|
64
70
|
: IncomingCall && <IncomingCall CallTopView={CallTopView} />;
|
|
65
71
|
case CallingState.JOINED:
|
|
66
|
-
return
|
|
72
|
+
return (
|
|
73
|
+
CallContent && (
|
|
74
|
+
<CallContent CallTopView={CallTopView} landscape={landscape} />
|
|
75
|
+
)
|
|
76
|
+
);
|
|
67
77
|
case CallingState.JOINING:
|
|
68
78
|
return JoiningCallIndicator && <JoiningCallIndicator />;
|
|
69
79
|
default:
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.0.
|
|
1
|
+
export const version = '0.0.28';
|