@abrar71/lib-jitsi-meet 0.0.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.
Files changed (350) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +26 -0
  3. package/dist/esm/JitsiConference.js +3692 -0
  4. package/dist/esm/JitsiConference.js.map +1 -0
  5. package/dist/esm/JitsiConferenceErrors.js +126 -0
  6. package/dist/esm/JitsiConferenceErrors.js.map +1 -0
  7. package/dist/esm/JitsiConferenceEventManager.js +424 -0
  8. package/dist/esm/JitsiConferenceEventManager.js.map +1 -0
  9. package/dist/esm/JitsiConferenceEvents.js +431 -0
  10. package/dist/esm/JitsiConferenceEvents.js.map +1 -0
  11. package/dist/esm/JitsiConnection.js +187 -0
  12. package/dist/esm/JitsiConnection.js.map +1 -0
  13. package/dist/esm/JitsiConnectionErrors.js +52 -0
  14. package/dist/esm/JitsiConnectionErrors.js.map +1 -0
  15. package/dist/esm/JitsiConnectionEvents.js +57 -0
  16. package/dist/esm/JitsiConnectionEvents.js.map +1 -0
  17. package/dist/esm/JitsiMediaDevices.js +221 -0
  18. package/dist/esm/JitsiMediaDevices.js.map +1 -0
  19. package/dist/esm/JitsiMediaDevicesEvents.js +29 -0
  20. package/dist/esm/JitsiMediaDevicesEvents.js.map +1 -0
  21. package/dist/esm/JitsiMeetJS.js +499 -0
  22. package/dist/esm/JitsiMeetJS.js.map +1 -0
  23. package/dist/esm/JitsiParticipant.js +323 -0
  24. package/dist/esm/JitsiParticipant.js.map +1 -0
  25. package/dist/esm/JitsiTrackError.js +122 -0
  26. package/dist/esm/JitsiTrackError.js.map +1 -0
  27. package/dist/esm/JitsiTrackErrors.js +91 -0
  28. package/dist/esm/JitsiTrackErrors.js.map +1 -0
  29. package/dist/esm/JitsiTrackEvents.js +60 -0
  30. package/dist/esm/JitsiTrackEvents.js.map +1 -0
  31. package/dist/esm/JitsiTranscriptionStatus.js +15 -0
  32. package/dist/esm/JitsiTranscriptionStatus.js.map +1 -0
  33. package/dist/esm/modules/RTC/BridgeChannel.js +398 -0
  34. package/dist/esm/modules/RTC/BridgeChannel.js.map +1 -0
  35. package/dist/esm/modules/RTC/JitsiLocalTrack.js +896 -0
  36. package/dist/esm/modules/RTC/JitsiLocalTrack.js.map +1 -0
  37. package/dist/esm/modules/RTC/JitsiRemoteTrack.js +427 -0
  38. package/dist/esm/modules/RTC/JitsiRemoteTrack.js.map +1 -0
  39. package/dist/esm/modules/RTC/JitsiTrack.js +453 -0
  40. package/dist/esm/modules/RTC/JitsiTrack.js.map +1 -0
  41. package/dist/esm/modules/RTC/MockClasses.js +388 -0
  42. package/dist/esm/modules/RTC/MockClasses.js.map +1 -0
  43. package/dist/esm/modules/RTC/RTC.js +658 -0
  44. package/dist/esm/modules/RTC/RTC.js.map +1 -0
  45. package/dist/esm/modules/RTC/RTCUtils.js +762 -0
  46. package/dist/esm/modules/RTC/RTCUtils.js.map +1 -0
  47. package/dist/esm/modules/RTC/ScreenObtainer.js +380 -0
  48. package/dist/esm/modules/RTC/ScreenObtainer.js.map +1 -0
  49. package/dist/esm/modules/RTC/TPCUtils.js +803 -0
  50. package/dist/esm/modules/RTC/TPCUtils.js.map +1 -0
  51. package/dist/esm/modules/RTC/TraceablePeerConnection.js +2223 -0
  52. package/dist/esm/modules/RTC/TraceablePeerConnection.js.map +1 -0
  53. package/dist/esm/modules/RTCStats/DefaulLogStorage.js +35 -0
  54. package/dist/esm/modules/RTCStats/DefaulLogStorage.js.map +1 -0
  55. package/dist/esm/modules/RTCStats/RTCStats.js +219 -0
  56. package/dist/esm/modules/RTCStats/RTCStats.js.map +1 -0
  57. package/dist/esm/modules/RTCStats/RTCStatsEvents.js +92 -0
  58. package/dist/esm/modules/RTCStats/RTCStatsEvents.js.map +1 -0
  59. package/dist/esm/modules/RTCStats/interfaces.js +2 -0
  60. package/dist/esm/modules/RTCStats/interfaces.js.map +1 -0
  61. package/dist/esm/modules/browser/BrowserCapabilities.js +345 -0
  62. package/dist/esm/modules/browser/BrowserCapabilities.js.map +1 -0
  63. package/dist/esm/modules/browser/index.js +3 -0
  64. package/dist/esm/modules/browser/index.js.map +1 -0
  65. package/dist/esm/modules/connectivity/ConnectionQuality.js +389 -0
  66. package/dist/esm/modules/connectivity/ConnectionQuality.js.map +1 -0
  67. package/dist/esm/modules/connectivity/IceFailedHandling.js +84 -0
  68. package/dist/esm/modules/connectivity/IceFailedHandling.js.map +1 -0
  69. package/dist/esm/modules/connectivity/NetworkInfo.js +49 -0
  70. package/dist/esm/modules/connectivity/NetworkInfo.js.map +1 -0
  71. package/dist/esm/modules/connectivity/TrackStreamingStatus.js +453 -0
  72. package/dist/esm/modules/connectivity/TrackStreamingStatus.js.map +1 -0
  73. package/dist/esm/modules/detection/ActiveDeviceDetector.js +79 -0
  74. package/dist/esm/modules/detection/ActiveDeviceDetector.js.map +1 -0
  75. package/dist/esm/modules/detection/DetectionEvents.js +58 -0
  76. package/dist/esm/modules/detection/DetectionEvents.js.map +1 -0
  77. package/dist/esm/modules/detection/NoAudioSignalDetection.js +127 -0
  78. package/dist/esm/modules/detection/NoAudioSignalDetection.js.map +1 -0
  79. package/dist/esm/modules/detection/P2PDominantSpeakerDetection.js +47 -0
  80. package/dist/esm/modules/detection/P2PDominantSpeakerDetection.js.map +1 -0
  81. package/dist/esm/modules/detection/TrackVADEmitter.js +190 -0
  82. package/dist/esm/modules/detection/TrackVADEmitter.js.map +1 -0
  83. package/dist/esm/modules/detection/VADAudioAnalyser.js +199 -0
  84. package/dist/esm/modules/detection/VADAudioAnalyser.js.map +1 -0
  85. package/dist/esm/modules/detection/VADNoiseDetection.js +168 -0
  86. package/dist/esm/modules/detection/VADNoiseDetection.js.map +1 -0
  87. package/dist/esm/modules/detection/VADReportingService.js +203 -0
  88. package/dist/esm/modules/detection/VADReportingService.js.map +1 -0
  89. package/dist/esm/modules/detection/VADTalkMutedDetection.js +131 -0
  90. package/dist/esm/modules/detection/VADTalkMutedDetection.js.map +1 -0
  91. package/dist/esm/modules/e2ee/Context.js +274 -0
  92. package/dist/esm/modules/e2ee/Context.js.map +1 -0
  93. package/dist/esm/modules/e2ee/E2EEContext.js +158 -0
  94. package/dist/esm/modules/e2ee/E2EEContext.js.map +1 -0
  95. package/dist/esm/modules/e2ee/E2EEErrors.js +10 -0
  96. package/dist/esm/modules/e2ee/E2EEErrors.js.map +1 -0
  97. package/dist/esm/modules/e2ee/E2EEncryption.js +87 -0
  98. package/dist/esm/modules/e2ee/E2EEncryption.js.map +1 -0
  99. package/dist/esm/modules/e2ee/ExternallyManagedKeyHandler.js +24 -0
  100. package/dist/esm/modules/e2ee/ExternallyManagedKeyHandler.js.map +1 -0
  101. package/dist/esm/modules/e2ee/KeyHandler.js +137 -0
  102. package/dist/esm/modules/e2ee/KeyHandler.js.map +1 -0
  103. package/dist/esm/modules/e2ee/ManagedKeyHandler.js +182 -0
  104. package/dist/esm/modules/e2ee/ManagedKeyHandler.js.map +1 -0
  105. package/dist/esm/modules/e2ee/OlmAdapter.js +860 -0
  106. package/dist/esm/modules/e2ee/OlmAdapter.js.map +1 -0
  107. package/dist/esm/modules/e2ee/SAS.js +128 -0
  108. package/dist/esm/modules/e2ee/SAS.js.map +1 -0
  109. package/dist/esm/modules/e2ee/Worker.js +102 -0
  110. package/dist/esm/modules/e2ee/Worker.js.map +1 -0
  111. package/dist/esm/modules/e2ee/crypto-utils.js +53 -0
  112. package/dist/esm/modules/e2ee/crypto-utils.js.map +1 -0
  113. package/dist/esm/modules/e2ee/utils.js +15 -0
  114. package/dist/esm/modules/e2ee/utils.js.map +1 -0
  115. package/dist/esm/modules/e2eping/e2eping.js +314 -0
  116. package/dist/esm/modules/e2eping/e2eping.js.map +1 -0
  117. package/dist/esm/modules/flags/FeatureFlags.js +36 -0
  118. package/dist/esm/modules/flags/FeatureFlags.js.map +1 -0
  119. package/dist/esm/modules/litemode/LiteModeContext.js +50 -0
  120. package/dist/esm/modules/litemode/LiteModeContext.js.map +1 -0
  121. package/dist/esm/modules/proxyconnection/CustomSignalingLayer.js +98 -0
  122. package/dist/esm/modules/proxyconnection/CustomSignalingLayer.js.map +1 -0
  123. package/dist/esm/modules/proxyconnection/ProxyConnectionPC.js +348 -0
  124. package/dist/esm/modules/proxyconnection/ProxyConnectionPC.js.map +1 -0
  125. package/dist/esm/modules/proxyconnection/ProxyConnectionService.js +279 -0
  126. package/dist/esm/modules/proxyconnection/ProxyConnectionService.js.map +1 -0
  127. package/dist/esm/modules/proxyconnection/constants.js +14 -0
  128. package/dist/esm/modules/proxyconnection/constants.js.map +1 -0
  129. package/dist/esm/modules/qualitycontrol/CodecSelection.js +222 -0
  130. package/dist/esm/modules/qualitycontrol/CodecSelection.js.map +1 -0
  131. package/dist/esm/modules/qualitycontrol/MockClasses.js +120 -0
  132. package/dist/esm/modules/qualitycontrol/MockClasses.js.map +1 -0
  133. package/dist/esm/modules/qualitycontrol/QualityController.js +366 -0
  134. package/dist/esm/modules/qualitycontrol/QualityController.js.map +1 -0
  135. package/dist/esm/modules/qualitycontrol/ReceiveAudioController.js +73 -0
  136. package/dist/esm/modules/qualitycontrol/ReceiveAudioController.js.map +1 -0
  137. package/dist/esm/modules/qualitycontrol/ReceiveVideoController.js +216 -0
  138. package/dist/esm/modules/qualitycontrol/ReceiveVideoController.js.map +1 -0
  139. package/dist/esm/modules/qualitycontrol/SendVideoController.js +133 -0
  140. package/dist/esm/modules/qualitycontrol/SendVideoController.js.map +1 -0
  141. package/dist/esm/modules/recording/JibriSession.js +279 -0
  142. package/dist/esm/modules/recording/JibriSession.js.map +1 -0
  143. package/dist/esm/modules/recording/RecordingManager.js +257 -0
  144. package/dist/esm/modules/recording/RecordingManager.js.map +1 -0
  145. package/dist/esm/modules/recording/recordingConstants.js +21 -0
  146. package/dist/esm/modules/recording/recordingConstants.js.map +1 -0
  147. package/dist/esm/modules/recording/recordingXMLUtils.js +69 -0
  148. package/dist/esm/modules/recording/recordingXMLUtils.js.map +1 -0
  149. package/dist/esm/modules/red/red.js +108 -0
  150. package/dist/esm/modules/red/red.js.map +1 -0
  151. package/dist/esm/modules/sdp/LocalSdpMunger.js +143 -0
  152. package/dist/esm/modules/sdp/LocalSdpMunger.js.map +1 -0
  153. package/dist/esm/modules/sdp/RtxModifier.js +179 -0
  154. package/dist/esm/modules/sdp/RtxModifier.js.map +1 -0
  155. package/dist/esm/modules/sdp/SDP.js +848 -0
  156. package/dist/esm/modules/sdp/SDP.js.map +1 -0
  157. package/dist/esm/modules/sdp/SDPDiffer.js +96 -0
  158. package/dist/esm/modules/sdp/SDPDiffer.js.map +1 -0
  159. package/dist/esm/modules/sdp/SDPUtil.js +798 -0
  160. package/dist/esm/modules/sdp/SDPUtil.js.map +1 -0
  161. package/dist/esm/modules/sdp/SampleSdpStrings.js +589 -0
  162. package/dist/esm/modules/sdp/SampleSdpStrings.js.map +1 -0
  163. package/dist/esm/modules/sdp/SdpSimulcast.js +196 -0
  164. package/dist/esm/modules/sdp/SdpSimulcast.js.map +1 -0
  165. package/dist/esm/modules/sdp/SdpTransformUtil.js +337 -0
  166. package/dist/esm/modules/sdp/SdpTransformUtil.js.map +1 -0
  167. package/dist/esm/modules/sdp/constants.js +2 -0
  168. package/dist/esm/modules/sdp/constants.js.map +1 -0
  169. package/dist/esm/modules/settings/Settings.js +95 -0
  170. package/dist/esm/modules/settings/Settings.js.map +1 -0
  171. package/dist/esm/modules/statistics/AnalyticsAdapter.js +277 -0
  172. package/dist/esm/modules/statistics/AnalyticsAdapter.js.map +1 -0
  173. package/dist/esm/modules/statistics/AvgRTPStatsReporter.js +817 -0
  174. package/dist/esm/modules/statistics/AvgRTPStatsReporter.js.map +1 -0
  175. package/dist/esm/modules/statistics/LocalStatsCollector.js +149 -0
  176. package/dist/esm/modules/statistics/LocalStatsCollector.js.map +1 -0
  177. package/dist/esm/modules/statistics/PreCallTest.js +15 -0
  178. package/dist/esm/modules/statistics/PreCallTest.js.map +1 -0
  179. package/dist/esm/modules/statistics/RTPStatsCollector.js +601 -0
  180. package/dist/esm/modules/statistics/RTPStatsCollector.js.map +1 -0
  181. package/dist/esm/modules/statistics/SpeakerStats.js +163 -0
  182. package/dist/esm/modules/statistics/SpeakerStats.js.map +1 -0
  183. package/dist/esm/modules/statistics/SpeakerStatsCollector.js +161 -0
  184. package/dist/esm/modules/statistics/SpeakerStatsCollector.js.map +1 -0
  185. package/dist/esm/modules/statistics/constants.js +7 -0
  186. package/dist/esm/modules/statistics/constants.js.map +1 -0
  187. package/dist/esm/modules/statistics/statistics.js +362 -0
  188. package/dist/esm/modules/statistics/statistics.js.map +1 -0
  189. package/dist/esm/modules/util/AsyncQueue.js +102 -0
  190. package/dist/esm/modules/util/AsyncQueue.js.map +1 -0
  191. package/dist/esm/modules/util/Deferred.js +41 -0
  192. package/dist/esm/modules/util/Deferred.js.map +1 -0
  193. package/dist/esm/modules/util/EventEmitter.js +17 -0
  194. package/dist/esm/modules/util/EventEmitter.js.map +1 -0
  195. package/dist/esm/modules/util/EventEmitterForwarder.js +52 -0
  196. package/dist/esm/modules/util/EventEmitterForwarder.js.map +1 -0
  197. package/dist/esm/modules/util/Listenable.js +106 -0
  198. package/dist/esm/modules/util/Listenable.js.map +1 -0
  199. package/dist/esm/modules/util/MathUtil.js +103 -0
  200. package/dist/esm/modules/util/MathUtil.js.map +1 -0
  201. package/dist/esm/modules/util/RandomUtil.js +66 -0
  202. package/dist/esm/modules/util/RandomUtil.js.map +1 -0
  203. package/dist/esm/modules/util/Retry.js +15 -0
  204. package/dist/esm/modules/util/Retry.js.map +1 -0
  205. package/dist/esm/modules/util/ScriptUtil.js +58 -0
  206. package/dist/esm/modules/util/ScriptUtil.js.map +1 -0
  207. package/dist/esm/modules/util/StringUtils.js +21 -0
  208. package/dist/esm/modules/util/StringUtils.js.map +1 -0
  209. package/dist/esm/modules/util/TestUtils.js +14 -0
  210. package/dist/esm/modules/util/TestUtils.js.map +1 -0
  211. package/dist/esm/modules/util/UsernameGenerator.js +436 -0
  212. package/dist/esm/modules/util/UsernameGenerator.js.map +1 -0
  213. package/dist/esm/modules/util/XMLUtils.js +135 -0
  214. package/dist/esm/modules/util/XMLUtils.js.map +1 -0
  215. package/dist/esm/modules/version/ComponentsVersions.js +52 -0
  216. package/dist/esm/modules/version/ComponentsVersions.js.map +1 -0
  217. package/dist/esm/modules/videosipgw/JitsiVideoSIPGWSession.js +137 -0
  218. package/dist/esm/modules/videosipgw/JitsiVideoSIPGWSession.js.map +1 -0
  219. package/dist/esm/modules/videosipgw/VideoSIPGW.js +102 -0
  220. package/dist/esm/modules/videosipgw/VideoSIPGW.js.map +1 -0
  221. package/dist/esm/modules/videosipgw/VideoSIPGWConstants.js +65 -0
  222. package/dist/esm/modules/videosipgw/VideoSIPGWConstants.js.map +1 -0
  223. package/dist/esm/modules/watchRTC/WatchRTC.js +69 -0
  224. package/dist/esm/modules/watchRTC/WatchRTC.js.map +1 -0
  225. package/dist/esm/modules/watchRTC/functions.js +31 -0
  226. package/dist/esm/modules/watchRTC/functions.js.map +1 -0
  227. package/dist/esm/modules/watchRTC/interfaces.js +2 -0
  228. package/dist/esm/modules/watchRTC/interfaces.js.map +1 -0
  229. package/dist/esm/modules/webaudio/AudioMixer.js +74 -0
  230. package/dist/esm/modules/webaudio/AudioMixer.js.map +1 -0
  231. package/dist/esm/modules/webaudio/WebAudioUtils.js +13 -0
  232. package/dist/esm/modules/webaudio/WebAudioUtils.js.map +1 -0
  233. package/dist/esm/modules/xmpp/AVModeration.js +156 -0
  234. package/dist/esm/modules/xmpp/AVModeration.js.map +1 -0
  235. package/dist/esm/modules/xmpp/BreakoutRooms.js +230 -0
  236. package/dist/esm/modules/xmpp/BreakoutRooms.js.map +1 -0
  237. package/dist/esm/modules/xmpp/Caps.js +223 -0
  238. package/dist/esm/modules/xmpp/Caps.js.map +1 -0
  239. package/dist/esm/modules/xmpp/ChatRoom.js +1877 -0
  240. package/dist/esm/modules/xmpp/ChatRoom.js.map +1 -0
  241. package/dist/esm/modules/xmpp/ConnectionPlugin.js +37 -0
  242. package/dist/esm/modules/xmpp/ConnectionPlugin.js.map +1 -0
  243. package/dist/esm/modules/xmpp/FileSharing.js +95 -0
  244. package/dist/esm/modules/xmpp/FileSharing.js.map +1 -0
  245. package/dist/esm/modules/xmpp/JingleHelperFunctions.js +168 -0
  246. package/dist/esm/modules/xmpp/JingleHelperFunctions.js.map +1 -0
  247. package/dist/esm/modules/xmpp/JingleSession.js +166 -0
  248. package/dist/esm/modules/xmpp/JingleSession.js.map +1 -0
  249. package/dist/esm/modules/xmpp/JingleSessionPC.js +1969 -0
  250. package/dist/esm/modules/xmpp/JingleSessionPC.js.map +1 -0
  251. package/dist/esm/modules/xmpp/JingleSessionState.js +23 -0
  252. package/dist/esm/modules/xmpp/JingleSessionState.js.map +1 -0
  253. package/dist/esm/modules/xmpp/Lobby.js +384 -0
  254. package/dist/esm/modules/xmpp/Lobby.js.map +1 -0
  255. package/dist/esm/modules/xmpp/MediaSessionEvents.js +12 -0
  256. package/dist/esm/modules/xmpp/MediaSessionEvents.js.map +1 -0
  257. package/dist/esm/modules/xmpp/MockClasses.js +77 -0
  258. package/dist/esm/modules/xmpp/MockClasses.js.map +1 -0
  259. package/dist/esm/modules/xmpp/Polls.js +87 -0
  260. package/dist/esm/modules/xmpp/Polls.js.map +1 -0
  261. package/dist/esm/modules/xmpp/ResumeTask.js +149 -0
  262. package/dist/esm/modules/xmpp/ResumeTask.js.map +1 -0
  263. package/dist/esm/modules/xmpp/RoomMetadata.js +96 -0
  264. package/dist/esm/modules/xmpp/RoomMetadata.js.map +1 -0
  265. package/dist/esm/modules/xmpp/SignalingLayerImpl.js +313 -0
  266. package/dist/esm/modules/xmpp/SignalingLayerImpl.js.map +1 -0
  267. package/dist/esm/modules/xmpp/StropheErrorHandler.js +53 -0
  268. package/dist/esm/modules/xmpp/StropheErrorHandler.js.map +1 -0
  269. package/dist/esm/modules/xmpp/StropheLastSuccess.js +52 -0
  270. package/dist/esm/modules/xmpp/StropheLastSuccess.js.map +1 -0
  271. package/dist/esm/modules/xmpp/XmppConnection.js +579 -0
  272. package/dist/esm/modules/xmpp/XmppConnection.js.map +1 -0
  273. package/dist/esm/modules/xmpp/moderator.js +524 -0
  274. package/dist/esm/modules/xmpp/moderator.js.map +1 -0
  275. package/dist/esm/modules/xmpp/sha1.js +165 -0
  276. package/dist/esm/modules/xmpp/sha1.js.map +1 -0
  277. package/dist/esm/modules/xmpp/strophe.disco.js +222 -0
  278. package/dist/esm/modules/xmpp/strophe.disco.js.map +1 -0
  279. package/dist/esm/modules/xmpp/strophe.emuc.js +206 -0
  280. package/dist/esm/modules/xmpp/strophe.emuc.js.map +1 -0
  281. package/dist/esm/modules/xmpp/strophe.jingle.js +404 -0
  282. package/dist/esm/modules/xmpp/strophe.jingle.js.map +1 -0
  283. package/dist/esm/modules/xmpp/strophe.logger.js +44 -0
  284. package/dist/esm/modules/xmpp/strophe.logger.js.map +1 -0
  285. package/dist/esm/modules/xmpp/strophe.ping.js +170 -0
  286. package/dist/esm/modules/xmpp/strophe.ping.js.map +1 -0
  287. package/dist/esm/modules/xmpp/strophe.rayo.js +117 -0
  288. package/dist/esm/modules/xmpp/strophe.rayo.js.map +1 -0
  289. package/dist/esm/modules/xmpp/strophe.stream-management.js +365 -0
  290. package/dist/esm/modules/xmpp/strophe.stream-management.js.map +1 -0
  291. package/dist/esm/modules/xmpp/strophe.util.js +116 -0
  292. package/dist/esm/modules/xmpp/strophe.util.js.map +1 -0
  293. package/dist/esm/modules/xmpp/xmpp.js +973 -0
  294. package/dist/esm/modules/xmpp/xmpp.js.map +1 -0
  295. package/dist/esm/service/RTC/BridgeVideoType.js +24 -0
  296. package/dist/esm/service/RTC/BridgeVideoType.js.map +1 -0
  297. package/dist/esm/service/RTC/CameraFacingMode.js +21 -0
  298. package/dist/esm/service/RTC/CameraFacingMode.js.map +1 -0
  299. package/dist/esm/service/RTC/CodecMimeType.js +36 -0
  300. package/dist/esm/service/RTC/CodecMimeType.js.map +1 -0
  301. package/dist/esm/service/RTC/MediaDirection.js +23 -0
  302. package/dist/esm/service/RTC/MediaDirection.js.map +1 -0
  303. package/dist/esm/service/RTC/MediaType.js +20 -0
  304. package/dist/esm/service/RTC/MediaType.js.map +1 -0
  305. package/dist/esm/service/RTC/RTCEvents.js +111 -0
  306. package/dist/esm/service/RTC/RTCEvents.js.map +1 -0
  307. package/dist/esm/service/RTC/ReceiverAudioSubscription.js +27 -0
  308. package/dist/esm/service/RTC/ReceiverAudioSubscription.js.map +1 -0
  309. package/dist/esm/service/RTC/Resolutions.js +56 -0
  310. package/dist/esm/service/RTC/Resolutions.js.map +1 -0
  311. package/dist/esm/service/RTC/SignalingEvents.js +42 -0
  312. package/dist/esm/service/RTC/SignalingEvents.js.map +1 -0
  313. package/dist/esm/service/RTC/SignalingLayer.js +153 -0
  314. package/dist/esm/service/RTC/SignalingLayer.js.map +1 -0
  315. package/dist/esm/service/RTC/StandardVideoQualitySettings.js +180 -0
  316. package/dist/esm/service/RTC/StandardVideoQualitySettings.js.map +1 -0
  317. package/dist/esm/service/RTC/VideoEncoderScalabilityMode.js +36 -0
  318. package/dist/esm/service/RTC/VideoEncoderScalabilityMode.js.map +1 -0
  319. package/dist/esm/service/RTC/VideoType.js +19 -0
  320. package/dist/esm/service/RTC/VideoType.js.map +1 -0
  321. package/dist/esm/service/authentication/AuthenticationEvents.js +13 -0
  322. package/dist/esm/service/authentication/AuthenticationEvents.js.map +1 -0
  323. package/dist/esm/service/connectivity/ConnectionQualityEvents.js +13 -0
  324. package/dist/esm/service/connectivity/ConnectionQualityEvents.js.map +1 -0
  325. package/dist/esm/service/connectivity/Constants.js +3 -0
  326. package/dist/esm/service/connectivity/Constants.js.map +1 -0
  327. package/dist/esm/service/e2eping/E2ePingEvents.js +8 -0
  328. package/dist/esm/service/e2eping/E2ePingEvents.js.map +1 -0
  329. package/dist/esm/service/statistics/AnalyticsEvents.js +521 -0
  330. package/dist/esm/service/statistics/AnalyticsEvents.js.map +1 -0
  331. package/dist/esm/service/statistics/Events.js +36 -0
  332. package/dist/esm/service/statistics/Events.js.map +1 -0
  333. package/dist/esm/service/statistics/constants.js +2 -0
  334. package/dist/esm/service/statistics/constants.js.map +1 -0
  335. package/dist/esm/service/xmpp/XMPPEvents.js +359 -0
  336. package/dist/esm/service/xmpp/XMPPEvents.js.map +1 -0
  337. package/dist/esm/service/xmpp/XMPPExtensioProtocols.js +64 -0
  338. package/dist/esm/service/xmpp/XMPPExtensioProtocols.js.map +1 -0
  339. package/dist/esm/test-setup-polyfill.js +34 -0
  340. package/dist/esm/test-setup-polyfill.js.map +1 -0
  341. package/dist/esm/tools/gen-version.js +15 -0
  342. package/dist/esm/tools/gen-version.js.map +1 -0
  343. package/dist/esm/version.js +3 -0
  344. package/dist/esm/version.js.map +1 -0
  345. package/dist/umd/lib-jitsi-meet.e2ee-worker.js +484 -0
  346. package/dist/umd/lib-jitsi-meet.min.js +3 -0
  347. package/dist/umd/lib-jitsi-meet.min.js.LICENSE.txt +18 -0
  348. package/dist/umd/lib-jitsi-meet.min.map +1 -0
  349. package/package.json +93 -0
  350. package/types/index.d.ts +16180 -0
