@100mslive/react-native-hms 1.10.6 → 1.10.8

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.
Files changed (283) hide show
  1. package/android/build.gradle +0 -5
  2. package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +90 -0
  3. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +14 -3
  4. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +4 -6
  5. package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +2 -3
  6. package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +54 -15
  7. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +64 -3
  8. package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +9 -17
  9. package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +7 -3
  10. package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +3 -6
  11. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityDecoder.kt +13 -16
  12. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityHelper.kt +14 -13
  13. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSRNInteractivityCenter.kt +19 -4
  14. package/android/src/main/java/com/reactnativehmssdk/PipActionReceiver.kt +10 -2
  15. package/ios/HMSConstants.swift +2 -0
  16. package/ios/HMSDecoder.swift +75 -0
  17. package/ios/HMSManager.m +45 -0
  18. package/ios/HMSManager.swift +126 -1
  19. package/ios/HMSRNSDK.swift +335 -1
  20. package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  21. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  22. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  23. package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  24. package/ios/PIPMode/HMSPipModel.swift +18 -0
  25. package/ios/PIPMode/HMSPipView.swift +36 -0
  26. package/ios/PIPMode/HMSSampleBufferSwiftUIView.swift +45 -0
  27. package/lib/commonjs/classes/HMSAudioMixerSource.js +1 -1
  28. package/lib/commonjs/classes/HMSAudioNode.js +1 -1
  29. package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
  30. package/lib/commonjs/classes/HMSAudioSettings.js +1 -1
  31. package/lib/commonjs/classes/HMSAudioTrackSettings.js +1 -1
  32. package/lib/commonjs/classes/HMSBrowserRecordingState.js +1 -1
  33. package/lib/commonjs/classes/HMSCameraControl.js +1 -1
  34. package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
  35. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +1 -1
  36. package/lib/commonjs/classes/HMSConfig.js +1 -1
  37. package/lib/commonjs/classes/HMSEncoder.js +32 -2
  38. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  39. package/lib/commonjs/classes/HMSException.js +1 -1
  40. package/lib/commonjs/classes/HMSHLSConfig.js +1 -1
  41. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +1 -1
  42. package/lib/commonjs/classes/HMSHLSRecordingConfig.js +1 -1
  43. package/lib/commonjs/classes/HMSHLSRecordingState.js +1 -1
  44. package/lib/commonjs/classes/HMSHLSStreamingState.js +1 -1
  45. package/lib/commonjs/classes/HMSHLSVariant.js +1 -1
  46. package/lib/commonjs/classes/HMSInteractivityCenter.js +2 -2
  47. package/lib/commonjs/classes/HMSInteractivityCenter.js.map +1 -1
  48. package/lib/commonjs/classes/HMSLocalAudioStats.js +1 -1
  49. package/lib/commonjs/classes/HMSLocalAudioTrack.js +1 -1
  50. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  51. package/lib/commonjs/classes/HMSLocalPeer.js +1 -1
  52. package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
  53. package/lib/commonjs/classes/HMSLocalVideoStats.js +1 -1
  54. package/lib/commonjs/classes/HMSLocalVideoTrack.js +1 -1
  55. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  56. package/lib/commonjs/classes/HMSLogSettings.js +1 -1
  57. package/lib/commonjs/classes/HMSLogger.js +1 -1
  58. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  59. package/lib/commonjs/classes/HMSMessage.js +1 -1
  60. package/lib/commonjs/classes/HMSMessageRecipient.js +1 -1
  61. package/lib/commonjs/classes/HMSNativeEventEmitter.js +1 -1
  62. package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
  63. package/lib/commonjs/classes/HMSNativeEventListener.js +1 -1
  64. package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -1
  65. package/lib/commonjs/classes/HMSNetworkQuality.js +1 -1
  66. package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js +2 -2
  67. package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js.map +1 -1
  68. package/lib/commonjs/classes/HMSPIPConfig.js +4 -0
  69. package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -1
  70. package/lib/commonjs/classes/HMSPeer.js +20 -3
  71. package/lib/commonjs/classes/HMSPeer.js.map +1 -1
  72. package/lib/commonjs/classes/HMSPeerListIterator.js +2 -2
  73. package/lib/commonjs/classes/HMSPeerListIterator.js.map +1 -1
  74. package/lib/commonjs/classes/HMSPeersCache.js +2 -2
  75. package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
  76. package/lib/commonjs/classes/HMSPermissions.js +3 -1
  77. package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
  78. package/lib/commonjs/classes/HMSPublishSettings.js +1 -1
  79. package/lib/commonjs/classes/HMSQualityLimitationReasons.js +1 -1
  80. package/lib/commonjs/classes/HMSRTCStats.js +1 -1
  81. package/lib/commonjs/classes/HMSRTCStatsReport.js +1 -1
  82. package/lib/commonjs/classes/HMSRTMPConfig.js +1 -1
  83. package/lib/commonjs/classes/HMSRemoteAudioStats.js +1 -1
  84. package/lib/commonjs/classes/HMSRemoteAudioTrack.js +1 -1
  85. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  86. package/lib/commonjs/classes/HMSRemotePeer.js +1 -1
  87. package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
  88. package/lib/commonjs/classes/HMSRemoteVideoStats.js +1 -1
  89. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +1 -1
  90. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  91. package/lib/commonjs/classes/HMSRole.js +1 -1
  92. package/lib/commonjs/classes/HMSRoleChangeRequest.js +1 -1
  93. package/lib/commonjs/classes/HMSRoom.js +8 -1
  94. package/lib/commonjs/classes/HMSRoom.js.map +1 -1
  95. package/lib/commonjs/classes/HMSRoomCache.js +9 -2
  96. package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
  97. package/lib/commonjs/classes/HMSRoomUpdate.js +1 -0
  98. package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
  99. package/lib/commonjs/classes/HMSRtmpStreamingState.js +1 -1
  100. package/lib/commonjs/classes/HMSRtmpVideoResolution.js +1 -1
  101. package/lib/commonjs/classes/HMSSDK.js +105 -12
  102. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  103. package/lib/commonjs/classes/HMSServerRecordingState.js +1 -1
  104. package/lib/commonjs/classes/HMSSessionStore.js +2 -2
  105. package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
  106. package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js +1 -1
  107. package/lib/commonjs/classes/HMSSimulcastLayerSettings.js +1 -1
  108. package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js +1 -1
  109. package/lib/commonjs/classes/HMSSimulcastSettings.js +1 -1
  110. package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js +1 -1
  111. package/lib/commonjs/classes/HMSSpeaker.js +1 -1
  112. package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js +1 -1
  113. package/lib/commonjs/classes/HMSSubscribeSettings.js +1 -1
  114. package/lib/commonjs/classes/HMSTrack.js +1 -1
  115. package/lib/commonjs/classes/HMSTrackSettings.js +1 -1
  116. package/lib/commonjs/classes/HMSUpdateListenerActions.js +1 -0
  117. package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
  118. package/lib/commonjs/classes/HMSVideoResolution.js +1 -1
  119. package/lib/commonjs/classes/HMSVideoSettings.js +1 -1
  120. package/lib/commonjs/classes/HMSVideoTrack.js +1 -1
  121. package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
  122. package/lib/commonjs/classes/HMSVideoTrackSettings.js +1 -1
  123. package/lib/commonjs/classes/transcriptions/HMSTranscript.js +6 -0
  124. package/lib/commonjs/classes/transcriptions/HMSTranscript.js.map +1 -0
  125. package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js +2 -0
  126. package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js.map +1 -0
  127. package/lib/commonjs/classes/transcriptions/TranscriptionState.js +14 -0
  128. package/lib/commonjs/classes/transcriptions/TranscriptionState.js.map +1 -0
  129. package/lib/commonjs/classes/transcriptions/Transcriptions.js +6 -0
  130. package/lib/commonjs/classes/transcriptions/Transcriptions.js.map +1 -0
  131. package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js +12 -0
  132. package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js.map +1 -0
  133. package/lib/commonjs/classes/transcriptions/index.js +61 -0
  134. package/lib/commonjs/classes/transcriptions/index.js.map +1 -0
  135. package/lib/commonjs/classes/whiteboard/registerCallbacks.js +1 -1
  136. package/lib/commonjs/classes/whiteboard/registerCallbacks.js.map +1 -1
  137. package/lib/commonjs/hooks/useHMSPeerUpdates.js +1 -1
  138. package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
  139. package/lib/commonjs/index.js +13 -1
  140. package/lib/commonjs/index.js.map +1 -1
  141. package/lib/commonjs/modules/HMSManagerModule.js.map +1 -1
  142. package/lib/commonjs/utils/emitter/EventEmitter.js +1 -1
  143. package/lib/commonjs/utils/emitter/EventEmitter.js.map +1 -1
  144. package/lib/commonjs/utils/emitter/_EmitterSubscription.js +1 -1
  145. package/lib/commonjs/utils/emitter/_EmitterSubscription.js.map +1 -1
  146. package/lib/commonjs/utils/emitter/_EventSubscription.js +1 -1
  147. package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +1 -1
  148. package/lib/commonjs/utils/keyboard.js +1 -1
  149. package/lib/commonjs/utils/keyboard.js.map +1 -1
  150. package/lib/commonjs/utils/notification.js +1 -1
  151. package/lib/commonjs/utils/notification.js.map +1 -1
  152. package/lib/commonjs/utils/windowController.js +1 -1
  153. package/lib/commonjs/utils/windowController.js.map +1 -1
  154. package/lib/module/classes/HMSAudioMixerSource.js +1 -1
  155. package/lib/module/classes/HMSAudioNode.js +1 -1
  156. package/lib/module/classes/HMSAudioSettings.js +1 -1
  157. package/lib/module/classes/HMSAudioTrackSettings.js +1 -1
  158. package/lib/module/classes/HMSBrowserRecordingState.js +1 -1
  159. package/lib/module/classes/HMSChangeTrackStateRequest.js +1 -1
  160. package/lib/module/classes/HMSConfig.js +1 -1
  161. package/lib/module/classes/HMSEncoder.js +31 -1
  162. package/lib/module/classes/HMSEncoder.js.map +1 -1
  163. package/lib/module/classes/HMSException.js +1 -1
  164. package/lib/module/classes/HMSHLSConfig.js +1 -1
  165. package/lib/module/classes/HMSHLSMeetingURLVariant.js +1 -1
  166. package/lib/module/classes/HMSHLSRecordingConfig.js +1 -1
  167. package/lib/module/classes/HMSHLSRecordingState.js +1 -1
  168. package/lib/module/classes/HMSHLSStreamingState.js +1 -1
  169. package/lib/module/classes/HMSHLSVariant.js +1 -1
  170. package/lib/module/classes/HMSInteractivityCenter.js +1 -1
  171. package/lib/module/classes/HMSLocalAudioStats.js +1 -1
  172. package/lib/module/classes/HMSLocalAudioTrack.js +1 -1
  173. package/lib/module/classes/HMSLocalPeer.js +1 -1
  174. package/lib/module/classes/HMSLocalVideoStats.js +1 -1
  175. package/lib/module/classes/HMSLocalVideoTrack.js +1 -1
  176. package/lib/module/classes/HMSLogSettings.js +1 -1
  177. package/lib/module/classes/HMSLogger.js +1 -1
  178. package/lib/module/classes/HMSLogger.js.map +1 -1
  179. package/lib/module/classes/HMSMessage.js +1 -1
  180. package/lib/module/classes/HMSMessageRecipient.js +1 -1
  181. package/lib/module/classes/HMSNativeEventEmitter.js +1 -1
  182. package/lib/module/classes/HMSNetworkQuality.js +1 -1
  183. package/lib/module/classes/HMSNoiseCancellationPlugin.js +1 -1
  184. package/lib/module/classes/HMSPIPConfig.js +1 -1
  185. package/lib/module/classes/HMSPIPConfig.js.map +1 -1
  186. package/lib/module/classes/HMSPeer.js +20 -3
  187. package/lib/module/classes/HMSPeer.js.map +1 -1
  188. package/lib/module/classes/HMSPeerListIterator.js +1 -1
  189. package/lib/module/classes/HMSPeersCache.js +1 -1
  190. package/lib/module/classes/HMSPermissions.js +3 -1
  191. package/lib/module/classes/HMSPermissions.js.map +1 -1
  192. package/lib/module/classes/HMSPublishSettings.js +1 -1
  193. package/lib/module/classes/HMSQualityLimitationReasons.js +1 -1
  194. package/lib/module/classes/HMSRTCStats.js +1 -1
  195. package/lib/module/classes/HMSRTCStatsReport.js +1 -1
  196. package/lib/module/classes/HMSRTMPConfig.js +1 -1
  197. package/lib/module/classes/HMSRemoteAudioStats.js +1 -1
  198. package/lib/module/classes/HMSRemoteAudioTrack.js +1 -1
  199. package/lib/module/classes/HMSRemotePeer.js +1 -1
  200. package/lib/module/classes/HMSRemoteVideoStats.js +1 -1
  201. package/lib/module/classes/HMSRemoteVideoTrack.js +1 -1
  202. package/lib/module/classes/HMSRole.js +1 -1
  203. package/lib/module/classes/HMSRoleChangeRequest.js +1 -1
  204. package/lib/module/classes/HMSRoom.js +8 -1
  205. package/lib/module/classes/HMSRoom.js.map +1 -1
  206. package/lib/module/classes/HMSRoomCache.js +8 -1
  207. package/lib/module/classes/HMSRoomCache.js.map +1 -1
  208. package/lib/module/classes/HMSRoomUpdate.js +1 -0
  209. package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
  210. package/lib/module/classes/HMSRtmpStreamingState.js +1 -1
  211. package/lib/module/classes/HMSRtmpVideoResolution.js +1 -1
  212. package/lib/module/classes/HMSSDK.js +104 -11
  213. package/lib/module/classes/HMSSDK.js.map +1 -1
  214. package/lib/module/classes/HMSServerRecordingState.js +1 -1
  215. package/lib/module/classes/HMSSessionStore.js +1 -1
  216. package/lib/module/classes/HMSSimulcastLayerDefinition.js +1 -1
  217. package/lib/module/classes/HMSSimulcastLayerSettings.js +1 -1
  218. package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js +1 -1
  219. package/lib/module/classes/HMSSimulcastSettings.js +1 -1
  220. package/lib/module/classes/HMSSimulcastSettingsPolicy.js +1 -1
  221. package/lib/module/classes/HMSSpeaker.js +1 -1
  222. package/lib/module/classes/HMSSubscribeDegradationPolicy.js +1 -1
  223. package/lib/module/classes/HMSSubscribeSettings.js +1 -1
  224. package/lib/module/classes/HMSTrack.js +1 -1
  225. package/lib/module/classes/HMSTrackSettings.js +1 -1
  226. package/lib/module/classes/HMSUpdateListenerActions.js +1 -0
  227. package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
  228. package/lib/module/classes/HMSVideoResolution.js +1 -1
  229. package/lib/module/classes/HMSVideoSettings.js +1 -1
  230. package/lib/module/classes/HMSVideoTrack.js +1 -1
  231. package/lib/module/classes/HMSVideoTrackSettings.js +1 -1
  232. package/lib/module/classes/transcriptions/HMSTranscript.js +2 -0
  233. package/lib/module/classes/transcriptions/HMSTranscript.js.map +1 -0
  234. package/lib/module/classes/transcriptions/OnTranscriptionError.js +2 -0
  235. package/lib/module/classes/transcriptions/OnTranscriptionError.js.map +1 -0
  236. package/lib/module/classes/transcriptions/TranscriptionState.js +8 -0
  237. package/lib/module/classes/transcriptions/TranscriptionState.js.map +1 -0
  238. package/lib/module/classes/transcriptions/Transcriptions.js +2 -0
  239. package/lib/module/classes/transcriptions/Transcriptions.js.map +1 -0
  240. package/lib/module/classes/transcriptions/TranscriptionsMode.js +6 -0
  241. package/lib/module/classes/transcriptions/TranscriptionsMode.js.map +1 -0
  242. package/lib/module/classes/transcriptions/index.js +6 -0
  243. package/lib/module/classes/transcriptions/index.js.map +1 -0
  244. package/lib/module/index.js +1 -0
  245. package/lib/module/index.js.map +1 -1
  246. package/lib/module/modules/HMSManagerModule.js.map +1 -1
  247. package/lib/module/utils/emitter/EventEmitter.js +1 -1
  248. package/lib/module/utils/emitter/_EmitterSubscription.js +1 -1
  249. package/lib/module/utils/emitter/_EventSubscription.js +1 -1
  250. package/lib/module/utils/emitter/_EventSubscriptionVendor.js +1 -1
  251. package/lib/typescript/classes/HMSEncoder.d.ts +3 -0
  252. package/lib/typescript/classes/HMSPIPConfig.d.ts +3 -0
  253. package/lib/typescript/classes/HMSPeer.d.ts +3 -1
  254. package/lib/typescript/classes/HMSPermissions.d.ts +7 -0
  255. package/lib/typescript/classes/HMSRoom.d.ts +2 -0
  256. package/lib/typescript/classes/HMSRoomUpdate.d.ts +2 -1
  257. package/lib/typescript/classes/HMSSDK.d.ts +7 -0
  258. package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +2 -1
  259. package/lib/typescript/classes/transcriptions/HMSTranscript.d.ts +8 -0
  260. package/lib/typescript/classes/transcriptions/OnTranscriptionError.d.ts +4 -0
  261. package/lib/typescript/classes/transcriptions/TranscriptionState.d.ts +6 -0
  262. package/lib/typescript/classes/transcriptions/Transcriptions.d.ts +12 -0
  263. package/lib/typescript/classes/transcriptions/TranscriptionsMode.d.ts +4 -0
  264. package/lib/typescript/classes/transcriptions/index.d.ts +5 -0
  265. package/lib/typescript/index.d.ts +1 -0
  266. package/package.json +1 -1
  267. package/sdk-versions.json +2 -2
  268. package/src/classes/HMSEncoder.ts +35 -0
  269. package/src/classes/HMSPIPConfig.ts +30 -0
  270. package/src/classes/HMSPeer.ts +29 -2
  271. package/src/classes/HMSPermissions.ts +10 -0
  272. package/src/classes/HMSRoom.ts +14 -0
  273. package/src/classes/HMSRoomCache.ts +9 -0
  274. package/src/classes/HMSRoomUpdate.ts +1 -0
  275. package/src/classes/HMSSDK.tsx +121 -21
  276. package/src/classes/HMSUpdateListenerActions.ts +1 -0
  277. package/src/classes/transcriptions/HMSTranscript.ts +13 -0
  278. package/src/classes/transcriptions/OnTranscriptionError.ts +5 -0
  279. package/src/classes/transcriptions/TranscriptionState.ts +6 -0
  280. package/src/classes/transcriptions/Transcriptions.ts +19 -0
  281. package/src/classes/transcriptions/TranscriptionsMode.ts +4 -0
  282. package/src/classes/transcriptions/index.ts +5 -0
  283. package/src/index.ts +2 -0
