@openclaw/matrix 2026.7.1-beta.2 → 2026.7.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-selection-Bv_ZuOu4.js → account-selection-5e4mHR1m.js} +1 -1
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-DzpLXVdc.js → approval-handler.runtime-DI5x9r8I.js} +5 -5
- package/dist/{approval-ids-R834n6m3.js → approval-ids-ZgqbspmS.js} +1 -1
- package/dist/{approval-reaction-auth-eAqCXUFG.js → approval-reaction-auth-D9LijQhr.js} +2 -2
- package/dist/{approval-reactions-BRGQgOu2.js → approval-reactions-BdUaUXVw.js} +24 -73
- package/dist/auth-presence.js +1 -1
- package/dist/{channel-KcNo9qtl.js → channel-jUTBsjHU.js} +20 -18
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DtsGVgZj.js → channel.runtime-DO1Nv9ed.js} +25 -13
- package/dist/{cli-Clvpw_8I.js → cli-CEfWwCKx.js} +9 -9
- package/dist/{cli-metadata-D3N0Avnt.js → cli-metadata-CfiEO-CE.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-BQz5GcYr.js → client-FRuyCNju.js} +2 -2
- package/dist/{client-bootstrap-CBJciU5u.js → client-bootstrap-DjFJ7e0N.js} +1 -2
- package/dist/{client-D-5GVz_D.js → client-tgnlQJk4.js} +2 -2
- package/dist/{config-schema-Dn-fHID8.js → config-schema-DtnhNYd-.js} +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-DhGid8FE.js → create-client-CNakT7zF.js} +3 -3
- package/dist/{credentials-G8lNmiME.js → credentials-Ds9V1mn2.js} +1 -1
- package/dist/{credentials-read-TzTOQPOM.js → credentials-read-BlkvsNFg.js} +1 -1
- package/dist/{credentials-write.runtime-5PDPPG9f.js → credentials-write.runtime-CTqqxcut.js} +1 -1
- package/dist/{crypto-runtime-B7kyrTL0.js → crypto-runtime-B74cTS6A.js} +4 -4
- package/dist/{crypto-state-store-DK2tcEyP.js → crypto-state-store-Jy3qwhdy.js} +1 -1
- package/dist/{deps-D3bkh48_.js → deps-CdjHvnmh.js} +20 -2
- package/dist/{directory-live-Ctu4whZK.js → directory-live-Ufd4qSpX.js} +2 -2
- package/dist/{doctor-BRSDNU5C.js → doctor-DfaOqFtr.js} +3 -3
- package/dist/{doctor-contract-Dq8OZWHF.js → doctor-contract-BAja_fmb.js} +1 -1
- package/dist/doctor-contract-api.js +8 -14
- package/dist/{draft-stream-j71tSUu-.js → draft-stream-D4EH25gv.js} +1 -1
- package/dist/{encryption-guidance-Bg3IRYoX.js → encryption-guidance-D8walY04.js} +1 -1
- package/dist/{file-sync-store-BWLVB01Y.js → file-sync-store-DVm0ACml.js} +3 -3
- package/dist/helper-api.js +1 -1
- package/dist/{idb-persistence-BGY1CJ7J.js → idb-persistence-BHm97th-.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{legacy-crypto-inspector-D_8iylBq.js → legacy-crypto-inspector-vzXSkm18.js} +1 -1
- package/dist/{legacy-crypto-restore-B0gcIEkE.js → legacy-crypto-restore-CIBfOmLn.js} +2 -2
- package/dist/{matrix-migration.runtime-Ctlb_rZl.js → matrix-migration.runtime-BMCyrANT.js} +3 -3
- package/dist/{media-text-XO4VaezT.js → media-text-p-LP21qs.js} +1 -1
- package/dist/{messages-nQLGGa1r.js → messages-DRKkiEY-.js} +6 -5
- package/dist/{monitor-k3Sko8qt.js → monitor-CsGOGdwu.js} +71 -71
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-2MZLc6ng.js +3 -0
- package/dist/{profile-update-DIOAhezh.js → profile-update-Ucc8RrJL.js} +2 -2
- package/dist/{reaction-events-BDsbR82F.js → reaction-events-DentrVii.js} +3 -3
- package/dist/{recovery-key-store-BGk8c_gf.js → recovery-key-store-DSeLFvNx.js} +1 -1
- package/dist/{resolve-targets-BbrinjHd.js → resolve-targets-DcV_KfgX.js} +1 -1
- package/dist/{resolver.runtime-B3N7k_6-.js → resolver.runtime-Hr6bO5zl.js} +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/runtime-heavy-api.js +1 -1
- package/dist/{sdk-eyqOqjmn.js → sdk-AZYVl34z.js} +8 -6
- package/dist/{send-D0hpevF-.js → send-D92v6Yy0.js} +21 -8
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-Ihb_DM2a.js → setup-bootstrap-Da564w5f.js} +2 -2
- package/dist/{setup-core-D2BQs8w1.js → setup-core-BGgbrdaJ.js} +5 -8
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-1qf1LZIP.js → setup-surface-iJ6pd-t5.js} +6 -6
- package/dist/{shared-BGcaBMK3.js → shared-DkFfq7mH.js} +6 -6
- package/dist/{startup-verification-Bd31KqLv.js → startup-verification-BKMAXvcV.js} +2 -2
- package/dist/{storage-t5S-5c_5.js → storage-CQdyKcGg.js} +5 -5
- package/dist/{thread-bindings-BnuBS0VH.js → thread-bindings-BX5nmWpw.js} +3 -3
- package/dist/{tool-actions.runtime-BeUveYxV.js → tool-actions.runtime-C1d5fxE_.js} +12 -12
- package/dist/{verification-CNw2K4uT.js → verification-BGCMiO1p.js} +2 -2
- package/node_modules/@babel/runtime/package.json +468 -1089
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/.cargo/config.toml +2 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/CHANGELOG.md +12 -3
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/README.md +17 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js +10 -2
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/modules.xml +8 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/vcs.xml +6 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/xtask.iml +11 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +28 -28
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +24 -24
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +58 -58
- package/node_modules/content-type/README.md +32 -57
- package/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +35 -25
- package/node_modules/linkify-it/README.md +3 -4
- package/node_modules/linkify-it/build/index.cjs.js +44 -41
- package/node_modules/linkify-it/index.mjs +10 -11
- package/node_modules/linkify-it/lib/re.mjs +34 -30
- package/node_modules/linkify-it/package.json +10 -15
- package/node_modules/markdown-it/dist/index.cjs.js +3652 -5378
- package/node_modules/markdown-it/dist/index.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.js +1399 -4479
- package/node_modules/markdown-it/dist/markdown-it.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.min.js +3 -2
- package/node_modules/markdown-it/dist/markdown-it.min.js.map +1 -0
- package/node_modules/markdown-it/lib/common/html_re.mjs +9 -9
- package/node_modules/markdown-it/lib/common/utils.mjs +2 -11
- package/node_modules/markdown-it/lib/parser_block.mjs +9 -9
- package/node_modules/markdown-it/lib/parser_core.mjs +7 -7
- package/node_modules/markdown-it/lib/parser_inline.mjs +16 -16
- package/node_modules/markdown-it/lib/renderer.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/code.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_block/list.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +5 -5
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/table.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_core/block.mjs +3 -3
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +15 -15
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +17 -17
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +15 -1
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +10 -10
- package/node_modules/markdown-it/lib/token.mjs +12 -12
- package/node_modules/markdown-it/package.json +25 -34
- package/node_modules/matrix-js-sdk/CHANGELOG.md +24 -0
- package/node_modules/matrix-js-sdk/README.md +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/AESEncryptedSecretStoragePayload.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/IIdentityServerProvider.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +7 -7
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/auth.js +4 -4
- package/node_modules/matrix-js-sdk/lib/@types/auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js +2 -2
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/common.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/crypto.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +6 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.js +23 -20
- package/node_modules/matrix-js-sdk/lib/@types/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/events.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js +6 -6
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/global.d.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/json.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/local_notifications.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/location.js +4 -4
- package/node_modules/matrix-js-sdk/lib/@types/location.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/matrix-sdk-crypto-wasm.d.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/media.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/membership.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/membership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/partials.js +6 -6
- package/node_modules/matrix-js-sdk/lib/@types/partials.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/polls.js +5 -5
- package/node_modules/matrix-js-sdk/lib/@types/polls.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js +2 -2
- package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/registration.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts +15 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.js +13 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/search.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/search.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/signed.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/spaces.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/state_events.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/synapse.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/sync.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/threepids.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/threepids.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/topic.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/topic.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/uia.js +3 -1
- package/node_modules/matrix-js-sdk/lib/NamespacedValue.js +8 -8
- package/node_modules/matrix-js-sdk/lib/NamespacedValue.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ReEmitter.js +8 -15
- package/node_modules/matrix-js-sdk/lib/ReEmitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js +47 -55
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/autodiscovery.js +233 -247
- package/node_modules/matrix-js-sdk/lib/autodiscovery.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/base64.js +1 -1
- package/node_modules/matrix-js-sdk/lib/base64.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.d.ts +2 -2
- package/node_modules/matrix-js-sdk/lib/browser-index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.js +5 -5
- package/node_modules/matrix-js-sdk/lib/browser-index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts +38 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.js +93 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/client.d.ts +9 -8
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +2123 -2483
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js +3 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/content-helpers.js +43 -48
- package/node_modules/matrix-js-sdk/lib/content-helpers.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/content-repo.js +14 -24
- package/node_modules/matrix-js-sdk/lib/content-repo.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js +6 -6
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js +189 -237
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js +25 -28
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js +113 -145
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js +74 -105
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEventHandlerMap.js +3 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +15 -6
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js +76 -76
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js +15 -23
- package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.js +3 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js +11 -12
- package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js +3 -3
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/digest.js +7 -14
- package/node_modules/matrix-js-sdk/lib/digest.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js +379 -500
- package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.js +2 -2
- package/node_modules/matrix-js-sdk/lib/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/event-mapper.js +10 -12
- package/node_modules/matrix-js-sdk/lib/event-mapper.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js +26 -28
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js +11 -12
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js +6 -6
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js +36 -38
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/utilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/feature.js +18 -31
- package/node_modules/matrix-js-sdk/lib/feature.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.js +20 -26
- package/node_modules/matrix-js-sdk/lib/filter-component.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter.js +14 -15
- package/node_modules/matrix-js-sdk/lib/filter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js +41 -56
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +140 -157
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/index.js +17 -20
- package/node_modules/matrix-js-sdk/lib/http-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/method.js +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/method.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/prefix.js +3 -3
- package/node_modules/matrix-js-sdk/lib/http-api/prefix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js +80 -99
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.js +35 -47
- package/node_modules/matrix-js-sdk/lib/http-api/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js +3 -3
- package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/indexeddb-worker.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts +5 -5
- package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js +181 -203
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/logger.js +22 -56
- package/node_modules/matrix-js-sdk/lib/logger.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.js +8 -11
- package/node_modules/matrix-js-sdk/lib/matrix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +83 -76
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +4 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +144 -184
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +35 -39
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +2 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +346 -383
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js +54 -59
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +117 -139
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +49 -54
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +15 -23
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +4 -5
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +4 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js +4 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js +91 -116
- package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js +209 -244
- package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/ToDeviceMessage.js +3 -1
- package/node_modules/matrix-js-sdk/lib/models/beacon.js +20 -15
- package/node_modules/matrix-js-sdk/lib/models/beacon.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js +13 -13
- package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/device.js +10 -3
- package/node_modules/matrix-js-sdk/lib/models/device.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-context.js +5 -7
- package/node_modules/matrix-js-sdk/lib/models/event-context.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-status.js +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-status.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +91 -91
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline.js +31 -29
- package/node_modules/matrix-js-sdk/lib/models/event-timeline.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event.js +215 -235
- package/node_modules/matrix-js-sdk/lib/models/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js +4 -4
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js +159 -179
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/poll.js +72 -78
- package/node_modules/matrix-js-sdk/lib/models/poll.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/profile-keys.js +2 -2
- package/node_modules/matrix-js-sdk/lib/models/profile-keys.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.js +40 -56
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/related-relations.js +2 -0
- package/node_modules/matrix-js-sdk/lib/models/related-relations.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js +20 -21
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations.js +131 -156
- package/node_modules/matrix-js-sdk/lib/models/relations.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-member.js +44 -27
- package/node_modules/matrix-js-sdk/lib/models/room-member.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-receipts.js +48 -55
- package/node_modules/matrix-js-sdk/lib/models/room-receipts.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts +28 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.js +192 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-state.js +141 -170
- package/node_modules/matrix-js-sdk/lib/models/room-state.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +46 -65
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-summary.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts +2 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.js +800 -887
- package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/search-result.js +5 -5
- package/node_modules/matrix-js-sdk/lib/models/search-result.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +267 -283
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js +7 -18
- package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/user.js +26 -7
- package/node_modules/matrix-js-sdk/lib/models/user.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js +208 -241
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js +23 -36
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.js +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/index.js +1 -0
- package/node_modules/matrix-js-sdk/lib/oidc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/register.js +60 -66
- package/node_modules/matrix-js-sdk/lib/oidc/register.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js +83 -94
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js +18 -18
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/pushprocessor.js +70 -81
- package/node_modules/matrix-js-sdk/lib/pushprocessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/randomstring.js +9 -9
- package/node_modules/matrix-js-sdk/lib/randomstring.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js +25 -28
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts +2 -0
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js +14 -22
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js +272 -298
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousChannel.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousCode.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousError.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js +2 -2
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousTransport.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js +122 -144
- package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js +44 -69
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js +142 -152
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts +33 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.js +39 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/room-hierarchy.js +52 -56
- package/node_modules/matrix-js-sdk/lib/room-hierarchy.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js +94 -104
- package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js +158 -190
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js +17 -20
- package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js +109 -139
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js +72 -86
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js +195 -221
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js +121 -137
- package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +7 -2
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js +459 -544
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js +15 -28
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +103 -116
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js +303 -365
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts +5 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +1065 -1322
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js +12 -25
- package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js +134 -184
- package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/scheduler.js +42 -17
- package/node_modules/matrix-js-sdk/lib/scheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.js +179 -213
- package/node_modules/matrix-js-sdk/lib/secret-storage.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts +4 -23
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.js +9 -62
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/service-types.js +1 -1
- package/node_modules/matrix-js-sdk/lib/service-types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +368 -421
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js +136 -167
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/index.d.ts +7 -0
- package/node_modules/matrix-js-sdk/lib/store/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/index.js +3 -1
- package/node_modules/matrix-js-sdk/lib/store/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-backend.js +3 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js +197 -240
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts +3 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js +51 -59
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js +22 -22
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts +7 -5
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js +63 -79
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js +2 -2
- package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/memory.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.js +38 -54
- package/node_modules/matrix-js-sdk/lib/store/memory.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/stub.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/stub.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/stub.js +22 -32
- package/node_modules/matrix-js-sdk/lib/store/stub.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js +57 -65
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.js +914 -991
- package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/testing.js +63 -105
- package/node_modules/matrix-js-sdk/lib/testing.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/thread-utils.js +1 -4
- package/node_modules/matrix-js-sdk/lib/thread-utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/timeline-window.js +90 -99
- package/node_modules/matrix-js-sdk/lib/timeline-window.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/types.js +1 -1
- package/node_modules/matrix-js-sdk/lib/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js +14 -25
- package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js +27 -38
- package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js +25 -32
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils.js +83 -135
- package/node_modules/matrix-js-sdk/lib/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/version-support.js +3 -3
- package/node_modules/matrix-js-sdk/lib/version-support.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js +5 -6
- package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/call.js +1123 -1256
- package/node_modules/matrix-js-sdk/lib/webrtc/call.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js +207 -214
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js +2 -2
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js +33 -20
- package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js +521 -594
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js +58 -61
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js +203 -233
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js +16 -20
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js +65 -70
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportSummary.js +3 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js +2 -2
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js +20 -24
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js +4 -5
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js +7 -8
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js +7 -9
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js +6 -6
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js +14 -14
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js +32 -34
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStats.js +3 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js +9 -9
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +110 -138
- package/node_modules/matrix-js-sdk/src/@types/event.ts +9 -0
- package/node_modules/matrix-js-sdk/src/@types/global.d.ts +2 -2
- package/node_modules/matrix-js-sdk/src/@types/retention.ts +16 -0
- package/node_modules/matrix-js-sdk/src/ToDeviceMessageQueue.ts +2 -2
- package/node_modules/matrix-js-sdk/src/browser-index.ts +4 -4
- package/node_modules/matrix-js-sdk/src/capabilityPoller.ts +102 -0
- package/node_modules/matrix-js-sdk/src/client.ts +37 -25
- package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +17 -6
- package/node_modules/matrix-js-sdk/src/embedded.ts +4 -6
- package/node_modules/matrix-js-sdk/src/filter-component.ts +1 -0
- package/node_modules/matrix-js-sdk/src/http-api/utils.ts +5 -10
- package/node_modules/matrix-js-sdk/src/interactive-auth.ts +11 -5
- package/node_modules/matrix-js-sdk/src/matrix.ts +1 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +5 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +2 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManagerActionScheduler.ts +4 -1
- package/node_modules/matrix-js-sdk/src/models/MSC3089Branch.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/room-retention.ts +230 -0
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +1 -0
- package/node_modules/matrix-js-sdk/src/models/room.ts +26 -12
- package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +2 -0
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/rendezvous/transports/MSC4108RendezvousSession.ts +2 -2
- package/node_modules/matrix-js-sdk/src/retentionPolicy.ts +65 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
- package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +15 -4
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +6 -6
- package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +31 -7
- package/node_modules/matrix-js-sdk/src/rust-crypto/verification.ts +1 -1
- package/node_modules/matrix-js-sdk/src/serverCapabilities.ts +8 -67
- package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +5 -7
- package/node_modules/matrix-js-sdk/src/store/index.ts +8 -0
- package/node_modules/matrix-js-sdk/src/store/indexeddb-local-backend.ts +12 -2
- package/node_modules/matrix-js-sdk/src/store/indexeddb-remote-backend.ts +24 -5
- package/node_modules/matrix-js-sdk/src/store/indexeddb.ts +20 -8
- package/node_modules/matrix-js-sdk/src/store/memory.ts +4 -0
- package/node_modules/matrix-js-sdk/src/store/stub.ts +3 -0
- package/node_modules/matrix-js-sdk/src/sync-accumulator.ts +9 -0
- package/node_modules/matrix-js-sdk/src/sync.ts +11 -9
- package/node_modules/media-typer/README.md +19 -33
- package/node_modules/media-typer/dist/index.d.ts +29 -0
- package/node_modules/media-typer/dist/index.js +64 -0
- package/node_modules/media-typer/dist/index.js.map +1 -0
- package/node_modules/media-typer/package.json +37 -22
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +2 -2
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +65 -13
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +10 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +13 -3
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.js +6 -5
- package/node_modules/music-metadata/package.json +5 -5
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/npm-shrinkwrap.json +59 -54
- package/package.json +10 -10
- package/dist/probe.runtime-BED7DXis.js +0 -3
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -77
- package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
- package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -77
- package/node_modules/@babel/runtime/helpers/using.js +0 -12
- package/node_modules/@babel/runtime/regenerator/index.js +0 -15
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/media-typer/HISTORY.md +0 -50
- package/node_modules/media-typer/index.js +0 -143
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
3
|
import { TypedEventEmitter } from "../models/typed-event-emitter.js";
|
|
7
4
|
import { CallFeed, SPEAKING_THRESHOLD } from "./callFeed.js";
|
|
8
5
|
import { CallErrorCode, CallEvent, CallState, genCallID, setTracksEnabled, createNewMatrixCall, CallError } from "./call.js";
|
|
@@ -19,18 +16,18 @@ import { StatsReport } from "./stats/statsReport.js";
|
|
|
19
16
|
import { SummaryStatsReportGatherer } from "./stats/summaryStatsReportGatherer.js";
|
|
20
17
|
import { CallFeedStatsReporter } from "./stats/callFeedStatsReporter.js";
|
|
21
18
|
import { KnownMembership } from "../@types/membership.js";
|
|
22
|
-
export
|
|
19
|
+
export let GroupCallIntent = /*#__PURE__*/function (GroupCallIntent) {
|
|
23
20
|
GroupCallIntent["Ring"] = "m.ring";
|
|
24
21
|
GroupCallIntent["Prompt"] = "m.prompt";
|
|
25
22
|
GroupCallIntent["Room"] = "m.room";
|
|
26
23
|
return GroupCallIntent;
|
|
27
24
|
}({});
|
|
28
|
-
export
|
|
25
|
+
export let GroupCallType = /*#__PURE__*/function (GroupCallType) {
|
|
29
26
|
GroupCallType["Video"] = "m.video";
|
|
30
27
|
GroupCallType["Voice"] = "m.voice";
|
|
31
28
|
return GroupCallType;
|
|
32
29
|
}({});
|
|
33
|
-
export
|
|
30
|
+
export let GroupCallTerminationReason = /*#__PURE__*/function (GroupCallTerminationReason) {
|
|
34
31
|
GroupCallTerminationReason["CallEnded"] = "call_ended";
|
|
35
32
|
return GroupCallTerminationReason;
|
|
36
33
|
}({});
|
|
@@ -39,7 +36,7 @@ export var GroupCallTerminationReason = /*#__PURE__*/function (GroupCallTerminat
|
|
|
39
36
|
* to be unique over all event types of event emitter.
|
|
40
37
|
* Some objects could emit more then one set of events.
|
|
41
38
|
*/
|
|
42
|
-
export
|
|
39
|
+
export let GroupCallEvent = /*#__PURE__*/function (GroupCallEvent) {
|
|
43
40
|
GroupCallEvent["GroupCallStateChanged"] = "group_call_state_changed";
|
|
44
41
|
GroupCallEvent["ActiveSpeakerChanged"] = "active_speaker_changed";
|
|
45
42
|
GroupCallEvent["CallsChanged"] = "calls_changed";
|
|
@@ -51,7 +48,7 @@ export var GroupCallEvent = /*#__PURE__*/function (GroupCallEvent) {
|
|
|
51
48
|
GroupCallEvent["Error"] = "group_call_error";
|
|
52
49
|
return GroupCallEvent;
|
|
53
50
|
}({});
|
|
54
|
-
export
|
|
51
|
+
export let GroupCallStatsReportEvent = /*#__PURE__*/function (GroupCallStatsReportEvent) {
|
|
55
52
|
GroupCallStatsReportEvent["ConnectionStats"] = "GroupCall.connection_stats";
|
|
56
53
|
GroupCallStatsReportEvent["ByteSentStats"] = "GroupCall.byte_sent_stats";
|
|
57
54
|
GroupCallStatsReportEvent["SummaryStats"] = "GroupCall.summary_stats";
|
|
@@ -63,7 +60,7 @@ export var GroupCallStatsReportEvent = /*#__PURE__*/function (GroupCallStatsRepo
|
|
|
63
60
|
* The final report-events that get consumed by client.
|
|
64
61
|
*/
|
|
65
62
|
|
|
66
|
-
export
|
|
63
|
+
export let GroupCallErrorCode = /*#__PURE__*/function (GroupCallErrorCode) {
|
|
67
64
|
GroupCallErrorCode["NoUserMedia"] = "no_user_media";
|
|
68
65
|
GroupCallErrorCode["UnknownDevice"] = "unknown_device";
|
|
69
66
|
GroupCallErrorCode["PlaceCallFailed"] = "place_call_failed";
|
|
@@ -74,8 +71,10 @@ export class GroupCallError extends Error {
|
|
|
74
71
|
// Still don't think there's any way to have proper nested errors
|
|
75
72
|
if (err) {
|
|
76
73
|
super(msg + ": " + err);
|
|
74
|
+
_defineProperty(this, "code", void 0);
|
|
77
75
|
} else {
|
|
78
76
|
super(msg);
|
|
77
|
+
_defineProperty(this, "code", void 0);
|
|
79
78
|
}
|
|
80
79
|
this.code = code;
|
|
81
80
|
}
|
|
@@ -91,7 +90,7 @@ export class OtherUserSpeakingError extends Error {
|
|
|
91
90
|
super("Cannot unmute: another user is speaking");
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
export
|
|
93
|
+
export let GroupCallState = /*#__PURE__*/function (GroupCallState) {
|
|
95
94
|
GroupCallState["LocalCallFeedUninitialized"] = "local_call_feed_uninitialized";
|
|
96
95
|
GroupCallState["InitializingLocalCallFeed"] = "initializing_local_call_feed";
|
|
97
96
|
GroupCallState["LocalCallFeedInitialized"] = "local_call_feed_initialized";
|
|
@@ -99,34 +98,48 @@ export var GroupCallState = /*#__PURE__*/function (GroupCallState) {
|
|
|
99
98
|
GroupCallState["Ended"] = "ended";
|
|
100
99
|
return GroupCallState;
|
|
101
100
|
}({});
|
|
102
|
-
|
|
101
|
+
const DEVICE_TIMEOUT = 1000 * 60 * 60; // 1 hour
|
|
103
102
|
|
|
104
103
|
function getCallUserId(call) {
|
|
105
|
-
|
|
106
|
-
return ((_call$getOpponentMemb = call.getOpponentMember()) === null || _call$getOpponentMemb === void 0 ? void 0 : _call$getOpponentMemb.userId) || call.invitee || null;
|
|
104
|
+
return call.getOpponentMember()?.userId || call.invitee || null;
|
|
107
105
|
}
|
|
108
106
|
export class GroupCall extends TypedEventEmitter {
|
|
109
|
-
constructor(client, room, type, isPtt, intent, groupCallId, dataChannelsEnabled, dataChannelOptions, isCallWithoutVideoAndAudio
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
constructor(client, room, type, isPtt, intent, groupCallId, dataChannelsEnabled, dataChannelOptions, isCallWithoutVideoAndAudio,
|
|
108
|
+
// this tells the js-sdk not to actually establish any calls to exchange media and just to
|
|
109
|
+
// create the group call signaling events, with the intention that the actual media will be
|
|
110
|
+
// handled using livekit. The js-sdk doesn't contain any code to do the actual livekit call though.
|
|
111
|
+
useLivekit = false, livekitServiceURL) {
|
|
113
112
|
super();
|
|
114
113
|
// Config
|
|
115
114
|
_defineProperty(this, "activeSpeakerInterval", 1000);
|
|
116
115
|
_defineProperty(this, "retryCallInterval", 5000);
|
|
117
116
|
_defineProperty(this, "participantTimeout", 1000 * 15);
|
|
118
117
|
_defineProperty(this, "pttMaxTransmitTime", 1000 * 20);
|
|
118
|
+
_defineProperty(this, "activeSpeaker", void 0);
|
|
119
|
+
_defineProperty(this, "localCallFeed", void 0);
|
|
120
|
+
_defineProperty(this, "localScreenshareFeed", void 0);
|
|
121
|
+
_defineProperty(this, "localDesktopCapturerSourceId", void 0);
|
|
119
122
|
_defineProperty(this, "userMediaFeeds", []);
|
|
120
123
|
_defineProperty(this, "screenshareFeeds", []);
|
|
124
|
+
_defineProperty(this, "groupCallId", void 0);
|
|
125
|
+
_defineProperty(this, "allowCallWithoutVideoAndAudio", void 0);
|
|
121
126
|
_defineProperty(this, "calls", new Map());
|
|
122
127
|
// user_id -> device_id -> MatrixCall
|
|
123
128
|
_defineProperty(this, "callHandlers", new Map());
|
|
129
|
+
// user_id -> device_id -> ICallHandlers
|
|
130
|
+
_defineProperty(this, "activeSpeakerLoopInterval", void 0);
|
|
131
|
+
_defineProperty(this, "retryCallLoopInterval", void 0);
|
|
124
132
|
_defineProperty(this, "retryCallCounts", new Map());
|
|
133
|
+
// user_id -> device_id -> count
|
|
134
|
+
_defineProperty(this, "reEmitter", void 0);
|
|
125
135
|
_defineProperty(this, "transmitTimer", null);
|
|
126
136
|
_defineProperty(this, "participantsExpirationTimer", null);
|
|
127
137
|
_defineProperty(this, "resendMemberStateTimer", null);
|
|
128
138
|
_defineProperty(this, "initWithAudioMuted", false);
|
|
129
139
|
_defineProperty(this, "initWithVideoMuted", false);
|
|
140
|
+
_defineProperty(this, "initCallFeedPromise", void 0);
|
|
141
|
+
_defineProperty(this, "_livekitServiceURL", void 0);
|
|
142
|
+
_defineProperty(this, "stats", void 0);
|
|
130
143
|
/**
|
|
131
144
|
* Configure default webrtc stats collection interval in ms
|
|
132
145
|
* Disable collecting webrtc stats by setting interval to 0
|
|
@@ -155,7 +168,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
155
168
|
if (this.localCallFeed) {
|
|
156
169
|
report = CallFeedStatsReporter.expandCallFeedReport(report, [this.localCallFeed], "from-local-feed");
|
|
157
170
|
}
|
|
158
|
-
|
|
171
|
+
const callFeeds = [];
|
|
159
172
|
this.forEachCall(call => {
|
|
160
173
|
if (call.callId === report.callId) {
|
|
161
174
|
call.getFeeds().forEach(f => callFeeds.push(f));
|
|
@@ -179,33 +192,32 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
179
192
|
* as they are observed by the RoomState.members event.
|
|
180
193
|
*/
|
|
181
194
|
_defineProperty(this, "onIncomingCall", newCall => {
|
|
182
|
-
var _newCall$getOpponentM, _this$calls$get;
|
|
183
195
|
// The incoming calls may be for another room, which we will ignore.
|
|
184
196
|
if (newCall.roomId !== this.room.roomId) {
|
|
185
197
|
return;
|
|
186
198
|
}
|
|
187
199
|
if (newCall.state !== CallState.Ringing) {
|
|
188
|
-
logger.warn(
|
|
200
|
+
logger.warn(`GroupCall ${this.groupCallId} onIncomingCall() incoming call no longer in ringing state - ignoring`);
|
|
189
201
|
return;
|
|
190
202
|
}
|
|
191
203
|
if (!newCall.groupCallId || newCall.groupCallId !== this.groupCallId) {
|
|
192
|
-
logger.log(
|
|
204
|
+
logger.log(`GroupCall ${this.groupCallId} onIncomingCall() ignored because it doesn't match the current group call`);
|
|
193
205
|
newCall.reject();
|
|
194
206
|
return;
|
|
195
207
|
}
|
|
196
|
-
|
|
208
|
+
const opponentUserId = newCall.getOpponentMember()?.userId;
|
|
197
209
|
if (opponentUserId === undefined) {
|
|
198
|
-
logger.warn(
|
|
210
|
+
logger.warn(`GroupCall ${this.groupCallId} onIncomingCall() incoming call with no member - ignoring`);
|
|
199
211
|
return;
|
|
200
212
|
}
|
|
201
213
|
if (this.useLivekit) {
|
|
202
214
|
logger.info("Received incoming call whilst in signaling-only mode! Ignoring.");
|
|
203
215
|
return;
|
|
204
216
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if (
|
|
208
|
-
logger.log(
|
|
217
|
+
const deviceMap = this.calls.get(opponentUserId) ?? new Map();
|
|
218
|
+
const prevCall = deviceMap.get(newCall.getOpponentDeviceId());
|
|
219
|
+
if (prevCall?.callId === newCall.callId) return;
|
|
220
|
+
logger.log(`GroupCall ${this.groupCallId} onIncomingCall() incoming call (userId=${opponentUserId}, callId=${newCall.callId})`);
|
|
209
221
|
if (prevCall) prevCall.hangup(CallErrorCode.Replaced, false);
|
|
210
222
|
// We must do this before we start initialising / answering the call as we
|
|
211
223
|
// need to know it is the active call for this user+deviceId and to not ignore
|
|
@@ -213,11 +225,11 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
213
225
|
deviceMap.set(newCall.getOpponentDeviceId(), newCall);
|
|
214
226
|
this.calls.set(opponentUserId, deviceMap);
|
|
215
227
|
this.initCall(newCall);
|
|
216
|
-
|
|
228
|
+
const feeds = this.getLocalFeeds().map(feed => feed.clone());
|
|
217
229
|
if (!this.callExpected(newCall)) {
|
|
218
230
|
// Disable our tracks for users not explicitly participating in the
|
|
219
231
|
// call but trying to receive the feeds
|
|
220
|
-
for (
|
|
232
|
+
for (const feed of feeds) {
|
|
221
233
|
setTracksEnabled(feed.stream.getAudioTracks(), false);
|
|
222
234
|
setTracksEnabled(feed.stream.getVideoTracks(), false);
|
|
223
235
|
}
|
|
@@ -226,24 +238,19 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
226
238
|
this.emit(GroupCallEvent.CallsChanged, this.calls);
|
|
227
239
|
});
|
|
228
240
|
_defineProperty(this, "onRetryCallLoop", () => {
|
|
229
|
-
|
|
230
|
-
for (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
var deviceId = _ref5[0];
|
|
240
|
-
var participant = _ref5[1];
|
|
241
|
-
var call = callMap === null || callMap === void 0 ? void 0 : callMap.get(deviceId);
|
|
242
|
-
var retries = (_retriesMap$get = (_retriesMap = retriesMap) === null || _retriesMap === void 0 ? void 0 : _retriesMap.get(deviceId)) !== null && _retriesMap$get !== void 0 ? _retriesMap$get : 0;
|
|
243
|
-
if ((call === null || call === void 0 ? void 0 : call.getOpponentSessionId()) !== participant.sessionId && this.wantsOutgoingCall(_userId, deviceId) && retries < 3) {
|
|
241
|
+
let needsRetry = false;
|
|
242
|
+
for (const [{
|
|
243
|
+
userId
|
|
244
|
+
}, participantMap] of this.participants) {
|
|
245
|
+
const callMap = this.calls.get(userId);
|
|
246
|
+
let retriesMap = this.retryCallCounts.get(userId);
|
|
247
|
+
for (const [deviceId, participant] of participantMap) {
|
|
248
|
+
const call = callMap?.get(deviceId);
|
|
249
|
+
const retries = retriesMap?.get(deviceId) ?? 0;
|
|
250
|
+
if (call?.getOpponentSessionId() !== participant.sessionId && this.wantsOutgoingCall(userId, deviceId) && retries < 3) {
|
|
244
251
|
if (retriesMap === undefined) {
|
|
245
252
|
retriesMap = new Map();
|
|
246
|
-
this.retryCallCounts.set(
|
|
253
|
+
this.retryCallCounts.set(userId, retriesMap);
|
|
247
254
|
}
|
|
248
255
|
retriesMap.set(deviceId, retries + 1);
|
|
249
256
|
needsRetry = true;
|
|
@@ -253,17 +260,17 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
253
260
|
if (needsRetry) this.placeOutgoingCalls();
|
|
254
261
|
});
|
|
255
262
|
_defineProperty(this, "onCallFeedsChanged", call => {
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
const opponentMemberId = getCallUserId(call);
|
|
264
|
+
const opponentDeviceId = call.getOpponentDeviceId();
|
|
258
265
|
if (!opponentMemberId) {
|
|
259
266
|
throw new Error("Cannot change call feeds without user id");
|
|
260
267
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
if (
|
|
268
|
+
const currentUserMediaFeed = this.getUserMediaFeed(opponentMemberId, opponentDeviceId);
|
|
269
|
+
const remoteUsermediaFeed = call.remoteUsermediaFeed;
|
|
270
|
+
const remoteFeedChanged = remoteUsermediaFeed !== currentUserMediaFeed;
|
|
271
|
+
const deviceMap = this.calls.get(opponentMemberId);
|
|
272
|
+
const currentCallForUserDevice = deviceMap?.get(opponentDeviceId);
|
|
273
|
+
if (currentCallForUserDevice?.callId !== call.callId) {
|
|
267
274
|
// the call in question is not the current call for this user/deviceId
|
|
268
275
|
// so ignore feed events from it otherwise we'll remove our real feeds
|
|
269
276
|
return;
|
|
@@ -277,9 +284,9 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
277
284
|
this.removeUserMediaFeed(currentUserMediaFeed);
|
|
278
285
|
}
|
|
279
286
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
287
|
+
const currentScreenshareFeed = this.getScreenshareFeed(opponentMemberId, opponentDeviceId);
|
|
288
|
+
const remoteScreensharingFeed = call.remoteScreensharingFeed;
|
|
289
|
+
const remoteScreenshareFeedChanged = remoteScreensharingFeed !== currentScreenshareFeed;
|
|
283
290
|
if (remoteScreenshareFeedChanged) {
|
|
284
291
|
if (!currentScreenshareFeed && remoteScreensharingFeed) {
|
|
285
292
|
this.addScreenshareFeed(remoteScreensharingFeed);
|
|
@@ -291,31 +298,29 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
291
298
|
}
|
|
292
299
|
});
|
|
293
300
|
_defineProperty(this, "onCallStateChanged", (call, state, _oldState) => {
|
|
294
|
-
var _call$getOpponentMemb2;
|
|
295
301
|
if (state === CallState.Ended) return;
|
|
296
|
-
|
|
302
|
+
const audioMuted = this.localCallFeed.isAudioMuted();
|
|
297
303
|
if (call.localUsermediaStream && call.isMicrophoneMuted() !== audioMuted) {
|
|
298
304
|
call.setMicrophoneMuted(audioMuted);
|
|
299
305
|
}
|
|
300
|
-
|
|
306
|
+
const videoMuted = this.localCallFeed.isVideoMuted();
|
|
301
307
|
if (call.localUsermediaStream && call.isLocalVideoMuted() !== videoMuted) {
|
|
302
308
|
call.setLocalVideoMuted(videoMuted);
|
|
303
309
|
}
|
|
304
|
-
|
|
310
|
+
const opponentUserId = call.getOpponentMember()?.userId;
|
|
305
311
|
if (state === CallState.Connected && opponentUserId) {
|
|
306
|
-
|
|
307
|
-
retriesMap
|
|
308
|
-
if (
|
|
312
|
+
const retriesMap = this.retryCallCounts.get(opponentUserId);
|
|
313
|
+
retriesMap?.delete(call.getOpponentDeviceId());
|
|
314
|
+
if (retriesMap?.size === 0) this.retryCallCounts.delete(opponentUserId);
|
|
309
315
|
}
|
|
310
316
|
});
|
|
311
317
|
_defineProperty(this, "onCallHangup", call => {
|
|
312
|
-
var _call$getOpponentMemb3, _call$getOpponentMemb4;
|
|
313
318
|
if (call.hangupReason === CallErrorCode.Replaced) return;
|
|
314
|
-
|
|
315
|
-
|
|
319
|
+
const opponentUserId = call.getOpponentMember()?.userId ?? this.room.getMember(call.invitee).userId;
|
|
320
|
+
const deviceMap = this.calls.get(opponentUserId);
|
|
316
321
|
|
|
317
322
|
// Sanity check that this call is in fact in the map
|
|
318
|
-
if (
|
|
323
|
+
if (deviceMap?.get(call.getOpponentDeviceId()) === call) {
|
|
319
324
|
this.disposeCall(call, call.hangupReason);
|
|
320
325
|
deviceMap.delete(call.getOpponentDeviceId());
|
|
321
326
|
if (deviceMap.size === 0) this.calls.delete(opponentUserId);
|
|
@@ -323,8 +328,8 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
323
328
|
}
|
|
324
329
|
});
|
|
325
330
|
_defineProperty(this, "onCallReplaced", (prevCall, newCall) => {
|
|
326
|
-
|
|
327
|
-
|
|
331
|
+
const opponentUserId = prevCall.getOpponentMember().userId;
|
|
332
|
+
let deviceMap = this.calls.get(opponentUserId);
|
|
328
333
|
if (deviceMap === undefined) {
|
|
329
334
|
deviceMap = new Map();
|
|
330
335
|
this.calls.set(opponentUserId, deviceMap);
|
|
@@ -335,12 +340,12 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
335
340
|
this.emit(GroupCallEvent.CallsChanged, this.calls);
|
|
336
341
|
});
|
|
337
342
|
_defineProperty(this, "onActiveSpeakerLoop", () => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
for (
|
|
343
|
+
let topAvg = undefined;
|
|
344
|
+
let nextActiveSpeaker = undefined;
|
|
345
|
+
for (const callFeed of this.userMediaFeeds) {
|
|
341
346
|
if (callFeed.isLocal() && this.userMediaFeeds.length > 1) continue;
|
|
342
|
-
|
|
343
|
-
|
|
347
|
+
const total = callFeed.speakingVolumeSamples.reduce((acc, volume) => acc + Math.max(volume, SPEAKING_THRESHOLD));
|
|
348
|
+
const avg = total / callFeed.speakingVolumeSamples.length;
|
|
344
349
|
if (!topAvg || avg > topAvg) {
|
|
345
350
|
topAvg = avg;
|
|
346
351
|
nextActiveSpeaker = callFeed;
|
|
@@ -357,8 +362,8 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
357
362
|
// left get denied access to our media, and participants that just
|
|
358
363
|
// joined get granted access
|
|
359
364
|
this.forEachCall(call => {
|
|
360
|
-
|
|
361
|
-
for (
|
|
365
|
+
const expected = this.callExpected(call);
|
|
366
|
+
for (const feed of call.getLocalFeeds()) {
|
|
362
367
|
setTracksEnabled(feed.stream.getAudioTracks(), !feed.isAudioMuted() && expected);
|
|
363
368
|
setTracksEnabled(feed.stream.getVideoTracks(), !feed.isVideoMuted() && expected);
|
|
364
369
|
}
|
|
@@ -371,12 +376,12 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
371
376
|
if (newState === GroupCallState.Entered || oldState === GroupCallState.Entered || newState === GroupCallState.Ended) {
|
|
372
377
|
// We either entered, left, or ended the call
|
|
373
378
|
this.updateParticipants();
|
|
374
|
-
this.updateMemberState().catch(e => logger.error(
|
|
379
|
+
this.updateMemberState().catch(e => logger.error(`GroupCall ${this.groupCallId} onStateChanged() failed to update member state devices"`, e));
|
|
375
380
|
}
|
|
376
381
|
});
|
|
377
382
|
_defineProperty(this, "onLocalFeedsChanged", () => {
|
|
378
383
|
if (this.state === GroupCallState.Entered) {
|
|
379
|
-
this.updateMemberState().catch(e => logger.error(
|
|
384
|
+
this.updateMemberState().catch(e => logger.error(`GroupCall ${this.groupCallId} onLocalFeedsChanged() failed to update member state feeds`, e));
|
|
380
385
|
}
|
|
381
386
|
});
|
|
382
387
|
this.client = client;
|
|
@@ -388,9 +393,9 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
388
393
|
this.dataChannelOptions = dataChannelOptions;
|
|
389
394
|
this.useLivekit = useLivekit;
|
|
390
395
|
this.reEmitter = new ReEmitter(this);
|
|
391
|
-
this.groupCallId = groupCallId
|
|
396
|
+
this.groupCallId = groupCallId ?? genCallID();
|
|
392
397
|
this._livekitServiceURL = livekitServiceURL;
|
|
393
|
-
this.creationTs =
|
|
398
|
+
this.creationTs = room.currentState.getStateEvents(EventType.GroupCallPrefix, this.groupCallId)?.getTs() ?? null;
|
|
394
399
|
this.updateParticipants();
|
|
395
400
|
room.on(RoomStateEvent.Update, this.onRoomState);
|
|
396
401
|
this.on(GroupCallEvent.ParticipantsChanged, this.onParticipantsChanged);
|
|
@@ -398,32 +403,26 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
398
403
|
this.on(GroupCallEvent.LocalScreenshareStateChanged, this.onLocalFeedsChanged);
|
|
399
404
|
this.allowCallWithoutVideoAndAudio = !!isCallWithoutVideoAndAudio;
|
|
400
405
|
}
|
|
401
|
-
create() {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
yield _this.sendCallStateEvent();
|
|
408
|
-
return _this;
|
|
409
|
-
})();
|
|
406
|
+
async create() {
|
|
407
|
+
this.creationTs = Date.now();
|
|
408
|
+
this.client.groupCallEventHandler.groupCalls.set(this.room.roomId, this);
|
|
409
|
+
this.client.emit(GroupCallEventHandlerEvent.Outgoing, this);
|
|
410
|
+
await this.sendCallStateEvent();
|
|
411
|
+
return this;
|
|
410
412
|
}
|
|
411
|
-
sendCallStateEvent() {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
yield _this2.client.sendStateEvent(_this2.room.roomId, EventType.GroupCallPrefix, groupCallState, _this2.groupCallId);
|
|
426
|
-
})();
|
|
413
|
+
async sendCallStateEvent() {
|
|
414
|
+
const groupCallState = {
|
|
415
|
+
"m.intent": this.intent,
|
|
416
|
+
"m.type": this.type,
|
|
417
|
+
"io.element.ptt": this.isPtt,
|
|
418
|
+
// TODO: Specify data-channels better
|
|
419
|
+
"dataChannelsEnabled": this.dataChannelsEnabled,
|
|
420
|
+
"dataChannelOptions": this.dataChannelsEnabled ? this.dataChannelOptions : undefined
|
|
421
|
+
};
|
|
422
|
+
if (this.livekitServiceURL) {
|
|
423
|
+
groupCallState["io.element.livekit_service_url"] = this.livekitServiceURL;
|
|
424
|
+
}
|
|
425
|
+
await this.client.sendStateEvent(this.room.roomId, EventType.GroupCallPrefix, groupCallState, this.groupCallId);
|
|
427
426
|
}
|
|
428
427
|
get livekitServiceURL() {
|
|
429
428
|
return this._livekitServiceURL;
|
|
@@ -439,7 +438,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
439
438
|
return this._state;
|
|
440
439
|
}
|
|
441
440
|
set state(value) {
|
|
442
|
-
|
|
441
|
+
const prevValue = this._state;
|
|
443
442
|
if (value !== prevValue) {
|
|
444
443
|
this._state = value;
|
|
445
444
|
this.emit(GroupCallEvent.GroupCallStateChanged, value, prevValue);
|
|
@@ -453,9 +452,9 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
453
452
|
return this._participants;
|
|
454
453
|
}
|
|
455
454
|
set participants(value) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
const prevValue = this._participants;
|
|
456
|
+
const participantStateEqual = (x, y) => x.sessionId === y.sessionId && x.screensharing === y.screensharing;
|
|
457
|
+
const deviceMapsEqual = (x, y) => mapsEqual(x, y, participantStateEqual);
|
|
459
458
|
|
|
460
459
|
// Only update if the map actually changed
|
|
461
460
|
if (!mapsEqual(value, prevValue, deviceMapsEqual)) {
|
|
@@ -490,19 +489,18 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
490
489
|
* @param f - The callback.
|
|
491
490
|
*/
|
|
492
491
|
forEachCall(f) {
|
|
493
|
-
for (
|
|
494
|
-
for (
|
|
492
|
+
for (const deviceMap of this.calls.values()) {
|
|
493
|
+
for (const call of deviceMap.values()) f(call);
|
|
495
494
|
}
|
|
496
495
|
}
|
|
497
496
|
getLocalFeeds() {
|
|
498
|
-
|
|
497
|
+
const feeds = [];
|
|
499
498
|
if (this.localCallFeed) feeds.push(this.localCallFeed);
|
|
500
499
|
if (this.localScreenshareFeed) feeds.push(this.localScreenshareFeed);
|
|
501
500
|
return feeds;
|
|
502
501
|
}
|
|
503
502
|
hasLocalParticipant() {
|
|
504
|
-
|
|
505
|
-
return (_this$participants$ge = (_this$participants$ge2 = this.participants.get(this.room.getMember(this.client.getUserId()))) === null || _this$participants$ge2 === void 0 ? void 0 : _this$participants$ge2.has(this.client.getDeviceId())) !== null && _this$participants$ge !== void 0 ? _this$participants$ge : false;
|
|
503
|
+
return this.participants.get(this.room.getMember(this.client.getUserId()))?.has(this.client.getDeviceId()) ?? false;
|
|
506
504
|
}
|
|
507
505
|
|
|
508
506
|
/**
|
|
@@ -510,117 +508,103 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
510
508
|
* given our knowledge of who is participating in the group call.
|
|
511
509
|
*/
|
|
512
510
|
callExpected(call) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
return member !== null && deviceId !== undefined && ((_this$participants$ge3 = this.participants.get(member)) === null || _this$participants$ge3 === void 0 ? void 0 : _this$participants$ge3.get(deviceId)) !== undefined;
|
|
511
|
+
const userId = getCallUserId(call);
|
|
512
|
+
const member = userId === null ? null : this.room.getMember(userId);
|
|
513
|
+
const deviceId = call.getOpponentDeviceId();
|
|
514
|
+
return member !== null && deviceId !== undefined && this.participants.get(member)?.get(deviceId) !== undefined;
|
|
518
515
|
}
|
|
519
|
-
initLocalCallFeed() {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
529
|
-
_this3.state = GroupCallState.InitializingLocalCallFeed;
|
|
516
|
+
async initLocalCallFeed() {
|
|
517
|
+
if (this.useLivekit) {
|
|
518
|
+
logger.info("Livekit group call: not starting local call feed.");
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (this.state !== GroupCallState.LocalCallFeedUninitialized) {
|
|
522
|
+
throw new Error(`Cannot initialize local call feed in the "${this.state}" state.`);
|
|
523
|
+
}
|
|
524
|
+
this.state = GroupCallState.InitializingLocalCallFeed;
|
|
530
525
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
})();
|
|
526
|
+
// wraps the real method to serialise calls, because we don't want to try starting
|
|
527
|
+
// multiple call feeds at once
|
|
528
|
+
if (this.initCallFeedPromise) return this.initCallFeedPromise;
|
|
529
|
+
try {
|
|
530
|
+
this.initCallFeedPromise = this.initLocalCallFeedInternal();
|
|
531
|
+
await this.initCallFeedPromise;
|
|
532
|
+
} finally {
|
|
533
|
+
this.initCallFeedPromise = undefined;
|
|
534
|
+
}
|
|
541
535
|
}
|
|
542
|
-
initLocalCallFeedInternal() {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
_this4.state = GroupCallState.LocalCallFeedUninitialized;
|
|
557
|
-
throw error;
|
|
558
|
-
}
|
|
536
|
+
async initLocalCallFeedInternal() {
|
|
537
|
+
logger.log(`GroupCall ${this.groupCallId} initLocalCallFeedInternal() running`);
|
|
538
|
+
let stream;
|
|
539
|
+
try {
|
|
540
|
+
stream = await this.client.getMediaHandler().getUserMediaStream(true, this.type === GroupCallType.Video);
|
|
541
|
+
} catch (error) {
|
|
542
|
+
// If is allowed to join a call without a media stream, then we
|
|
543
|
+
// don't throw an error here. But we need an empty Local Feed to establish
|
|
544
|
+
// a connection later.
|
|
545
|
+
if (this.allowCallWithoutVideoAndAudio) {
|
|
546
|
+
stream = new MediaStream();
|
|
547
|
+
} else {
|
|
548
|
+
this.state = GroupCallState.LocalCallFeedUninitialized;
|
|
549
|
+
throw error;
|
|
559
550
|
}
|
|
551
|
+
}
|
|
560
552
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
})();
|
|
553
|
+
// The call could've been disposed while we were waiting, and could
|
|
554
|
+
// also have been started back up again (hello, React 18) so if we're
|
|
555
|
+
// still in this 'initializing' state, carry on, otherwise bail.
|
|
556
|
+
if (this._state !== GroupCallState.InitializingLocalCallFeed) {
|
|
557
|
+
this.client.getMediaHandler().stopUserMediaStream(stream);
|
|
558
|
+
throw new Error("Group call disposed while gathering media stream");
|
|
559
|
+
}
|
|
560
|
+
const callFeed = new CallFeed({
|
|
561
|
+
client: this.client,
|
|
562
|
+
roomId: this.room.roomId,
|
|
563
|
+
userId: this.client.getUserId(),
|
|
564
|
+
deviceId: this.client.getDeviceId(),
|
|
565
|
+
stream,
|
|
566
|
+
purpose: SDPStreamMetadataPurpose.Usermedia,
|
|
567
|
+
audioMuted: this.initWithAudioMuted || stream.getAudioTracks().length === 0 || this.isPtt,
|
|
568
|
+
videoMuted: this.initWithVideoMuted || stream.getVideoTracks().length === 0
|
|
569
|
+
});
|
|
570
|
+
setTracksEnabled(stream.getAudioTracks(), !callFeed.isAudioMuted());
|
|
571
|
+
setTracksEnabled(stream.getVideoTracks(), !callFeed.isVideoMuted());
|
|
572
|
+
this.localCallFeed = callFeed;
|
|
573
|
+
this.addUserMediaFeed(callFeed);
|
|
574
|
+
this.state = GroupCallState.LocalCallFeedInitialized;
|
|
584
575
|
}
|
|
585
|
-
updateLocalUsermediaStream(stream) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
_this5.client.getMediaHandler().stopUserMediaStream(oldStream);
|
|
597
|
-
}
|
|
598
|
-
})();
|
|
576
|
+
async updateLocalUsermediaStream(stream) {
|
|
577
|
+
if (this.localCallFeed) {
|
|
578
|
+
const oldStream = this.localCallFeed.stream;
|
|
579
|
+
this.localCallFeed.setNewStream(stream);
|
|
580
|
+
const micShouldBeMuted = this.localCallFeed.isAudioMuted();
|
|
581
|
+
const vidShouldBeMuted = this.localCallFeed.isVideoMuted();
|
|
582
|
+
logger.log(`GroupCall ${this.groupCallId} updateLocalUsermediaStream() (oldStreamId=${oldStream.id}, newStreamId=${stream.id}, micShouldBeMuted=${micShouldBeMuted}, vidShouldBeMuted=${vidShouldBeMuted})`);
|
|
583
|
+
setTracksEnabled(stream.getAudioTracks(), !micShouldBeMuted);
|
|
584
|
+
setTracksEnabled(stream.getVideoTracks(), !vidShouldBeMuted);
|
|
585
|
+
this.client.getMediaHandler().stopUserMediaStream(oldStream);
|
|
586
|
+
}
|
|
599
587
|
}
|
|
600
|
-
enter() {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
_this6.activeSpeakerLoopInterval = setInterval(_this6.onActiveSpeakerLoop, _this6.activeSpeakerInterval);
|
|
619
|
-
}
|
|
620
|
-
})();
|
|
588
|
+
async enter() {
|
|
589
|
+
if (this.state === GroupCallState.LocalCallFeedUninitialized) {
|
|
590
|
+
await this.initLocalCallFeed();
|
|
591
|
+
} else if (this.state !== GroupCallState.LocalCallFeedInitialized) {
|
|
592
|
+
throw new Error(`Cannot enter call in the "${this.state}" state`);
|
|
593
|
+
}
|
|
594
|
+
logger.log(`GroupCall ${this.groupCallId} enter() running`);
|
|
595
|
+
this.state = GroupCallState.Entered;
|
|
596
|
+
this.client.on(CallEventHandlerEvent.Incoming, this.onIncomingCall);
|
|
597
|
+
for (const call of this.client.callEventHandler.calls.values()) {
|
|
598
|
+
this.onIncomingCall(call);
|
|
599
|
+
}
|
|
600
|
+
if (!this.useLivekit) {
|
|
601
|
+
this.retryCallLoopInterval = setInterval(this.onRetryCallLoop, this.retryCallInterval);
|
|
602
|
+
this.activeSpeaker = undefined;
|
|
603
|
+
this.onActiveSpeakerLoop();
|
|
604
|
+
this.activeSpeakerLoopInterval = setInterval(this.onActiveSpeakerLoop, this.activeSpeakerInterval);
|
|
605
|
+
}
|
|
621
606
|
}
|
|
622
607
|
dispose() {
|
|
623
|
-
var _this$stats;
|
|
624
608
|
if (this.localCallFeed) {
|
|
625
609
|
this.removeUserMediaFeed(this.localCallFeed);
|
|
626
610
|
this.localCallFeed = undefined;
|
|
@@ -653,29 +637,24 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
653
637
|
this.retryCallCounts.clear();
|
|
654
638
|
clearInterval(this.retryCallLoopInterval);
|
|
655
639
|
this.client.removeListener(CallEventHandlerEvent.Incoming, this.onIncomingCall);
|
|
656
|
-
|
|
640
|
+
this.stats?.stop();
|
|
657
641
|
}
|
|
658
642
|
leave() {
|
|
659
643
|
this.dispose();
|
|
660
644
|
this.state = GroupCallState.LocalCallFeedUninitialized;
|
|
661
645
|
}
|
|
662
|
-
terminate() {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
yield _this7.client.sendStateEvent(_this7.room.roomId, EventType.GroupCallPrefix, _objectSpread(_objectSpread({}, existingStateEvent.getContent()), {}, {
|
|
675
|
-
"m.terminated": GroupCallTerminationReason.CallEnded
|
|
676
|
-
}), _this7.groupCallId);
|
|
677
|
-
}
|
|
678
|
-
})();
|
|
646
|
+
async terminate(emitStateEvent = true) {
|
|
647
|
+
this.dispose();
|
|
648
|
+
this.room.off(RoomStateEvent.Update, this.onRoomState);
|
|
649
|
+
this.client.groupCallEventHandler.groupCalls.delete(this.room.roomId);
|
|
650
|
+
this.client.emit(GroupCallEventHandlerEvent.Ended, this);
|
|
651
|
+
this.state = GroupCallState.Ended;
|
|
652
|
+
if (emitStateEvent) {
|
|
653
|
+
const existingStateEvent = this.room.currentState.getStateEvents(EventType.GroupCallPrefix, this.groupCallId);
|
|
654
|
+
await this.client.sendStateEvent(this.room.roomId, EventType.GroupCallPrefix, _objectSpread(_objectSpread({}, existingStateEvent.getContent()), {}, {
|
|
655
|
+
"m.terminated": GroupCallTerminationReason.CallEnded
|
|
656
|
+
}), this.groupCallId);
|
|
657
|
+
}
|
|
679
658
|
}
|
|
680
659
|
|
|
681
660
|
/*
|
|
@@ -700,65 +679,54 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
700
679
|
* @param muted - Whether to mute the microphone
|
|
701
680
|
* @returns Whether muting/unmuting was successful
|
|
702
681
|
*/
|
|
703
|
-
setMicrophoneMuted(muted) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}
|
|
712
|
-
var sendUpdatesBefore = !muted && _this8.isPtt;
|
|
682
|
+
async setMicrophoneMuted(muted) {
|
|
683
|
+
// hasAudioDevice can block indefinitely if the window has lost focus,
|
|
684
|
+
// and it doesn't make much sense to keep a device from being muted, so
|
|
685
|
+
// we always allow muted = true changes to go through
|
|
686
|
+
if (!muted && !(await this.client.getMediaHandler().hasAudioDevice())) {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
const sendUpdatesBefore = !muted && this.isPtt;
|
|
713
690
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}
|
|
691
|
+
// set a timer for the maximum transmit time on PTT calls
|
|
692
|
+
if (this.isPtt) {
|
|
693
|
+
// Set or clear the max transmit timer
|
|
694
|
+
if (!muted && this.isMicrophoneMuted()) {
|
|
695
|
+
this.transmitTimer = setTimeout(() => {
|
|
696
|
+
this.setMicrophoneMuted(true);
|
|
697
|
+
}, this.pttMaxTransmitTime);
|
|
698
|
+
} else if (muted && !this.isMicrophoneMuted()) {
|
|
699
|
+
if (this.transmitTimer !== null) clearTimeout(this.transmitTimer);
|
|
700
|
+
this.transmitTimer = null;
|
|
725
701
|
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}();
|
|
740
|
-
if (sendUpdatesBefore) yield sendUpdates();
|
|
741
|
-
if (_this8.localCallFeed) {
|
|
742
|
-
logger.log("GroupCall ".concat(_this8.groupCallId, " setMicrophoneMuted() (streamId=").concat(_this8.localCallFeed.stream.id, ", muted=").concat(muted, ")"));
|
|
743
|
-
var hasPermission = yield _this8.checkAudioPermissionIfNecessary(muted);
|
|
744
|
-
if (!hasPermission) {
|
|
745
|
-
return false;
|
|
746
|
-
}
|
|
747
|
-
_this8.localCallFeed.setAudioVideoMuted(muted, null);
|
|
748
|
-
// I don't believe its actually necessary to enable these tracks: they
|
|
749
|
-
// are the one on the GroupCall's own CallFeed and are cloned before being
|
|
750
|
-
// given to any of the actual calls, so these tracks don't actually go
|
|
751
|
-
// anywhere. Let's do it anyway to avoid confusion.
|
|
752
|
-
setTracksEnabled(_this8.localCallFeed.stream.getAudioTracks(), !muted);
|
|
753
|
-
} else {
|
|
754
|
-
logger.log("GroupCall ".concat(_this8.groupCallId, " setMicrophoneMuted() no stream muted (muted=").concat(muted, ")"));
|
|
755
|
-
_this8.initWithAudioMuted = muted;
|
|
702
|
+
}
|
|
703
|
+
this.forEachCall(call => call.localUsermediaFeed?.setAudioVideoMuted(muted, null));
|
|
704
|
+
const sendUpdates = async () => {
|
|
705
|
+
const updates = [];
|
|
706
|
+
this.forEachCall(call => updates.push(call.sendMetadataUpdate()));
|
|
707
|
+
await Promise.all(updates).catch(e => logger.info(`GroupCall ${this.groupCallId} setMicrophoneMuted() failed to send some metadata updates`, e));
|
|
708
|
+
};
|
|
709
|
+
if (sendUpdatesBefore) await sendUpdates();
|
|
710
|
+
if (this.localCallFeed) {
|
|
711
|
+
logger.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() (streamId=${this.localCallFeed.stream.id}, muted=${muted})`);
|
|
712
|
+
const hasPermission = await this.checkAudioPermissionIfNecessary(muted);
|
|
713
|
+
if (!hasPermission) {
|
|
714
|
+
return false;
|
|
756
715
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
716
|
+
this.localCallFeed.setAudioVideoMuted(muted, null);
|
|
717
|
+
// I don't believe its actually necessary to enable these tracks: they
|
|
718
|
+
// are the one on the GroupCall's own CallFeed and are cloned before being
|
|
719
|
+
// given to any of the actual calls, so these tracks don't actually go
|
|
720
|
+
// anywhere. Let's do it anyway to avoid confusion.
|
|
721
|
+
setTracksEnabled(this.localCallFeed.stream.getAudioTracks(), !muted);
|
|
722
|
+
} else {
|
|
723
|
+
logger.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no stream muted (muted=${muted})`);
|
|
724
|
+
this.initWithAudioMuted = muted;
|
|
725
|
+
}
|
|
726
|
+
this.forEachCall(call => setTracksEnabled(call.localUsermediaFeed.stream.getAudioTracks(), !muted && this.callExpected(call)));
|
|
727
|
+
this.emit(GroupCallEvent.LocalMuteStateChanged, muted, this.isLocalVideoMuted());
|
|
728
|
+
if (!sendUpdatesBefore) await sendUpdates();
|
|
729
|
+
return true;
|
|
762
730
|
}
|
|
763
731
|
|
|
764
732
|
/**
|
|
@@ -770,27 +738,24 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
770
738
|
* not Audio Track exists.
|
|
771
739
|
* As such, this is a compromise, because, the access rights should always be queried before the call.
|
|
772
740
|
*/
|
|
773
|
-
checkAudioPermissionIfNecessary(muted) {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
if (
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
logger.log("GroupCall ".concat(_this9.groupCallId, " setMicrophoneMuted() no device to receive local stream, muted=").concat(muted));
|
|
784
|
-
return false;
|
|
785
|
-
}
|
|
741
|
+
async checkAudioPermissionIfNecessary(muted) {
|
|
742
|
+
// We needed this here to avoid an error in case user join a call without a device.
|
|
743
|
+
try {
|
|
744
|
+
if (!muted && this.localCallFeed && !this.localCallFeed.hasAudioTrack) {
|
|
745
|
+
const stream = await this.client.getMediaHandler().getUserMediaStream(true, !this.localCallFeed.isVideoMuted());
|
|
746
|
+
if (stream?.getTracks().length === 0) {
|
|
747
|
+
// if case permission denied to get a stream stop this here
|
|
748
|
+
/* istanbul ignore next */
|
|
749
|
+
logger.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no device to receive local stream, muted=${muted}`);
|
|
750
|
+
return false;
|
|
786
751
|
}
|
|
787
|
-
} catch (_unused) {
|
|
788
|
-
/* istanbul ignore next */
|
|
789
|
-
logger.log("GroupCall ".concat(_this9.groupCallId, " setMicrophoneMuted() no device or permission to receive local stream, muted=").concat(muted));
|
|
790
|
-
return false;
|
|
791
752
|
}
|
|
792
|
-
|
|
793
|
-
|
|
753
|
+
} catch {
|
|
754
|
+
/* istanbul ignore next */
|
|
755
|
+
logger.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no device or permission to receive local stream, muted=${muted}`);
|
|
756
|
+
return false;
|
|
757
|
+
}
|
|
758
|
+
return true;
|
|
794
759
|
}
|
|
795
760
|
|
|
796
761
|
/**
|
|
@@ -798,102 +763,91 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
798
763
|
* @param muted - Whether to mute the video
|
|
799
764
|
* @returns Whether muting/unmuting was successful
|
|
800
765
|
*/
|
|
801
|
-
setLocalVideoMuted(muted) {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
766
|
+
async setLocalVideoMuted(muted) {
|
|
767
|
+
// hasAudioDevice can block indefinitely if the window has lost focus,
|
|
768
|
+
// and it doesn't make much sense to keep a device from being muted, so
|
|
769
|
+
// we always allow muted = true changes to go through
|
|
770
|
+
if (!muted && !(await this.client.getMediaHandler().hasVideoDevice())) {
|
|
771
|
+
return false;
|
|
772
|
+
}
|
|
773
|
+
if (this.localCallFeed) {
|
|
774
|
+
/* istanbul ignore next */
|
|
775
|
+
logger.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() (stream=${this.localCallFeed.stream.id}, muted=${muted})`);
|
|
776
|
+
try {
|
|
777
|
+
const stream = await this.client.getMediaHandler().getUserMediaStream(true, !muted);
|
|
778
|
+
await this.updateLocalUsermediaStream(stream);
|
|
779
|
+
this.localCallFeed.setAudioVideoMuted(null, muted);
|
|
780
|
+
setTracksEnabled(this.localCallFeed.stream.getVideoTracks(), !muted);
|
|
781
|
+
} catch {
|
|
782
|
+
// No permission to video device
|
|
811
783
|
/* istanbul ignore next */
|
|
812
|
-
logger.log(
|
|
813
|
-
|
|
814
|
-
var stream = yield _this0.client.getMediaHandler().getUserMediaStream(true, !muted);
|
|
815
|
-
yield _this0.updateLocalUsermediaStream(stream);
|
|
816
|
-
_this0.localCallFeed.setAudioVideoMuted(null, muted);
|
|
817
|
-
setTracksEnabled(_this0.localCallFeed.stream.getVideoTracks(), !muted);
|
|
818
|
-
} catch (_unused2) {
|
|
819
|
-
// No permission to video device
|
|
820
|
-
/* istanbul ignore next */
|
|
821
|
-
logger.log("GroupCall ".concat(_this0.groupCallId, " setLocalVideoMuted() no device or permission to receive local stream, muted=").concat(muted));
|
|
822
|
-
return false;
|
|
823
|
-
}
|
|
824
|
-
} else {
|
|
825
|
-
logger.log("GroupCall ".concat(_this0.groupCallId, " setLocalVideoMuted() no stream muted (muted=").concat(muted, ")"));
|
|
826
|
-
_this0.initWithVideoMuted = muted;
|
|
784
|
+
logger.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() no device or permission to receive local stream, muted=${muted}`);
|
|
785
|
+
return false;
|
|
827
786
|
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
787
|
+
} else {
|
|
788
|
+
logger.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() no stream muted (muted=${muted})`);
|
|
789
|
+
this.initWithVideoMuted = muted;
|
|
790
|
+
}
|
|
791
|
+
const updates = [];
|
|
792
|
+
this.forEachCall(call => updates.push(call.setLocalVideoMuted(muted)));
|
|
793
|
+
await Promise.all(updates);
|
|
831
794
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
})();
|
|
795
|
+
// We setTracksEnabled again, independently from the call doing it
|
|
796
|
+
// internally, since we might not be expecting the call
|
|
797
|
+
this.forEachCall(call => setTracksEnabled(call.localUsermediaFeed.stream.getVideoTracks(), !muted && this.callExpected(call)));
|
|
798
|
+
this.emit(GroupCallEvent.LocalMuteStateChanged, this.isMicrophoneMuted(), muted);
|
|
799
|
+
return true;
|
|
838
800
|
}
|
|
839
|
-
setScreensharingEnabled(enabled) {
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
var _loop = function* _loop(track) {
|
|
852
|
-
var onTrackEnded = () => {
|
|
853
|
-
_this1.setScreensharingEnabled(false);
|
|
854
|
-
track.removeEventListener("ended", onTrackEnded);
|
|
855
|
-
};
|
|
856
|
-
track.addEventListener("ended", onTrackEnded);
|
|
801
|
+
async setScreensharingEnabled(enabled, opts = {}) {
|
|
802
|
+
if (enabled === this.isScreensharing()) {
|
|
803
|
+
return enabled;
|
|
804
|
+
}
|
|
805
|
+
if (enabled) {
|
|
806
|
+
try {
|
|
807
|
+
logger.log(`GroupCall ${this.groupCallId} setScreensharingEnabled() is asking for screensharing permissions`);
|
|
808
|
+
const stream = await this.client.getMediaHandler().getScreensharingStream(opts);
|
|
809
|
+
for (const track of stream.getTracks()) {
|
|
810
|
+
const onTrackEnded = () => {
|
|
811
|
+
this.setScreensharingEnabled(false);
|
|
812
|
+
track.removeEventListener("ended", onTrackEnded);
|
|
857
813
|
};
|
|
858
|
-
|
|
859
|
-
yield* _loop(track);
|
|
860
|
-
}
|
|
861
|
-
logger.log("GroupCall ".concat(_this1.groupCallId, " setScreensharingEnabled() granted screensharing permissions. Setting screensharing enabled on all calls"));
|
|
862
|
-
_this1.localDesktopCapturerSourceId = opts.desktopCapturerSourceId;
|
|
863
|
-
_this1.localScreenshareFeed = new CallFeed({
|
|
864
|
-
client: _this1.client,
|
|
865
|
-
roomId: _this1.room.roomId,
|
|
866
|
-
userId: _this1.client.getUserId(),
|
|
867
|
-
deviceId: _this1.client.getDeviceId(),
|
|
868
|
-
stream,
|
|
869
|
-
purpose: SDPStreamMetadataPurpose.Screenshare,
|
|
870
|
-
audioMuted: false,
|
|
871
|
-
videoMuted: false
|
|
872
|
-
});
|
|
873
|
-
_this1.addScreenshareFeed(_this1.localScreenshareFeed);
|
|
874
|
-
_this1.emit(GroupCallEvent.LocalScreenshareStateChanged, true, _this1.localScreenshareFeed, _this1.localDesktopCapturerSourceId);
|
|
875
|
-
|
|
876
|
-
// TODO: handle errors
|
|
877
|
-
_this1.forEachCall(call => call.pushLocalFeed(_this1.localScreenshareFeed.clone()));
|
|
878
|
-
return true;
|
|
879
|
-
} catch (error) {
|
|
880
|
-
if (opts.throwOnFail) throw error;
|
|
881
|
-
logger.error("GroupCall ".concat(_this1.groupCallId, " setScreensharingEnabled() enabling screensharing error"), error);
|
|
882
|
-
_this1.emit(GroupCallEvent.Error, new GroupCallError(GroupCallErrorCode.NoUserMedia, "Failed to get screen-sharing stream: ", error));
|
|
883
|
-
return false;
|
|
814
|
+
track.addEventListener("ended", onTrackEnded);
|
|
884
815
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
816
|
+
logger.log(`GroupCall ${this.groupCallId} setScreensharingEnabled() granted screensharing permissions. Setting screensharing enabled on all calls`);
|
|
817
|
+
this.localDesktopCapturerSourceId = opts.desktopCapturerSourceId;
|
|
818
|
+
this.localScreenshareFeed = new CallFeed({
|
|
819
|
+
client: this.client,
|
|
820
|
+
roomId: this.room.roomId,
|
|
821
|
+
userId: this.client.getUserId(),
|
|
822
|
+
deviceId: this.client.getDeviceId(),
|
|
823
|
+
stream,
|
|
824
|
+
purpose: SDPStreamMetadataPurpose.Screenshare,
|
|
825
|
+
audioMuted: false,
|
|
826
|
+
videoMuted: false
|
|
888
827
|
});
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
828
|
+
this.addScreenshareFeed(this.localScreenshareFeed);
|
|
829
|
+
this.emit(GroupCallEvent.LocalScreenshareStateChanged, true, this.localScreenshareFeed, this.localDesktopCapturerSourceId);
|
|
830
|
+
|
|
831
|
+
// TODO: handle errors
|
|
832
|
+
this.forEachCall(call => call.pushLocalFeed(this.localScreenshareFeed.clone()));
|
|
833
|
+
return true;
|
|
834
|
+
} catch (error) {
|
|
835
|
+
if (opts.throwOnFail) throw error;
|
|
836
|
+
logger.error(`GroupCall ${this.groupCallId} setScreensharingEnabled() enabling screensharing error`, error);
|
|
837
|
+
this.emit(GroupCallEvent.Error, new GroupCallError(GroupCallErrorCode.NoUserMedia, "Failed to get screen-sharing stream: ", error));
|
|
894
838
|
return false;
|
|
895
839
|
}
|
|
896
|
-
}
|
|
840
|
+
} else {
|
|
841
|
+
this.forEachCall(call => {
|
|
842
|
+
if (call.localScreensharingFeed) call.removeLocalFeed(call.localScreensharingFeed);
|
|
843
|
+
});
|
|
844
|
+
this.client.getMediaHandler().stopScreensharingStream(this.localScreenshareFeed.stream);
|
|
845
|
+
this.removeScreenshareFeed(this.localScreenshareFeed);
|
|
846
|
+
this.localScreenshareFeed = undefined;
|
|
847
|
+
this.localDesktopCapturerSourceId = undefined;
|
|
848
|
+
this.emit(GroupCallEvent.LocalScreenshareStateChanged, false, undefined, undefined);
|
|
849
|
+
return false;
|
|
850
|
+
}
|
|
897
851
|
}
|
|
898
852
|
isScreensharing() {
|
|
899
853
|
return !!this.localScreenshareFeed;
|
|
@@ -906,8 +860,8 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
906
860
|
* @returns Whether we need to place an outgoing call to the participant.
|
|
907
861
|
*/
|
|
908
862
|
wantsOutgoingCall(userId, deviceId) {
|
|
909
|
-
|
|
910
|
-
|
|
863
|
+
const localUserId = this.client.getUserId();
|
|
864
|
+
const localDeviceId = this.client.getDeviceId();
|
|
911
865
|
return (
|
|
912
866
|
// If a user's ID is less than our own, they'll call us
|
|
913
867
|
userId >= localUserId && (
|
|
@@ -920,68 +874,54 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
920
874
|
* Places calls to all participants that we're responsible for calling.
|
|
921
875
|
*/
|
|
922
876
|
placeOutgoingCalls() {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
877
|
+
let callsChanged = false;
|
|
878
|
+
for (const [{
|
|
879
|
+
userId
|
|
880
|
+
}, participantMap] of this.participants) {
|
|
881
|
+
const callMap = this.calls.get(userId) ?? new Map();
|
|
882
|
+
for (const [deviceId, participant] of participantMap) {
|
|
883
|
+
const prevCall = callMap.get(deviceId);
|
|
884
|
+
if (prevCall?.getOpponentSessionId() !== participant.sessionId && this.wantsOutgoingCall(userId, deviceId)) {
|
|
885
|
+
callsChanged = true;
|
|
886
|
+
if (prevCall !== undefined) {
|
|
887
|
+
logger.debug(`GroupCall ${this.groupCallId} placeOutgoingCalls() replacing call (userId=${userId}, deviceId=${deviceId}, callId=${prevCall.callId})`);
|
|
888
|
+
prevCall.hangup(CallErrorCode.NewSession, false);
|
|
889
|
+
}
|
|
890
|
+
const newCall = createNewMatrixCall(this.client, this.room.roomId, {
|
|
891
|
+
invitee: userId,
|
|
892
|
+
opponentDeviceId: deviceId,
|
|
893
|
+
opponentSessionId: participant.sessionId,
|
|
894
|
+
groupCallId: this.groupCallId
|
|
895
|
+
});
|
|
896
|
+
if (newCall === null) {
|
|
897
|
+
logger.error(`GroupCall ${this.groupCallId} placeOutgoingCalls() failed to create call (userId=${userId}, device=${deviceId})`);
|
|
898
|
+
callMap.delete(deviceId);
|
|
899
|
+
} else {
|
|
900
|
+
this.initCall(newCall);
|
|
901
|
+
callMap.set(deviceId, newCall);
|
|
902
|
+
logger.debug(`GroupCall ${this.groupCallId} placeOutgoingCalls() placing call (userId=${userId}, deviceId=${deviceId}, sessionId=${participant.sessionId})`);
|
|
903
|
+
newCall.placeCallWithCallFeeds(this.getLocalFeeds().map(feed => feed.clone()), participant.screensharing).then(() => {
|
|
904
|
+
if (this.dataChannelsEnabled) {
|
|
905
|
+
newCall.createDataChannel("datachannel", this.dataChannelOptions);
|
|
941
906
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
groupCallId: _this10.groupCallId
|
|
947
|
-
});
|
|
948
|
-
if (newCall === null) {
|
|
949
|
-
logger.error("GroupCall ".concat(_this10.groupCallId, " placeOutgoingCalls() failed to create call (userId=").concat(userId, ", device=").concat(deviceId, ")"));
|
|
950
|
-
callMap.delete(deviceId);
|
|
907
|
+
}).catch(e => {
|
|
908
|
+
logger.warn(`GroupCall ${this.groupCallId} placeOutgoingCalls() failed to place call (userId=${userId})`, e);
|
|
909
|
+
if (e instanceof CallError && e.code === GroupCallErrorCode.UnknownDevice) {
|
|
910
|
+
this.emit(GroupCallEvent.Error, e);
|
|
951
911
|
} else {
|
|
952
|
-
|
|
953
|
-
callMap.set(deviceId, newCall);
|
|
954
|
-
logger.debug("GroupCall ".concat(_this10.groupCallId, " placeOutgoingCalls() placing call (userId=").concat(userId, ", deviceId=").concat(deviceId, ", sessionId=").concat(participant.sessionId, ")"));
|
|
955
|
-
newCall.placeCallWithCallFeeds(_this10.getLocalFeeds().map(feed => feed.clone()), participant.screensharing).then(() => {
|
|
956
|
-
if (_this10.dataChannelsEnabled) {
|
|
957
|
-
newCall.createDataChannel("datachannel", _this10.dataChannelOptions);
|
|
958
|
-
}
|
|
959
|
-
}).catch(e => {
|
|
960
|
-
logger.warn("GroupCall ".concat(_this10.groupCallId, " placeOutgoingCalls() failed to place call (userId=").concat(userId, ")"), e);
|
|
961
|
-
if (e instanceof CallError && e.code === GroupCallErrorCode.UnknownDevice) {
|
|
962
|
-
_this10.emit(GroupCallEvent.Error, e);
|
|
963
|
-
} else {
|
|
964
|
-
_this10.emit(GroupCallEvent.Error, new GroupCallError(GroupCallErrorCode.PlaceCallFailed, "Failed to place call to ".concat(userId)));
|
|
965
|
-
}
|
|
966
|
-
newCall.hangup(CallErrorCode.SignallingFailed, false);
|
|
967
|
-
if (callMap.get(deviceId) === newCall) callMap.delete(deviceId);
|
|
968
|
-
});
|
|
912
|
+
this.emit(GroupCallEvent.Error, new GroupCallError(GroupCallErrorCode.PlaceCallFailed, `Failed to place call to ${userId}`));
|
|
969
913
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
_loop3();
|
|
975
|
-
}
|
|
976
|
-
if (callMap.size > 0) {
|
|
977
|
-
_this10.calls.set(userId, callMap);
|
|
978
|
-
} else {
|
|
979
|
-
_this10.calls.delete(userId);
|
|
914
|
+
newCall.hangup(CallErrorCode.SignallingFailed, false);
|
|
915
|
+
if (callMap.get(deviceId) === newCall) callMap.delete(deviceId);
|
|
916
|
+
});
|
|
917
|
+
}
|
|
980
918
|
}
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
919
|
+
}
|
|
920
|
+
if (callMap.size > 0) {
|
|
921
|
+
this.calls.set(userId, callMap);
|
|
922
|
+
} else {
|
|
923
|
+
this.calls.delete(userId);
|
|
924
|
+
}
|
|
985
925
|
}
|
|
986
926
|
if (callsChanged) this.emit(GroupCallEvent.CallsChanged, this.calls);
|
|
987
927
|
}
|
|
@@ -994,15 +934,15 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
994
934
|
return userId === undefined ? this.room.currentState.getStateEvents(EventType.GroupCallMemberPrefix) : this.room.currentState.getStateEvents(EventType.GroupCallMemberPrefix, userId);
|
|
995
935
|
}
|
|
996
936
|
initCall(call) {
|
|
997
|
-
|
|
937
|
+
const opponentMemberId = getCallUserId(call);
|
|
998
938
|
if (!opponentMemberId) {
|
|
999
939
|
throw new Error("Cannot init call without user id");
|
|
1000
940
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
941
|
+
const onCallFeedsChanged = () => this.onCallFeedsChanged(call);
|
|
942
|
+
const onCallStateChanged = (state, oldState) => this.onCallStateChanged(call, state, oldState);
|
|
943
|
+
const onCallHangup = this.onCallHangup;
|
|
944
|
+
const onCallReplaced = newCall => this.onCallReplaced(call, newCall);
|
|
945
|
+
let deviceMap = this.callHandlers.get(opponentMemberId);
|
|
1006
946
|
if (deviceMap === undefined) {
|
|
1007
947
|
deviceMap = new Map();
|
|
1008
948
|
this.callHandlers.set(opponentMemberId, deviceMap);
|
|
@@ -1023,17 +963,18 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1023
963
|
onCallFeedsChanged();
|
|
1024
964
|
}
|
|
1025
965
|
disposeCall(call, hangupReason) {
|
|
1026
|
-
|
|
1027
|
-
|
|
966
|
+
const opponentMemberId = getCallUserId(call);
|
|
967
|
+
const opponentDeviceId = call.getOpponentDeviceId();
|
|
1028
968
|
if (!opponentMemberId) {
|
|
1029
969
|
throw new Error("Cannot dispose call without user id");
|
|
1030
970
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
onCallFeedsChanged
|
|
1034
|
-
onCallStateChanged
|
|
1035
|
-
onCallHangup
|
|
1036
|
-
onCallReplaced
|
|
971
|
+
const deviceMap = this.callHandlers.get(opponentMemberId);
|
|
972
|
+
const {
|
|
973
|
+
onCallFeedsChanged,
|
|
974
|
+
onCallStateChanged,
|
|
975
|
+
onCallHangup,
|
|
976
|
+
onCallReplaced
|
|
977
|
+
} = deviceMap.get(opponentDeviceId);
|
|
1037
978
|
call.removeListener(CallEvent.FeedsChanged, onCallFeedsChanged);
|
|
1038
979
|
call.removeListener(CallEvent.State, onCallStateChanged);
|
|
1039
980
|
call.removeListener(CallEvent.Hangup, onCallHangup);
|
|
@@ -1043,11 +984,11 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1043
984
|
if (call.hangupReason === CallErrorCode.Replaced) {
|
|
1044
985
|
return;
|
|
1045
986
|
}
|
|
1046
|
-
|
|
987
|
+
const usermediaFeed = this.getUserMediaFeed(opponentMemberId, opponentDeviceId);
|
|
1047
988
|
if (usermediaFeed) {
|
|
1048
989
|
this.removeUserMediaFeed(usermediaFeed);
|
|
1049
990
|
}
|
|
1050
|
-
|
|
991
|
+
const screenshareFeed = this.getScreenshareFeed(opponentMemberId, opponentDeviceId);
|
|
1051
992
|
if (screenshareFeed) {
|
|
1052
993
|
this.removeScreenshareFeed(screenshareFeed);
|
|
1053
994
|
}
|
|
@@ -1065,7 +1006,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1065
1006
|
this.emit(GroupCallEvent.UserMediaFeedsChanged, this.userMediaFeeds);
|
|
1066
1007
|
}
|
|
1067
1008
|
replaceUserMediaFeed(existingFeed, replacementFeed) {
|
|
1068
|
-
|
|
1009
|
+
const feedIndex = this.userMediaFeeds.findIndex(f => f.userId === existingFeed.userId && f.deviceId === existingFeed.deviceId);
|
|
1069
1010
|
if (feedIndex === -1) {
|
|
1070
1011
|
throw new Error("Couldn't find user media feed to replace");
|
|
1071
1012
|
}
|
|
@@ -1075,7 +1016,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1075
1016
|
this.emit(GroupCallEvent.UserMediaFeedsChanged, this.userMediaFeeds);
|
|
1076
1017
|
}
|
|
1077
1018
|
removeUserMediaFeed(callFeed) {
|
|
1078
|
-
|
|
1019
|
+
const feedIndex = this.userMediaFeeds.findIndex(f => f.userId === callFeed.userId && f.deviceId === callFeed.deviceId);
|
|
1079
1020
|
if (feedIndex === -1) {
|
|
1080
1021
|
throw new Error("Couldn't find user media feed to remove");
|
|
1081
1022
|
}
|
|
@@ -1099,7 +1040,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1099
1040
|
this.emit(GroupCallEvent.ScreenshareFeedsChanged, this.screenshareFeeds);
|
|
1100
1041
|
}
|
|
1101
1042
|
replaceScreenshareFeed(existingFeed, replacementFeed) {
|
|
1102
|
-
|
|
1043
|
+
const feedIndex = this.screenshareFeeds.findIndex(f => f.userId === existingFeed.userId && f.deviceId === existingFeed.deviceId);
|
|
1103
1044
|
if (feedIndex === -1) {
|
|
1104
1045
|
throw new Error("Couldn't find screenshare feed to replace");
|
|
1105
1046
|
}
|
|
@@ -1108,7 +1049,7 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1108
1049
|
this.emit(GroupCallEvent.ScreenshareFeedsChanged, this.screenshareFeeds);
|
|
1109
1050
|
}
|
|
1110
1051
|
removeScreenshareFeed(callFeed) {
|
|
1111
|
-
|
|
1052
|
+
const feedIndex = this.screenshareFeeds.findIndex(f => f.userId === callFeed.userId && f.deviceId === callFeed.deviceId);
|
|
1112
1053
|
if (feedIndex === -1) {
|
|
1113
1054
|
throw new Error("Couldn't find screenshare feed to remove");
|
|
1114
1055
|
}
|
|
@@ -1121,11 +1062,11 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1121
1062
|
* Recalculates and updates the participant map to match the room state.
|
|
1122
1063
|
*/
|
|
1123
1064
|
updateParticipants() {
|
|
1124
|
-
|
|
1065
|
+
const localMember = this.room.getMember(this.client.getSafeUserId());
|
|
1125
1066
|
if (!localMember) {
|
|
1126
1067
|
// The client hasn't fetched enough of the room state to get our own member
|
|
1127
1068
|
// event. This probably shouldn't happen, but sanity check & exit for now.
|
|
1128
|
-
logger.warn(
|
|
1069
|
+
logger.warn(`GroupCall ${this.groupCallId} updateParticipants() tried to update participants before local room member is available`);
|
|
1129
1070
|
return;
|
|
1130
1071
|
}
|
|
1131
1072
|
if (this.participantsExpirationTimer !== null) {
|
|
@@ -1136,30 +1077,30 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1136
1077
|
this.participants = new Map();
|
|
1137
1078
|
return;
|
|
1138
1079
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
for (
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1080
|
+
const participants = new Map();
|
|
1081
|
+
const now = Date.now();
|
|
1082
|
+
const entered = this.state === GroupCallState.Entered || this.enteredViaAnotherSession;
|
|
1083
|
+
let nextExpiration = Infinity;
|
|
1084
|
+
for (const e of this.getMemberStateEvents()) {
|
|
1085
|
+
const member = this.room.getMember(e.getStateKey());
|
|
1086
|
+
const content = e.getContent();
|
|
1087
|
+
const calls = Array.isArray(content["m.calls"]) ? content["m.calls"] : [];
|
|
1088
|
+
const call = calls.find(call => call["m.call_id"] === this.groupCallId);
|
|
1089
|
+
const devices = Array.isArray(call?.["m.devices"]) ? call["m.devices"] : [];
|
|
1149
1090
|
|
|
1150
1091
|
// Filter out invalid and expired devices
|
|
1151
|
-
|
|
1092
|
+
let validDevices = devices.filter(d => typeof d.device_id === "string" && typeof d.session_id === "string" && typeof d.expires_ts === "number" && d.expires_ts > now && Array.isArray(d.feeds));
|
|
1152
1093
|
|
|
1153
1094
|
// Apply local echo for the unentered case
|
|
1154
|
-
if (!entered &&
|
|
1095
|
+
if (!entered && member?.userId === this.client.getUserId()) {
|
|
1155
1096
|
validDevices = validDevices.filter(d => d.device_id !== this.client.getDeviceId());
|
|
1156
1097
|
}
|
|
1157
1098
|
|
|
1158
1099
|
// Must have a connected device and be joined to the room
|
|
1159
|
-
if (validDevices.length > 0 &&
|
|
1160
|
-
|
|
1100
|
+
if (validDevices.length > 0 && member?.membership === KnownMembership.Join) {
|
|
1101
|
+
const deviceMap = new Map();
|
|
1161
1102
|
participants.set(member, deviceMap);
|
|
1162
|
-
for (
|
|
1103
|
+
for (const d of validDevices) {
|
|
1163
1104
|
deviceMap.set(d.device_id, {
|
|
1164
1105
|
sessionId: d.session_id,
|
|
1165
1106
|
screensharing: d.feeds.some(f => f.purpose === SDPStreamMetadataPurpose.Screenshare)
|
|
@@ -1171,13 +1112,13 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1171
1112
|
|
|
1172
1113
|
// Apply local echo for the entered case
|
|
1173
1114
|
if (entered) {
|
|
1174
|
-
|
|
1175
|
-
if (
|
|
1176
|
-
|
|
1177
|
-
participants.set(localMember,
|
|
1115
|
+
let deviceMap = participants.get(localMember);
|
|
1116
|
+
if (deviceMap === undefined) {
|
|
1117
|
+
deviceMap = new Map();
|
|
1118
|
+
participants.set(localMember, deviceMap);
|
|
1178
1119
|
}
|
|
1179
|
-
if (!
|
|
1180
|
-
|
|
1120
|
+
if (!deviceMap.has(this.client.getDeviceId())) {
|
|
1121
|
+
deviceMap.set(this.client.getDeviceId(), {
|
|
1181
1122
|
sessionId: this.client.getSessionId(),
|
|
1182
1123
|
screensharing: this.getLocalFeeds().some(f => f.purpose === SDPStreamMetadataPurpose.Screenshare)
|
|
1183
1124
|
});
|
|
@@ -1195,116 +1136,102 @@ export class GroupCall extends TypedEventEmitter {
|
|
|
1195
1136
|
* returns null, the update will be skipped.
|
|
1196
1137
|
* @param keepAlive - Whether the request should outlive the window.
|
|
1197
1138
|
*/
|
|
1198
|
-
updateDevices(fn) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
for (var c of calls) {
|
|
1212
|
-
if (c["m.call_id"] === _this11.groupCallId) {
|
|
1213
|
-
call = c;
|
|
1214
|
-
} else {
|
|
1215
|
-
otherCalls.push(c);
|
|
1216
|
-
}
|
|
1139
|
+
async updateDevices(fn, keepAlive = false) {
|
|
1140
|
+
const now = Date.now();
|
|
1141
|
+
const localUserId = this.client.getUserId();
|
|
1142
|
+
const event = this.getMemberStateEvents(localUserId);
|
|
1143
|
+
const content = event?.getContent() ?? {};
|
|
1144
|
+
const calls = Array.isArray(content["m.calls"]) ? content["m.calls"] : [];
|
|
1145
|
+
let call = null;
|
|
1146
|
+
const otherCalls = [];
|
|
1147
|
+
for (const c of calls) {
|
|
1148
|
+
if (c["m.call_id"] === this.groupCallId) {
|
|
1149
|
+
call = c;
|
|
1150
|
+
} else {
|
|
1151
|
+
otherCalls.push(c);
|
|
1217
1152
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1153
|
+
}
|
|
1154
|
+
if (call === null) call = {};
|
|
1155
|
+
const devices = Array.isArray(call["m.devices"]) ? call["m.devices"] : [];
|
|
1220
1156
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
})();
|
|
1157
|
+
// Filter out invalid and expired devices
|
|
1158
|
+
const validDevices = devices.filter(d => typeof d.device_id === "string" && typeof d.session_id === "string" && typeof d.expires_ts === "number" && d.expires_ts > now && Array.isArray(d.feeds));
|
|
1159
|
+
const newDevices = fn(validDevices);
|
|
1160
|
+
if (newDevices === null) return;
|
|
1161
|
+
const newCalls = [...otherCalls];
|
|
1162
|
+
if (newDevices.length > 0) {
|
|
1163
|
+
newCalls.push(_objectSpread(_objectSpread({}, call), {}, {
|
|
1164
|
+
"m.call_id": this.groupCallId,
|
|
1165
|
+
"m.devices": newDevices
|
|
1166
|
+
}));
|
|
1167
|
+
}
|
|
1168
|
+
const newContent = {
|
|
1169
|
+
"m.calls": newCalls
|
|
1170
|
+
};
|
|
1171
|
+
await this.client.sendStateEvent(this.room.roomId, EventType.GroupCallMemberPrefix, newContent, localUserId, {
|
|
1172
|
+
keepAlive
|
|
1173
|
+
});
|
|
1239
1174
|
}
|
|
1240
|
-
addDeviceToMemberState() {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
// TODO: Add data channels
|
|
1251
|
-
}]);
|
|
1252
|
-
})();
|
|
1175
|
+
async addDeviceToMemberState() {
|
|
1176
|
+
await this.updateDevices(devices => [...devices.filter(d => d.device_id !== this.client.getDeviceId()), {
|
|
1177
|
+
device_id: this.client.getDeviceId(),
|
|
1178
|
+
session_id: this.client.getSessionId(),
|
|
1179
|
+
expires_ts: Date.now() + DEVICE_TIMEOUT,
|
|
1180
|
+
feeds: this.getLocalFeeds().map(feed => ({
|
|
1181
|
+
purpose: feed.purpose
|
|
1182
|
+
}))
|
|
1183
|
+
// TODO: Add data channels
|
|
1184
|
+
}]);
|
|
1253
1185
|
}
|
|
1254
|
-
updateMemberState() {
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
// Add the local device
|
|
1264
|
-
yield _this13.addDeviceToMemberState();
|
|
1186
|
+
async updateMemberState() {
|
|
1187
|
+
// Clear the old update interval before proceeding
|
|
1188
|
+
if (this.resendMemberStateTimer !== null) {
|
|
1189
|
+
clearInterval(this.resendMemberStateTimer);
|
|
1190
|
+
this.resendMemberStateTimer = null;
|
|
1191
|
+
}
|
|
1192
|
+
if (this.state === GroupCallState.Entered) {
|
|
1193
|
+
// Add the local device
|
|
1194
|
+
await this.addDeviceToMemberState();
|
|
1265
1195
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
})();
|
|
1196
|
+
// Resend the state event every so often so it doesn't become stale
|
|
1197
|
+
this.resendMemberStateTimer = setInterval(async () => {
|
|
1198
|
+
logger.log(`GroupCall ${this.groupCallId} updateMemberState() resending call member state"`);
|
|
1199
|
+
try {
|
|
1200
|
+
await this.addDeviceToMemberState();
|
|
1201
|
+
} catch (e) {
|
|
1202
|
+
logger.error(`GroupCall ${this.groupCallId} updateMemberState() failed to resend call member state`, e);
|
|
1203
|
+
}
|
|
1204
|
+
}, DEVICE_TIMEOUT * 3 / 4);
|
|
1205
|
+
} else {
|
|
1206
|
+
// Remove the local device
|
|
1207
|
+
await this.updateDevices(devices => devices.filter(d => d.device_id !== this.client.getDeviceId()), true);
|
|
1208
|
+
}
|
|
1280
1209
|
}
|
|
1281
1210
|
|
|
1282
1211
|
/**
|
|
1283
1212
|
* Cleans up our member state by filtering out logged out devices, inactive
|
|
1284
1213
|
* devices, and our own device (if we know we haven't entered).
|
|
1285
1214
|
*/
|
|
1286
|
-
cleanMemberState() {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
var deviceMap = new Map(myDevices.map(d => [d.device_id, d]));
|
|
1215
|
+
async cleanMemberState() {
|
|
1216
|
+
const {
|
|
1217
|
+
devices: myDevices
|
|
1218
|
+
} = await this.client.getDevices();
|
|
1219
|
+
const deviceMap = new Map(myDevices.map(d => [d.device_id, d]));
|
|
1292
1220
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
});
|
|
1299
|
-
|
|
1300
|
-
// Skip the update if the devices are unchanged
|
|
1301
|
-
return newDevices.length === devices.length ? null : newDevices;
|
|
1221
|
+
// updateDevices takes care of filtering out inactive devices for us
|
|
1222
|
+
await this.updateDevices(devices => {
|
|
1223
|
+
const newDevices = devices.filter(d => {
|
|
1224
|
+
const device = deviceMap.get(d.device_id);
|
|
1225
|
+
return device?.last_seen_ts !== undefined && !(d.device_id === this.client.getDeviceId() && this.state !== GroupCallState.Entered && !this.enteredViaAnotherSession);
|
|
1302
1226
|
});
|
|
1303
|
-
|
|
1227
|
+
|
|
1228
|
+
// Skip the update if the devices are unchanged
|
|
1229
|
+
return newDevices.length === devices.length ? null : newDevices;
|
|
1230
|
+
});
|
|
1304
1231
|
}
|
|
1305
1232
|
getGroupCallStats() {
|
|
1306
1233
|
if (this.stats === undefined) {
|
|
1307
|
-
|
|
1234
|
+
const userID = this.client.getUserId() || "unknown";
|
|
1308
1235
|
this.stats = new GroupCallStats(this.groupCallId, userID, this.statsCollectIntervalTime);
|
|
1309
1236
|
this.stats.reports.on(StatsReport.CONNECTION_STATS, this.onConnectionStats);
|
|
1310
1237
|
this.stats.reports.on(StatsReport.BYTE_SENT_STATS, this.onByteSentStats);
|