@stream-io/video-react-native-sdk 1.22.0 → 1.22.1-alpha.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/dist/commonjs/version.js +1 -1
- package/dist/commonjs/version.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/dist/typescript/version.d.ts.map +1 -1
- package/ios/StreamInCallManager.swift +40 -40
- package/ios/StreamVideoReactNative.xcodeproj/project.xcworkspace/xcuserdata/santhoshvaiyapuri.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/StreamVideoReactNative.xcodeproj/xcuserdata/santhoshvaiyapuri.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +4 -4
- package/src/version.ts +1 -1
- package/CHANGELOG.md +0 -2805
package/dist/commonjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,
|
|
1
|
+
{"version":3,"names":["version","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,gBAAgB","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.22.0';
|
|
1
|
+
export const version = '1.22.1-alpha.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.22.0";
|
|
1
|
+
export declare const version = "1.22.1-alpha.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
|
|
@@ -19,8 +19,6 @@ enum DefaultAudioDevice {
|
|
|
19
19
|
@objc(StreamInCallManager)
|
|
20
20
|
class StreamInCallManager: RCTEventEmitter {
|
|
21
21
|
|
|
22
|
-
private let audioSessionQueue = DispatchQueue(label: "io.getstream.rn.audioSessionQueue")
|
|
23
|
-
|
|
24
22
|
private var audioManagerActivated = false
|
|
25
23
|
private var callAudioRole: CallAudioRole = .communicator
|
|
26
24
|
private var defaultAudioDevice: DefaultAudioDevice = .speaker
|
|
@@ -46,60 +44,55 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
46
44
|
|
|
47
45
|
@objc(setAudioRole:)
|
|
48
46
|
func setAudioRole(audioRole: String) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
self.callAudioRole = audioRole.lowercased() == "listener" ? .listener : .communicator
|
|
47
|
+
if audioManagerActivated {
|
|
48
|
+
log("AudioManager is already activated, audio role cannot be changed.")
|
|
49
|
+
return
|
|
55
50
|
}
|
|
51
|
+
self.callAudioRole = audioRole.lowercased() == "listener" ? .listener : .communicator
|
|
52
|
+
|
|
56
53
|
}
|
|
57
54
|
|
|
58
55
|
@objc(setDefaultAudioDeviceEndpointType:)
|
|
59
56
|
func setDefaultAudioDeviceEndpointType(endpointType: String) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
self.defaultAudioDevice = endpointType.lowercased() == "earpiece" ? .earpiece : .speaker
|
|
57
|
+
if audioManagerActivated {
|
|
58
|
+
log("AudioManager is already activated, default audio device cannot be changed.")
|
|
59
|
+
return
|
|
66
60
|
}
|
|
61
|
+
self.defaultAudioDevice = endpointType.lowercased() == "earpiece" ? .earpiece : .speaker
|
|
62
|
+
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
@objc
|
|
70
66
|
func start() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
let session = AVAudioSession.sharedInstance()
|
|
76
|
-
previousAudioSessionState = AudioSessionState(
|
|
77
|
-
category: session.category,
|
|
78
|
-
mode: session.mode,
|
|
79
|
-
options: session.categoryOptions
|
|
80
|
-
)
|
|
81
|
-
configureAudioSession()
|
|
82
|
-
audioManagerActivated = true
|
|
67
|
+
if audioManagerActivated {
|
|
68
|
+
return
|
|
83
69
|
}
|
|
70
|
+
let session = AVAudioSession.sharedInstance()
|
|
71
|
+
previousAudioSessionState = AudioSessionState(
|
|
72
|
+
category: session.category,
|
|
73
|
+
mode: session.mode,
|
|
74
|
+
options: session.categoryOptions
|
|
75
|
+
)
|
|
76
|
+
configureAudioSession()
|
|
77
|
+
audioManagerActivated = true
|
|
84
78
|
}
|
|
85
79
|
|
|
86
80
|
@objc
|
|
87
81
|
func stop() {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
log("Error restoring previous audio session: \(error.localizedDescription)")
|
|
98
|
-
}
|
|
99
|
-
previousAudioSessionState = nil
|
|
82
|
+
if !audioManagerActivated {
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
if let prev = previousAudioSessionState {
|
|
86
|
+
let session = AVAudioSession.sharedInstance()
|
|
87
|
+
do {
|
|
88
|
+
try session.setCategory(prev.category, mode: prev.mode, options: prev.options)
|
|
89
|
+
} catch {
|
|
90
|
+
log("Error restoring previous audio session: \(error.localizedDescription)")
|
|
100
91
|
}
|
|
101
|
-
|
|
92
|
+
previousAudioSessionState = nil
|
|
102
93
|
}
|
|
94
|
+
audioManagerActivated = false
|
|
95
|
+
|
|
103
96
|
}
|
|
104
97
|
|
|
105
98
|
private func configureAudioSession() {
|
|
@@ -142,6 +135,9 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
142
135
|
|
|
143
136
|
if currentCategory != intendedCategory.rawValue || currentMode != intendedMode.rawValue || currentOptions != intendedOptions || !currentIsActive {
|
|
144
137
|
session.lockForConfiguration()
|
|
138
|
+
defer {
|
|
139
|
+
session.unlockForConfiguration()
|
|
140
|
+
}
|
|
145
141
|
do {
|
|
146
142
|
try session.setCategory(intendedCategory, mode: intendedMode, options: intendedOptions)
|
|
147
143
|
try session.setActive(true)
|
|
@@ -156,7 +152,6 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
156
152
|
log("configureAudioSession: Error setting mode: \(error.localizedDescription)")
|
|
157
153
|
}
|
|
158
154
|
}
|
|
159
|
-
session.unlockForConfiguration()
|
|
160
155
|
} else {
|
|
161
156
|
log("configureAudioSession: no change needed")
|
|
162
157
|
}
|
|
@@ -295,6 +290,11 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
295
290
|
}
|
|
296
291
|
}
|
|
297
292
|
|
|
293
|
+
@objc
|
|
294
|
+
func methodQueue() -> DispatchQueue {
|
|
295
|
+
return DispatchQueue(label: "io.getstream.rn.audioSessionQueue", qos: .userInitiated)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
298
|
// MARK: - Logging Helper
|
|
299
299
|
private func log(_ message: String) {
|
|
300
300
|
NSLog("InCallManager: %@", message)
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>StreamVideoReactNative.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.22.0",
|
|
3
|
+
"version": "1.22.1-alpha.0",
|
|
4
4
|
"description": "Stream Video SDK for React Native",
|
|
5
5
|
"author": "https://getstream.io",
|
|
6
6
|
"homepage": "https://getstream.io/video/docs/react-native/",
|
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
"@react-native-firebase/app": "^23.4.0",
|
|
126
126
|
"@react-native-firebase/messaging": "^23.4.0",
|
|
127
127
|
"@react-native/babel-preset": "^0.81.4",
|
|
128
|
-
"@stream-io/noise-cancellation-react-native": "
|
|
128
|
+
"@stream-io/noise-cancellation-react-native": "workspace:^",
|
|
129
129
|
"@stream-io/react-native-webrtc": "125.4.4",
|
|
130
|
-
"@stream-io/video-filters-react-native": "
|
|
130
|
+
"@stream-io/video-filters-react-native": "workspace:^",
|
|
131
131
|
"@testing-library/jest-native": "^5.4.3",
|
|
132
132
|
"@testing-library/react-native": "13.3.3",
|
|
133
133
|
"@tsconfig/node18": "^18.2.4",
|
|
@@ -162,4 +162,4 @@
|
|
|
162
162
|
"typescript"
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
|
-
}
|
|
165
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.22.0';
|
|
1
|
+
export const version = '1.22.1-alpha.0';
|