Commit Graph

43 Commits (6b54f83b085b1d651637ab8e57a66654663b91c7)

Author SHA1 Message Date
Travis Ralston 079e75aae9 Handle upload errors in voice messages
Fixes https://github.com/vector-im/element-web/issues/17148

Mostly adding some try/catch blocks, and a generic dialog.
2021-07-21 16:11:10 -06:00
Michael Telatynski ce78cdf4ad Conform to new react and typescript eslint rules 2021-07-19 22:43:11 +01:00
Travis Ralston e045aa940e Be smart with readonly 2021-07-12 14:11:24 -06:00
Travis Ralston 4c98c0bc23 Increase sample count in voice message thumbnail
Fixes https://github.com/vector-im/element-web/issues/17817

Technically requires https://github.com/matrix-org/matrix-react-sdk/pull/6357 for sample sizing.
2021-07-12 14:02:51 -06:00
Šimon Brandner dadfba9075
Add MediaDeviceKindEnum
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-09 13:08:39 +02:00
Travis Ralston 12d7be2b6a Merge branch 'develop' into travis/new-audio 2021-06-30 13:25:41 -06:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Travis Ralston d6cf2346fe Manually conflict resolve https://github.com/matrix-org/matrix-react-sdk/pull/6240 2021-06-28 21:00:36 -06:00
Travis Ralston 964a97d59e Merge remote-tracking branch 'origin/develop' into travis/new-audio 2021-06-28 20:52:44 -06:00
Germain Souquet 6cb86057c5 Merge branch 'develop' into gsouquet/voice-messages-waveform-perf 2021-06-28 09:29:11 +01:00
Travis Ralston b5bb767b8f Appease the linter 2021-06-25 14:11:50 -06:00
Travis Ralston cb0d2a2c4f Encrypt the voice message file if needed
Fixes https://github.com/vector-im/element-web/issues/17729

"oops, should have done that"
2021-06-25 13:54:05 -06:00
Travis Ralston 76caba0385 Restore mx_VoiceMessagePrimaryContainer class 2021-06-25 00:10:32 -06:00
Travis Ralston ffef2e58cb Unify audio message types to new media body 2021-06-24 11:38:35 -06:00
Travis Ralston 470778cbb8 Move voice message components to audio-generic directory 2021-06-24 11:38:35 -06:00
Germain Souquet 21caa6df12 move live recording logic down the component tree 2021-06-24 09:58:11 +01:00
Germain Souquet 56467485f5 Merge branch 'develop' into gsouquet/voice-messages-waveform-perf 2021-06-24 09:42:47 +01:00
Germain Souquet a6367c0796 Reintroduce LiveRecording components for maintenance reasons 2021-06-23 09:33:38 +01:00
Šimon Brandner 9bceb40820
CallMediaHandler -> MediaDeviceHandler
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-23 09:26:33 +02:00
Germain Souquet a85c6c67e0 Make waveform update match the screen refresh rate 2021-06-22 12:28:23 +01:00
Travis Ralston d13611736a Update MSC number references for voice messages
as per https://github.com/matrix-org/matrix-doc/pull/3245
2021-06-15 17:24:56 -06:00
Travis Ralston 54931cb43e Merge remote-tracking branch 'origin/develop' into travis/voicemessages/timeline 2021-05-04 09:05:04 -06:00
Travis Ralston 87a57ec7e5 Handle no/blocked microphones in voice messages
Fixes https://github.com/vector-im/element-web/issues/17139
2021-05-03 16:41:39 -06:00
Travis Ralston 8abd251ec5 delib 2021-05-03 11:43:46 -06:00
Travis Ralston d7ed2d3486 Switch to m.audio with extensible events 2021-05-03 10:27:15 -06:00
Travis Ralston c2d37af1cb Move playback to its own set of classes
This all started with a bug where the clock wouldn't update appropriately, and ended with a whole refactoring to support later playback in the timeline.

Playback and recording instances are now independent, and this applies to the <Playback* /> components as well. Instead of those playback components taking a recording, they take a playback instance which has all the information the components need.

The clock was incredibly difficult to do because of the audio context's time tracking and the source's inability to say where it is at in the buffer/in time. This means we have to track when we started playing the clip so we can capture the audio context's current time, which may be a few seconds by the first time the user hits play. We also track stops so we know when to reset that flag.

Waveform calculations have also been moved into the base component, deduplicating the math a bit.
2021-04-27 22:23:57 -06:00
Travis Ralston c1bb0bb0b8 Add a delete button 2021-04-27 15:02:15 -06:00
Travis Ralston 30e120284d Add simple play/pause controls 2021-04-27 15:02:15 -06:00
Travis Ralston 32e3ce3dea Handle basic state machine of recordings 2021-04-27 15:02:15 -06:00
Travis Ralston 4f75e2944c Appease the linter 2021-04-19 23:11:41 -06:00
Travis Ralston 61730f2f88 Populate waveform data on voice message event 2021-04-19 23:05:53 -06:00
Travis Ralston 6f794cca9b Fill in some metadata for the sent event 2021-04-19 21:01:48 -06:00
Travis Ralston 3cafed478c Run voice recording updates through a dedicated store 2021-04-14 20:11:34 -06:00
Travis Ralston b0a04c9f81 Rename VoiceRecorder -> VoiceRecording to better match expected function 2021-04-14 20:00:16 -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 b7e653268b Rename function 2021-03-23 18:19:14 -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 f0d5edbc37 Render voice messages as audio messages for now 2021-03-16 23:48:47 -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