Commit Graph

16 Commits

Author SHA1 Message Date
Travis Ralston
d270e232fd Fix voice message playback being squished up against send button
In the style shuffle of https://github.com/matrix-org/matrix-react-sdk/pull/5970 the playback bar got squished up against the send button. This just fixes the selector to actually hit the composer-based recorder all the time, not just when recording.
2021-05-06 21:41:04 -06:00
Travis Ralston
ccdc9fbef6 Fix issue where composer styles were being applied to the timeline 2021-05-04 21:15:22 -06:00
Travis Ralston
a94c1a90c1 Update colours and sizing for voice messages
Fixes https://github.com/vector-im/element-web/issues/17162
2021-05-04 20:45:15 -06:00
Travis Ralston
ba2da6826f Support a dark theme for voice messages
Fixes https://github.com/vector-im/element-web/issues/17137
2021-05-03 16:08:38 -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
e079f64a16 Adjust pixel dimensions 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
3e24d6f8ac Change animation speed 2021-04-15 10:49:39 -06:00
Travis Ralston
f0d1e7c565 Document the lamp effect 2021-04-15 10:04:15 -06:00
Travis Ralston
6b3ac20d76 Cleanup 2021-04-15 09:53:15 -06:00
Travis Ralston
595225b98b A different animation option for pulsing record icons 2021-04-14 15:14:52 -06:00
Travis Ralston
e77d3bea04 Pulse animation option for voice record button 2021-04-14 15:12:21 -06:00
Travis Ralston
1419ac6b69 Hook up a clock and implement proper design 2021-03-25 17:12:26 -06:00
Travis Ralston
51dca8d13d Fix positioning of stop square 2021-03-16 23:54:33 -06:00
Travis Ralston
9aa5348c7f Show a stop button to stop the recording 2021-03-16 23:43:59 -06:00