7 Commits
Author SHA1 Message Date
91e8f3bdae Keep a copy of the audio buffer so the WAV fallback can run (#34481)
* Keep a copy of the audio buffer so the WAV fallback can run

decodeAudioData detaches the buffer it is given, so the catch block handed an
already detached buffer to decodeOgg and it threw "Cannot perform Construct on
a detached ArrayBuffer" before it could re-encode. The fallback could never
run and the user saw an error instead of their voice message.

Fixes https://github.com/element-hq/element-web/issues/24904

* Assert the fallback buffer is usable instead of constructing a view for its side effect

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:08:59 +00:00
hayyaksiandGitHub 0a86a6b93d Stop large audio playback when the media element ends (#34495) 2026-08-11 15:51:08 +00:00
Michael TelatynskiandGitHub 4aa1a3549e Enable oxlint restriction ruleset (#34307)
* Remove stale max-len disablements

* Remove stale camelCase & naming-convention disablements

* Remove stale ban-ts-comment disablements

* Remove stale no-var disablements

* Remove stale no-empty-property disablements

* Remove stale react rule disablements

* Remove stale no-constant-condition disablements

* Remove stale no-unused-vars disablements

* Remove stale disablements for disabled rules

* fixup camelcase

* Remove dead code

* Tidy code

* Tweak oxlint config

* Use oxlint to apply jsx/tsx extension consistently

* Fix import

* Fix imports

* Rename affected snapshots

* Update more imports

* Enable restriction ruleset

* Make code comply with new rules

* Make code comply with react/button-has-type

* Make code comply with typescript/non-nullable-type-assertion-style

* Comply with node/no-process-env

* Comply with unicorn/prefer-node-protocol

* Comply with unicorn/import-style

* Comply with unicorn/no-process-exit

* Comply with no-proto

* Comply with node/handle-callback-err

* Comply with import/no-commonjs

* Comply with node/no-path-concat

* Comply with unicorn/no-length-as-slice-end

* Comply with unicorn/no-document-cookie

* Comply with unicorn/prefer-module

* Comply with typescript/prefer-literal-enum-member

* Comply with jsx-a11y/anchor-ambiguous-text

* Tweak oxlint config

* Fix resolves

* Iterate

* Iterate

* Iterate

* Iterate

* Iterate

* Iterate

* Iterate
2026-08-04 09:15:07 +00:00
Michael TelatynskiandGitHub b719f531dd Migrate more tests to vitest (#34349) 2026-07-20 13:07:35 +00:00
David BakerandGitHub 54d27fd59c Separate out SDKContext (#34053)
* Separate out SDKContext

...from SDKContextClass, as the comments hopefully explain.

Also make the captitalisation consistent.

* Adding the new file usually helps too

* Fix import

* More comment

* Update the various imports of SDKContextClass

* Also fix case of TestSDKContext

* Update the mock
2026-07-01 12:49:18 +00:00
5ba09a5f90 Fix #32727: Ensure VoiceRecording uses the selected microphone (#32887)
Voice messages were being recorded using the system default microphone
instead of the device selected in Element settings.

This was fixed by ensuring the preferred deviceId is correctly passed
to the MediaStream constraints in VoiceRecording.ts.

Added unit tests in VoiceRecording-test.ts to verify that the
application correctly requests the user-selected device.

Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
2026-04-09 11:07:32 +00:00
Michael Telatynski 91a3cb03c1 mv element.io @types __mocks__/ debian docker module_system/ playwright res src test webapp Dockerfile .dockerignore .eslintignore .stylelintrc.cjs babel.config.cjs recorder-worklet-loader.cjs .modernizr.json components.json config.json config.sample.json package.json project.json tsconfig.json tsconfig.module_system.json jest.config.ts playwright.config.ts webpack.config.ts build_config.sample.yaml apps/web/
mkdir apps/web/scripts
mv scripts/{cleanup.sh,ci_package.sh,copy-res.ts,deploy.py,package.sh} apps/web/scripts

And a couple of gitignore tweaks

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-24 15:43:58 +00:00