@poolse/react-native 2.21.1 → 2.22.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 +9 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1317,6 +1317,13 @@ interface CallScreenProps {
|
|
|
1317
1317
|
onTransportChange?: (transport: 'sfu' | 'mesh' | null) => void;
|
|
1318
1318
|
/** Called when the call's video state changes. */
|
|
1319
1319
|
onVideoChange?: (video: boolean) => void;
|
|
1320
|
+
/**
|
|
1321
|
+
* Called when the audio route changes: speaker on/off, or an
|
|
1322
|
+
* external device (headset, Bluetooth) taking over. Hosts use this
|
|
1323
|
+
* to drive the proximity sensor — the screen should only go dark
|
|
1324
|
+
* near an ear when the sound is actually AT the ear.
|
|
1325
|
+
*/
|
|
1326
|
+
onSpeakerChange?: (speakerOn: boolean, externalDevice: boolean) => void;
|
|
1320
1327
|
/**
|
|
1321
1328
|
* `react-native-incall-manager`, imported by your app.
|
|
1322
1329
|
*
|
|
@@ -1352,7 +1359,7 @@ interface RingToneModule {
|
|
|
1352
1359
|
startRingtone?: (...args: never[]) => void;
|
|
1353
1360
|
stopRingtone?: (...args: never[]) => void;
|
|
1354
1361
|
}
|
|
1355
|
-
declare function CallScreen({ userId, labelFor, conversationLabel, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1362
|
+
declare function CallScreen({ userId, labelFor, conversationLabel, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, onSpeakerChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1356
1363
|
|
|
1357
1364
|
interface CallVideoGridProps {
|
|
1358
1365
|
participants: CallParticipant[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1317,6 +1317,13 @@ interface CallScreenProps {
|
|
|
1317
1317
|
onTransportChange?: (transport: 'sfu' | 'mesh' | null) => void;
|
|
1318
1318
|
/** Called when the call's video state changes. */
|
|
1319
1319
|
onVideoChange?: (video: boolean) => void;
|
|
1320
|
+
/**
|
|
1321
|
+
* Called when the audio route changes: speaker on/off, or an
|
|
1322
|
+
* external device (headset, Bluetooth) taking over. Hosts use this
|
|
1323
|
+
* to drive the proximity sensor — the screen should only go dark
|
|
1324
|
+
* near an ear when the sound is actually AT the ear.
|
|
1325
|
+
*/
|
|
1326
|
+
onSpeakerChange?: (speakerOn: boolean, externalDevice: boolean) => void;
|
|
1320
1327
|
/**
|
|
1321
1328
|
* `react-native-incall-manager`, imported by your app.
|
|
1322
1329
|
*
|
|
@@ -1352,7 +1359,7 @@ interface RingToneModule {
|
|
|
1352
1359
|
startRingtone?: (...args: never[]) => void;
|
|
1353
1360
|
stopRingtone?: (...args: never[]) => void;
|
|
1354
1361
|
}
|
|
1355
|
-
declare function CallScreen({ userId, labelFor, conversationLabel, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1362
|
+
declare function CallScreen({ userId, labelFor, conversationLabel, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, onSpeakerChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1356
1363
|
|
|
1357
1364
|
interface CallVideoGridProps {
|
|
1358
1365
|
participants: CallParticipant[];
|
package/dist/index.js
CHANGED
|
@@ -6008,6 +6008,7 @@ function CallScreen({
|
|
|
6008
6008
|
onStatusChange,
|
|
6009
6009
|
onTransportChange,
|
|
6010
6010
|
onVideoChange,
|
|
6011
|
+
onSpeakerChange,
|
|
6011
6012
|
inCallManager,
|
|
6012
6013
|
nativeIncomingUi
|
|
6013
6014
|
}) {
|
|
@@ -6059,6 +6060,9 @@ function CallScreen({
|
|
|
6059
6060
|
livekitReactNative
|
|
6060
6061
|
});
|
|
6061
6062
|
const [routesOpen, setRoutesOpen] = useState(false);
|
|
6063
|
+
useEffect(() => {
|
|
6064
|
+
onSpeakerChange?.(audio.speakerOn, audio.externalDevice);
|
|
6065
|
+
}, [audio.speakerOn, audio.externalDevice, onSpeakerChange]);
|
|
6062
6066
|
const showingIncoming = calls.phase === "ringing-in" && !nativeIncomingUi;
|
|
6063
6067
|
useEffect(() => {
|
|
6064
6068
|
const ringing = calls.phase === "ringing-out";
|