@@ -8,8 +8,10 @@
8
8
  import Foundation
9
9
  import HMSSDK
10
10
  import ReplayKit
11
+ import AVKit
12
+ import SwiftUI
11
13
 
12
- class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
14
+ class HMSRNSDK: NSObject, HMSUpdateListener, HMSPreviewListener {
13
15
 
14
16
  var hms: HMSSDK?
15
17
  var interactivity: HMSRNInteractivityCenter?
@@ -38,6 +40,7 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
38
40
 
39
41
  // MARK: - Setup
40
42
  init(data: NSDictionary?, delegate manager: HMSManager?, uid id: String) {
43
+ super.init()
41
44
  preferredExtension = data?.value(forKey: "preferredExtension") as? String
42
45
  self.delegate = manager
43
46
  self.id = id
@@ -1395,6 +1398,9 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
1395
1398
  case "isLargeRoom":
1396
1399
  return ["isLargeRoom": hmsRoom.isLarge]
1397
1400
 
1401
+ case "transcriptions":
1402
+ return ["transcriptions": HMSDecoder.getTranscriptionStates(hmsRoom.transcriptionStates)]
1403
+
1398
1404
  default:
1399
1405
  return nil
1400
1406
  }
@@ -1531,6 +1537,18 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
1531
1537
  }
