Element Voice Messages

Adds a button to record voice messages. Click the button to start recording, click again to stop.

Автор
vctls
Установок в день
0
Всего установок
7
Оценки
0 0 0
Версия
0.1
Создано
14.05.2021
Обновлено
14.05.2021
Размер
4,2 КБ
Лицензия
нет данных
Работает на

Disclaimer: I am no JS developer, and there are probably better ways to do this.

As of 2021-05-14, Element.io does not have voice messages.
But the attachment button contains a hidden file input, which if changed
automatically triggers the Upload modal.
This script uses the MediaRecorder interface to record audio blobs,
which are then put into the hidden input using a DataTransfer object.
An html element is appended to the upload modal to preview the recorded audio.

Tested and working on Firefox 89 with GreaseMonkey.

Also available on the following Github gist:
https://gist.github.com/vctls/9e17a920490d11f7d12e0bc660ea721d

Minimalist usage demo:
https://youtu.be/I8-bsGZPerg