* 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>
* 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
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>
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>