1532
1538
  }
1533
1539
  }
1540
+
1541
+ if #available(iOS 15.0, *),
1542
+ useActiveSpeakerInPIP,
1543
+ let controller = pipController,
1544
+ controller.isPictureInPictureActive,
1545
+ track.kind == .video,
1546
+ update == .trackRemoved,
1547
+ pipModel?.track == track {
1548
+
1549
+ pipModel?.text = hms?.localPeer?.name
1550
+ pipModel?.track = nil
1551
+ }
1534
1552
 
1535
1553
  if eventsEnableStatus[HMSConstants.ON_TRACK_UPDATE] != true {
1536
1554
  return
@@ -1559,6 +1577,35 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
1559
1577
  }
1560
1578
 
1561
1579
  func on(updated speakers: [HMSSpeaker]) {
1580
+
1581
+ if #available(iOS 15.0, *),
1582
+ useActiveSpeakerInPIP,
1583
+ let controller = pipController,
1584
+ controller.isPictureInPictureActive,
1585
+ let peer = speakers.first?.peer,
1586
+ let track = peer.videoTrack {
1587
+
1588
+ if track.isMute() {
1589
+ pipModel?.text = peer.name
1590
+ pipModel?.track = nil
1591
+ } else {
1592
+ if peer.isLocal {
1593
+ if #available(iOS 16.0, *) {
1594
+ if AVCaptureSession().isMultitaskingCameraAccessSupported {
1595
+ pipModel?.text = nil
1596
+ pipModel?.track = track
1597
+ return
1598
+ }
1599
+ }
1600
+ pipModel?.text = peer.name
1601
+ pipModel?.track = nil
1602
+ } else {
1603
+ pipModel?.text = nil
1604
+ pipModel?.track = track
1605
+ }
1606
+ }
1607
+ }
1608
+
1562
1609
  if eventsEnableStatus[HMSConstants.ON_SPEAKER] != true {
1563
1610
  return
1564
1611
  }
