@unwanted/matrix-sdk-mini 34.12.0 → 36.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 (759) hide show
  1. package/git-revision.txt +1 -1
  2. package/lib/@types/event.d.ts +25 -19
  3. package/lib/@types/event.d.ts.map +1 -1
  4. package/lib/@types/event.js +5 -0
  5. package/lib/@types/event.js.map +1 -1
  6. package/lib/@types/global.d.js +0 -2
  7. package/lib/@types/global.d.js.map +1 -1
  8. package/lib/autodiscovery.d.ts +1 -1
  9. package/lib/autodiscovery.d.ts.map +1 -1
  10. package/lib/autodiscovery.js.map +1 -1
  11. package/lib/base64.d.ts +3 -6
  12. package/lib/base64.d.ts.map +1 -1
  13. package/lib/base64.js +43 -36
  14. package/lib/base64.js.map +1 -1
  15. package/lib/browser-index.d.ts.map +1 -1
  16. package/lib/browser-index.js +0 -11
  17. package/lib/browser-index.js.map +1 -1
  18. package/lib/client.d.ts +45 -1306
  19. package/lib/client.d.ts.map +1 -1
  20. package/lib/client.js +406 -2963
  21. package/lib/client.js.map +1 -1
  22. package/lib/digest.d.ts +2 -2
  23. package/lib/digest.d.ts.map +1 -1
  24. package/lib/digest.js +2 -2
  25. package/lib/digest.js.map +1 -1
  26. package/lib/embedded.d.ts +2 -23
  27. package/lib/embedded.d.ts.map +1 -1
  28. package/lib/embedded.js +82 -209
  29. package/lib/embedded.js.map +1 -1
  30. package/lib/event-mapper.d.ts.map +1 -1
  31. package/lib/event-mapper.js +0 -4
  32. package/lib/event-mapper.js.map +1 -1
  33. package/lib/feature.d.ts.map +1 -1
  34. package/lib/feature.js +2 -1
  35. package/lib/feature.js.map +1 -1
  36. package/lib/http-api/errors.d.ts +3 -3
  37. package/lib/http-api/errors.js +3 -3
  38. package/lib/http-api/errors.js.map +1 -1
  39. package/lib/http-api/utils.js +2 -2
  40. package/lib/http-api/utils.js.map +1 -1
  41. package/lib/matrix.d.ts +0 -25
  42. package/lib/matrix.d.ts.map +1 -1
  43. package/lib/matrix.js +1 -30
  44. package/lib/matrix.js.map +1 -1
  45. package/lib/models/MSC3089Branch.d.ts.map +1 -1
  46. package/lib/models/MSC3089Branch.js +0 -3
  47. package/lib/models/MSC3089Branch.js.map +1 -1
  48. package/lib/models/event-timeline-set.d.ts +6 -10
  49. package/lib/models/event-timeline-set.d.ts.map +1 -1
  50. package/lib/models/event-timeline-set.js +28 -36
  51. package/lib/models/event-timeline-set.js.map +1 -1
  52. package/lib/models/event-timeline.d.ts +7 -2
  53. package/lib/models/event-timeline.d.ts.map +1 -1
  54. package/lib/models/event-timeline.js +9 -30
  55. package/lib/models/event-timeline.js.map +1 -1
  56. package/lib/models/event.d.ts +12 -96
  57. package/lib/models/event.d.ts.map +1 -1
  58. package/lib/models/event.js +59 -286
  59. package/lib/models/event.js.map +1 -1
  60. package/lib/models/invites-ignorer-types.d.ts +27 -0
  61. package/lib/models/invites-ignorer-types.d.ts.map +1 -0
  62. package/lib/models/invites-ignorer-types.js +36 -0
  63. package/lib/models/invites-ignorer-types.js.map +1 -0
  64. package/lib/models/invites-ignorer.d.ts +2 -26
  65. package/lib/models/invites-ignorer.d.ts.map +1 -1
  66. package/lib/models/invites-ignorer.js +2 -27
  67. package/lib/models/invites-ignorer.js.map +1 -1
  68. package/lib/models/poll.d.ts.map +1 -1
  69. package/lib/models/poll.js +1 -5
  70. package/lib/models/poll.js.map +1 -1
  71. package/lib/models/relations-container.d.ts.map +1 -1
  72. package/lib/models/relations-container.js +1 -7
  73. package/lib/models/relations-container.js.map +1 -1
  74. package/lib/models/relations.d.ts +0 -1
  75. package/lib/models/relations.d.ts.map +1 -1
  76. package/lib/models/relations.js +0 -8
  77. package/lib/models/relations.js.map +1 -1
  78. package/lib/models/room-member.d.ts +6 -1
  79. package/lib/models/room-member.d.ts.map +1 -1
  80. package/lib/models/room-member.js +7 -1
  81. package/lib/models/room-member.js.map +1 -1
  82. package/lib/models/room-state.d.ts +2 -13
  83. package/lib/models/room-state.d.ts.map +1 -1
  84. package/lib/models/room-state.js +12 -56
  85. package/lib/models/room-state.js.map +1 -1
  86. package/lib/models/room.d.ts +8 -21
  87. package/lib/models/room.d.ts.map +1 -1
  88. package/lib/models/room.js +128 -163
  89. package/lib/models/room.js.map +1 -1
  90. package/lib/models/thread.d.ts.map +1 -1
  91. package/lib/models/thread.js +5 -4
  92. package/lib/models/thread.js.map +1 -1
  93. package/lib/oidc/authorize.d.ts +2 -2
  94. package/lib/oidc/authorize.d.ts.map +1 -1
  95. package/lib/oidc/authorize.js +5 -5
  96. package/lib/oidc/authorize.js.map +1 -1
  97. package/lib/oidc/discovery.d.ts +8 -0
  98. package/lib/oidc/discovery.d.ts.map +1 -1
  99. package/lib/oidc/discovery.js +22 -11
  100. package/lib/oidc/discovery.js.map +1 -1
  101. package/lib/oidc/index.d.ts +3 -4
  102. package/lib/oidc/index.d.ts.map +1 -1
  103. package/lib/oidc/index.js.map +1 -1
  104. package/lib/oidc/register.js +3 -3
  105. package/lib/oidc/register.js.map +1 -1
  106. package/lib/oidc/tokenRefresher.d.ts.map +1 -1
  107. package/lib/oidc/tokenRefresher.js +6 -5
  108. package/lib/oidc/tokenRefresher.js.map +1 -1
  109. package/lib/oidc/validate.d.ts +9 -23
  110. package/lib/oidc/validate.d.ts.map +1 -1
  111. package/lib/oidc/validate.js +13 -28
  112. package/lib/oidc/validate.js.map +1 -1
  113. package/lib/randomstring.d.ts +30 -3
  114. package/lib/randomstring.d.ts.map +1 -1
  115. package/lib/randomstring.js +68 -16
  116. package/lib/randomstring.js.map +1 -1
  117. package/lib/sliding-sync-sdk.d.ts +3 -4
  118. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  119. package/lib/sliding-sync-sdk.js +55 -102
  120. package/lib/sliding-sync-sdk.js.map +1 -1
  121. package/lib/sliding-sync.js +9 -6
  122. package/lib/sliding-sync.js.map +1 -1
  123. package/lib/store/indexeddb-local-backend.js +4 -2
  124. package/lib/store/indexeddb-local-backend.js.map +1 -1
  125. package/lib/store/indexeddb.d.ts +1 -1
  126. package/lib/store/indexeddb.d.ts.map +1 -1
  127. package/lib/store/indexeddb.js.map +1 -1
  128. package/lib/sync-accumulator.d.ts +6 -4
  129. package/lib/sync-accumulator.d.ts.map +1 -1
  130. package/lib/sync-accumulator.js +23 -12
  131. package/lib/sync-accumulator.js.map +1 -1
  132. package/lib/sync.d.ts +10 -13
  133. package/lib/sync.d.ts.map +1 -1
  134. package/lib/sync.js +94 -115
  135. package/lib/sync.js.map +1 -1
  136. package/lib/testing.d.ts +13 -44
  137. package/lib/testing.d.ts.map +1 -1
  138. package/lib/testing.js +36 -99
  139. package/lib/testing.js.map +1 -1
  140. package/lib/types.d.ts +0 -1
  141. package/lib/types.d.ts.map +1 -1
  142. package/lib/types.js.map +1 -1
  143. package/package.json +14 -15
  144. package/src/@types/event.ts +19 -36
  145. package/src/@types/global.d.ts +21 -4
  146. package/src/autodiscovery.ts +1 -1
  147. package/src/base64.ts +38 -40
  148. package/src/browser-index.ts +0 -11
  149. package/src/client.ts +175 -3136
  150. package/src/digest.ts +3 -3
  151. package/src/embedded.ts +43 -149
  152. package/src/event-mapper.ts +0 -4
  153. package/src/feature.ts +1 -0
  154. package/src/http-api/errors.ts +3 -3
  155. package/src/http-api/utils.ts +2 -2
  156. package/src/matrix.ts +0 -41
  157. package/src/models/MSC3089Branch.ts +0 -3
  158. package/src/models/event-timeline-set.ts +17 -38
  159. package/src/models/event-timeline.ts +11 -26
  160. package/src/models/event.ts +54 -295
  161. package/src/models/invites-ignorer-types.ts +48 -0
  162. package/src/models/invites-ignorer.ts +7 -42
  163. package/src/models/poll.ts +0 -6
  164. package/src/models/relations-container.ts +1 -8
  165. package/src/models/relations.ts +0 -8
  166. package/src/models/room-member.ts +16 -1
  167. package/src/models/room-state.ts +4 -37
  168. package/src/models/room.ts +34 -69
  169. package/src/models/thread.ts +4 -3
  170. package/src/oidc/authorize.ts +7 -7
  171. package/src/oidc/discovery.ts +16 -10
  172. package/src/oidc/index.ts +3 -4
  173. package/src/oidc/register.ts +3 -3
  174. package/src/oidc/tokenRefresher.ts +3 -2
  175. package/src/oidc/validate.ts +40 -63
  176. package/src/randomstring.ts +65 -19
  177. package/src/sliding-sync-sdk.ts +10 -83
  178. package/src/sliding-sync.ts +6 -6
  179. package/src/store/indexeddb-local-backend.ts +2 -2
  180. package/src/store/indexeddb.ts +1 -1
  181. package/src/sync-accumulator.ts +33 -16
  182. package/src/sync.ts +112 -143
  183. package/src/testing.ts +36 -103
  184. package/src/types.ts +0 -1
  185. package/CHANGELOG.md +0 -5910
  186. package/lib/@types/AESEncryptedSecretStoragePayload.d.ts +0 -14
  187. package/lib/@types/AESEncryptedSecretStoragePayload.d.ts.map +0 -1
  188. package/lib/@types/AESEncryptedSecretStoragePayload.js +0 -1
  189. package/lib/@types/AESEncryptedSecretStoragePayload.js.map +0 -1
  190. package/lib/@types/crypto.d.ts +0 -47
  191. package/lib/@types/crypto.d.ts.map +0 -1
  192. package/lib/@types/crypto.js +0 -1
  193. package/lib/@types/crypto.js.map +0 -1
  194. package/lib/@types/matrix-sdk-crypto-wasm.d.js +0 -1
  195. package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +0 -1
  196. package/lib/common-crypto/CryptoBackend.d.ts +0 -240
  197. package/lib/common-crypto/CryptoBackend.d.ts.map +0 -1
  198. package/lib/common-crypto/CryptoBackend.js +0 -73
  199. package/lib/common-crypto/CryptoBackend.js.map +0 -1
  200. package/lib/common-crypto/key-passphrase.d.ts +0 -14
  201. package/lib/common-crypto/key-passphrase.d.ts.map +0 -1
  202. package/lib/common-crypto/key-passphrase.js +0 -33
  203. package/lib/common-crypto/key-passphrase.js.map +0 -1
  204. package/lib/crypto/CrossSigning.d.ts +0 -184
  205. package/lib/crypto/CrossSigning.d.ts.map +0 -1
  206. package/lib/crypto/CrossSigning.js +0 -718
  207. package/lib/crypto/CrossSigning.js.map +0 -1
  208. package/lib/crypto/DeviceList.d.ts +0 -216
  209. package/lib/crypto/DeviceList.d.ts.map +0 -1
  210. package/lib/crypto/DeviceList.js +0 -892
  211. package/lib/crypto/DeviceList.js.map +0 -1
  212. package/lib/crypto/EncryptionSetup.d.ts +0 -152
  213. package/lib/crypto/EncryptionSetup.d.ts.map +0 -1
  214. package/lib/crypto/EncryptionSetup.js +0 -356
  215. package/lib/crypto/EncryptionSetup.js.map +0 -1
  216. package/lib/crypto/OlmDevice.d.ts +0 -457
  217. package/lib/crypto/OlmDevice.d.ts.map +0 -1
  218. package/lib/crypto/OlmDevice.js +0 -1241
  219. package/lib/crypto/OlmDevice.js.map +0 -1
  220. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts +0 -109
  221. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts.map +0 -1
  222. package/lib/crypto/OutgoingRoomKeyRequestManager.js +0 -415
  223. package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +0 -1
  224. package/lib/crypto/RoomList.d.ts +0 -26
  225. package/lib/crypto/RoomList.d.ts.map +0 -1
  226. package/lib/crypto/RoomList.js +0 -71
  227. package/lib/crypto/RoomList.js.map +0 -1
  228. package/lib/crypto/SecretSharing.d.ts +0 -24
  229. package/lib/crypto/SecretSharing.d.ts.map +0 -1
  230. package/lib/crypto/SecretSharing.js +0 -194
  231. package/lib/crypto/SecretSharing.js.map +0 -1
  232. package/lib/crypto/SecretStorage.d.ts +0 -55
  233. package/lib/crypto/SecretStorage.d.ts.map +0 -1
  234. package/lib/crypto/SecretStorage.js +0 -118
  235. package/lib/crypto/SecretStorage.js.map +0 -1
  236. package/lib/crypto/aes.d.ts +0 -6
  237. package/lib/crypto/aes.d.ts.map +0 -1
  238. package/lib/crypto/aes.js +0 -24
  239. package/lib/crypto/aes.js.map +0 -1
  240. package/lib/crypto/algorithms/base.d.ts +0 -156
  241. package/lib/crypto/algorithms/base.d.ts.map +0 -1
  242. package/lib/crypto/algorithms/base.js +0 -187
  243. package/lib/crypto/algorithms/base.js.map +0 -1
  244. package/lib/crypto/algorithms/index.d.ts +0 -4
  245. package/lib/crypto/algorithms/index.d.ts.map +0 -1
  246. package/lib/crypto/algorithms/index.js +0 -20
  247. package/lib/crypto/algorithms/index.js.map +0 -1
  248. package/lib/crypto/algorithms/megolm.d.ts +0 -385
  249. package/lib/crypto/algorithms/megolm.d.ts.map +0 -1
  250. package/lib/crypto/algorithms/megolm.js +0 -1822
  251. package/lib/crypto/algorithms/megolm.js.map +0 -1
  252. package/lib/crypto/algorithms/olm.d.ts +0 -5
  253. package/lib/crypto/algorithms/olm.d.ts.map +0 -1
  254. package/lib/crypto/algorithms/olm.js +0 -299
  255. package/lib/crypto/algorithms/olm.js.map +0 -1
  256. package/lib/crypto/api.d.ts +0 -32
  257. package/lib/crypto/api.d.ts.map +0 -1
  258. package/lib/crypto/api.js +0 -22
  259. package/lib/crypto/api.js.map +0 -1
  260. package/lib/crypto/backup.d.ts +0 -227
  261. package/lib/crypto/backup.d.ts.map +0 -1
  262. package/lib/crypto/backup.js +0 -824
  263. package/lib/crypto/backup.js.map +0 -1
  264. package/lib/crypto/crypto.d.ts +0 -3
  265. package/lib/crypto/crypto.d.ts.map +0 -1
  266. package/lib/crypto/crypto.js +0 -19
  267. package/lib/crypto/crypto.js.map +0 -1
  268. package/lib/crypto/dehydration.d.ts +0 -34
  269. package/lib/crypto/dehydration.d.ts.map +0 -1
  270. package/lib/crypto/dehydration.js +0 -252
  271. package/lib/crypto/dehydration.js.map +0 -1
  272. package/lib/crypto/device-converter.d.ts +0 -9
  273. package/lib/crypto/device-converter.d.ts.map +0 -1
  274. package/lib/crypto/device-converter.js +0 -42
  275. package/lib/crypto/device-converter.js.map +0 -1
  276. package/lib/crypto/deviceinfo.d.ts +0 -99
  277. package/lib/crypto/deviceinfo.d.ts.map +0 -1
  278. package/lib/crypto/deviceinfo.js +0 -148
  279. package/lib/crypto/deviceinfo.js.map +0 -1
  280. package/lib/crypto/index.d.ts +0 -1210
  281. package/lib/crypto/index.d.ts.map +0 -1
  282. package/lib/crypto/index.js +0 -4101
  283. package/lib/crypto/index.js.map +0 -1
  284. package/lib/crypto/key_passphrase.d.ts +0 -14
  285. package/lib/crypto/key_passphrase.d.ts.map +0 -1
  286. package/lib/crypto/key_passphrase.js +0 -44
  287. package/lib/crypto/key_passphrase.js.map +0 -1
  288. package/lib/crypto/keybackup.d.ts +0 -18
  289. package/lib/crypto/keybackup.d.ts.map +0 -1
  290. package/lib/crypto/keybackup.js +0 -1
  291. package/lib/crypto/keybackup.js.map +0 -1
  292. package/lib/crypto/olmlib.d.ts +0 -129
  293. package/lib/crypto/olmlib.d.ts.map +0 -1
  294. package/lib/crypto/olmlib.js +0 -492
  295. package/lib/crypto/olmlib.js.map +0 -1
  296. package/lib/crypto/recoverykey.d.ts +0 -2
  297. package/lib/crypto/recoverykey.d.ts.map +0 -1
  298. package/lib/crypto/recoverykey.js +0 -19
  299. package/lib/crypto/recoverykey.js.map +0 -1
  300. package/lib/crypto/store/base.d.ts +0 -252
  301. package/lib/crypto/store/base.d.ts.map +0 -1
  302. package/lib/crypto/store/base.js +0 -64
  303. package/lib/crypto/store/base.js.map +0 -1
  304. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +0 -187
  305. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +0 -1
  306. package/lib/crypto/store/indexeddb-crypto-store-backend.js +0 -1145
  307. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +0 -1
  308. package/lib/crypto/store/indexeddb-crypto-store.d.ts +0 -432
  309. package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +0 -1
  310. package/lib/crypto/store/indexeddb-crypto-store.js +0 -728
  311. package/lib/crypto/store/indexeddb-crypto-store.js.map +0 -1
  312. package/lib/crypto/store/localStorage-crypto-store.d.ts +0 -119
  313. package/lib/crypto/store/localStorage-crypto-store.d.ts.map +0 -1
  314. package/lib/crypto/store/localStorage-crypto-store.js +0 -531
  315. package/lib/crypto/store/localStorage-crypto-store.js.map +0 -1
  316. package/lib/crypto/store/memory-crypto-store.d.ts +0 -215
  317. package/lib/crypto/store/memory-crypto-store.d.ts.map +0 -1
  318. package/lib/crypto/store/memory-crypto-store.js +0 -622
  319. package/lib/crypto/store/memory-crypto-store.js.map +0 -1
  320. package/lib/crypto/verification/Base.d.ts +0 -105
  321. package/lib/crypto/verification/Base.d.ts.map +0 -1
  322. package/lib/crypto/verification/Base.js +0 -372
  323. package/lib/crypto/verification/Base.js.map +0 -1
  324. package/lib/crypto/verification/Error.d.ts +0 -35
  325. package/lib/crypto/verification/Error.d.ts.map +0 -1
  326. package/lib/crypto/verification/Error.js +0 -86
  327. package/lib/crypto/verification/Error.js.map +0 -1
  328. package/lib/crypto/verification/IllegalMethod.d.ts +0 -15
  329. package/lib/crypto/verification/IllegalMethod.d.ts.map +0 -1
  330. package/lib/crypto/verification/IllegalMethod.js +0 -43
  331. package/lib/crypto/verification/IllegalMethod.js.map +0 -1
  332. package/lib/crypto/verification/QRCode.d.ts +0 -51
  333. package/lib/crypto/verification/QRCode.d.ts.map +0 -1
  334. package/lib/crypto/verification/QRCode.js +0 -277
  335. package/lib/crypto/verification/QRCode.js.map +0 -1
  336. package/lib/crypto/verification/SAS.d.ts +0 -27
  337. package/lib/crypto/verification/SAS.d.ts.map +0 -1
  338. package/lib/crypto/verification/SAS.js +0 -485
  339. package/lib/crypto/verification/SAS.js.map +0 -1
  340. package/lib/crypto/verification/SASDecimal.d.ts +0 -8
  341. package/lib/crypto/verification/SASDecimal.d.ts.map +0 -1
  342. package/lib/crypto/verification/SASDecimal.js +0 -34
  343. package/lib/crypto/verification/SASDecimal.js.map +0 -1
  344. package/lib/crypto/verification/request/Channel.d.ts +0 -18
  345. package/lib/crypto/verification/request/Channel.d.ts.map +0 -1
  346. package/lib/crypto/verification/request/Channel.js +0 -1
  347. package/lib/crypto/verification/request/Channel.js.map +0 -1
  348. package/lib/crypto/verification/request/InRoomChannel.d.ts +0 -113
  349. package/lib/crypto/verification/request/InRoomChannel.d.ts.map +0 -1
  350. package/lib/crypto/verification/request/InRoomChannel.js +0 -351
  351. package/lib/crypto/verification/request/InRoomChannel.js.map +0 -1
  352. package/lib/crypto/verification/request/ToDeviceChannel.d.ts +0 -105
  353. package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +0 -1
  354. package/lib/crypto/verification/request/ToDeviceChannel.js +0 -328
  355. package/lib/crypto/verification/request/ToDeviceChannel.js.map +0 -1
  356. package/lib/crypto/verification/request/VerificationRequest.d.ts +0 -227
  357. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +0 -1
  358. package/lib/crypto/verification/request/VerificationRequest.js +0 -937
  359. package/lib/crypto/verification/request/VerificationRequest.js.map +0 -1
  360. package/lib/crypto-api/CryptoEvent.d.ts +0 -69
  361. package/lib/crypto-api/CryptoEvent.d.ts.map +0 -1
  362. package/lib/crypto-api/CryptoEvent.js +0 -33
  363. package/lib/crypto-api/CryptoEvent.js.map +0 -1
  364. package/lib/crypto-api/CryptoEventHandlerMap.d.ts +0 -16
  365. package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +0 -1
  366. package/lib/crypto-api/CryptoEventHandlerMap.js +0 -22
  367. package/lib/crypto-api/CryptoEventHandlerMap.js.map +0 -1
  368. package/lib/crypto-api/index.d.ts +0 -978
  369. package/lib/crypto-api/index.d.ts.map +0 -1
  370. package/lib/crypto-api/index.js +0 -304
  371. package/lib/crypto-api/index.js.map +0 -1
  372. package/lib/crypto-api/key-passphrase.d.ts +0 -11
  373. package/lib/crypto-api/key-passphrase.d.ts.map +0 -1
  374. package/lib/crypto-api/key-passphrase.js +0 -51
  375. package/lib/crypto-api/key-passphrase.js.map +0 -1
  376. package/lib/crypto-api/keybackup.d.ts +0 -88
  377. package/lib/crypto-api/keybackup.d.ts.map +0 -1
  378. package/lib/crypto-api/keybackup.js +0 -1
  379. package/lib/crypto-api/keybackup.js.map +0 -1
  380. package/lib/crypto-api/recovery-key.d.ts +0 -11
  381. package/lib/crypto-api/recovery-key.d.ts.map +0 -1
  382. package/lib/crypto-api/recovery-key.js +0 -65
  383. package/lib/crypto-api/recovery-key.js.map +0 -1
  384. package/lib/crypto-api/verification.d.ts +0 -344
  385. package/lib/crypto-api/verification.d.ts.map +0 -1
  386. package/lib/crypto-api/verification.js +0 -91
  387. package/lib/crypto-api/verification.js.map +0 -1
  388. package/lib/matrixrtc/CallMembership.d.ts +0 -66
  389. package/lib/matrixrtc/CallMembership.d.ts.map +0 -1
  390. package/lib/matrixrtc/CallMembership.js +0 -197
  391. package/lib/matrixrtc/CallMembership.js.map +0 -1
  392. package/lib/matrixrtc/LivekitFocus.d.ts +0 -16
  393. package/lib/matrixrtc/LivekitFocus.d.ts.map +0 -1
  394. package/lib/matrixrtc/LivekitFocus.js +0 -20
  395. package/lib/matrixrtc/LivekitFocus.js.map +0 -1
  396. package/lib/matrixrtc/MatrixRTCSession.d.ts +0 -295
  397. package/lib/matrixrtc/MatrixRTCSession.d.ts.map +0 -1
  398. package/lib/matrixrtc/MatrixRTCSession.js +0 -1043
  399. package/lib/matrixrtc/MatrixRTCSession.js.map +0 -1
  400. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +0 -40
  401. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +0 -1
  402. package/lib/matrixrtc/MatrixRTCSessionManager.js +0 -146
  403. package/lib/matrixrtc/MatrixRTCSessionManager.js.map +0 -1
  404. package/lib/matrixrtc/focus.d.ts +0 -10
  405. package/lib/matrixrtc/focus.d.ts.map +0 -1
  406. package/lib/matrixrtc/focus.js +0 -1
  407. package/lib/matrixrtc/focus.js.map +0 -1
  408. package/lib/matrixrtc/index.d.ts +0 -7
  409. package/lib/matrixrtc/index.d.ts.map +0 -1
  410. package/lib/matrixrtc/index.js +0 -21
  411. package/lib/matrixrtc/index.js.map +0 -1
  412. package/lib/matrixrtc/types.d.ts +0 -19
  413. package/lib/matrixrtc/types.d.ts.map +0 -1
  414. package/lib/matrixrtc/types.js +0 -1
  415. package/lib/matrixrtc/types.js.map +0 -1
  416. package/lib/rendezvous/MSC4108SignInWithQR.d.ts +0 -112
  417. package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +0 -1
  418. package/lib/rendezvous/MSC4108SignInWithQR.js +0 -392
  419. package/lib/rendezvous/MSC4108SignInWithQR.js.map +0 -1
  420. package/lib/rendezvous/RendezvousChannel.d.ts +0 -27
  421. package/lib/rendezvous/RendezvousChannel.d.ts.map +0 -1
  422. package/lib/rendezvous/RendezvousChannel.js +0 -1
  423. package/lib/rendezvous/RendezvousChannel.js.map +0 -1
  424. package/lib/rendezvous/RendezvousCode.d.ts +0 -9
  425. package/lib/rendezvous/RendezvousCode.d.ts.map +0 -1
  426. package/lib/rendezvous/RendezvousCode.js +0 -1
  427. package/lib/rendezvous/RendezvousCode.js.map +0 -1
  428. package/lib/rendezvous/RendezvousError.d.ts +0 -6
  429. package/lib/rendezvous/RendezvousError.d.ts.map +0 -1
  430. package/lib/rendezvous/RendezvousError.js +0 -23
  431. package/lib/rendezvous/RendezvousError.js.map +0 -1
  432. package/lib/rendezvous/RendezvousFailureReason.d.ts +0 -31
  433. package/lib/rendezvous/RendezvousFailureReason.d.ts.map +0 -1
  434. package/lib/rendezvous/RendezvousFailureReason.js +0 -38
  435. package/lib/rendezvous/RendezvousFailureReason.js.map +0 -1
  436. package/lib/rendezvous/RendezvousIntent.d.ts +0 -5
  437. package/lib/rendezvous/RendezvousIntent.d.ts.map +0 -1
  438. package/lib/rendezvous/RendezvousIntent.js +0 -22
  439. package/lib/rendezvous/RendezvousIntent.js.map +0 -1
  440. package/lib/rendezvous/RendezvousTransport.d.ts +0 -36
  441. package/lib/rendezvous/RendezvousTransport.d.ts.map +0 -1
  442. package/lib/rendezvous/RendezvousTransport.js +0 -1
  443. package/lib/rendezvous/RendezvousTransport.js.map +0 -1
  444. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +0 -58
  445. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +0 -1
  446. package/lib/rendezvous/channels/MSC4108SecureChannel.js +0 -246
  447. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +0 -1
  448. package/lib/rendezvous/channels/index.d.ts +0 -2
  449. package/lib/rendezvous/channels/index.d.ts.map +0 -1
  450. package/lib/rendezvous/channels/index.js +0 -18
  451. package/lib/rendezvous/channels/index.js.map +0 -1
  452. package/lib/rendezvous/index.d.ts +0 -10
  453. package/lib/rendezvous/index.d.ts.map +0 -1
  454. package/lib/rendezvous/index.js +0 -23
  455. package/lib/rendezvous/index.js.map +0 -1
  456. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +0 -61
  457. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +0 -1
  458. package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -253
  459. package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +0 -1
  460. package/lib/rendezvous/transports/index.d.ts +0 -2
  461. package/lib/rendezvous/transports/index.d.ts.map +0 -1
  462. package/lib/rendezvous/transports/index.js +0 -18
  463. package/lib/rendezvous/transports/index.js.map +0 -1
  464. package/lib/rust-crypto/CrossSigningIdentity.d.ts +0 -33
  465. package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +0 -1
  466. package/lib/rust-crypto/CrossSigningIdentity.js +0 -157
  467. package/lib/rust-crypto/CrossSigningIdentity.js.map +0 -1
  468. package/lib/rust-crypto/DehydratedDeviceManager.d.ts +0 -98
  469. package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +0 -1
  470. package/lib/rust-crypto/DehydratedDeviceManager.js +0 -285
  471. package/lib/rust-crypto/DehydratedDeviceManager.js.map +0 -1
  472. package/lib/rust-crypto/KeyClaimManager.d.ts +0 -33
  473. package/lib/rust-crypto/KeyClaimManager.d.ts.map +0 -1
  474. package/lib/rust-crypto/KeyClaimManager.js +0 -82
  475. package/lib/rust-crypto/KeyClaimManager.js.map +0 -1
  476. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +0 -43
  477. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +0 -1
  478. package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -195
  479. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +0 -1
  480. package/lib/rust-crypto/OutgoingRequestsManager.d.ts +0 -47
  481. package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +0 -1
  482. package/lib/rust-crypto/OutgoingRequestsManager.js +0 -148
  483. package/lib/rust-crypto/OutgoingRequestsManager.js.map +0 -1
  484. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +0 -120
  485. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +0 -1
  486. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +0 -467
  487. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +0 -1
  488. package/lib/rust-crypto/RoomEncryptor.d.ts +0 -98
  489. package/lib/rust-crypto/RoomEncryptor.d.ts.map +0 -1
  490. package/lib/rust-crypto/RoomEncryptor.js +0 -299
  491. package/lib/rust-crypto/RoomEncryptor.js.map +0 -1
  492. package/lib/rust-crypto/backup.d.ts +0 -254
  493. package/lib/rust-crypto/backup.d.ts.map +0 -1
  494. package/lib/rust-crypto/backup.js +0 -837
  495. package/lib/rust-crypto/backup.js.map +0 -1
  496. package/lib/rust-crypto/constants.d.ts +0 -3
  497. package/lib/rust-crypto/constants.d.ts.map +0 -1
  498. package/lib/rust-crypto/constants.js +0 -19
  499. package/lib/rust-crypto/constants.js.map +0 -1
  500. package/lib/rust-crypto/device-converter.d.ts +0 -28
  501. package/lib/rust-crypto/device-converter.d.ts.map +0 -1
  502. package/lib/rust-crypto/device-converter.js +0 -123
  503. package/lib/rust-crypto/device-converter.js.map +0 -1
  504. package/lib/rust-crypto/index.d.ts +0 -61
  505. package/lib/rust-crypto/index.d.ts.map +0 -1
  506. package/lib/rust-crypto/index.js +0 -152
  507. package/lib/rust-crypto/index.js.map +0 -1
  508. package/lib/rust-crypto/libolm_migration.d.ts +0 -81
  509. package/lib/rust-crypto/libolm_migration.d.ts.map +0 -1
  510. package/lib/rust-crypto/libolm_migration.js +0 -459
  511. package/lib/rust-crypto/libolm_migration.js.map +0 -1
  512. package/lib/rust-crypto/rust-crypto.d.ts +0 -556
  513. package/lib/rust-crypto/rust-crypto.d.ts.map +0 -1
  514. package/lib/rust-crypto/rust-crypto.js +0 -2016
  515. package/lib/rust-crypto/rust-crypto.js.map +0 -1
  516. package/lib/rust-crypto/secret-storage.d.ts +0 -22
  517. package/lib/rust-crypto/secret-storage.d.ts.map +0 -1
  518. package/lib/rust-crypto/secret-storage.js +0 -63
  519. package/lib/rust-crypto/secret-storage.js.map +0 -1
  520. package/lib/rust-crypto/verification.d.ts +0 -319
  521. package/lib/rust-crypto/verification.d.ts.map +0 -1
  522. package/lib/rust-crypto/verification.js +0 -816
  523. package/lib/rust-crypto/verification.js.map +0 -1
  524. package/lib/secret-storage.d.ts +0 -370
  525. package/lib/secret-storage.d.ts.map +0 -1
  526. package/lib/secret-storage.js +0 -466
  527. package/lib/secret-storage.js.map +0 -1
  528. package/lib/utils/decryptAESSecretStorageItem.d.ts +0 -12
  529. package/lib/utils/decryptAESSecretStorageItem.d.ts.map +0 -1
  530. package/lib/utils/decryptAESSecretStorageItem.js +0 -50
  531. package/lib/utils/decryptAESSecretStorageItem.js.map +0 -1
  532. package/lib/utils/encryptAESSecretStorageItem.d.ts +0 -16
  533. package/lib/utils/encryptAESSecretStorageItem.d.ts.map +0 -1
  534. package/lib/utils/encryptAESSecretStorageItem.js +0 -68
  535. package/lib/utils/encryptAESSecretStorageItem.js.map +0 -1
  536. package/lib/utils/internal/deriveKeys.d.ts +0 -10
  537. package/lib/utils/internal/deriveKeys.d.ts.map +0 -1
  538. package/lib/utils/internal/deriveKeys.js +0 -60
  539. package/lib/utils/internal/deriveKeys.js.map +0 -1
  540. package/lib/webrtc/audioContext.d.ts +0 -15
  541. package/lib/webrtc/audioContext.d.ts.map +0 -1
  542. package/lib/webrtc/audioContext.js +0 -46
  543. package/lib/webrtc/audioContext.js.map +0 -1
  544. package/lib/webrtc/call.d.ts +0 -560
  545. package/lib/webrtc/call.d.ts.map +0 -1
  546. package/lib/webrtc/call.js +0 -2541
  547. package/lib/webrtc/call.js.map +0 -1
  548. package/lib/webrtc/callEventHandler.d.ts +0 -37
  549. package/lib/webrtc/callEventHandler.d.ts.map +0 -1
  550. package/lib/webrtc/callEventHandler.js +0 -344
  551. package/lib/webrtc/callEventHandler.js.map +0 -1
  552. package/lib/webrtc/callEventTypes.d.ts +0 -73
  553. package/lib/webrtc/callEventTypes.d.ts.map +0 -1
  554. package/lib/webrtc/callEventTypes.js +0 -13
  555. package/lib/webrtc/callEventTypes.js.map +0 -1
  556. package/lib/webrtc/callFeed.d.ts +0 -128
  557. package/lib/webrtc/callFeed.d.ts.map +0 -1
  558. package/lib/webrtc/callFeed.js +0 -289
  559. package/lib/webrtc/callFeed.js.map +0 -1
  560. package/lib/webrtc/groupCall.d.ts +0 -323
  561. package/lib/webrtc/groupCall.d.ts.map +0 -1
  562. package/lib/webrtc/groupCall.js +0 -1337
  563. package/lib/webrtc/groupCall.js.map +0 -1
  564. package/lib/webrtc/groupCallEventHandler.d.ts +0 -31
  565. package/lib/webrtc/groupCallEventHandler.d.ts.map +0 -1
  566. package/lib/webrtc/groupCallEventHandler.js +0 -178
  567. package/lib/webrtc/groupCallEventHandler.js.map +0 -1
  568. package/lib/webrtc/mediaHandler.d.ts +0 -89
  569. package/lib/webrtc/mediaHandler.d.ts.map +0 -1
  570. package/lib/webrtc/mediaHandler.js +0 -437
  571. package/lib/webrtc/mediaHandler.js.map +0 -1
  572. package/lib/webrtc/stats/callFeedStatsReporter.d.ts +0 -8
  573. package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +0 -1
  574. package/lib/webrtc/stats/callFeedStatsReporter.js +0 -82
  575. package/lib/webrtc/stats/callFeedStatsReporter.js.map +0 -1
  576. package/lib/webrtc/stats/callStatsReportGatherer.d.ts +0 -25
  577. package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +0 -1
  578. package/lib/webrtc/stats/callStatsReportGatherer.js +0 -199
  579. package/lib/webrtc/stats/callStatsReportGatherer.js.map +0 -1
  580. package/lib/webrtc/stats/callStatsReportSummary.d.ts +0 -17
  581. package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +0 -1
  582. package/lib/webrtc/stats/callStatsReportSummary.js +0 -1
  583. package/lib/webrtc/stats/callStatsReportSummary.js.map +0 -1
  584. package/lib/webrtc/stats/connectionStats.d.ts +0 -28
  585. package/lib/webrtc/stats/connectionStats.d.ts.map +0 -1
  586. package/lib/webrtc/stats/connectionStats.js +0 -26
  587. package/lib/webrtc/stats/connectionStats.js.map +0 -1
  588. package/lib/webrtc/stats/connectionStatsBuilder.d.ts +0 -5
  589. package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +0 -1
  590. package/lib/webrtc/stats/connectionStatsBuilder.js +0 -27
  591. package/lib/webrtc/stats/connectionStatsBuilder.js.map +0 -1
  592. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +0 -7
  593. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +0 -1
  594. package/lib/webrtc/stats/connectionStatsReportBuilder.js +0 -121
  595. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +0 -1
  596. package/lib/webrtc/stats/groupCallStats.d.ts +0 -22
  597. package/lib/webrtc/stats/groupCallStats.d.ts.map +0 -1
  598. package/lib/webrtc/stats/groupCallStats.js +0 -78
  599. package/lib/webrtc/stats/groupCallStats.js.map +0 -1
  600. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +0 -10
  601. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +0 -1
  602. package/lib/webrtc/stats/media/mediaSsrcHandler.js +0 -57
  603. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +0 -1
  604. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +0 -12
  605. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +0 -1
  606. package/lib/webrtc/stats/media/mediaTrackHandler.js +0 -62
  607. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +0 -1
  608. package/lib/webrtc/stats/media/mediaTrackStats.d.ts +0 -86
  609. package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +0 -1
  610. package/lib/webrtc/stats/media/mediaTrackStats.js +0 -142
  611. package/lib/webrtc/stats/media/mediaTrackStats.js.map +0 -1
  612. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +0 -22
  613. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +0 -1
  614. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +0 -76
  615. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +0 -1
  616. package/lib/webrtc/stats/statsReport.d.ts +0 -99
  617. package/lib/webrtc/stats/statsReport.d.ts.map +0 -1
  618. package/lib/webrtc/stats/statsReport.js +0 -32
  619. package/lib/webrtc/stats/statsReport.js.map +0 -1
  620. package/lib/webrtc/stats/statsReportEmitter.d.ts +0 -15
  621. package/lib/webrtc/stats/statsReportEmitter.d.ts.map +0 -1
  622. package/lib/webrtc/stats/statsReportEmitter.js +0 -33
  623. package/lib/webrtc/stats/statsReportEmitter.js.map +0 -1
  624. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +0 -16
  625. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +0 -1
  626. package/lib/webrtc/stats/summaryStatsReportGatherer.js +0 -116
  627. package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +0 -1
  628. package/lib/webrtc/stats/trackStatsBuilder.d.ts +0 -19
  629. package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +0 -1
  630. package/lib/webrtc/stats/trackStatsBuilder.js +0 -168
  631. package/lib/webrtc/stats/trackStatsBuilder.js.map +0 -1
  632. package/lib/webrtc/stats/transportStats.d.ts +0 -11
  633. package/lib/webrtc/stats/transportStats.d.ts.map +0 -1
  634. package/lib/webrtc/stats/transportStats.js +0 -1
  635. package/lib/webrtc/stats/transportStats.js.map +0 -1
  636. package/lib/webrtc/stats/transportStatsBuilder.d.ts +0 -5
  637. package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +0 -1
  638. package/lib/webrtc/stats/transportStatsBuilder.js +0 -34
  639. package/lib/webrtc/stats/transportStatsBuilder.js.map +0 -1
  640. package/lib/webrtc/stats/valueFormatter.d.ts +0 -4
  641. package/lib/webrtc/stats/valueFormatter.d.ts.map +0 -1
  642. package/lib/webrtc/stats/valueFormatter.js +0 -25
  643. package/lib/webrtc/stats/valueFormatter.js.map +0 -1
  644. package/src/@types/AESEncryptedSecretStoragePayload.ts +0 -29
  645. package/src/@types/crypto.ts +0 -73
  646. package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -44
  647. package/src/common-crypto/CryptoBackend.ts +0 -302
  648. package/src/common-crypto/README.md +0 -4
  649. package/src/common-crypto/key-passphrase.ts +0 -43
  650. package/src/crypto/CrossSigning.ts +0 -773
  651. package/src/crypto/DeviceList.ts +0 -989
  652. package/src/crypto/EncryptionSetup.ts +0 -351
  653. package/src/crypto/OlmDevice.ts +0 -1500
  654. package/src/crypto/OutgoingRoomKeyRequestManager.ts +0 -485
  655. package/src/crypto/RoomList.ts +0 -70
  656. package/src/crypto/SecretSharing.ts +0 -240
  657. package/src/crypto/SecretStorage.ts +0 -136
  658. package/src/crypto/aes.ts +0 -23
  659. package/src/crypto/algorithms/base.ts +0 -236
  660. package/src/crypto/algorithms/index.ts +0 -20
  661. package/src/crypto/algorithms/megolm.ts +0 -2216
  662. package/src/crypto/algorithms/olm.ts +0 -381
  663. package/src/crypto/api.ts +0 -70
  664. package/src/crypto/backup.ts +0 -922
  665. package/src/crypto/crypto.ts +0 -18
  666. package/src/crypto/dehydration.ts +0 -272
  667. package/src/crypto/device-converter.ts +0 -45
  668. package/src/crypto/deviceinfo.ts +0 -158
  669. package/src/crypto/index.ts +0 -4418
  670. package/src/crypto/key_passphrase.ts +0 -42
  671. package/src/crypto/keybackup.ts +0 -47
  672. package/src/crypto/olmlib.ts +0 -539
  673. package/src/crypto/recoverykey.ts +0 -18
  674. package/src/crypto/store/base.ts +0 -348
  675. package/src/crypto/store/indexeddb-crypto-store-backend.ts +0 -1250
  676. package/src/crypto/store/indexeddb-crypto-store.ts +0 -845
  677. package/src/crypto/store/localStorage-crypto-store.ts +0 -579
  678. package/src/crypto/store/memory-crypto-store.ts +0 -680
  679. package/src/crypto/verification/Base.ts +0 -409
  680. package/src/crypto/verification/Error.ts +0 -76
  681. package/src/crypto/verification/IllegalMethod.ts +0 -50
  682. package/src/crypto/verification/QRCode.ts +0 -310
  683. package/src/crypto/verification/SAS.ts +0 -494
  684. package/src/crypto/verification/SASDecimal.ts +0 -37
  685. package/src/crypto/verification/request/Channel.ts +0 -34
  686. package/src/crypto/verification/request/InRoomChannel.ts +0 -371
  687. package/src/crypto/verification/request/ToDeviceChannel.ts +0 -354
  688. package/src/crypto/verification/request/VerificationRequest.ts +0 -976
  689. package/src/crypto-api/CryptoEvent.ts +0 -93
  690. package/src/crypto-api/CryptoEventHandlerMap.ts +0 -32
  691. package/src/crypto-api/index.ts +0 -1175
  692. package/src/crypto-api/key-passphrase.ts +0 -58
  693. package/src/crypto-api/keybackup.ts +0 -115
  694. package/src/crypto-api/recovery-key.ts +0 -69
  695. package/src/crypto-api/verification.ts +0 -408
  696. package/src/matrixrtc/CallMembership.ts +0 -247
  697. package/src/matrixrtc/LivekitFocus.ts +0 -39
  698. package/src/matrixrtc/MatrixRTCSession.ts +0 -1319
  699. package/src/matrixrtc/MatrixRTCSessionManager.ts +0 -166
  700. package/src/matrixrtc/focus.ts +0 -25
  701. package/src/matrixrtc/index.ts +0 -22
  702. package/src/matrixrtc/types.ts +0 -36
  703. package/src/rendezvous/MSC4108SignInWithQR.ts +0 -444
  704. package/src/rendezvous/RendezvousChannel.ts +0 -48
  705. package/src/rendezvous/RendezvousCode.ts +0 -25
  706. package/src/rendezvous/RendezvousError.ts +0 -26
  707. package/src/rendezvous/RendezvousFailureReason.ts +0 -49
  708. package/src/rendezvous/RendezvousIntent.ts +0 -20
  709. package/src/rendezvous/RendezvousTransport.ts +0 -58
  710. package/src/rendezvous/channels/MSC4108SecureChannel.ts +0 -270
  711. package/src/rendezvous/channels/index.ts +0 -17
  712. package/src/rendezvous/index.ts +0 -25
  713. package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -270
  714. package/src/rendezvous/transports/index.ts +0 -17
  715. package/src/rust-crypto/CrossSigningIdentity.ts +0 -183
  716. package/src/rust-crypto/DehydratedDeviceManager.ts +0 -306
  717. package/src/rust-crypto/KeyClaimManager.ts +0 -86
  718. package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -236
  719. package/src/rust-crypto/OutgoingRequestsManager.ts +0 -143
  720. package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +0 -501
  721. package/src/rust-crypto/RoomEncryptor.ts +0 -352
  722. package/src/rust-crypto/backup.ts +0 -881
  723. package/src/rust-crypto/constants.ts +0 -18
  724. package/src/rust-crypto/device-converter.ts +0 -128
  725. package/src/rust-crypto/index.ts +0 -237
  726. package/src/rust-crypto/libolm_migration.ts +0 -530
  727. package/src/rust-crypto/rust-crypto.ts +0 -2205
  728. package/src/rust-crypto/secret-storage.ts +0 -60
  729. package/src/rust-crypto/verification.ts +0 -830
  730. package/src/secret-storage.ts +0 -693
  731. package/src/utils/decryptAESSecretStorageItem.ts +0 -54
  732. package/src/utils/encryptAESSecretStorageItem.ts +0 -73
  733. package/src/utils/internal/deriveKeys.ts +0 -63
  734. package/src/webrtc/audioContext.ts +0 -44
  735. package/src/webrtc/call.ts +0 -3074
  736. package/src/webrtc/callEventHandler.ts +0 -425
  737. package/src/webrtc/callEventTypes.ts +0 -93
  738. package/src/webrtc/callFeed.ts +0 -364
  739. package/src/webrtc/groupCall.ts +0 -1735
  740. package/src/webrtc/groupCallEventHandler.ts +0 -234
  741. package/src/webrtc/mediaHandler.ts +0 -484
  742. package/src/webrtc/stats/callFeedStatsReporter.ts +0 -94
  743. package/src/webrtc/stats/callStatsReportGatherer.ts +0 -219
  744. package/src/webrtc/stats/callStatsReportSummary.ts +0 -30
  745. package/src/webrtc/stats/connectionStats.ts +0 -47
  746. package/src/webrtc/stats/connectionStatsBuilder.ts +0 -28
  747. package/src/webrtc/stats/connectionStatsReportBuilder.ts +0 -140
  748. package/src/webrtc/stats/groupCallStats.ts +0 -93
  749. package/src/webrtc/stats/media/mediaSsrcHandler.ts +0 -57
  750. package/src/webrtc/stats/media/mediaTrackHandler.ts +0 -76
  751. package/src/webrtc/stats/media/mediaTrackStats.ts +0 -176
  752. package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +0 -90
  753. package/src/webrtc/stats/statsReport.ts +0 -133
  754. package/src/webrtc/stats/statsReportEmitter.ts +0 -49
  755. package/src/webrtc/stats/summaryStatsReportGatherer.ts +0 -148
  756. package/src/webrtc/stats/trackStatsBuilder.ts +0 -207
  757. package/src/webrtc/stats/transportStats.ts +0 -26
  758. package/src/webrtc/stats/transportStatsBuilder.ts +0 -48
  759. package/src/webrtc/stats/valueFormatter.ts +0 -27
