@100mslive/react-native-hms 1.9.0 → 1.9.1-beta.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/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +1 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +4 -3
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +27 -22
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +226 -249
- package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +24 -4
- package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +1 -1
- package/ios/HMSHLSPlayerManager.swift +20 -11
- package/ios/HMSManager.m +40 -10
- package/ios/HMSManager.swift +20 -20
- package/ios/HMSRNSDK.swift +86 -85
- package/lib/commonjs/classes/HMSPIPConfig.js +4 -0
- package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSSDK.js +0 -2
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +14 -1
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -5
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js +6 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/index.js +8 -1
- package/lib/commonjs/components/HMSHLSPlayer/index.js.map +1 -1
- package/lib/commonjs/hooks/hmsviews.js +17 -0
- package/lib/commonjs/hooks/hmsviews.js.map +1 -0
- package/lib/commonjs/index.js +9 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stores/hls-player-playback-slice.js +4 -0
- package/lib/commonjs/stores/hls-player-playback-slice.js.map +1 -1
- package/lib/commonjs/stores/hms-store.js +3 -1
- package/lib/commonjs/stores/hms-store.js.map +1 -1
- package/lib/commonjs/stores/hmsviews-slice.js +19 -0
- package/lib/commonjs/stores/hmsviews-slice.js.map +1 -0
- package/lib/commonjs/stores/types.js +9 -0
- package/lib/commonjs/stores/types.js.map +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/classes/HMSPIPConfig.js +2 -0
- package/lib/module/classes/HMSPIPConfig.js.map +1 -0
- package/lib/module/classes/HMSSDK.js +0 -3
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HmsView.js +14 -1
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +9 -6
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/hooks.js +4 -0
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/index.js +1 -1
- package/lib/module/components/HMSHLSPlayer/index.js.map +1 -1
- package/lib/module/hooks/hmsviews.js +12 -0
- package/lib/module/hooks/hmsviews.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/stores/hls-player-playback-slice.js +4 -0
- package/lib/module/stores/hls-player-playback-slice.js.map +1 -1
- package/lib/module/stores/hms-store.js +3 -1
- package/lib/module/stores/hms-store.js.map +1 -1
- package/lib/module/stores/hmsviews-slice.js +12 -0
- package/lib/module/stores/hmsviews-slice.js.map +1 -0
- package/lib/module/stores/types.js +9 -0
- package/lib/module/stores/types.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/classes/HMSPIPConfig.d.ts +7 -0
- package/lib/typescript/classes/HMSSDK.d.ts +3 -9
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +2 -0
- package/lib/typescript/components/HMSHLSPlayer/index.d.ts +1 -1
- package/lib/typescript/hooks/hmsviews.d.ts +3 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/stores/hms-store.d.ts +4 -3
- package/lib/typescript/stores/hmsviews-slice.d.ts +5 -0
- package/lib/typescript/stores/types.d.ts +14 -2
- package/lib/typescript/types.d.ts +9 -5
- package/package.json +3 -1
- package/sdk-versions.json +1 -1
- package/src/classes/HMSPIPConfig.ts +7 -0
- package/src/classes/HMSSDK.tsx +3 -11
- package/src/classes/HmsView.tsx +16 -2
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +11 -5
- package/src/components/HMSHLSPlayer/hooks.ts +7 -0
- package/src/components/HMSHLSPlayer/index.ts +1 -0
- package/src/hooks/hmsviews.ts +13 -0
- package/src/index.ts +2 -0
- package/src/stores/hls-player-playback-slice.ts +3 -0
- package/src/stores/hms-store.ts +2 -0
- package/src/stores/hmsviews-slice.ts +20 -0
- package/src/stores/types.ts +20 -1
- package/src/types.ts +13 -3
|
@@ -43,16 +43,36 @@ class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
|
43
43
|
newHeight: Int,
|
|
44
44
|
) {
|
|
45
45
|
super.onResolutionChange(newWidth, newHeight)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
jsCanApplyStyles
|
|
46
|
+
|
|
47
|
+
videoTrack?.let { nonnullVideoTrack ->
|
|
48
|
+
// emit when source is screen or `jsCanApplyStyles` is `false`
|
|
49
|
+
if (nonnullVideoTrack.source == "screen" || !jsCanApplyStyles) {
|
|
50
|
+
jsCanApplyStyles = true
|
|
51
|
+
|
|
52
|
+
val data = Arguments.createMap()
|
|
53
|
+
data.putInt("width", newWidth)
|
|
54
|
+
data.putInt("height", newHeight)
|
|
55
|
+
|
|
56
|
+
sendEventToJS("ON_RESOLUTION_CHANGE_EVENT", data)
|
|
57
|
+
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
},
|
|
53
61
|
)
|
|
54
62
|
}
|
|
55
63
|
|
|
64
|
+
private fun sendEventToJS(
|
|
65
|
+
eventName: String,
|
|
66
|
+
data: WritableMap,
|
|
67
|
+
) {
|
|
68
|
+
val event: WritableMap = Arguments.createMap()
|
|
69
|
+
event.putString("event", eventName)
|
|
70
|
+
event.putMap("data", data)
|
|
71
|
+
|
|
72
|
+
val reactContext = context as ReactContext
|
|
73
|
+
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(id, "topChange", event)
|
|
74
|
+
}
|
|
75
|
+
|
|
56
76
|
@RequiresApi(Build.VERSION_CODES.N)
|
|
57
77
|
fun captureHmsView(args: ReadableArray?) {
|
|
58
78
|
hmsVideoView?.let {
|
|
@@ -27,7 +27,7 @@ class HmsScreenshareActivity : ComponentActivity() {
|
|
|
27
27
|
|
|
28
28
|
override fun onSuccess() {
|
|
29
29
|
HMSManager.hmsCollection[id]?.screenshareCallback?.resolve(
|
|
30
|
-
HMSManager.hmsCollection[id]?.
|
|
30
|
+
HMSManager.hmsCollection[id]?.getPromiseResolveData(),
|
|
31
31
|
)
|
|
32
32
|
finish()
|
|
33
33
|
}
|
|
@@ -308,18 +308,31 @@ class HMSHLSPlayer: UIView {
|
|
|
308
308
|
sendHLSPlaybackEventToJS(HMSHLSPlayerConstants.ON_PLAYBACK_FAILURE_EVENT, data)
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
fileprivate func onPlaybackStateChanged(state: HMSHLSPlaybackState
|
|
311
|
+
fileprivate func onPlaybackStateChanged(state: HMSHLSPlaybackState) {
|
|
312
312
|
guard onHmsHlsPlaybackEvent != nil else { return }
|
|
313
313
|
|
|
314
314
|
var data = [String: Any]()
|
|
315
315
|
|
|
316
|
-
data["state"] =
|
|
316
|
+
data["state"] = state.description
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
sendHLSPlaybackEventToJS(HMSHLSPlayerConstants.ON_PLAYBACK_STATE_CHANGE_EVENT, data)
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
fileprivate func onResolutionChanged(videoSize: CGSize) {
|
|
322
|
+
if videoSize.width >= videoSize.height {
|
|
323
|
+
hmsHLSPlayerViewController?.videoGravity = .resizeAspect
|
|
324
|
+
} else {
|
|
325
|
+
hmsHLSPlayerViewController?.videoGravity = .resizeAspectFill
|
|
320
326
|
}
|
|
321
327
|
|
|
322
|
-
|
|
328
|
+
guard onHmsHlsPlaybackEvent != nil else { return }
|
|
329
|
+
|
|
330
|
+
var data = [String: Any]()
|
|
331
|
+
|
|
332
|
+
data["width"] = videoSize.width
|
|
333
|
+
data["height"] = videoSize.height
|
|
334
|
+
|
|
335
|
+
sendHLSPlaybackEventToJS(HMSHLSPlayerConstants.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT, data)
|
|
323
336
|
}
|
|
324
337
|
}
|
|
325
338
|
|
|
@@ -343,12 +356,7 @@ class HLSPlaybackEventController: HMSHLSPlayerDelegate {
|
|
|
343
356
|
}
|
|
344
357
|
|
|
345
358
|
func onResolutionChanged(videoSize: CGSize) {
|
|
346
|
-
|
|
347
|
-
hmsHlsPlayerDelegate?.hmsHLSPlayerViewController?.videoGravity = .resizeAspect
|
|
348
|
-
} else {
|
|
349
|
-
hmsHlsPlayerDelegate?.hmsHLSPlayerViewController?.videoGravity = .resizeAspectFill
|
|
350
|
-
}
|
|
351
|
-
hmsHlsPlayerDelegate?.onPlaybackStateChanged(videoSizeChanged: true, aspectRatio: videoSize.width/videoSize.height)
|
|
359
|
+
hmsHlsPlayerDelegate?.onResolutionChanged(videoSize: videoSize)
|
|
352
360
|
}
|
|
353
361
|
}
|
|
354
362
|
|
|
@@ -357,6 +365,7 @@ enum HMSHLSPlayerConstants {
|
|
|
357
365
|
static let ON_PLAYBACK_CUE_EVENT = "ON_PLAYBACK_CUE_EVENT"
|
|
358
366
|
static let ON_PLAYBACK_FAILURE_EVENT = "ON_PLAYBACK_FAILURE_EVENT"
|
|
359
367
|
static let ON_PLAYBACK_STATE_CHANGE_EVENT = "ON_PLAYBACK_STATE_CHANGE_EVENT"
|
|
368
|
+
static let ON_PLAYBACK_RESOLUTION_CHANGE_EVENT = "ON_PLAYBACK_RESOLUTION_CHANGE_EVENT"
|
|
360
369
|
|
|
361
370
|
// HLS Playback Stats Events
|
|
362
371
|
static let ON_STATS_EVENT_UPDATE = "ON_STATS_EVENT_UPDATE"
|
package/ios/HMSManager.m
CHANGED
|
@@ -12,8 +12,14 @@ RCT_EXTERN_METHOD(previewForRole
|
|
|
12
12
|
RCT_EXTERN_METHOD(cancelPreview : (NSDictionary)data
|
|
13
13
|
: (RCTPromiseResolveBlock)resolve
|
|
14
14
|
: (RCTPromiseRejectBlock)reject)
|
|
15
|
-
RCT_EXTERN_METHOD(setLocalMute
|
|
16
|
-
|
|
15
|
+
RCT_EXTERN_METHOD(setLocalMute
|
|
16
|
+
: (NSDictionary)isMute
|
|
17
|
+
: (RCTPromiseResolveBlock)resolve
|
|
18
|
+
: (RCTPromiseRejectBlock)reject)
|
|
19
|
+
RCT_EXTERN_METHOD(setLocalVideoMute
|
|
20
|
+
: (NSDictionary)isMute
|
|
21
|
+
: (RCTPromiseResolveBlock)resolve
|
|
22
|
+
: (RCTPromiseRejectBlock)reject)
|
|
17
23
|
RCT_EXTERN_METHOD(sendBroadcastMessage
|
|
18
24
|
: (NSDictionary)data
|
|
19
25
|
: (RCTPromiseResolveBlock)resolve
|
|
@@ -26,7 +32,10 @@ RCT_EXTERN_METHOD(sendDirectMessage
|
|
|
26
32
|
: (NSDictionary)data
|
|
27
33
|
: (RCTPromiseResolveBlock)resolve
|
|
28
34
|
: (RCTPromiseRejectBlock)reject)
|
|
29
|
-
RCT_EXTERN_METHOD(setPlaybackAllowed
|
|
35
|
+
RCT_EXTERN_METHOD(setPlaybackAllowed
|
|
36
|
+
: (NSDictionary)data
|
|
37
|
+
: (RCTPromiseResolveBlock)resolve
|
|
38
|
+
: (RCTPromiseRejectBlock)reject)
|
|
30
39
|
RCT_EXTERN_METHOD(removePeer
|
|
31
40
|
: (NSDictionary)data
|
|
32
41
|
: (RCTPromiseResolveBlock)resolve
|
|
@@ -54,7 +63,10 @@ RCT_EXTERN_METHOD(getRoom
|
|
|
54
63
|
: (RCTPromiseResolveBlock)resolve
|
|
55
64
|
: (RCTPromiseRejectBlock)reject)
|
|
56
65
|
RCT_EXTERN_METHOD(switchCamera : (NSDictionary)data)
|
|
57
|
-
RCT_EXTERN_METHOD(setVolume
|
|
66
|
+
RCT_EXTERN_METHOD(setVolume
|
|
67
|
+
: (NSDictionary)data
|
|
68
|
+
: (RCTPromiseResolveBlock)resolve
|
|
69
|
+
: (RCTPromiseRejectBlock)reject)
|
|
58
70
|
RCT_EXTERN_METHOD(build
|
|
59
71
|
: (NSDictionary)data
|
|
60
72
|
: (RCTPromiseResolveBlock)resolve
|
|
@@ -63,7 +75,10 @@ RCT_EXTERN_METHOD(leave
|
|
|
63
75
|
: (NSDictionary)data
|
|
64
76
|
: (RCTPromiseResolveBlock)resolve
|
|
65
77
|
: (RCTPromiseRejectBlock)reject)
|
|
66
|
-
RCT_EXTERN_METHOD(setPlaybackForAllAudio
|
|
78
|
+
RCT_EXTERN_METHOD(setPlaybackForAllAudio
|
|
79
|
+
: (NSDictionary)mute
|
|
80
|
+
: (RCTPromiseResolveBlock)resolve
|
|
81
|
+
: (RCTPromiseRejectBlock)reject)
|
|
67
82
|
RCT_EXTERN_METHOD(remoteMuteAllAudio
|
|
68
83
|
: (NSDictionary)data
|
|
69
84
|
: (RCTPromiseResolveBlock)resolve
|
|
@@ -132,10 +147,22 @@ RCT_EXTERN_METHOD(playAudioShare
|
|
|
132
147
|
: (NSDictionary)data
|
|
133
148
|
: (RCTPromiseResolveBlock)resolve
|
|
134
149
|
: (RCTPromiseRejectBlock)reject)
|
|
135
|
-
RCT_EXTERN_METHOD(setAudioShareVolume
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
RCT_EXTERN_METHOD(setAudioShareVolume
|
|
151
|
+
: (NSDictionary)data
|
|
152
|
+
: (RCTPromiseResolveBlock)resolve
|
|
153
|
+
: (RCTPromiseRejectBlock)reject)
|
|
154
|
+
RCT_EXTERN_METHOD(stopAudioShare
|
|
155
|
+
: (NSDictionary)data
|
|
156
|
+
: (RCTPromiseResolveBlock)resolve
|
|
157
|
+
: (RCTPromiseRejectBlock)reject)
|
|
158
|
+
RCT_EXTERN_METHOD(resumeAudioShare
|
|
159
|
+
: (NSDictionary)data
|
|
160
|
+
: (RCTPromiseResolveBlock)resolve
|
|
161
|
+
: (RCTPromiseRejectBlock)reject)
|
|
162
|
+
RCT_EXTERN_METHOD(pauseAudioShare
|
|
163
|
+
: (NSDictionary)data
|
|
164
|
+
: (RCTPromiseResolveBlock)resolve
|
|
165
|
+
: (RCTPromiseRejectBlock)reject)
|
|
139
166
|
RCT_EXTERN_METHOD(audioShareIsPlaying
|
|
140
167
|
: (NSDictionary)data
|
|
141
168
|
: (RCTPromiseResolveBlock)resolve
|
|
@@ -182,7 +209,10 @@ RCT_EXTERN_METHOD(disableEvent
|
|
|
182
209
|
: (NSDictionary)data
|
|
183
210
|
: (RCTPromiseResolveBlock)resolve
|
|
184
211
|
: (RCTPromiseRejectBlock)reject)
|
|
185
|
-
RCT_EXTERN_METHOD(restrictData
|
|
212
|
+
RCT_EXTERN_METHOD(restrictData
|
|
213
|
+
: (NSDictionary)data
|
|
214
|
+
: (RCTPromiseResolveBlock)resolve
|
|
215
|
+
: (RCTPromiseRejectBlock)reject)
|
|
186
216
|
RCT_EXTERN_METHOD(getAuthTokenByRoomCode
|
|
187
217
|
: (NSDictionary)data
|
|
188
218
|
: (RCTPromiseResolveBlock)resolve
|
package/ios/HMSManager.swift
CHANGED
|
@@ -125,17 +125,17 @@ class HMSManager: RCTEventEmitter {
|
|
|
125
125
|
// MARK: - Audio & Video Actions
|
|
126
126
|
|
|
127
127
|
@objc
|
|
128
|
-
func setLocalMute(_ data: NSDictionary) {
|
|
128
|
+
func setLocalMute(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
129
129
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
130
130
|
|
|
131
|
-
hms?.setLocalMute(data)
|
|
131
|
+
hms?.setLocalMute(data, resolve, reject)
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
@objc
|
|
135
|
-
func setLocalVideoMute(_ data: NSDictionary) {
|
|
135
|
+
func setLocalVideoMute(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
136
136
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
137
137
|
|
|
138
|
-
hms?.setLocalVideoMute(data)
|
|
138
|
+
hms?.setLocalVideoMute(data, resolve, reject)
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
@objc
|
|
@@ -157,10 +157,10 @@ class HMSManager: RCTEventEmitter {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
@objc
|
|
160
|
-
func setPlaybackAllowed(_ data: NSDictionary) {
|
|
160
|
+
func setPlaybackAllowed(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
161
161
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
162
162
|
|
|
163
|
-
hms?.setPlaybackAllowed(data)
|
|
163
|
+
hms?.setPlaybackAllowed(data, resolve, reject)
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
@objc
|
|
@@ -171,10 +171,10 @@ class HMSManager: RCTEventEmitter {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
@objc
|
|
174
|
-
func setPlaybackForAllAudio(_ data: NSDictionary) {
|
|
174
|
+
func setPlaybackForAllAudio(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
175
175
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
176
176
|
|
|
177
|
-
hms?.setPlaybackForAllAudio(data)
|
|
177
|
+
hms?.setPlaybackForAllAudio(data, resolve, reject)
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
@objc
|
|
@@ -185,10 +185,10 @@ class HMSManager: RCTEventEmitter {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
@objc
|
|
188
|
-
func setVolume(_ data: NSDictionary) {
|
|
188
|
+
func setVolume(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
189
189
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
190
190
|
|
|
191
|
-
hms?.setVolume(data)
|
|
191
|
+
hms?.setVolume(data, resolve, reject)
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
@objc
|
|
@@ -398,31 +398,31 @@ class HMSManager: RCTEventEmitter {
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
@objc
|
|
401
|
-
func setAudioShareVolume(_ data: NSDictionary) {
|
|
401
|
+
func setAudioShareVolume(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
402
402
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
403
403
|
|
|
404
|
-
hms?.setAudioShareVolume(data)
|
|
404
|
+
hms?.setAudioShareVolume(data, resolve, reject)
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
@objc
|
|
408
|
-
func stopAudioShare(_ data: NSDictionary) {
|
|
408
|
+
func stopAudioShare(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
409
409
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
410
410
|
|
|
411
|
-
hms?.stopAudioShare(data)
|
|
411
|
+
hms?.stopAudioShare(data, resolve, reject)
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
@objc
|
|
415
|
-
func resumeAudioShare(_ data: NSDictionary) {
|
|
415
|
+
func resumeAudioShare(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
416
416
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
417
417
|
|
|
418
|
-
hms?.resumeAudioShare(data)
|
|
418
|
+
hms?.resumeAudioShare(data, resolve, reject)
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
@objc
|
|
422
|
-
func pauseAudioShare(_ data: NSDictionary) {
|
|
422
|
+
func pauseAudioShare(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
423
423
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
424
424
|
|
|
425
|
-
hms?.pauseAudioShare(data)
|
|
425
|
+
hms?.pauseAudioShare(data, resolve, reject)
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
@objc
|
|
@@ -497,10 +497,10 @@ class HMSManager: RCTEventEmitter {
|
|
|
497
497
|
// MARK: - Restrict sending whole HMSRole object
|
|
498
498
|
|
|
499
499
|
@objc
|
|
500
|
-
func restrictData(_ data: NSDictionary) {
|
|
500
|
+
func restrictData(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
|
|
501
501
|
let hms = HMSHelper.getHms(data, hmsCollection)
|
|
502
502
|
|
|
503
|
-
hms?.restrictData(data)
|
|
503
|
+
hms?.restrictData(data, resolve, reject)
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
// MARK: - Room Code Auth Token API
|