@@ -1684,6 +1731,15 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
1684
1731
  self.delegate?.emitEvent(HMSConstants.ON_REMOTE_VIDEO_STATS, ["remoteVideoStats": remoteStats, "track": remoteTrack, "peer": decodedPeer, "id": self.id])
1685
1732
  }
1686
1733
 
1734
+ func on(transcripts: HMSTranscripts) {
1735
+ if eventsEnableStatus[HMSConstants.ON_TRANSCRIPTS] != true {
1736
+ return
1737
+ }
1738
+ let transcriptsArray = HMSDecoder.getHmsTranscripts(transcripts.transcripts)
1739
+
1740
+ self.delegate?.emitEvent(HMSConstants.ON_TRANSCRIPTS, ["id": self.id, "transcripts": transcriptsArray])
1741
+ }
1742
+
1687
1743
  // MARK: - Simulcast
1688
1744
 
1689
1745
  func getVideoTrackLayerDefinition(_ data: NSDictionary, _ resolve: RCTPromiseResolveBlock?, _ reject: RCTPromiseRejectBlock?) {
@@ -2351,6 +2407,209 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
2351
2407
  resolve?(true)
2352
2408
  }
2353
2409
 
2410
+ // MARK: - WebRTC Transcriptions
2411
+
2412
+ func handleRealTimeTranscription(_ data: NSDictionary,
2413
+ _ resolve: RCTPromiseResolveBlock?,
2414
+ _ reject: RCTPromiseRejectBlock?) {
2415
+ guard let action = data.value(forKey: "action") as? String else {
2416
+ reject?("\(#function): `action` key not passed", "\(#function): `action` key not passed", nil)
2417
+ return
2418
+ }
2419
+ switch action {
2420
+ case "start":
2421
+ startRealTimeTranscription(data, resolve, reject)
2422
+ case "stop":
2423
+ stopRealTimeTranscription(data, resolve, reject)
2424
+ default:
2425
+ reject?("\(#function): Unknown `action` key passed", "\(#function): Unknown `action` key passed", nil)
2426
+ }
2427
+ }
2428
+
2429
+ private func startRealTimeTranscription(_ data: NSDictionary,
2430
+ _ resolve: RCTPromiseResolveBlock?,
2431
+ _ reject: RCTPromiseRejectBlock?) {
2432
+ guard let hmssdk = hms else {
2433
+ reject?("\(#function): HMSSDK not available", "\(#function): HMSSDK not available", nil)
2434
+ return
2435
+ }
2436
+ hmssdk.startTranscription { success, error in
2437
+ if let error = error {
2438
+ reject?(error.localizedDescription, error.localizedDescription, nil)
2439
+ return
2440
+ }
2441
+ resolve?(success)
2442
+ }
2443
+ }
2444
+
2445
+ private func stopRealTimeTranscription(_ data: NSDictionary,
2446
+ _ resolve: RCTPromiseResolveBlock?,
2447
+ _ reject: RCTPromiseRejectBlock?) {
2448
+ guard let hmssdk = hms else {
2449
+ reject?("\(#function): HMSSDK not available", "\(#function): HMSSDK not available", nil)
2450
+ return
2451
+ }
2452
+ hmssdk.stopTranscription { success, error in
2453
+ if let error = error {
2454
+ reject?(error.localizedDescription, error.localizedDescription, nil)
2455
+ return
2456
+ }
2457
+ resolve?(success)
2458
+ }
2459
+ }
2460
+
2461
+ // MARK: - PIP Mode Support
2462
+
2463
+ internal var _pipVideoCallViewController: Any?
2464
+
2465
+ @available(iOS 15.0, *)
2466
+ internal var pipVideoCallViewController: AVPictureInPictureVideoCallViewController? {
2467
+ if _pipVideoCallViewController == nil {
2468
+ _pipVideoCallViewController = AVPictureInPictureVideoCallViewController()
2469
+ }
2470
+ return _pipVideoCallViewController as? AVPictureInPictureVideoCallViewController
2471
+ }
2472
+
2473
+ internal var _pipModel: Any?
2474
+
2475
+ @available(iOS 15.0, *)
2476
+ internal var pipModel: HMSPipModel? {
2477
+ if _pipModel == nil {
2478
+ _pipModel = HMSPipModel()
2479
+ }
2480
+ return _pipModel as? HMSPipModel
2481
+ }
2482
+
2483
+ internal var pipController: AVPictureInPictureController?
2484
+
2485
+ private var useActiveSpeakerInPIP: Bool = true
2486
+
2487
+ @available(iOS 15.0, *)
2488
+ func setPictureInPictureParams(_ data: NSDictionary,
2489
+ _ resolve: RCTPromiseResolveBlock?,
2490
+ _ reject: RCTPromiseRejectBlock?) {
2491
+
2492
+ guard AVPictureInPictureController.isPictureInPictureSupported() else {
2493
+ let errorMessage = "\(#function) PIP is not supported on this device"
2494
+ reject?("6004", errorMessage, nil)
2495
+ return
2496
+ }
2497
+
2498
+ guard let uiView = UIApplication.shared.keyWindow?.rootViewController?.view else {
2499
+ let errorMessage = "\(#function) Failed to setup PIP"
2500
+ reject?("6004", errorMessage, nil)
2501
+ return
2502
+ }
2503
+
2504
+ pipModel?.pipViewEnabled = true
2505
+
2506
+ if let scaleType = data["scaleType"] as? String {
2507
+ pipModel?.scaleType = getViewContentMode(scaleType)
2508
+ } else {
2509
+ pipModel?.scaleType = .scaleAspectFill
2510
+ }
2511
+
2512
+ pipModel?.color = .black
2513
+ pipModel?.text = hms?.localPeer?.name
2514
+
2515
+ let controller = UIHostingController(rootView: HMSPipView(model: pipModel!))
2516
+
2517
+ pipVideoCallViewController?.view.addConstrained(subview: controller.view)
2518
+
2519
+ if let ratio = data["aspectRatio"] as? [Int], ratio.count == 2 {
2520
+ pipVideoCallViewController?.preferredContentSize = CGSize(width: ratio[0], height: ratio[1])
2521
+ } else {
2522
+ pipVideoCallViewController?.preferredContentSize = CGSize(width: uiView.frame.size.width, height: uiView.frame.size.height)
2523
+ }
2524
+
2525
+ guard let pipVideoCallViewController = pipVideoCallViewController else {
2526
+ let errorMessage = "\(#function) Failed to setup PIP"
2527
+ reject?("6004", errorMessage, nil)
2528
+ return
2529
+ }
2530
+
2531
+ let pipContentSource = AVPictureInPictureController.ContentSource(activeVideoCallSourceView: uiView, contentViewController: pipVideoCallViewController)
2532
+
2533
+ pipController = AVPictureInPictureController(contentSource: pipContentSource)
2534
+
2535
+ pipController?.delegate = self
2536
+
2537
+ pipController?.canStartPictureInPictureAutomaticallyFromInline = true
2538
+
2539
+ if let autoEnterPIP = data["autoEnterPipMode"] as? Bool {
2540
+ pipController?.canStartPictureInPictureAutomaticallyFromInline = autoEnterPIP
2541
+ }
2542
+
2543
+ NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification,
2544
+ object: nil, queue: .main) { [weak self] _ in
2545
+ self?.stopPIP(nil, nil)
2546
+ }
2547
+
2548
+ resolve?(nil)
2549
+ }
2550
+
2551
+ func enterPipMode(_ resolve: RCTPromiseResolveBlock?,
2552
+ _ reject: RCTPromiseRejectBlock?) {
2553
+ pipController?.startPictureInPicture()
2554
+ resolve?(nil)
2555
+ }
2556
+
2557
+ func stopPIP(_ resolve: RCTPromiseResolveBlock?,
2558
+ _ reject: RCTPromiseRejectBlock?) {
2559
+ pipController?.stopPictureInPicture()
2560
+ resolve?(nil)
2561
+ }
2562
+
2563
+ func disposePIP(_ resolve: RCTPromiseResolveBlock?,
2564
+ _ reject: RCTPromiseRejectBlock?) {
2565
+ pipController = nil
2566
+ _pipModel = nil
2567
+ _pipVideoCallViewController = nil
2568
+ NotificationCenter.default.removeObserver(UIApplication.didBecomeActiveNotification)
2569
+ resolve?(nil)
2570
+ }
2571
+
2572
+ func isPIPActive(_ resolve: RCTPromiseResolveBlock?,
2573
+ _ reject: RCTPromiseRejectBlock?) {
2574
+ if pipController != nil && pipController!.isPictureInPictureActive {
2575
+ resolve?(true)
2576
+ } else {
2577
+ resolve?(false)
2578
+ }
2579
+ }
2580
+
2581
+ @available(iOS 15.0, *)
2582
+ func changeIOSPIPVideoTrack(_ data: NSDictionary,
2583
+ _ resolve: RCTPromiseResolveBlock?,
2584
+ _ reject: RCTPromiseRejectBlock?) {
2585
+
2586
+ guard let trackID = data["trackId"] as? String,
2587
+ let room = hms?.room,
2588
+ let track = HMSUtilities.getVideoTrack(for: trackID, in: room)
2589
+ else {
2590
+ let errorMessage = "\(#function) Incorrect data passed for changing track in PIP Mode"
2591
+ reject?("6004", errorMessage, nil)
2592
+ return
2593
+ }
2594
+
2595
+ useActiveSpeakerInPIP = false
2596
+ pipModel?.track = track
2597
+ resolve?(nil)
2598
+ }
2599
+
2600
+ func setActiveSpeakerInIOSPIP(_ data: NSDictionary,
2601
+ _ resolve: RCTPromiseResolveBlock?,
2602
+ _ reject: RCTPromiseRejectBlock?) {
2603
+ guard let enabled = data["enable"] as? Bool else {
2604
+ let errorMessage = "\(#function) Incorrect data passed for setActiveSpeakerInIOSPIP in PIP Mode"
2605
+ reject?("6004", errorMessage, nil)
2606
+ return
2607
+ }
2608
+
2609
+ useActiveSpeakerInPIP = enabled
2610
+ resolve?(nil)
2611
+ }
2612
+
2354
2613
  // MARK: - Helper Functions