@@ -1,289 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /*
3
- Copyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- */
17
-
18
- import { SDPStreamMetadataPurpose } from "./callEventTypes.js";
19
- import { acquireContext, releaseContext } from "./audioContext.js";
20
- import { logger } from "../logger.js";
21
- import { TypedEventEmitter } from "../models/typed-event-emitter.js";
22
- import { CallEvent, CallState } from "./call.js";
23
- var POLLING_INTERVAL = 200; // ms
24
- export var SPEAKING_THRESHOLD = -60; // dB
25
- var SPEAKING_SAMPLE_COUNT = 8; // samples
26
-
27
- export var CallFeedEvent = /*#__PURE__*/function (CallFeedEvent) {
28
- CallFeedEvent["NewStream"] = "new_stream";
29
- CallFeedEvent["MuteStateChanged"] = "mute_state_changed";
30
- CallFeedEvent["LocalVolumeChanged"] = "local_volume_changed";
31
- CallFeedEvent["VolumeChanged"] = "volume_changed";
32
- CallFeedEvent["ConnectedChanged"] = "connected_changed";
33
- CallFeedEvent["Speaking"] = "speaking";
34
- CallFeedEvent["Disposed"] = "disposed";
35
- return CallFeedEvent;
36
- }({});
37
- export class CallFeed extends TypedEventEmitter {
38
- constructor(opts) {
39
- super();
40
- _defineProperty(this, "stream", void 0);
41
- _defineProperty(this, "sdpMetadataStreamId", void 0);
42
- _defineProperty(this, "userId", void 0);
43
- _defineProperty(this, "deviceId", void 0);
44
- _defineProperty(this, "purpose", void 0);
45
- _defineProperty(this, "speakingVolumeSamples", void 0);
46
- _defineProperty(this, "client", void 0);
47
- _defineProperty(this, "call", void 0);
48
- _defineProperty(this, "roomId", void 0);
49
- _defineProperty(this, "audioMuted", void 0);
50
- _defineProperty(this, "videoMuted", void 0);
51
- _defineProperty(this, "localVolume", 1);
52
- _defineProperty(this, "measuringVolumeActivity", false);
53
- _defineProperty(this, "audioContext", void 0);
54
- _defineProperty(this, "analyser", void 0);
55
- _defineProperty(this, "frequencyBinCount", void 0);
56
- _defineProperty(this, "speakingThreshold", SPEAKING_THRESHOLD);
57
- _defineProperty(this, "speaking", false);
58
- _defineProperty(this, "volumeLooperTimeout", void 0);
59
- _defineProperty(this, "_disposed", false);
60
- _defineProperty(this, "_connected", false);
61
- _defineProperty(this, "onAddTrack", () => {
62
- this.emit(CallFeedEvent.NewStream, this.stream);
63
- });
64
- _defineProperty(this, "onCallState", state => {
65
- if (state === CallState.Connected) {
66
- this.connected = true;
67
- } else if (state === CallState.Connecting) {
68
- this.connected = false;
69
- }
70
- });
71
- _defineProperty(this, "volumeLooper", () => {
72
- if (!this.analyser) return;
73
- if (!this.measuringVolumeActivity) return;
74
- this.analyser.getFloatFrequencyData(this.frequencyBinCount);
75
- var maxVolume = -Infinity;
76
- for (var volume of this.frequencyBinCount) {
77
- if (volume > maxVolume) {
78
- maxVolume = volume;
79
- }
80
- }
81
- this.speakingVolumeSamples.shift();
82
- this.speakingVolumeSamples.push(maxVolume);
83
- this.emit(CallFeedEvent.VolumeChanged, maxVolume);
84
- var newSpeaking = false;
85
- for (var _volume of this.speakingVolumeSamples) {
86
- if (_volume > this.speakingThreshold) {
87
- newSpeaking = true;
88
- break;
89
- }
90
- }
91
- if (this.speaking !== newSpeaking) {
92
- this.speaking = newSpeaking;
93
- this.emit(CallFeedEvent.Speaking, this.speaking);
94
- }
95
- this.volumeLooperTimeout = setTimeout(this.volumeLooper, POLLING_INTERVAL);
96
- });
97
- this.client = opts.client;
98
- this.call = opts.call;
99
- this.roomId = opts.roomId;
100
- this.userId = opts.userId;
101
- this.deviceId = opts.deviceId;
102
- this.purpose = opts.purpose;
103
- this.audioMuted = opts.audioMuted;
104
- this.videoMuted = opts.videoMuted;
105
- this.speakingVolumeSamples = new Array(SPEAKING_SAMPLE_COUNT).fill(-Infinity);
106
- this.sdpMetadataStreamId = opts.stream.id;
107
- this.updateStream(null, opts.stream);
108
- this.stream = opts.stream; // updateStream does this, but this makes TS happier
109
-
110
- if (this.hasAudioTrack) {
111
- this.initVolumeMeasuring();
112
- }
113
- if (opts.call) {
114
- opts.call.addListener(CallEvent.State, this.onCallState);
115
- this.onCallState(opts.call.state);
116
- }
117
- }
118
- get connected() {
119
- // Local feeds are always considered connected
120
- return this.isLocal() || this._connected;
121
- }
122
- set connected(connected) {
123
- this._connected = connected;
124
- this.emit(CallFeedEvent.ConnectedChanged, this.connected);
125
- }
126
- get hasAudioTrack() {
127
- return this.stream.getAudioTracks().length > 0;
128
- }
129
- updateStream(oldStream, newStream) {
130
- if (newStream === oldStream) return;
131
- var wasMeasuringVolumeActivity = this.measuringVolumeActivity;
132
- if (oldStream) {
133
- oldStream.removeEventListener("addtrack", this.onAddTrack);
134
- this.measureVolumeActivity(false);
135
- }
136
- this.stream = newStream;
137
- newStream.addEventListener("addtrack", this.onAddTrack);
138
- if (this.hasAudioTrack) {
139
- this.initVolumeMeasuring();
140
- if (wasMeasuringVolumeActivity) this.measureVolumeActivity(true);
141
- } else {
142
- this.measureVolumeActivity(false);
143
- }
144
- this.emit(CallFeedEvent.NewStream, this.stream);
145
- }
146
- initVolumeMeasuring() {
147
- if (!this.hasAudioTrack) return;
148
- if (!this.audioContext) this.audioContext = acquireContext();
149
- this.analyser = this.audioContext.createAnalyser();
150
- this.analyser.fftSize = 512;
151
- this.analyser.smoothingTimeConstant = 0.1;
152
- var mediaStreamAudioSourceNode = this.audioContext.createMediaStreamSource(this.stream);
153
- mediaStreamAudioSourceNode.connect(this.analyser);
154
- this.frequencyBinCount = new Float32Array(this.analyser.frequencyBinCount);
155
- }
156
- /**
157
- * Returns callRoom member
158
- * @returns member of the callRoom
159
- */
160
- getMember() {
161
- var _callRoom$getMember;
162
- var callRoom = this.client.getRoom(this.roomId);
163
- return (_callRoom$getMember = callRoom === null || callRoom === void 0 ? void 0 : callRoom.getMember(this.userId)) !== null && _callRoom$getMember !== void 0 ? _callRoom$getMember : null;
164
- }
165
-
166
- /**
167
- * Returns true if CallFeed is local, otherwise returns false
168
- * @returns is local?
169
- */
170
- isLocal() {
171
- return this.userId === this.client.getUserId() && (this.deviceId === undefined || this.deviceId === this.client.getDeviceId());
172
- }
173
-
174
- /**
175
- * Returns true if audio is muted or if there are no audio
176
- * tracks, otherwise returns false
177
- * @returns is audio muted?
178
- */
179
- isAudioMuted() {
180
- return this.stream.getAudioTracks().length === 0 || this.audioMuted;
181
- }
182
-
183
- /**
184
- * Returns true video is muted or if there are no video
185
- * tracks, otherwise returns false
186
- * @returns is video muted?
187
- */
188
- isVideoMuted() {
189
- // We assume only one video track
190
- return this.stream.getVideoTracks().length === 0 || this.videoMuted;
191
- }
192
- isSpeaking() {
193
- return this.speaking;
194
- }
195
-
196
- /**
197
- * Replaces the current MediaStream with a new one.
198
- * The stream will be different and new stream as remote parties are
199
- * concerned, but this can be used for convenience locally to set up
200
- * volume listeners automatically on the new stream etc.
201
- * @param newStream - new stream with which to replace the current one
202
- */
203
- setNewStream(newStream) {
204
- this.updateStream(this.stream, newStream);
205
- }
206
-
207
- /**
208
- * Set one or both of feed's internal audio and video video mute state
209
- * Either value may be null to leave it as-is
210
- * @param audioMuted - is the feed's audio muted?
211
- * @param videoMuted - is the feed's video muted?
212
- */
213
- setAudioVideoMuted(audioMuted, videoMuted) {
214
- if (audioMuted !== null) {
215
- if (this.audioMuted !== audioMuted) {
216
- this.speakingVolumeSamples.fill(-Infinity);
217
- }
218
- this.audioMuted = audioMuted;
219
- }
220
- if (videoMuted !== null) this.videoMuted = videoMuted;
221
- this.emit(CallFeedEvent.MuteStateChanged, this.audioMuted, this.videoMuted);
222
- }
223
-
224
- /**
225
- * Starts emitting volume_changed events where the emitter value is in decibels
226
- * @param enabled - emit volume changes
227
- */
228
- measureVolumeActivity(enabled) {
229
- if (enabled) {
230
- if (!this.analyser || !this.frequencyBinCount || !this.hasAudioTrack) return;
231
- this.measuringVolumeActivity = true;
232
- this.volumeLooper();
233
- } else {
234
- this.measuringVolumeActivity = false;
235
- this.speakingVolumeSamples.fill(-Infinity);
236
- this.emit(CallFeedEvent.VolumeChanged, -Infinity);
237
- }
238
- }
239
- setSpeakingThreshold(threshold) {
240
- this.speakingThreshold = threshold;
241
- }
242
- clone() {
243
- var mediaHandler = this.client.getMediaHandler();
244
- var stream = this.stream.clone();
245
- logger.log("CallFeed clone() cloning stream (originalStreamId=".concat(this.stream.id, ", newStreamId").concat(stream.id, ")"));
246
- if (this.purpose === SDPStreamMetadataPurpose.Usermedia) {
247
- mediaHandler.userMediaStreams.push(stream);
248
- } else {
249
- mediaHandler.screensharingStreams.push(stream);
250
- }
251
- return new CallFeed({
252
- client: this.client,
253
- roomId: this.roomId,
254
- userId: this.userId,
255
- deviceId: this.deviceId,
256
- stream,
257
- purpose: this.purpose,
258
- audioMuted: this.audioMuted,
259
- videoMuted: this.videoMuted
260
- });
261
- }
262
- dispose() {
263
- var _this$stream, _this$call;
264
- clearTimeout(this.volumeLooperTimeout);
265
- (_this$stream = this.stream) === null || _this$stream === void 0 || _this$stream.removeEventListener("addtrack", this.onAddTrack);
266
- (_this$call = this.call) === null || _this$call === void 0 || _this$call.removeListener(CallEvent.State, this.onCallState);
267
- if (this.audioContext) {
268
- this.audioContext = undefined;
269
- this.analyser = undefined;
270
- releaseContext();
271
- }
272
- this._disposed = true;
273
- this.emit(CallFeedEvent.Disposed);
274
- }
275
- get disposed() {
276
- return this._disposed;
277
- }
278
- set disposed(value) {
279
- this._disposed = value;
280
- }
281
- getLocalVolume() {
282
- return this.localVolume;
283
- }
284
- setLocalVolume(localVolume) {
285
- this.localVolume = localVolume;
286
- this.emit(CallFeedEvent.LocalVolumeChanged, localVolume);
287
- }
288
- }
289
- //# sourceMappingURL=callFeed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"callFeed.js","names":["SDPStreamMetadataPurpose","acquireContext","releaseContext","logger","TypedEventEmitter","CallEvent","CallState","POLLING_INTERVAL","SPEAKING_THRESHOLD","SPEAKING_SAMPLE_COUNT","CallFeedEvent","CallFeed","constructor","opts","_defineProperty","emit","NewStream","stream","state","Connected","connected","Connecting","analyser","measuringVolumeActivity","getFloatFrequencyData","frequencyBinCount","maxVolume","Infinity","volume","speakingVolumeSamples","shift","push","VolumeChanged","newSpeaking","speakingThreshold","speaking","Speaking","volumeLooperTimeout","setTimeout","volumeLooper","client","call","roomId","userId","deviceId","purpose","audioMuted","videoMuted","Array","fill","sdpMetadataStreamId","id","updateStream","hasAudioTrack","initVolumeMeasuring","addListener","State","onCallState","isLocal","_connected","ConnectedChanged","getAudioTracks","length","oldStream","newStream","wasMeasuringVolumeActivity","removeEventListener","onAddTrack","measureVolumeActivity","addEventListener","audioContext","createAnalyser","fftSize","smoothingTimeConstant","mediaStreamAudioSourceNode","createMediaStreamSource","connect","Float32Array","getMember","_callRoom$getMember","callRoom","getRoom","getUserId","undefined","getDeviceId","isAudioMuted","isVideoMuted","getVideoTracks","isSpeaking","setNewStream","setAudioVideoMuted","MuteStateChanged","enabled","setSpeakingThreshold","threshold","clone","mediaHandler","getMediaHandler","log","concat","Usermedia","userMediaStreams","screensharingStreams","dispose","_this$stream","_this$call","clearTimeout","removeListener","_disposed","Disposed","disposed","value","getLocalVolume","localVolume","setLocalVolume","LocalVolumeChanged"],"sources":["../../src/webrtc/callFeed.ts"],"sourcesContent":["/*\nCopyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { SDPStreamMetadataPurpose } from \"./callEventTypes.ts\";\nimport { acquireContext, releaseContext } from \"./audioContext.ts\";\nimport { MatrixClient } from \"../client.ts\";\nimport { RoomMember } from \"../models/room-member.ts\";\nimport { logger } from \"../logger.ts\";\nimport { TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\nimport { CallEvent, CallState, MatrixCall } from \"./call.ts\";\n\nconst POLLING_INTERVAL = 200; // ms\nexport const SPEAKING_THRESHOLD = -60; // dB\nconst SPEAKING_SAMPLE_COUNT = 8; // samples\n\nexport interface ICallFeedOpts {\n client: MatrixClient;\n roomId?: string;\n userId: string;\n deviceId: string | undefined;\n stream: MediaStream;\n purpose: SDPStreamMetadataPurpose;\n /**\n * Whether or not the remote SDPStreamMetadata says audio is muted\n */\n audioMuted: boolean;\n /**\n * Whether or not the remote SDPStreamMetadata says video is muted\n */\n videoMuted: boolean;\n /**\n * The MatrixCall which is the source of this CallFeed\n */\n call?: MatrixCall;\n}\n\nexport enum CallFeedEvent {\n NewStream = \"new_stream\",\n MuteStateChanged = \"mute_state_changed\",\n LocalVolumeChanged = \"local_volume_changed\",\n VolumeChanged = \"volume_changed\",\n ConnectedChanged = \"connected_changed\",\n Speaking = \"speaking\",\n Disposed = \"disposed\",\n}\n\ntype EventHandlerMap = {\n [CallFeedEvent.NewStream]: (stream: MediaStream) => void;\n [CallFeedEvent.MuteStateChanged]: (audioMuted: boolean, videoMuted: boolean) => void;\n [CallFeedEvent.LocalVolumeChanged]: (localVolume: number) => void;\n [CallFeedEvent.VolumeChanged]: (volume: number) => void;\n [CallFeedEvent.ConnectedChanged]: (connected: boolean) => void;\n [CallFeedEvent.Speaking]: (speaking: boolean) => void;\n [CallFeedEvent.Disposed]: () => void;\n};\n\nexport class CallFeed extends TypedEventEmitter<CallFeedEvent, EventHandlerMap> {\n public stream: MediaStream;\n public sdpMetadataStreamId: string;\n public userId: string;\n public readonly deviceId: string | undefined;\n public purpose: SDPStreamMetadataPurpose;\n public speakingVolumeSamples: number[];\n\n private client: MatrixClient;\n private call?: MatrixCall;\n private roomId?: string;\n private audioMuted: boolean;\n private videoMuted: boolean;\n private localVolume = 1;\n private measuringVolumeActivity = false;\n private audioContext?: AudioContext;\n private analyser?: AnalyserNode;\n private frequencyBinCount?: Float32Array;\n private speakingThreshold = SPEAKING_THRESHOLD;\n private speaking = false;\n private volumeLooperTimeout?: ReturnType<typeof setTimeout>;\n private _disposed = false;\n private _connected = false;\n\n public constructor(opts: ICallFeedOpts) {\n super();\n\n this.client = opts.client;\n this.call = opts.call;\n this.roomId = opts.roomId;\n this.userId = opts.userId;\n this.deviceId = opts.deviceId;\n this.purpose = opts.purpose;\n this.audioMuted = opts.audioMuted;\n this.videoMuted = opts.videoMuted;\n this.speakingVolumeSamples = new Array(SPEAKING_SAMPLE_COUNT).fill(-Infinity);\n this.sdpMetadataStreamId = opts.stream.id;\n\n this.updateStream(null, opts.stream);\n this.stream = opts.stream; // updateStream does this, but this makes TS happier\n\n if (this.hasAudioTrack) {\n this.initVolumeMeasuring();\n }\n\n if (opts.call) {\n opts.call.addListener(CallEvent.State, this.onCallState);\n this.onCallState(opts.call.state);\n }\n }\n\n public get connected(): boolean {\n // Local feeds are always considered connected\n return this.isLocal() || this._connected;\n }\n\n private set connected(connected: boolean) {\n this._connected = connected;\n this.emit(CallFeedEvent.ConnectedChanged, this.connected);\n }\n\n public get hasAudioTrack(): boolean {\n return this.stream.getAudioTracks().length > 0;\n }\n\n private updateStream(oldStream: MediaStream | null, newStream: MediaStream): void {\n if (newStream === oldStream) return;\n\n const wasMeasuringVolumeActivity = this.measuringVolumeActivity;\n\n if (oldStream) {\n oldStream.removeEventListener(\"addtrack\", this.onAddTrack);\n this.measureVolumeActivity(false);\n }\n\n this.stream = newStream;\n newStream.addEventListener(\"addtrack\", this.onAddTrack);\n\n if (this.hasAudioTrack) {\n this.initVolumeMeasuring();\n if (wasMeasuringVolumeActivity) this.measureVolumeActivity(true);\n } else {\n this.measureVolumeActivity(false);\n }\n\n this.emit(CallFeedEvent.NewStream, this.stream);\n }\n\n private initVolumeMeasuring(): void {\n if (!this.hasAudioTrack) return;\n if (!this.audioContext) this.audioContext = acquireContext();\n\n this.analyser = this.audioContext.createAnalyser();\n this.analyser.fftSize = 512;\n this.analyser.smoothingTimeConstant = 0.1;\n\n const mediaStreamAudioSourceNode = this.audioContext.createMediaStreamSource(this.stream);\n mediaStreamAudioSourceNode.connect(this.analyser);\n\n this.frequencyBinCount = new Float32Array(this.analyser.frequencyBinCount);\n }\n\n private onAddTrack = (): void => {\n this.emit(CallFeedEvent.NewStream, this.stream);\n };\n\n private onCallState = (state: CallState): void => {\n if (state === CallState.Connected) {\n this.connected = true;\n } else if (state === CallState.Connecting) {\n this.connected = false;\n }\n };\n\n /**\n * Returns callRoom member\n * @returns member of the callRoom\n */\n public getMember(): RoomMember | null {\n const callRoom = this.client.getRoom(this.roomId);\n return callRoom?.getMember(this.userId) ?? null;\n }\n\n /**\n * Returns true if CallFeed is local, otherwise returns false\n * @returns is local?\n */\n public isLocal(): boolean {\n return (\n this.userId === this.client.getUserId() &&\n (this.deviceId === undefined || this.deviceId === this.client.getDeviceId())\n );\n }\n\n /**\n * Returns true if audio is muted or if there are no audio\n * tracks, otherwise returns false\n * @returns is audio muted?\n */\n public isAudioMuted(): boolean {\n return this.stream.getAudioTracks().length === 0 || this.audioMuted;\n }\n\n /**\n * Returns true video is muted or if there are no video\n * tracks, otherwise returns false\n * @returns is video muted?\n */\n public isVideoMuted(): boolean {\n // We assume only one video track\n return this.stream.getVideoTracks().length === 0 || this.videoMuted;\n }\n\n public isSpeaking(): boolean {\n return this.speaking;\n }\n\n /**\n * Replaces the current MediaStream with a new one.\n * The stream will be different and new stream as remote parties are\n * concerned, but this can be used for convenience locally to set up\n * volume listeners automatically on the new stream etc.\n * @param newStream - new stream with which to replace the current one\n */\n public setNewStream(newStream: MediaStream): void {\n this.updateStream(this.stream, newStream);\n }\n\n /**\n * Set one or both of feed's internal audio and video video mute state\n * Either value may be null to leave it as-is\n * @param audioMuted - is the feed's audio muted?\n * @param videoMuted - is the feed's video muted?\n */\n public setAudioVideoMuted(audioMuted: boolean | null, videoMuted: boolean | null): void {\n if (audioMuted !== null) {\n if (this.audioMuted !== audioMuted) {\n this.speakingVolumeSamples.fill(-Infinity);\n }\n this.audioMuted = audioMuted;\n }\n if (videoMuted !== null) this.videoMuted = videoMuted;\n this.emit(CallFeedEvent.MuteStateChanged, this.audioMuted, this.videoMuted);\n }\n\n /**\n * Starts emitting volume_changed events where the emitter value is in decibels\n * @param enabled - emit volume changes\n */\n public measureVolumeActivity(enabled: boolean): void {\n if (enabled) {\n if (!this.analyser || !this.frequencyBinCount || !this.hasAudioTrack) return;\n\n this.measuringVolumeActivity = true;\n this.volumeLooper();\n } else {\n this.measuringVolumeActivity = false;\n this.speakingVolumeSamples.fill(-Infinity);\n this.emit(CallFeedEvent.VolumeChanged, -Infinity);\n }\n }\n\n public setSpeakingThreshold(threshold: number): void {\n this.speakingThreshold = threshold;\n }\n\n private volumeLooper = (): void => {\n if (!this.analyser) return;\n\n if (!this.measuringVolumeActivity) return;\n\n this.analyser.getFloatFrequencyData(this.frequencyBinCount!);\n\n let maxVolume = -Infinity;\n for (const volume of this.frequencyBinCount!) {\n if (volume > maxVolume) {\n maxVolume = volume;\n }\n }\n\n this.speakingVolumeSamples.shift();\n this.speakingVolumeSamples.push(maxVolume);\n\n this.emit(CallFeedEvent.VolumeChanged, maxVolume);\n\n let newSpeaking = false;\n\n for (const volume of this.speakingVolumeSamples) {\n if (volume > this.speakingThreshold) {\n newSpeaking = true;\n break;\n }\n }\n\n if (this.speaking !== newSpeaking) {\n this.speaking = newSpeaking;\n this.emit(CallFeedEvent.Speaking, this.speaking);\n }\n\n this.volumeLooperTimeout = setTimeout(this.volumeLooper, POLLING_INTERVAL);\n };\n\n public clone(): CallFeed {\n const mediaHandler = this.client.getMediaHandler();\n const stream = this.stream.clone();\n logger.log(`CallFeed clone() cloning stream (originalStreamId=${this.stream.id}, newStreamId${stream.id})`);\n\n if (this.purpose === SDPStreamMetadataPurpose.Usermedia) {\n mediaHandler.userMediaStreams.push(stream);\n } else {\n mediaHandler.screensharingStreams.push(stream);\n }\n\n return new CallFeed({\n client: this.client,\n roomId: this.roomId,\n userId: this.userId,\n deviceId: this.deviceId,\n stream,\n purpose: this.purpose,\n audioMuted: this.audioMuted,\n videoMuted: this.videoMuted,\n });\n }\n\n public dispose(): void {\n clearTimeout(this.volumeLooperTimeout);\n this.stream?.removeEventListener(\"addtrack\", this.onAddTrack);\n this.call?.removeListener(CallEvent.State, this.onCallState);\n if (this.audioContext) {\n this.audioContext = undefined;\n this.analyser = undefined;\n releaseContext();\n }\n this._disposed = true;\n this.emit(CallFeedEvent.Disposed);\n }\n\n public get disposed(): boolean {\n return this._disposed;\n }\n\n private set disposed(value: boolean) {\n this._disposed = value;\n }\n\n public getLocalVolume(): number {\n return this.localVolume;\n }\n\n public setLocalVolume(localVolume: number): void {\n this.localVolume = localVolume;\n this.emit(CallFeedEvent.LocalVolumeChanged, localVolume);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,wBAAwB,QAAQ,qBAAqB;AAC9D,SAASC,cAAc,EAAEC,cAAc,QAAQ,mBAAmB;AAGlE,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,SAAS,EAAEC,SAAS,QAAoB,WAAW;AAE5D,IAAMC,gBAAgB,GAAG,GAAG,CAAC,CAAC;AAC9B,OAAO,IAAMC,kBAAkB,GAAG,CAAC,EAAE,CAAC,CAAC;AACvC,IAAMC,qBAAqB,GAAG,CAAC,CAAC,CAAC;;AAuBjC,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAoBzB,OAAO,MAAMC,QAAQ,SAASP,iBAAiB,CAAiC;EAwBrEQ,WAAWA,CAACC,IAAmB,EAAE;IACpC,KAAK,CAAC,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAZU,CAAC;IAAAA,eAAA,kCACW,KAAK;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,4BAIXN,kBAAkB;IAAAM,eAAA,mBAC3B,KAAK;IAAAA,eAAA;IAAAA,eAAA,oBAEJ,KAAK;IAAAA,eAAA,qBACJ,KAAK;IAAAA,eAAA,qBAgFL,MAAY;MAC7B,IAA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E,UAAA,eAATA,UAAA,CAAWE,cAAc,CAACtG,SAAS,CAACmD,KAAK,EAAE,IAAI,CAACC,WAAW,CAAC;IAC5D,IAAI,IAAI,CAACa,YAAY,EAAE;MACnB,IAAI,CAACA,YAAY,GAAGa,SAAS;MAC7B,IAAI,CAAC7D,QAAQ,GAAG6D,SAAS;MACzBjF,cAAc,CAAC,CAAC;IACpB;IACA,IAAI,CAAC0G,SAAS,GAAG,IAAI;IACrB,IAAI,CAAC7F,IAAI,CAACL,aAAa,CAACmG,QAAQ,CAAC;EACrC;EAEA,IAAWC,QAAQA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAACF,SAAS;EACzB;EAEA,IAAYE,QAAQA,CAACC,KAAc,EAAE;IACjC,IAAI,CAACH,SAAS,GAAGG,KAAK;EAC1B;EAEOC,cAAcA,CAAA,EAAW;IAC5B,OAAO,IAAI,CAACC,WAAW;EAC3B;EAEOC,cAAcA,CAACD,WAAmB,EAAQ;IAC7C,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAAClG,IAAI,CAACL,aAAa,CAACyG,kBAAkB,EAAEF,WAAW,CAAC;EAC5D;AACJ","ignoreList":[]}
@@ -1,323 +0,0 @@
1
- import { TypedEventEmitter } from "../models/typed-event-emitter.ts";
2
- import { CallFeed } from "./callFeed.ts";
3
- import { MatrixClient } from "../client.ts";
4
- import { CallEvent, CallEventHandlerMap, MatrixCall } from "./call.ts";
5
- import { RoomMember } from "../models/room-member.ts";
6
- import { Room } from "../models/room.ts";
7
- import { SDPStreamMetadataPurpose } from "./callEventTypes.ts";
8
- import { IScreensharingOpts } from "./mediaHandler.ts";
9
- import { GroupCallStats } from "./stats/groupCallStats.ts";
10
- import { ByteSentStatsReport, CallFeedReport, ConnectionStatsReport, SummaryStatsReport } from "./stats/statsReport.ts";
11
- import { CallMembershipData } from "../matrixrtc/CallMembership.ts";
12
- export declare enum GroupCallIntent {
13
- Ring = "m.ring",
14
- Prompt = "m.prompt",
15
- Room = "m.room"
16
- }
17
- export declare enum GroupCallType {
18
- Video = "m.video",
19
- Voice = "m.voice"
20
- }
21
- export declare enum GroupCallTerminationReason {
22
- CallEnded = "call_ended"
23
- }
24
- export type CallsByUserAndDevice = Map<string, Map<string, MatrixCall>>;
25
- /**
26
- * Because event names are just strings, they do need
27
- * to be unique over all event types of event emitter.
28
- * Some objects could emit more then one set of events.
29
- */
30
- export declare enum GroupCallEvent {
31
- GroupCallStateChanged = "group_call_state_changed",
32
- ActiveSpeakerChanged = "active_speaker_changed",
33
- CallsChanged = "calls_changed",
34
- UserMediaFeedsChanged = "user_media_feeds_changed",
35
- ScreenshareFeedsChanged = "screenshare_feeds_changed",
36
- LocalScreenshareStateChanged = "local_screenshare_state_changed",
37
- LocalMuteStateChanged = "local_mute_state_changed",
38
- ParticipantsChanged = "participants_changed",
39
- Error = "group_call_error"
40
- }
41
- export type GroupCallEventHandlerMap = {
42
- [GroupCallEvent.GroupCallStateChanged]: (newState: GroupCallState, oldState: GroupCallState) => void;
43
- [GroupCallEvent.ActiveSpeakerChanged]: (activeSpeaker: CallFeed | undefined) => void;
44
- [GroupCallEvent.CallsChanged]: (calls: CallsByUserAndDevice) => void;
45
- [GroupCallEvent.UserMediaFeedsChanged]: (feeds: CallFeed[]) => void;
46
- [GroupCallEvent.ScreenshareFeedsChanged]: (feeds: CallFeed[]) => void;
47
- [GroupCallEvent.LocalScreenshareStateChanged]: (isScreensharing: boolean, feed?: CallFeed, sourceId?: string) => void;
48
- [GroupCallEvent.LocalMuteStateChanged]: (audioMuted: boolean, videoMuted: boolean) => void;
49
- [GroupCallEvent.ParticipantsChanged]: (participants: Map<RoomMember, Map<string, ParticipantState>>) => void;
50
- /**
51
- * Fires whenever an error occurs when call.js encounters an issue with setting up the call.
52
- * <p>
53
- * The error given will have a code equal to either `MatrixCall.ERR_LOCAL_OFFER_FAILED` or
54
- * `MatrixCall.ERR_NO_USER_MEDIA`. `ERR_LOCAL_OFFER_FAILED` is emitted when the local client
55
- * fails to create an offer. `ERR_NO_USER_MEDIA` is emitted when the user has denied access
56
- * to their audio/video hardware.
57
- * @param error - The error raised by MatrixCall.
58
- * @example
59
- * ```
60
- * matrixCall.on("error", function(err){
61
- * console.error(err.code, err);
62
- * });
63
- * ```
64
- */
65
- [GroupCallEvent.Error]: (error: GroupCallError) => void;
66
- };
67
- export declare enum GroupCallStatsReportEvent {
68
- ConnectionStats = "GroupCall.connection_stats",
69
- ByteSentStats = "GroupCall.byte_sent_stats",
70
- SummaryStats = "GroupCall.summary_stats",
71
- CallFeedStats = "GroupCall.call_feed_stats"
72
- }
73
- /**
74
- * The final report-events that get consumed by client.
75
- */
76
- export type GroupCallStatsReportEventHandlerMap = {
77
- [GroupCallStatsReportEvent.ConnectionStats]: (report: GroupCallStatsReport<ConnectionStatsReport>) => void;
78
- [GroupCallStatsReportEvent.ByteSentStats]: (report: GroupCallStatsReport<ByteSentStatsReport>) => void;
79
- [GroupCallStatsReportEvent.SummaryStats]: (report: GroupCallStatsReport<SummaryStatsReport>) => void;
80
- [GroupCallStatsReportEvent.CallFeedStats]: (report: GroupCallStatsReport<CallFeedReport>) => void;
81
- };
82
- export declare enum GroupCallErrorCode {
83
- NoUserMedia = "no_user_media",
84
- UnknownDevice = "unknown_device",
85
- PlaceCallFailed = "place_call_failed"
86
- }
87
- export interface GroupCallStatsReport<T extends ConnectionStatsReport | ByteSentStatsReport | SummaryStatsReport | CallFeedReport> {
88
- report: T;
89
- }
90
- export declare class GroupCallError extends Error {
91
- code: string;
92
- constructor(code: GroupCallErrorCode, msg: string, err?: Error);
93
- }
94
- export declare class GroupCallUnknownDeviceError extends GroupCallError {
95
- userId: string;
96
- constructor(userId: string);
97
- }
98
- export declare class OtherUserSpeakingError extends Error {
99
- constructor();
100
- }
101
- export interface IGroupCallDataChannelOptions {
102
- ordered: boolean;
103
- maxPacketLifeTime: number;
104
- maxRetransmits: number;
105
- protocol: string;
106
- }
107
- export interface IGroupCallRoomState {
108
- "m.intent": GroupCallIntent;
109
- "m.type": GroupCallType;
110
- "m.terminated"?: GroupCallTerminationReason;
111
- "io.element.ptt"?: boolean;
112
- "dataChannelsEnabled"?: boolean;
113
- "dataChannelOptions"?: IGroupCallDataChannelOptions;
114
- "io.element.livekit_service_url"?: string;
115
- }
116
- export interface IGroupCallRoomMemberFeed {
117
- purpose: SDPStreamMetadataPurpose;
118
- }
119
- export interface IGroupCallRoomMemberDevice {
120
- device_id: string;
121
- session_id: string;
122
- expires_ts: number;
123
- feeds: IGroupCallRoomMemberFeed[];
124
- }
125
- export interface IGroupCallRoomMemberCallState {
126
- "m.call_id": string;
127
- "m.foci"?: string[];
128
- "m.devices": IGroupCallRoomMemberDevice[];
129
- }
130
- export interface IGroupCallRoomMemberState {
131
- "m.calls": IGroupCallRoomMemberCallState[];
132
- }
133
- export interface ExperimentalGroupCallRoomMemberState {
134
- memberships: CallMembershipData[];
135
- }
136
- export declare enum GroupCallState {
137
- LocalCallFeedUninitialized = "local_call_feed_uninitialized",
138
- InitializingLocalCallFeed = "initializing_local_call_feed",
139
- LocalCallFeedInitialized = "local_call_feed_initialized",
140
- Entered = "entered",
141
- Ended = "ended"
142
- }
143
- export interface ParticipantState {
144
- sessionId: string;
145
- screensharing: boolean;
146
- }
147
- export declare class GroupCall extends TypedEventEmitter<GroupCallEvent | CallEvent | GroupCallStatsReportEvent, GroupCallEventHandlerMap & CallEventHandlerMap & GroupCallStatsReportEventHandlerMap> {
148
- private client;
149
- room: Room;
150
- type: GroupCallType;
151
- isPtt: boolean;
152
- intent: GroupCallIntent;
153
- private dataChannelsEnabled?;
154
- private dataChannelOptions?;
155
- private useLivekit;
156
- activeSpeakerInterval: number;
157
- retryCallInterval: number;
158
- participantTimeout: number;
159
- pttMaxTransmitTime: number;
160
- activeSpeaker?: CallFeed;
161
- localCallFeed?: CallFeed;
162
- localScreenshareFeed?: CallFeed;
163
- localDesktopCapturerSourceId?: string;
164
- readonly userMediaFeeds: CallFeed[];
165
- readonly screenshareFeeds: CallFeed[];
166
- groupCallId: string;
167
- readonly allowCallWithoutVideoAndAudio: boolean;
168
- private readonly calls;
169
- private callHandlers;
170
- private activeSpeakerLoopInterval?;
171
- private retryCallLoopInterval?;
172
- private retryCallCounts;
173
- private reEmitter;
174
- private transmitTimer;
175
- private participantsExpirationTimer;
176
- private resendMemberStateTimer;
177
- private initWithAudioMuted;
178
- private initWithVideoMuted;
179
- private initCallFeedPromise?;
180
- private _livekitServiceURL?;
181
- private stats;
182
- /**
183
- * Configure default webrtc stats collection interval in ms
184
- * Disable collecting webrtc stats by setting interval to 0
185
- */
186
- private statsCollectIntervalTime;
187
- constructor(client: MatrixClient, room: Room, type: GroupCallType, isPtt: boolean, intent: GroupCallIntent, groupCallId?: string, dataChannelsEnabled?: boolean | undefined, dataChannelOptions?: IGroupCallDataChannelOptions | undefined, isCallWithoutVideoAndAudio?: boolean, useLivekit?: boolean, livekitServiceURL?: string);
188
- private onConnectionStats;
189
- private onByteSentStats;
190
- private onSummaryStats;
191
- private onCallFeedReport;
192
- create(): Promise<GroupCall>;
193
- private sendCallStateEvent;
194
- get livekitServiceURL(): string | undefined;
195
- updateLivekitServiceURL(newURL: string): Promise<void>;
196
- private _state;
197
- /**
198
- * The group call's state.
199
- */
200
- get state(): GroupCallState;
201
- private set state(value);
202
- private _participants;
203
- /**
204
- * The current participants in the call, as a map from members to device IDs
205
- * to participant info.
206
- */
207
- get participants(): Map<RoomMember, Map<string, ParticipantState>>;
208
- private set participants(value);
209
- private _creationTs;
210
- /**
211
- * The timestamp at which the call was created, or null if it has not yet
212
- * been created.
213
- */
214
- get creationTs(): number | null;
215
- private set creationTs(value);
216
- private _enteredViaAnotherSession;
217
- /**
218
- * Whether the local device has entered this call via another session, such
219
- * as a widget.
220
- */
221
- get enteredViaAnotherSession(): boolean;
222
- set enteredViaAnotherSession(value: boolean);
223
- /**
224
- * Executes the given callback on all calls in this group call.
225
- * @param f - The callback.
226
- */
227
- forEachCall(f: (call: MatrixCall) => void): void;
228
- getLocalFeeds(): CallFeed[];
229
- hasLocalParticipant(): boolean;
230
- /**
231
- * Determines whether the given call is one that we were expecting to exist
232
- * given our knowledge of who is participating in the group call.
233
- */
234
- private callExpected;
235
- initLocalCallFeed(): Promise<void>;
236
- private initLocalCallFeedInternal;
237
- updateLocalUsermediaStream(stream: MediaStream): Promise<void>;
238
- enter(): Promise<void>;
239
- private dispose;
240
- leave(): void;
241
- terminate(emitStateEvent?: boolean): Promise<void>;
242
- isLocalVideoMuted(): boolean;
243
- isMicrophoneMuted(): boolean;
244
- /**
245
- * Sets the mute state of the local participants's microphone.
246
- * @param muted - Whether to mute the microphone
247
- * @returns Whether muting/unmuting was successful
248
- */
249
- setMicrophoneMuted(muted: boolean): Promise<boolean>;
250
- /**
251
- * If we allow entering a call without a camera and without video, it can happen that the access rights to the
252
- * devices have not yet been queried. If a stream does not yet have an audio track, we assume that the rights have
253
- * not yet been checked.
254
- *
255
- * `this.client.getMediaHandler().getUserMediaStream` clones the current stream, so it only wanted to be called when
256
- * not Audio Track exists.
257
- * As such, this is a compromise, because, the access rights should always be queried before the call.
258
- */
259
- private checkAudioPermissionIfNecessary;
260
- /**
261
- * Sets the mute state of the local participants's video.
262
- * @param muted - Whether to mute the video
263
- * @returns Whether muting/unmuting was successful
264
- */
265
- setLocalVideoMuted(muted: boolean): Promise<boolean>;
266
- setScreensharingEnabled(enabled: boolean, opts?: IScreensharingOpts): Promise<boolean>;
267
- isScreensharing(): boolean;
268
- private onIncomingCall;
269
- /**
270
- * Determines whether a given participant expects us to call them (versus
271
- * them calling us).
272
- * @param userId - The participant's user ID.
273
- * @param deviceId - The participant's device ID.
274
- * @returns Whether we need to place an outgoing call to the participant.
275
- */
276
- private wantsOutgoingCall;
277
- /**
278
- * Places calls to all participants that we're responsible for calling.
279
- */
280
- private placeOutgoingCalls;
281
- private getMemberStateEvents;
282
- private onRetryCallLoop;
283
- private initCall;
284
- private disposeCall;
285
- private onCallFeedsChanged;
286
- private onCallStateChanged;
287
- private onCallHangup;
288
- private onCallReplaced;
289
- getUserMediaFeed(userId: string, deviceId: string): CallFeed | undefined;
290
- private addUserMediaFeed;
291
- private replaceUserMediaFeed;
292
- private removeUserMediaFeed;
293
- private onActiveSpeakerLoop;
294
- getScreenshareFeed(userId: string, deviceId: string): CallFeed | undefined;
295
- private addScreenshareFeed;
296
- private replaceScreenshareFeed;
297
- private removeScreenshareFeed;
298
- /**
299
- * Recalculates and updates the participant map to match the room state.
300
- */
301
- private updateParticipants;
302
- /**
303
- * Updates the local user's member state with the devices returned by the given function.
304
- * @param fn - A function from the current devices to the new devices. If it
305
- * returns null, the update will be skipped.
306
- * @param keepAlive - Whether the request should outlive the window.
307
- */
308
- private updateDevices;
309
- private addDeviceToMemberState;
310
- private updateMemberState;
311
- /**
312
- * Cleans up our member state by filtering out logged out devices, inactive
313
- * devices, and our own device (if we know we haven't entered).
314
- */
315
- cleanMemberState(): Promise<void>;
316
- private onRoomState;
317
- private onParticipantsChanged;
318
- private onStateChanged;
319
- private onLocalFeedsChanged;
320
- getGroupCallStats(): GroupCallStats;
321
- setGroupCallStatsInterval(interval: number): void;
322
- }
323
- //# sourceMappingURL=groupCall.d.ts.map