@poolse/react-native 2.10.0 → 2.10.1
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CallParticipant, Conversation, Uuid, Message, AttachmentUploadInput, Membership, Attachment, WebRtcAdapter, VoiceStatus, LiveKitModule, CallMedia } from '@poolse/sdk';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { ViewStyle } from 'react-native';
|
|
4
|
+
import { ReactNode, ReactElement } from 'react';
|
|
6
5
|
import { UseCalls } from '@poolse/react';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -16,13 +15,16 @@ import { UseCalls } from '@poolse/react';
|
|
|
16
15
|
* import * as livekitRN from '@livekit/react-native';
|
|
17
16
|
*/
|
|
18
17
|
interface LiveKitReactNativeModule {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The module's `VideoTrack` component.
|
|
20
|
+
*
|
|
21
|
+
* Typed as `unknown` on purpose. Its real props are far more specific
|
|
22
|
+
* than what this renders with, and React component props are
|
|
23
|
+
* contravariant — declaring the narrow shape here means the real
|
|
24
|
+
* component is not assignable to it and no app can pass the module in.
|
|
25
|
+
* It is narrowed to {@link CheckedVideoTrack} at the point of use.
|
|
26
|
+
*/
|
|
27
|
+
VideoTrack: unknown;
|
|
26
28
|
}
|
|
27
29
|
interface CallVideoGridProps {
|
|
28
30
|
participants: CallParticipant[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CallParticipant, Conversation, Uuid, Message, AttachmentUploadInput, Membership, Attachment, WebRtcAdapter, VoiceStatus, LiveKitModule, CallMedia } from '@poolse/sdk';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { ViewStyle } from 'react-native';
|
|
4
|
+
import { ReactNode, ReactElement } from 'react';
|
|
6
5
|
import { UseCalls } from '@poolse/react';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -16,13 +15,16 @@ import { UseCalls } from '@poolse/react';
|
|
|
16
15
|
* import * as livekitRN from '@livekit/react-native';
|
|
17
16
|
*/
|
|
18
17
|
interface LiveKitReactNativeModule {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The module's `VideoTrack` component.
|
|
20
|
+
*
|
|
21
|
+
* Typed as `unknown` on purpose. Its real props are far more specific
|
|
22
|
+
* than what this renders with, and React component props are
|
|
23
|
+
* contravariant — declaring the narrow shape here means the real
|
|
24
|
+
* component is not assignable to it and no app can pass the module in.
|
|
25
|
+
* It is narrowed to {@link CheckedVideoTrack} at the point of use.
|
|
26
|
+
*/
|
|
27
|
+
VideoTrack: unknown;
|
|
26
28
|
}
|
|
27
29
|
interface CallVideoGridProps {
|
|
28
30
|
participants: CallParticipant[];
|
package/dist/index.js
CHANGED
|
@@ -182,6 +182,7 @@ function usePoolseTheme() {
|
|
|
182
182
|
function CallVideoGrid({ participants, livekitReactNative, labelFor }) {
|
|
183
183
|
const theme = usePoolseTheme();
|
|
184
184
|
const label = labelFor ?? ((id) => `User ${id.slice(0, 6)}`);
|
|
185
|
+
const VideoTrack = livekitReactNative?.VideoTrack;
|
|
185
186
|
if (participants.length === 0) return null;
|
|
186
187
|
const columns = participants.length <= 1 ? 1 : 2;
|
|
187
188
|
const basis = columns === 1 ? "100%" : "48%";
|
|
@@ -199,8 +200,8 @@ function CallVideoGrid({ participants, livekitReactNative, labelFor }) {
|
|
|
199
200
|
}
|
|
200
201
|
],
|
|
201
202
|
children: [
|
|
202
|
-
participant.videoTrackRef &&
|
|
203
|
-
|
|
203
|
+
participant.videoTrackRef && VideoTrack ? /* @__PURE__ */ jsx(
|
|
204
|
+
VideoTrack,
|
|
204
205
|
{
|
|
205
206
|
trackRef: participant.videoTrackRef,
|
|
206
207
|
style: styles.video,
|