Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Early rendering for voice messages in the timeline #5955

Merged
merged 4 commits into from
May 4, 2021

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#17138

image
image

It's not obvious, but the second screenshot is an encrypted voice message.

@turt2live turt2live requested a review from a team May 3, 2021 17:43
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, thanks!

@@ -49,7 +49,7 @@ export class Playback extends EventEmitter implements IDestroyable {
constructor(private buf: ArrayBuffer, seedWaveform = DEFAULT_WAVEFORM) {
super();
this.context = new AudioContext();
this.resampledWaveform = arrayFastResample(seedWaveform, PLAYBACK_WAVEFORM_SAMPLES);
this.resampledWaveform = arrayFastResample(seedWaveform ?? DEFAULT_WAVEFORM, PLAYBACK_WAVEFORM_SAMPLES);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be covered by the default value for the function parameter above...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should, unless a null squeezes in here

@turt2live turt2live merged commit feac025 into develop May 4, 2021
@turt2live turt2live deleted the travis/voicemessages/timeline branch May 4, 2021 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Voice messages: Render in timeline
2 participants