2355
2614
 
2356
2615
  // Handle resetting states and data cleanup
@@ -2429,6 +2688,8 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
2429
2688
  return "SERVER_RECORDING_STATE_UPDATED"
2430
2689
  case .hlsRecordingStateUpdated:
2431
2690
  return "HLS_RECORDING_STATE_UPDATED"
2691
+ case .transcriptionStateUpdated:
2692
+ return "TRANSCRIPTIONS_UPDATED"
2432
2693
  default:
2433
2694
  return ""
2434
2695
  }
@@ -2449,6 +2710,19 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
2449
2710
  static private func getTimeStamp() -> String {
2450
2711
  "\(Date().timeIntervalSince1970)"
2451
2712
  }
2713
+
2714
+ private func getViewContentMode(_ type: String?) -> UIView.ContentMode {
2715
+ switch type {
2716
+ case "ASPECT_FILL":
2717
+ return .scaleAspectFill
2718
+ case "ASPECT_FIT":
2719
+ return .scaleAspectFit
2720
+ case "ASPECT_BALANCED":
2721
+ return .center
2722
+ default:
2723
+ return .scaleAspectFill
2724
+ }
2725
+ }
2452
2726
  }
2453
2727
 
2454
2728
  extension UIImage {
@@ -2464,3 +2738,63 @@ extension UIImage {
2464
2738
  return normalizedImage
2465
2739
  }
2466
2740
  }
