@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 CHANGED
@@ -4,6 +4,15 @@ All notable changes to `@poolse/react-native` are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
5
5
  versions follow [semver](https://semver.org).
6
6
 
7
+ ## [2.22.0] — 2026-10-14
8
+
9
+ ### Added
10
+
11
+ - `CallScreen onSpeakerChange` — fires with `(speakerOn,
12
+ externalDevice)` whenever the audio route changes. Hosts use it to
13
+ drive the proximity sensor: the screen should only go dark near an
14
+ ear when the sound is actually at the ear.
15
+
7
16
  ## [2.21.1] — 2026-10-14
8
17
 
9
18
  ### Fixed
package/dist/index.cjs CHANGED
@@ -6036,6 +6036,7 @@ function CallScreen({
6036
6036
  onStatusChange,
6037
6037
  onTransportChange,
6038
6038
  onVideoChange,
6039
+ onSpeakerChange,
6039
6040
  inCallManager,
6040
6041
  nativeIncomingUi
6041
6042
  }) {
@@ -6087,6 +6088,9 @@ function CallScreen({
6087
6088
  livekitReactNative
6088
6089
  });
6089
6090
  const [routesOpen, setRoutesOpen] = react.useState(false);
6091
+ react.useEffect(() => {
6092
+ onSpeakerChange?.(audio.speakerOn, audio.externalDevice);
6093
+ }, [audio.speakerOn, audio.externalDevice, onSpeakerChange]);
6090
6094
  const showingIncoming = calls.phase === "ringing-in" && !nativeIncomingUi;
6091
6095
  react.useEffect(() => {
6092
6096
  const ringing = calls.phase === "ringing-out";