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
创建于
2021-05-14
更新于
2021-05-14
大小
4.2 KB
许可证
暂无
适用于

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址