Commit graph

23 commits

Author SHA1 Message Date
Travis Ralston
b0a04c9f81 Rename VoiceRecorder -> VoiceRecording to better match expected function 2021-04-14 20:00:16 -06:00
Travis Ralston
b15412056e It helps to use the right function 2021-03-30 12:08:11 -06:00
Travis Ralston
60326e359a Clarify comment 2021-03-30 12:01:35 -06:00
Travis Ralston
54412878a1 Merge branch 'develop' into travis/voice-messages/waveform 2021-03-29 22:59:51 -06:00
Travis Ralston
9c2d44805d Revert "Avoid use of deprecated APIs, instead using an AudioWorklet"
This reverts commit 5c685dcf35.
2021-03-29 22:57:59 -06:00
Travis Ralston
5c685dcf35 Avoid use of deprecated APIs, instead using an AudioWorklet
A bit annoying that it is async, but it'll do.
2021-03-29 21:59:31 -06:00
Travis Ralston
e523ce6036 Fix float operations to make a little more sense. 2021-03-29 21:25:06 -06:00
Travis Ralston
e31ad0e174 Don't specify sample rates for voice messages
Turns out the browser doesn't actually resample for us, instead opting to explode in sadness.

We'll leave the resampling to the opus encoder.

Fixes https://github.com/vector-im/element-web/issues/16775
2021-03-25 18:24:58 -06:00
Travis Ralston
101679f647 Adjust some settings 2021-03-25 17:30:44 -06:00
Travis Ralston
1419ac6b69 Hook up a clock and implement proper design 2021-03-25 17:12:26 -06:00
Travis Ralston
449e028bbd Actually use a waveform instead of the frequency data 2021-03-24 23:31:02 -06:00
Travis Ralston
8ddd14e252 Early concept for rendering the frequency waveform 2021-03-24 22:17:45 -06:00
Travis Ralston
d929d48391 Clean up promises 2021-03-23 18:26:43 -06:00
Travis Ralston
c9938ff704 Adjust settings/docs for encoder 2021-03-23 18:24:40 -06:00
Travis Ralston
090cf28af4 Appease the linter 2021-03-22 19:36:58 -06:00
Travis Ralston
e352ed1908 Run audio through the Web Audio API instead
This leads to more reliable frequency/timing information, and involves a whole lot less decoding.

We still maintain ongoing encoded frames to avoid having to do one giant encode at the end, as that could take long enough to be disruptive.
2021-03-22 19:32:37 -06:00
Travis Ralston
207ba11da1 Tweak a bunch of settings 2021-03-19 17:08:01 -06:00
Travis Ralston
6c566cd382 Remove debugging 2021-03-16 23:50:03 -06:00
Travis Ralston
1dc2427128 Remove test function 2021-03-16 23:44:39 -06:00
Travis Ralston
9aa5348c7f Show a stop button to stop the recording 2021-03-16 23:43:59 -06:00
Travis Ralston
dafa8786a1 Fix comments 2021-03-16 23:43:22 -06:00
Travis Ralston
b5d32d92f3 Wire up a simple record button 2021-03-16 22:58:44 -06:00
Travis Ralston
be2e30df0d Add an early voice recorder utility class 2021-03-16 22:58:44 -06:00