Greasy Fork is available in English.

Element Voice Messages

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

Tekijä
vctls
Päivittäiset asennukset
0
Asennuskerrat
6
Arvostelut
0 0 0
Versio
0.1
Luotu
14.5.2021
Päivitetty
14.5.2021
Lisenssi
N/A
Käytössä

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