2741
+
2742
+ extension HMSRNSDK: AVPictureInPictureControllerDelegate {
2743
+
2744
+ public func pictureInPictureControllerWillStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
2745
+ print(#function)
2746
+ }
2747
+
2748
+ public func pictureInPictureControllerDidStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
2749
+
2750
+ if eventsEnableStatus[HMSConstants.ON_PIP_MODE_CHANGED] != true {
2751
+ return
2752
+ }
2753
+
2754
+ self.delegate?.emitEvent(HMSConstants.ON_PIP_MODE_CHANGED,
2755
+ ["event": HMSConstants.ON_PIP_MODE_CHANGED,
2756
+ "id": self.id,
2757
+ "isInPictureInPictureMode": true])
2758
+ }
2759
+
2760
+ public func pictureInPictureControllerWillStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
2761
+ print(#function)
2762
+ }
2763
+
2764
+ public func pictureInPictureControllerDidStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
2765
+ if eventsEnableStatus[HMSConstants.ON_PIP_MODE_CHANGED] != true {
2766
+ return
2767
+ }
2768
+
2769
+ self.delegate?.emitEvent(HMSConstants.ON_PIP_MODE_CHANGED,
2770
+ ["event": HMSConstants.ON_PIP_MODE_CHANGED,
2771
+ "id": self.id,
2772
+ "isInPictureInPictureMode": false])
2773
+ }
2774
+
2775
+ public func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, failedToStartPictureInPictureWithError error: Error) {
2776
+ if eventsEnableStatus[HMSConstants.ON_PIP_MODE_CHANGED] != true {
2777
+ return
2778
+ }
2779
+
2780
+ self.delegate?.emitEvent(HMSConstants.ON_PIP_MODE_CHANGED,
2781
+ ["event": HMSConstants.ON_PIP_MODE_CHANGED,
2782
+ "id": self.id,
2783
+ "isInPictureInPictureMode": false])
2784
+ }
2785
+
2786
+ public func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void) {
2787
+ print(#function)
2788
+ }
2789
+ }
2790
+
2791
+ extension UIView {
2792
+ func addConstrained(subview: UIView) {
2793
+ addSubview(subview)
2794
+ subview.translatesAutoresizingMaskIntoConstraints = false
2795
+ subview.topAnchor.constraint(equalTo: topAnchor).isActive = true
2796
+ subview.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
2797
+ subview.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true
2798
+ subview.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
2799
+ }
2800
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -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>Hmssdk.xcscheme_^#shared#^_</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ </dict>
14
+ </plist>
@@ -0,0 +1,18 @@
1
+ //
2
+ // HMSPipModel.swift
3
+ // react-native-hms
4
+ //
5
+ // Created by Yogesh Singh on 21/06/24.
6
+ //
7
+
8
+ import SwiftUI
9
+ import HMSSDK
10
+
11
+ @available(iOS 15.0, *)
12
+ class HMSPipModel: ObservableObject {
13
+ @Published var track: HMSVideoTrack?
14
+ @Published var pipViewEnabled = false
15
+ @Published var scaleType: UIView.ContentMode?
16
+ @Published var text: String?
17
+ @Published var color: Color = Color.black
18
+ }
@@ -0,0 +1,36 @@
1
+ //
2
+ // HMSPipView.swift
3
+ // react-native-hms
4
+ //
5
+ // Created by Yogesh Singh on 21/06/24.
6
+ //
7
+
8
+ import SwiftUI
9
+ import HMSSDK
10
+
11
+ @available(iOS 15.0, *)
12
+ struct HMSPipView: View {
13
+
14
+ @ObservedObject var model: HMSPipModel
15
+
16
+ var body: some View {
17
+ if model.pipViewEnabled {
18
+ VStack {
19
+ if let track = model.track, !(track.isMute()) {
20
+ GeometryReader { geo in
21
+ HMSSampleBufferSwiftUIView(track: track,
22
+ contentMode: .scaleAspectFill,
23
+ preferredSize: geo.size,
24
+ model: model)
25
+ .frame(width: geo.size.width, height: geo.size.height)
26
+ }
27
+ } else if let text = model.text {
28
+ Text(text)
29
+ }
30
+ }
31
+ .foregroundColor(.white)
32
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
33
+ .background(model.color)
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,45 @@
1
+ //
2
+ // HMSSampleBufferSwiftUIView.swift
3
+ // react-native-hms
4
+ //
5
+ // Created by Yogesh Singh on 21/06/24.
6
+ //
7
+
8
+ import SwiftUI
9
+ import HMSSDK
10
+
11
+ @available(iOS 15.0, *)
12
+ public struct HMSSampleBufferSwiftUIView: UIViewRepresentable {
13
+ weak var track: HMSVideoTrack?
14
+ var contentMode: UIView.ContentMode
15
+ var preferredSize: CGSize?
16
+
17
+ @ObservedObject var model: HMSPipModel
18
+
19
+ public func makeUIView(context: UIViewRepresentableContext<HMSSampleBufferSwiftUIView>) -> HMSSampleBufferDisplayView {
20
+
21
+ let sampleBufferView = HMSSampleBufferDisplayView(frame: .zero)
22
+ sampleBufferView.track = track
23
+
24
+ if let preferredSize = preferredSize {
25
+ sampleBufferView.preferredSize = preferredSize
26
+ }
27
+ sampleBufferView.contentMode = contentMode
28
+ sampleBufferView.isEnabled = true
29
+
30
+ return sampleBufferView
31
+ }
32
+
33
+ public func updateUIView(_ sampleBufferView: HMSSampleBufferDisplayView, context: UIViewRepresentableContext<HMSSampleBufferSwiftUIView>) {
34
+
35
+ if track != sampleBufferView.track {
36
+ sampleBufferView.track = track
37
+ }
38
+ sampleBufferView.isEnabled = model.pipViewEnabled
39
+ }
40
+
41
+ public static func dismantleUIView(_ uiView: HMSSampleBufferDisplayView, coordinator: ()) {
42
+ uiView.isEnabled = false
43
+ uiView.track = nil
44
+ }
45
+ }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSAudioMixerSource = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class HMSAudioMixerSource {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.HMSAudioNode = void 0;
7
7
  var _HMSConstants = require("./HMSConstants");
8
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
9
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
10
10
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
11
  class HMSAudioNode {
@@ -1 +1 @@
1
- {"version":3,"names":["_HMSConstants","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","HMSAudioNode","constructor","name","HMSConstants","DEFAULT_SDK_ID","toString","exports"],"sources":["HMSAudioNode.ts"],"sourcesContent":["import { HMSConstants } from './HMSConstants';\n\nexport class HMSAudioNode {\n name: string;\n sdkId: string = HMSConstants.DEFAULT_SDK_ID;\n\n constructor(name: string) {\n this.name = name;\n }\n\n toString(): string {\n return this.name;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAA8C,SAAAC,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAEvC,MAAMW,YAAY,CAAC;EAIxBC,WAAWA,CAACC,IAAY,EAAE;IAAAvB,eAAA;IAAAA,eAAA,gBAFVwB,0BAAY,CAACC,cAAc;IAGzC,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEAG,QAAQA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACH,IAAI;EAClB;AACF;AAACI,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_HMSConstants","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSAudioNode","constructor","name","HMSConstants","DEFAULT_SDK_ID","toString","exports"],"sources":["HMSAudioNode.ts"],"sourcesContent":["import { HMSConstants } from './HMSConstants';\n\nexport class HMSAudioNode {\n name: string;\n sdkId: string = HMSConstants.DEFAULT_SDK_ID;\n\n constructor(name: string) {\n this.name = name;\n }\n\n toString(): string {\n return this.name;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAA8C,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAEvC,MAAMgB,YAAY,CAAC;EAIxBC,WAAWA,CAACC,IAAY,EAAE;IAAArB,eAAA;IAAAA,eAAA,gBAFVsB,0BAAY,CAACC,cAAc;IAGzC,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEAG,QAAQA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACH,IAAI;EAClB;AACF;AAACI,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSAudioSettings = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class HMSAudioSettings {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSAudioTrackSettings = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  /**
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSBrowserRecordingState = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class HMSBrowserRecordingState {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.HMSCameraControl = void 0;
7
7
  var _HMSConstants = require("./HMSConstants");
8
8
  var _HMSManagerModule = _interopRequireDefault(require("../modules/HMSManagerModule"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  class HMSCameraControl {
11
11
  /**
12
12
  * It captures the image from the device camera at max possible resolution.
@@ -1 +1 @@
1
- {"version":3,"names":["_HMSConstants","require","_HMSManagerModule","_interopRequireDefault","obj","__esModule","default","HMSCameraControl","captureImageAtMaxSupportedResolution","flash","HMSManager","id","HMSConstants","DEFAULT_SDK_ID","exports"],"sources":["HMSCameraControl.ts"],"sourcesContent":["import { HMSConstants } from './HMSConstants';\n\nimport HMSManager from '../modules/HMSManagerModule';\n\nexport class HMSCameraControl {\n /**\n * It captures the image from the device camera at max possible resolution.\n *\n * @param {boolean} [flash=false] flash - value indicating whether to use flash while capturing image or not\n * @returns Promise - which is resolved with the file path of the captured image saved on the disk\n */\n static captureImageAtMaxSupportedResolution(\n flash: boolean = false\n ): Promise<string> {\n return HMSManager.captureImageAtMaxSupportedResolution({\n id: HMSConstants.DEFAULT_SDK_ID,\n flash,\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAqD,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9C,MAAMG,gBAAgB,CAAC;EAC5B;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,oCAAoCA,CACzCC,KAAc,GAAG,KAAK,EACL;IACjB,OAAOC,yBAAU,CAACF,oCAAoC,CAAC;MACrDG,EAAE,EAAEC,0BAAY,CAACC,cAAc;MAC/BJ;IACF,CAAC,CAAC;EACJ;AACF;AAACK,OAAA,CAAAP,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_HMSConstants","require","_HMSManagerModule","_interopRequireDefault","e","__esModule","default","HMSCameraControl","captureImageAtMaxSupportedResolution","flash","HMSManager","id","HMSConstants","DEFAULT_SDK_ID","exports"],"sources":["HMSCameraControl.ts"],"sourcesContent":["import { HMSConstants } from './HMSConstants';\n\nimport HMSManager from '../modules/HMSManagerModule';\n\nexport class HMSCameraControl {\n /**\n * It captures the image from the device camera at max possible resolution.\n *\n * @param {boolean} [flash=false] flash - value indicating whether to use flash while capturing image or not\n * @returns Promise - which is resolved with the file path of the captured image saved on the disk\n */\n static captureImageAtMaxSupportedResolution(\n flash: boolean = false\n ): Promise<string> {\n return HMSManager.captureImageAtMaxSupportedResolution({\n id: HMSConstants.DEFAULT_SDK_ID,\n flash,\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAqD,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C,MAAMG,gBAAgB,CAAC;EAC5B;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,oCAAoCA,CACzCC,KAAc,GAAG,KAAK,EACL;IACjB,OAAOC,yBAAU,CAACF,oCAAoC,CAAC;MACrDG,EAAE,EAAEC,0BAAY,CAACC,cAAc;MAC/BJ;IACF,CAAC,CAAC;EACJ;AACF;AAACK,OAAA,CAAAP,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSChangeTrackStateRequest = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class HMSChangeTrackStateRequest {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSConfig = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class HMSConfig {