@@ -0,0 +1,216 @@
1
+ import { getLogger } from '@jitsi/logger';
2
+ import { isEqual } from 'lodash-es';
3
+ import { MediaType } from '../../service/RTC/MediaType';
4
+ import { ASSUMED_BANDWIDTH_BPS, LAST_N_UNLIMITED } from '../../service/RTC/StandardVideoQualitySettings';
5
+ const logger = getLogger('qc:ReceiveVideoController');
6
+ const MAX_HEIGHT = 2160;
7
+ /**
8
+ * This class manages the receive video contraints for a given {@link JitsiConference}. These constraints are
9
+ * determined by the application based on how the remote video streams need to be displayed. This class is responsible
10
+ * for communicating these constraints to the bridge over the bridge channel.
11
+ */
12
+ export default class ReceiveVideoController {
13
+ /**
14
+ * Creates a new instance for a given conference.
15
+ *
16
+ * @param {JitsiConference} conference the conference instance for which the new instance will be managing
17
+ * the receive video quality constraints.
18
+ */
19
+ constructor(conference) {
20
+ this._conference = conference;
21
+ this._rtc = conference.rtc;
22
+ const { config } = conference.options;
23
+ // The number of videos requested from the bridge, -1 represents unlimited or all available videos.
24
+ this._lastN = config?.startLastN ?? config?.channelLastN ?? LAST_N_UNLIMITED;
25
+ // The number representing the maximum video height the local client should receive from the bridge.
26
+ this._maxFrameHeight = MAX_HEIGHT;
27
+ /**
28
+ * The map that holds the max frame height requested per remote source for p2p connection.
29
+ *
30
+ * @type Map<string, number>
31
+ */
32
+ this._sourceReceiverConstraints = new Map();
33
+ /**
34
+ * The number of bps requested from the bridge.
35
+ */
36
+ this._assumedBandwidthBps = ASSUMED_BANDWIDTH_BPS;
37
+ this._lastNLimitedByCpu = false;
38
+ this._receiveResolutionLimitedByCpu = false;
39
+ // The default receiver video constraints.
40
+ this._receiverVideoConstraints = {
41
+ assumedBandwidthBps: this._assumedBandwidthBps,
42
+ lastN: this._lastN
43
+ };
44
+ }
45
+ /**
46
+ * Returns a map of all the remote source names and the corresponding max frame heights.
47
+ *
48
+ * @param {JingleSessionPC} mediaSession - the media session.
49
+ * @param {number} maxFrameHeight - the height to be requested for remote sources.
50
+ * @returns
51
+ */
52
+ _getDefaultSourceReceiverConstraints(mediaSession, maxFrameHeight) {
53
+ const height = maxFrameHeight ?? MAX_HEIGHT;
54
+ const remoteVideoTracks = mediaSession.peerconnection?.getRemoteTracks(null, MediaType.VIDEO) || [];
55
+ const receiverConstraints = new Map();
56
+ for (const track of remoteVideoTracks) {
57
+ receiverConstraints.set(track.getSourceName(), height);
58
+ }
59
+ return receiverConstraints;
60
+ }
61
+ /**
62
+ * Updates the source based constraints based on the maxHeight set.
63
+ *
64
+ * @param {number} maxFrameHeight - the height to be requested for remote sources.
65
+ * @returns {void}
66
+ */
67
+ _updateIndividualConstraints(maxFrameHeight) {
68
+ const individualConstraints = this._receiverVideoConstraints.constraints;
69
+ if (individualConstraints && Object.keys(individualConstraints).length) {
70
+ for (const value of Object.values(individualConstraints)) {
71
+ value.maxHeight = maxFrameHeight ?? Math.min(value.maxHeight, this._maxFrameHeight);
72
+ }
73
+ }
74
+ else {
75
+ this._receiverVideoConstraints.defaultConstraints = { 'maxHeight': this._maxFrameHeight };
76
+ }
77
+ }
78
+ /**
79
+ * Returns the last set of receiver constraints that were set on the bridge channel.
80
+ *
81
+ * @returns {IReceiverVideoConstraints}
82
+ */
83
+ getCurrentReceiverConstraints() {
84
+ return this._receiverVideoConstraints;
85
+ }
86
+ /**
87
+ * Returns the lastN value for the conference.
88
+ *
89
+ * @returns {number}
90
+ */
91
+ getLastN() {
92
+ return this._lastN;
93
+ }
94
+ /**
95
+ * Checks whether last-n was lowered because of a cpu limitation.
96
+ *
97
+ * @returns {boolean}
98
+ */
99
+ isLastNLimitedByCpu() {
100
+ return this._lastNLimitedByCpu;
101
+ }
102
+ /**
103
+ * Handles the {@link JitsiConferenceEvents.MEDIA_SESSION_STARTED}, that is when the conference creates new media
104
+ * session. The preferred receive frameHeight is applied on the media session.
105
+ *
106
+ * @param {JingleSessionPC} mediaSession - the started media session.
107
+ * @returns {void}
108
+ */
109
+ onMediaSessionStarted(mediaSession) {
110
+ if (mediaSession.isP2P) {
111
+ mediaSession.setReceiverVideoConstraint(this._getDefaultSourceReceiverConstraints(mediaSession));
112
+ }
113
+ else {
114
+ this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
115
+ }
116
+ }
117
+ /**
118
+ * Sets the assumed bandwidth bps the local participant should receive from remote participants.
119
+ *
120
+ * @param {number|undefined} assumedBandwidthBps - the new value.
121
+ * @returns {void}
122
+ */
123
+ setAssumedBandwidthBps(assumedBandwidthBps) {
124
+ if (this._receiverVideoConstraints.assumedBandwidthBps !== assumedBandwidthBps) {
125
+ this._receiverVideoConstraints.assumedBandwidthBps = assumedBandwidthBps;
126
+ this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
127
+ }
128
+ }
129
+ /**
130
+ * Selects a new value for "lastN". The requested amount of videos are going to be delivered after the value is
131
+ * in effect. Set to -1 for unlimited or all available videos.
132
+ *
133
+ * @param {number} value the new value for lastN.
134
+ * @returns {void}
135
+ */
136
+ setLastN(value) {
137
+ if (this._lastN !== value) {
138
+ this._lastN = value;
139
+ this._receiverVideoConstraints.lastN = value;
140
+ this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
141
+ }
142
+ }
143
+ /**
144
+ * Updates the lastNLimitedByCpu field.
145
+ *
146
+ * @param {boolean} enabled
147
+ * @returns {void}
148
+ */
149
+ setLastNLimitedByCpu(enabled) {
150
+ if (this._lastNLimitedByCpu !== enabled) {
151
+ this._lastNLimitedByCpu = enabled;
152
+ logger.info(`ReceiveVideoController - Setting the lastNLimitedByCpu flag to ${enabled}`);
153
+ }
154
+ }
155
+ /**
156
+ * Sets the maximum video resolution the local participant should receive from remote participants.
157
+ *
158
+ * @param {number|undefined} maxFrameHeight - the new value.
159
+ * @returns {void}
160
+ */
161
+ setPreferredReceiveMaxFrameHeight(maxFrameHeight) {
162
+ this._maxFrameHeight = maxFrameHeight;
163
+ for (const session of this._conference.getMediaSessions()) {
164
+ if (session.isP2P) {
165
+ session.setReceiverVideoConstraint(this._getDefaultSourceReceiverConstraints(session, maxFrameHeight));
166
+ }
167
+ else {
168
+ this._updateIndividualConstraints(maxFrameHeight);
169
+ this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
170
+ }
171
+ }
172
+ }
173
+ /**
174
+ * Sets the receiver constraints for the conference.
175
+ *
176
+ * @param {IReceiverVideoConstraints} constraints The video constraints.
177
+ */
178
+ setReceiverConstraints(constraints) {
179
+ if (!constraints) {
180
+ return;
181
+ }
182
+ const constraintsChanged = !isEqual(this._receiverVideoConstraints, constraints);
183
+ if (constraintsChanged || this._lastNLimitedByCpu || this._receiveResolutionLimitedByCpu) {
184
+ this._receiverVideoConstraints = constraints;
185
+ this._assumedBandwidthBps = constraints.assumedBandwidthBps ?? this._assumedBandwidthBps;
186
+ this._lastN = typeof constraints.lastN !== 'undefined' && !this._lastNLimitedByCpu
187
+ ? constraints.lastN : this._lastN;
188
+ this._receiverVideoConstraints.lastN = this._lastN;
189
+ this._receiveResolutionLimitedByCpu && this._updateIndividualConstraints();
190
+ // Send the constraints on the bridge channel.
191
+ this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
192
+ const p2pSession = this._conference.getMediaSessions().find(session => session.isP2P);
193
+ if (!p2pSession || !this._receiverVideoConstraints.constraints) {
194
+ return;
195
+ }
196
+ const mappedConstraints = Array.from(Object.entries(this._receiverVideoConstraints.constraints))
197
+ .map(([key, value]) => [key, value.maxHeight]);
198
+ this._sourceReceiverConstraints = new Map(mappedConstraints);
199
+ // Send the receiver constraints to the peer through a "content-modify" message.
200
+ p2pSession.setReceiverVideoConstraint(this._sourceReceiverConstraints);
201
+ }
202
+ }
203
+ /**
204
+ * Updates the receivedResolutioLimitedByCpu field.
205
+ *
206
+ * @param {boolean} enabled
207
+ * @return {void}
208
+ */
209
+ setReceiveResolutionLimitedByCpu(enabled) {
210
+ if (this._receiveResolutionLimitedByCpu !== enabled) {
211
+ this._receiveResolutionLimitedByCpu = enabled;
212
+ logger.info(`ReceiveVideoController - Setting the receiveResolutionLimitedByCpu flag to ${enabled}`);
213
+ }
214
+ }
215
+ }
216
+ //# sourceMappingURL=ReceiveVideoController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiveVideoController.js","sourceRoot":"","sources":["../../../../modules/qualitycontrol/ReceiveVideoController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAIzG,MAAM,MAAM,GAAG,SAAS,CAAC,2BAA2B,CAAC,CAAC;AACtD,MAAM,UAAU,GAAG,IAAI,CAAC;AAaxB;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAmBvC;;;;;OAKG;IACH,YAAY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D,gFAAgF;YAChF,UAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAC3E,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,gCAAgC,CAAC,OAAgB;QAC7C,IAAI,IAAI,CAAC,8BAA8B,KAAK,OAAO,EAAE,CAAC;YAClD,IAAI,CAAC,8BAA8B,GAAG,OAAO,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC,8EAA8E,OAAO,EAAE,CAAC,CAAC;QACzG,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,133 @@
1
+ import { getLogger } from '@jitsi/logger';
2
+ import { MediaSessionEvents } from '../xmpp/MediaSessionEvents';
3
+ const logger = getLogger('qc:SendVideoController');
4
+ const MAX_LOCAL_RESOLUTION = 2160;
5
+ /**
6
+ * The class manages send video constraints across media sessions({@link JingleSessionPC}) which belong to
7
+ * {@link JitsiConference}. It finds the lowest common value, between the local user's send preference and
8
+ * the remote party's receive preference. Also this module will consider only the active session's receive value,
9
+ * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
10
+ * different.
11
+ */
12
+ export default class SendVideoController {
13
+ /**
14
+ * Creates new instance for a given conference.
15
+ *
16
+ * @param {JitsiConference} conference - the conference instance for which the new instance will be managing
17
+ * the send video quality constraints.
18
+ */
19
+ constructor(conference) {
20
+ this._conference = conference;
21
+ this._preferredSendMaxFrameHeight = MAX_LOCAL_RESOLUTION;
22
+ /**
23
+ * Source name based sender constraints.
24
+ * @type {Map<string, number>};
25
+ */
26
+ this._sourceSenderConstraints = new Map();
27
+ }
28
+ /**
29
+ * Figures out the send video constraint as specified by {@link _selectSendMaxFrameHeight} and sets it on all media
30
+ * sessions for the reasons mentioned in this class description.
31
+ *
32
+ * @param {string} sourceName - The source for which sender constraints have changed.
33
+ * @returns {Promise<void>}
34
+ * @private
35
+ */
36
+ async _propagateSendMaxFrameHeight(sourceName) {
37
+ if (!sourceName) {
38
+ throw new Error('sourceName missing for calculating the sendMaxHeight for video tracks');
39
+ }
40
+ const sendMaxFrameHeight = this._selectSendMaxFrameHeight(sourceName);
41
+ const promises = [];
42
+ if (sendMaxFrameHeight !== undefined && sendMaxFrameHeight >= 0) {
43
+ for (const session of this._conference.getMediaSessions()) {
44
+ promises.push(session.setSenderVideoConstraint(sendMaxFrameHeight, sourceName));
45
+ }
46
+ }
47
+ await Promise.all(promises);
48
+ }
49
+ /**
50
+ * Selects the lowest common value for the local video send constraint by looking at local user's preference and
51
+ * the active media session's receive preference set by the remote party.
52
+ *
53
+ * @param {string} sourceName - The source for which sender constraints have changed.
54
+ * @returns {Optional<number>}
55
+ * @private
56
+ */
57
+ _selectSendMaxFrameHeight(sourceName) {
58
+ if (!sourceName) {
59
+ throw new Error('sourceName missing for calculating the sendMaxHeight for video tracks');
60
+ }
61
+ const activeMediaSession = this._conference.getActiveMediaSession();
62
+ const remoteRecvMaxFrameHeight = activeMediaSession
63
+ ? this._sourceSenderConstraints.get(sourceName)
64
+ : undefined;
65
+ if (this._preferredSendMaxFrameHeight >= 0 && remoteRecvMaxFrameHeight !== undefined && remoteRecvMaxFrameHeight >= 0) {
66
+ return Math.min(this._preferredSendMaxFrameHeight, remoteRecvMaxFrameHeight);
67
+ }
68
+ else if (remoteRecvMaxFrameHeight !== undefined && remoteRecvMaxFrameHeight >= 0) {
69
+ return remoteRecvMaxFrameHeight;
70
+ }
71
+ return this._preferredSendMaxFrameHeight;
72
+ }
73
+ /**
74
+ * Configures the video encodings on the local sources when a media connection is established or becomes active.
75
+ *
76
+ * @returns {void}
77
+ */
78
+ configureConstraintsForLocalSources() {
79
+ for (const track of this._conference.getLocalVideoTracks()) {
80
+ const sourceName = track.getSourceName();
81
+ sourceName && this._propagateSendMaxFrameHeight(sourceName);
82
+ }
83
+ }
84
+ /**
85
+ * Handles the {@link JitsiConferenceEvents.MEDIA_SESSION_STARTED}, that is when the conference creates new media
86
+ * session. It doesn't mean it's already active though. For example the JVB connection may be created after
87
+ * the conference has entered the p2p mode already.
88
+ *
89
+ * @param {JingleSessionPC} mediaSession - the started media session.
90
+ */
91
+ onMediaSessionStarted(mediaSession) {
92
+ mediaSession.addListener(MediaSessionEvents.REMOTE_SOURCE_CONSTRAINTS_CHANGED, (session, sourceConstraints) => {
93
+ session === this._conference.getActiveMediaSession()
94
+ && sourceConstraints.forEach(constraint => this.onSenderConstraintsReceived(constraint));
95
+ });
96
+ }
97
+ /**
98
+ * Propagates the video constraints if they have changed.
99
+ *
100
+ * @param {IVideoConstraint} videoConstraints - The sender video constraints received from the bridge.
101
+ * @returns {Promise<void>}
102
+ */
103
+ async onSenderConstraintsReceived(videoConstraints) {
104
+ const { maxHeight, sourceName } = videoConstraints;
105
+ const localVideoTracks = this._conference.getLocalVideoTracks() ?? [];
106
+ for (const track of localVideoTracks) {
107
+ // Propagate the sender constraint only if it has changed.
108
+ if (track.getSourceName() === sourceName
109
+ && this._sourceSenderConstraints.get(sourceName) !== maxHeight) {
110
+ this._sourceSenderConstraints.set(sourceName, maxHeight === -1
111
+ ? Math.min(MAX_LOCAL_RESOLUTION, this._preferredSendMaxFrameHeight)
112
+ : maxHeight);
113
+ logger.debug(`Sender constraints for source:${sourceName} changed to maxHeight:${maxHeight}`);
114
+ await this._propagateSendMaxFrameHeight(sourceName);
115
+ }
116
+ }
117
+ }
118
+ /**
119
+ * Sets local preference for max send video frame height.
120
+ *
121
+ * @param {number} maxFrameHeight - the new value to set.
122
+ * @returns {Promise<void>} - resolved when the operation is complete.
123
+ */
124
+ async setPreferredSendMaxFrameHeight(maxFrameHeight) {
125
+ this._preferredSendMaxFrameHeight = maxFrameHeight;
126
+ const promises = [];
127
+ for (const sourceName of this._sourceSenderConstraints.keys()) {
128
+ promises.push(this._propagateSendMaxFrameHeight(sourceName));
129
+ }
130
+ await Promise.allSettled(promises);
131
+ }
132
+ }
133
+ //# sourceMappingURL=SendVideoController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendVideoController.js","sourceRoot":"","sources":["../../../../modules/qualityc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AChE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC;QACnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC;QAEtE,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACnC,0DAA0D;YAC1D,IAAI,KAAK,CAAC,aAAa,EAAE,KAAK,UAAU;mBACjC,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE,CAAC;gBACjE,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAC7B,UAAU,EACV,SAAS,KAAK,CAAC,CAAC;oBACZ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,4BAA4B,CAAC;oBACnE,CAAC,CAAC,SAAS,CAAC,CAAC;gBACrB,MAAM,CAAC,KAAK,CAAC,iCAAiC,UAAU,yBAAyB,SAAS,EAAE,CAAC,CAAC;gBAC9F,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;YACxD,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,8BAA8B,CAAC,cAAsB;QACvD,IAAI,CAAC,4BAA4B,GAAG,cAAc,CAAC;QACnD,MAAM,QAAQ,GAAoB,EAAE,CAAC;QAErC,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,wBAAwB,CAAC,IAAI,EAAE,EAAE,CAAC;YAC5D,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACJ"}
@@ -0,0 +1,279 @@
1
+ import { getLogger } from '@jitsi/logger';
2
+ import { $iq } from 'strophe.js';
3
+ import { handleStropheError } from '../xmpp/StropheErrorHandler';
4
+ import { getSessionIdFromIq } from './recordingXMLUtils';
5
+ const logger = getLogger('recording:JibriSession');
6
+ /**
7
+ * Represents a recording session.
8
+ */
9
+ export default class JibriSession {
10
+ /**
11
+ * Initializes a new JibriSession instance.
12
+ *
13
+ * @constructor
14
+ */
15
+ constructor(options = {}) {
16
+ this._jibriJid = null;
17
+ this._statusFromJicofo = '';
18
+ this._connection = options.connection;
19
+ this._mode = options.mode;
20
+ this._jibriJid = null;
21
+ this._statusFromJicofo = '';
22
+ this._setSessionID(options.sessionID);
23
+ this.setStatus(options.status);
24
+ this._focusMucJid = options.focusMucJid;
25
+ }
26
+ /**
27
+ * Returns the error related to the session instance, if any.
28
+ *
29
+ * @returns {Optional<string>}
30
+ */
31
+ getError() {
32
+ return this._error;
33
+ }
34
+ /**
35
+ * Returns the session ID of the session instance.
36
+ *
37
+ * @returns {Optional<string>}
38
+ */
39
+ getID() {
40
+ return this._sessionID;
41
+ }
42
+ /**
43
+ * Returns the initiator of the session instance.
44
+ *
45
+ * @returns {JitsiParticipant|string} The participant that started the session.
46
+ */
47
+ getInitiator() {
48
+ return this._initiator;
49
+ }
50
+ /**
51
+ * Returns the streaming URL of the session.
52
+ *
53
+ * @returns {Optional<string>}
54
+ */
55
+ getLiveStreamViewURL() {
56
+ return this._liveStreamViewURL;
57
+ }
58
+ /**
59
+ * Returns the current status of the session.
60
+ *
61
+ * @returns {Optional<string>}
62
+ */
63
+ getStatus() {
64
+ // If _status is not set fallback to the status reported by jicofo.
65
+ if (this._status) {
66
+ return this._status;
67
+ }
68
+ return this._statusFromJicofo;
69
+ }
70
+ /**
71
+ * @returns {Optional<string>}
72
+ */
73
+ getJibriJid() {
74
+ return this._jibriJid;
75
+ }
76
+ /**
77
+ * Returns the jid of the participant that stopped the session.
78
+ *
79
+ * @returns {JitsiParticipant|string} The participant that stopped the session.
80
+ */
81
+ getTerminator() {
82
+ return this._terminator;
83
+ }
84
+ /**
85
+ * Returns the current recording mode of the session, such as "file".
86
+ *
87
+ * @returns {string}
88
+ */
89
+ getMode() {
90
+ return this._mode;
91
+ }
92
+ /**
93
+ * Sets the last known error message related to the session.
94
+ *
95
+ * @param {string} error - The error string explaining why the session
96
+ * entered an error state.
97
+ * @returns {void}
98
+ */
99
+ setError(error) {
100
+ this._error = error;
101
+ }
102
+ /**
103
+ * Sets the last live stream URL for the session instance. Usually this is
104
+ * a YouTube URL and usually this is only set for "stream" sessions.
105
+ *
106
+ * @param {string} url - The live stream URL associated with the session.
107
+ * @returns {void}
108
+ */
109
+ setLiveStreamViewURL(url) {
110
+ this._liveStreamViewURL = url;
111
+ }
112
+ /**
113
+ * Sets the last known status for this recording session.
114
+ *
115
+ * @param {string} status - The new status to set.
116
+ * @returns {void}
117
+ */
118
+ setStatus(status) {
119
+ this._status = status;
120
+ }
121
+ /**
122
+ * Set the session status reported by jicofo. If a jibri is present in the room,
123
+ * the status is always 'on'. Otherwise, we fallback to the status reported by jicofo.
124
+ *
125
+ * @param {string} status
126
+ */
127
+ setStatusFromJicofo(status) {
128
+ this._statusFromJicofo = status;
129
+ }
130
+ /**
131
+ * Set the JID of the jibri associated with this session.
132
+ *
133
+ * @param {*} jibriJid
134
+ */
135
+ setJibriJid(jibriJid) {
136
+ this._jibriJid = jibriJid;
137
+ }
138
+ /**
139
+ * Sets the participant that started the session.
140
+ * @param {JitsiParticipant | string} participant - The participant or resource id
141
+ * if local participant.
142
+ */
143
+ setInitiator(participant) {
144
+ this._initiator = participant;
145
+ }
146
+ /**
147
+ * Sets the participant that stopped the session.
148
+ * @param {JitsiParticipant | string} participant - The participant or the resource id
149
+ * if local participant.
150
+ */
151
+ setTerminator(participant) {
152
+ this._terminator = participant;
153
+ }
154
+ /**
155
+ * Sends a message to start the actual recording.
156
+ *
157
+ * @param {Object} options - Additional arguments for starting therecording.
158
+ * @param {string} [options.appData] - Data specific to the app/service that the result file will be uploaded.
159
+ * @param {string} [options.broadcastId] - The broadcast ID of an associated YouTube stream, used for knowing the
160
+ * URL from which the stream can be viewed.
161
+ * @param {string} options.focusMucJid - The JID of the focus participant that controls recording.
162
+ * @param {streamId} options.streamId - Necessary for live streaming, this is the stream key needed to start a live
163
+ * streaming session with the streaming service provider.
164
+ * @returns Promise
165
+ */
166
+ start({ appData, broadcastId, focusMucJid, streamId }) {
167
+ logger.info('Starting recording session');
168
+ return new Promise((resolve, reject) => {
169
+ this._connection?.sendIQ(this._createIQ({
170
+ action: 'start',
171
+ appData,
172
+ broadcastId,
173
+ focusMucJid,
174
+ streamId
175
+ }), (result) => {
176
+ this.setStatus('pending');
177
+ this._setSessionID(getSessionIdFromIq(result));
178
+ resolve();
179
+ }, (error) => {
180
+ this._setErrorFromIq(error);
181
+ handleStropheError(error, {
182
+ operation: 'start Jibri session request',
183
+ userJid: this._connection?.jid,
184
+ });
185
+ reject(error);
186
+ });
187
+ });
188
+ }
189
+ /**
190
+ * Sends a message to actually stop the recording session.
191
+ *
192
+ * @param {Object} options - Additional arguments for stopping the recording.
193
+ * @param {Object} options.focusMucJid - The JID of the focus participant that controls recording.
194
+ * @returns Promise
195
+ */
196
+ stop({ focusMucJid }) {
197
+ logger.info('Stopping recording session');
198
+ return new Promise((resolve, reject) => {
199
+ this._connection?.sendIQ(this._createIQ({
200
+ action: 'stop',
201
+ focusMucJid
202
+ }), resolve, (error) => {
203
+ handleStropheError(error, {
204
+ operation: 'stop Jibri session request',
205
+ userJid: this._connection?.jid
206
+ });
207
+ reject(error);
208
+ });
209
+ });
210
+ }
211
+ /**
212
+ * Generates the message to change the status of the recording session.
213
+ *
214
+ * @param {string} [options.action] - The action to set the IQ
215
+ * @param {string} [options.appData] - Data specific to the app/service that
216
+ * the result file will be uploaded.
217
+ * @param {string} [options.broadcastId] - The broadcast ID of an
218
+ * associated YouTube stream, used for knowing the URL from which the stream
219
+ * can be viewed.
220
+ * @param {string} options.focusMucJid - The JID of the focus participant
221
+ * that controls recording.
222
+ * @param {streamId} options.streamId - Necessary for live streaming, this
223
+ * is the stream key needed to start a live streaming session with the
224
+ * streaming service provider.
225
+ * @returns Object - The XMPP IQ message.
226
+ */
227
+ _createIQ({ action, appData, broadcastId, focusMucJid, streamId }) {
228
+ return $iq({
229
+ to: focusMucJid,
230
+ type: 'set'
231
+ })
232
+ .c('jibri', {
233
+ 'action': action,
234
+ 'app_data': appData,
235
+ 'recording_mode': this._mode,
236
+ 'streamid': streamId,
237
+ 'xmlns': 'http://jitsi.org/protocol/jibri',
238
+ 'you_tube_broadcast_id': broadcastId
239
+ })
240
+ .up();
241
+ }
242
+ /**
243
+ * Handles the error from an iq and stores the error.
244
+ *
245
+ * @param {Node} errorIq - The error response from an Iq.
246
+ * @private
247
+ * @returns {void}
248
+ */
249
+ _setErrorFromIq(errorIq) {
250
+ let error;
251
+ if (errorIq) {
252
+ if (typeof errorIq === 'string') {
253
+ error = errorIq;
254
+ }
255
+ else if (errorIq.nodeType === 1) {
256
+ const errors = errorIq.getElementsByTagName('error');
257
+ if (errors?.length > 0) {
258
+ const errorChildren = errors[0].children;
259
+ error = errorChildren?.length > 0 ? errorChildren[0].tagName : undefined;
260
+ }
261
+ }
262
+ }
263
+ else {
264
+ error = 'timeout';
265
+ }
266
+ this.setError(error ?? 'unknown');
267
+ }
268
+ /**
269
+ * Sets the known session ID for this recording session.
270
+ *
271
+ * @param {string} sessionID
272
+ * @private
273
+ * @returns {void}
274
+ */
275
+ _setSessionID(sessionID) {
276
+ this._sessionID = sessionID;
277
+ }
278
+ }
279
+ //# sourceMappingURL=JibriSession.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JibriSession.js","sourceRoot":"","sources":["../../../../modules/recording/JibriSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,GAAG,SAAS,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