Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC3246: Audio waveform for extensible events #3246

Open
wants to merge 5 commits into
base: old_master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions proposals/3246-audio-waveform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# MSC3246: Audio waveforms (extensible events)

This is largely a placeholder MSC to describe how audio waveforms/events could work in an extensible
events world.

Proposals like [MSC3245 - Voice messages using extensible events](https://github.com/matrix-org/matrix-doc/pull/3245)
would make best use of this.

## Proposal

A `waveform` property is added to the `m.audio` event definition as an array of numbers to denote
amplitudes for the audio file. The array should have no less than 30 elements and no more than 120.
Clients might have to resample for their use case, and are encouraged to only use the information
as placeholder until the real waveform can be determined.

Due to floats not being allowed in events, the waveform should be rescaled to a range of integers
between zero and 1024, inclusive. This should allow for enough resolution to be maintained for
preview purposes. Values larger/smaller than those should be clamped.

The waveform is optional.

## Potential issues

TBD

## Alternatives

TBD

## Security considerations

TBD

## Unstable prefix

TBD (not currently needed)