-
-
Notifications
You must be signed in to change notification settings - Fork 827
Expand upon voice message event & include overall waveform #5888
Conversation
throw new Error("Unable to create recorder: no worklet script registered"); | ||
} | ||
await this.recorderContext.audioWorklet.addModule(mxRecorderWorkletPath); | ||
this.recorderWorklet = new AudioWorkletNode(this.recorderContext, WORKLET_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the AudioWorkletNode
is not supported by Safari whereas the ScriptProcessorNode
was.
Is there a fallback or progressive enhancement setup somewhere that I might not be aware of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh, I'll make note of this and get it properly tested in Safari in a future PR. I'm not confident it works properly before this change anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll definitely need some plan to support Safari before this can be enabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plan is in progress, though is dependent on acquisition of a Mac (work in progress)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👏
I'll leave the final review to someone else in the team
Co-authored-by: Germain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me, but please do consider the impact on Safari, as we'll need it to work there as before the feature can be enabled.
throw new Error("Unable to create recorder: no worklet script registered"); | ||
} | ||
await this.recorderContext.audioWorklet.addModule(mxRecorderWorkletPath); | ||
this.recorderWorklet = new AudioWorkletNode(this.recorderContext, WORKLET_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll definitely need some plan to support Safari before this can be enabled by default.
This does two primary things:
There's no specification or MSC for what the
waveform
attribute would contain, so this assumes that "one sample per second" is suitable. This is highly likely to change as a 1 second clip is likely to need a few dozen more samples.Note that this mixes in a couple MSCs to the event format. This is part of an experiment to see how it ends up working out.
Requires element-hq/element-web#17013