@stream-io/video-react-native-sdk 1.9.13 → 1.9.14

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,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.9.14](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.9.13...@stream-io/video-react-native-sdk-1.9.14) (2025-01-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add callkit audio methods for expo ([#1659](https://github.com/GetStream/stream-video-js/issues/1659)) ([89a53ec](https://github.com/GetStream/stream-video-js/commit/89a53ece63f7f6f4f4275d4697052a86fdad8a79))
11
+
5
12
  ## [1.9.13](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.9.12...@stream-io/video-react-native-sdk-1.9.13) (2025-01-29)
6
13
 
7
14
 
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- const version = exports.version = '1.9.13';
7
+ const version = exports.version = '1.9.14';
8
8
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export const version = '1.9.13';
1
+ export const version = '1.9.14';
2
2
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const version = "1.9.13";
1
+ export declare const version = "1.9.14";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -9,6 +9,8 @@ const addNewLinesToAppDelegate_1 = __importDefault(require("./common/addNewLines
9
9
  const DID_FINISH_LAUNCHING_WITH_OPTIONS = 'application:didFinishLaunchingWithOptions:';
10
10
  const DID_UPDATE_PUSH_CREDENTIALS = 'pushRegistry:didUpdatePushCredentials:forType:';
11
11
  const DID_RECEIVE_INCOMING_PUSH = 'pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:';
12
+ const DID_ACTIVATE_AUDIO_SESSION = 'provider:didActivateAudioSession:audioSession';
13
+ const DID_DEACTIVATE_AUDIO_SESSION = 'provider:didDeactivateAudioSession:audioSession';
12
14
  const withAppDelegate = (configuration, props) => {
13
15
  return (0, config_plugins_1.withAppDelegate)(configuration, (config) => {
14
16
  if (!props?.ringingPushNotifications &&
@@ -25,10 +27,12 @@ const withAppDelegate = (configuration, props) => {
25
27
  '<PushKit/PushKit.h>',
26
28
  '"RNVoipPushNotificationManager.h"',
27
29
  '"StreamVideoReactNative.h"',
30
+ '<WebRTC/RTCAudioSession.h>',
28
31
  ]);
29
32
  config.modResults.contents = addDidFinishLaunchingWithOptionsRinging(config.modResults.contents, props.ringingPushNotifications);
30
33
  config.modResults.contents = addDidUpdatePushCredentials(config.modResults.contents);
31
34
  config.modResults.contents = addDidReceiveIncomingPushCallback(config.modResults.contents);
35
+ config.modResults.contents = addAudioSessionMethods(config.modResults.contents);
32
36
  }
33
37
  config.modResults.contents = addDidFinishLaunchingWithOptions(config.modResults.contents, props.iOSEnableMultitaskingCameraAccess);
34
38
  return config;
@@ -93,6 +97,37 @@ function addDidUpdatePushCredentials(contents) {
93
97
  }
94
98
  return contents;
95
99
  }
100
+ function addAudioSessionMethods(contents) {
101
+ const audioSessionDidActivateMethod = '[[RTCAudioSession sharedInstance] audioSessionDidActivate:[AVAudioSession sharedInstance]];';
102
+ if (!contents.includes(audioSessionDidActivateMethod)) {
103
+ const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, DID_ACTIVATE_AUDIO_SESSION);
104
+ if (!codeblock) {
105
+ contents = (0, addNewLinesToAppDelegate_1.default)(contents, [
106
+ '- (void) provider:(CXProvider *) provider didActivateAudioSession:(AVAudioSession *) audioSession {',
107
+ ' ' /* indentation */ + audioSessionDidActivateMethod,
108
+ '}',
109
+ ]);
110
+ }
111
+ else {
112
+ contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, DID_ACTIVATE_AUDIO_SESSION, audioSessionDidActivateMethod, { position: 'tail' });
113
+ }
114
+ }
115
+ const audioSessionDidDeactivateMethod = '[[RTCAudioSession sharedInstance] audioSessionDidDeactivate:[AVAudioSession sharedInstance]];';
116
+ if (!contents.includes(audioSessionDidDeactivateMethod)) {
117
+ const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, DID_DEACTIVATE_AUDIO_SESSION);
118
+ if (!codeblock) {
119
+ contents = (0, addNewLinesToAppDelegate_1.default)(contents, [
120
+ '- (void) provider:(CXProvider *) provider didDeactivateAudioSession:(AVAudioSession *) audioSession {',
121
+ ' ' /* indentation */ + audioSessionDidDeactivateMethod,
122
+ '}',
123
+ ]);
124
+ }
125
+ else {
126
+ contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, DID_DEACTIVATE_AUDIO_SESSION, audioSessionDidDeactivateMethod, { position: 'tail' });
127
+ }
128
+ }
129
+ return contents;
130
+ }
96
131
  function addDidReceiveIncomingPushCallback(contents) {
97
132
  const onIncomingPush = `
98
133
  // send event to JS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-native-sdk",
3
- "version": "1.9.13",
3
+ "version": "1.9.14",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "module": "dist/module/index.js",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.9.13';
1
+ export const version = '1.9.14';