@stream-io/react-native-callingx 0.5.0 → 0.6.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
@@ -2,6 +2,22 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.6.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/react-native-callingx-0.5.1...@stream-io/react-native-callingx-0.6.0) (2026-06-26)
6
+
7
+ ### Dependency Updates
8
+
9
+ - `@stream-io/typescript-config` updated to version `0.1.0`
10
+
11
+ ### Features
12
+
13
+ - upgrade to TypeScript 6.0.3, pin ES2022, raise supported-browser floors ([#2290](https://github.com/GetStream/stream-video-js/issues/2290)) ([d9ea158](https://github.com/GetStream/stream-video-js/commit/d9ea15846582fa8db86b3b873eca2afe92ae3593))
14
+
15
+ ## [0.5.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/react-native-callingx-0.5.0...@stream-io/react-native-callingx-0.5.1) (2026-06-12)
16
+
17
+ ### Bug Fixes
18
+
19
+ - **ios:** joining a call muted may break remote audio playout ([#2282](https://github.com/GetStream/stream-video-js/issues/2282)) ([dc672a6](https://github.com/GetStream/stream-video-js/commit/dc672a69971d6ca46648696c242609c687cb42d7))
20
+
5
21
  ## [0.5.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/react-native-callingx-0.4.0...@stream-io/react-native-callingx-0.5.0) (2026-06-11)
6
22
 
7
23
  ### Features
@@ -65,36 +65,59 @@ enum DefaultAudioDevice {
65
65
  // MARK: - Private
66
66
 
67
67
  private func applyCallKitConfiguration() {
68
- let currentDevice = stateQueue.sync { defaultAudioDevice }
69
-
70
- // XCode 16 and older don't expose .allowBluetoothHFP
71
- // https://forums.swift.org/t/xcode-26-avaudiosession-categoryoptions-allowbluetooth-deprecated/80956
72
- #if compiler(>=6.2) // For Xcode 26.0+
73
- let bluetoothOption: AVAudioSession.CategoryOptions = .allowBluetoothHFP
74
- #else
75
- let bluetoothOption: AVAudioSession.CategoryOptions = .allowBluetooth
76
- #endif
77
-
78
- var categoryOptions: AVAudioSession.CategoryOptions = [bluetoothOption, .allowBluetoothA2DP]
79
- if currentDevice == .speaker {
80
- categoryOptions.insert(.defaultToSpeaker)
81
- }
68
+ let rtcSession = RTCAudioSession.sharedInstance()
69
+
70
+ // Relax to a pure-output (.playback) session when mic permission is missing
71
+ // same logic as in StreamInCallManager
72
+ let usePlaybackFallback = !micPermissionGranted()
82
73
 
83
74
  // webRTC() singleton hardcodes sampleRate=48000 / ioBufferDuration=0.02 — keep those.
84
75
  let rtcConfig = RTCAudioSessionConfiguration.webRTC()
85
- rtcConfig.category = AVAudioSession.Category.playAndRecord.rawValue
86
- rtcConfig.mode = AVAudioSession.Mode.voiceChat.rawValue
87
- rtcConfig.categoryOptions = categoryOptions
76
+ if usePlaybackFallback {
77
+ // Known gap: .playback can't route to the receiver (earpiece) — that route
78
+ // only exists under .playAndRecord.
79
+ rtcConfig.category = AVAudioSession.Category.playback.rawValue
80
+ rtcConfig.mode = AVAudioSession.Mode.spokenAudio.rawValue
81
+ rtcConfig.categoryOptions = []
82
+ } else {
83
+ let currentDevice = stateQueue.sync { defaultAudioDevice }
84
+
85
+ // XCode 16 and older don't expose .allowBluetoothHFP
86
+ // https://forums.swift.org/t/xcode-26-avaudiosession-categoryoptions-allowbluetooth-deprecated/80956
87
+ #if compiler(>=6.2) // For Xcode 26.0+
88
+ let bluetoothOption: AVAudioSession.CategoryOptions = .allowBluetoothHFP
89
+ #else
90
+ let bluetoothOption: AVAudioSession.CategoryOptions = .allowBluetooth
91
+ #endif
92
+
93
+ var categoryOptions: AVAudioSession.CategoryOptions = [bluetoothOption, .allowBluetoothA2DP]
94
+ if currentDevice == .speaker {
95
+ categoryOptions.insert(.defaultToSpeaker)
96
+ }
97
+
98
+ rtcConfig.category = AVAudioSession.Category.playAndRecord.rawValue
99
+ rtcConfig.mode = AVAudioSession.Mode.voiceChat.rawValue
100
+ rtcConfig.categoryOptions = categoryOptions
101
+ }
88
102
  RTCAudioSessionConfiguration.setWebRTC(rtcConfig)
89
103
 
90
- let rtcSession = RTCAudioSession.sharedInstance()
104
+ CallingxLog.audio.debugPublic("[applyCallKitConfiguration] category=\(rtcConfig.category) mode=\(rtcConfig.mode)")
105
+
91
106
  rtcSession.lockForConfiguration()
92
107
  defer { rtcSession.unlockForConfiguration() }
93
108
 
94
109
  do {
95
110
  try rtcSession.setConfiguration(rtcConfig)
96
111
  } catch {
97
- CallingxLog.audio.errorPublic("[createAudioSessionIfNeeded] Error: \(error)")
112
+ CallingxLog.audio.errorPublic("[applyCallKitConfiguration] Error: \(error)")
113
+ }
114
+ }
115
+
116
+ private func micPermissionGranted() -> Bool {
117
+ if #available(iOS 17.0, *) {
118
+ return AVAudioApplication.shared.recordPermission == .granted
119
+ } else {
120
+ return AVAudioSession.sharedInstance().recordPermission == .granted
98
121
  }
99
122
  }
100
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/react-native-callingx",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "CallKit and Telecom API capabilities for React Native",
5
5
  "main": "./dist/module/index.js",
6
6
  "module": "./dist/module/index.js",
@@ -62,12 +62,13 @@
62
62
  "@react-native-community/cli": "20.1.3",
63
63
  "@react-native/babel-preset": "0.85.3",
64
64
  "@stream-io/react-native-webrtc": "145.0.0",
65
+ "@stream-io/typescript-config": "^0.0.0",
65
66
  "@types/react": "^19.2.15",
66
67
  "del-cli": "^6.0.0",
67
68
  "react": "19.2.3",
68
69
  "react-native": "0.85.3",
69
70
  "react-native-builder-bob": "^0.41.0",
70
- "typescript": "^5.9.3"
71
+ "typescript": "^6.0.3"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "@react-native-firebase/app": ">=23.0.0",