-
Notifications
You must be signed in to change notification settings - Fork 371
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
MSC3052: Sample events #3052
MSC3052: Sample events #3052
Conversation
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
"sample_width" : undefined, | ||
"sample_depth" : undefined, | ||
"sample_encoding" : "encoding", | ||
"samples" : "whatever_samples" |
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.
are the samples encoded in some way? base64?
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.
Base64 is just one of the allowed encodings. Base85 or JSON-escaped are also possible.
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.
I think that this proposal is not very useful without also specifying something concrete (including the encoding) that would use it, whether as part of this MSC or as a companion MSC (or MSCs). And while I'm happy to that you're trying to make this mechanism generic, I don't think it will ever make it into the spec without also having a specific thing that uses it.
JSON part is formatted as follows: | ||
|
||
```json | ||
{ |
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.
Presumably you could use relations to chain together samples
"sample_width" : undefined, | ||
"sample_depth" : undefined, | ||
"sample_encoding" : "encoding", | ||
"samples" : "whatever_samples" |
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.
For someone ill informed:
- What's the expected duration of an average base64 encoded samples? (is it practical?)
- Is it realistic to expect a browser application to load and buffer a base64 audio sample seamlessly or will there be stutter in practise?
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.
- 125-150 milliseconds to 10-20 minutes, depending on the average communication latency between the sampler and intended receivers in the room.
- That needs to be tested in practice.
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
@@ -0,0 +1,54 @@ | |||
# MSC3052: Sample events |
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.
I may be missing something obvious here but: what is the use case? Why would you want to do this, rather than (say) streamed file transfer via the media repository, as per #2354?
Trying to tunnel RTP over Matrix events - or indeed any kind of binary data over Matrix, feels like a bad smell: we have a media repository for that.
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.
The designed-for use case is high (but controlled) latency voice calls and IoT with full replayability, down to sample level.
Marked as draft as there are unresolved concerns before having this implementable. |
## Alternatives | ||
|
||
Having signalling on Matrix and actual data separately, which unfortunately means the samples | ||
and the metadata possibly having different latency. |
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 to me an obvious alternative is to store the samples in the media repo rather than base64-encoding them.
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.
Media repository does not allow for conference moderation semantics where you can change the permission to talk midway.
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.
What I mean is: instead of having the samples
field be an encoding of the samples, it would instead be an mxc://
URL pointing to the samples in the media repo, while still using the m.samples
event type.
I'm not saying that I think it should be done that way. But I think that it's an obvious alternative that I would expect to see listed in the "Alternatives" section.
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.
What I mean is: instead of having the samples field be an encoding of the samples, it would instead be an mxc:// URL pointing to the samples in the media repo, while still using the m.samples event type.
I understood that, but it is not an alternative, due to stark difference in timing, persistence and moderation semantics of media repository and room events. Those two cover entirely different use cases.
…erns Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
This is a rudimentary way of streaming sample streams using Matrix.