Conversation
|
Adding sub-types to rooms makes feature support combinatorially complex. Clients now have to handle text, audio, and text+audio rooms, which require different design decisions (and existing clients will only support text-only rooms). This wouldn't be a problem if it was only text and audio, but text+audio means that there will be missing context for clients that only do text. Still, I don't see how we can avoid this, people are going to want to pair audio and text sometimes and not others, and the only way to keep implementations clean would be to have a different kind for every combination. One other modification would be to put the token endpoint in the |
|
I think we should say something about publishing kind 30311 live activity and 10312 room presence events from NIP-53 with appropriate |
A different kind of what, may I ask? Everything is already a pool of infinite complexity as it is. There are already a dozen different tags in the group announcement event that are probably not fully implemented in all clients. This is just a small cosmetic change. It is just a small cosmetic change. |
|
I was thinking of a different group kind. 39000, 3900x, 3900y, etc., with all the companion kinds. Madness, really. |
These kinds are vastly underspecified, so adding them helps nothing. They don't even say what you have to do with the URL. It's a non-spec. We would have to create another event kind anyway. Can we just publish a kind defining the existence of an AV space in the group? Yes, but then who owns that space? The person who published the event. Now we have multiple owners creating rooms inside the same group. It's a complete nightmare. I guess it's ok to have a one-off event for an ephemeral space, but that should be a different spec from permanent group-like spaces. I'm trying to come up with the simplest leanest possible standard here, and that means the most specific and restrict too.
I don't see any use case that justifies having this unnecessary flexibility that just makes implementations more cumbersome. The relay already keeps track of who belongs in each group, there is nothing a "community management bot" can add to the equation. Remember that this is for NIP-29. If we were talking about some other non-NIP-29 scenario then yes, it could have another shape. |
It's just adding one more opt-in kind (AV) that has huge demand, this should've been in NIP-29 from the start imo. Better late than never. Clients can choose to ignore the
Yeah, I prefer a self-contained spec. NIP-29 clients shouldn't have to worry about a whole other NIP just to support AV.
The relay is already the authority and audio rooms are scoped to a group, they are inherently coupled. My two sats. I like this proposal. |
|
ACK. This change is the first time I read some NIP-29 change and understood what I should do. |
|
Implemented this in fiatjaf/pyramid@4ac5418. I still have to come up with a way to try it. |
I'll implement it in Chachi, is your pyramid instance already running this code? |
|
Also I'm working on adding this to zooid + flotilla today. Keen to test compatibility when I'm done. |
Yes. I'll try to test it soon so you don't have to hit too many bugs, but I'm feeling somewhat sick today.
I've added this. Thank you for pointing out. Maybe in the future we should say something about the other JWT properties the LiveKit server understands. I haven't paid much attention to them yet.
Oops, I hadn't read this. Do you really think this? The presence event feels much more cumbersome to me, adds a lot of room for errors and flakiness, like clients failing to publish, publishing but not joining, or failing to delete these events, or adding extra requirements to relays for accepting and expiring these events (or storing the deletion requests forever unnecessarily), very error-prone. And since we're already trusting a LiveKit server entirely I think it can handle this. On the other hand I don't like polling either. I think it could be less bad if it was a |
The replaceable event (I think that's what you are suggesting) does seem more reliable (setting aside all the existing issues with replaceable events). Alternatively we could say that you must include an expiration tag on the presence event, and even the delete request associated with it. Or that all presence events should only be treated as valid for up to an hour and then deleted. In any case these things should not leave any trace on the relay long term. |
|
Another thing I think we might need is an endpoint for checking whether the relay has livekit configured or not. I'm using this to decide when to show the user voice room creation options. I tried hitting I propose something like "If the relay receives a request with no groupId (GET |
|
Putting the token url in the group event tags would fix detection, and probing wouldn't even be necessary |
|
Since the group create/edit event and the 39000 are separate, the relay can inject the token url into the livekit tag, or the admin can set it manually if he prefers. As far as classifying room type, it's probably fine to do that on edit rather than create. It need not even be immutable. |
Makes sense. |
|
ACK. I support this. |
|
@mplorentz the solution to all the problems of knowing who is online just came to my mind in a dream: let's just have the relay publish an event kind 39006 saying who is currently online in the group -- and keep that updated as the list of online participants change. Would that work? |
sounds good to me, we probably don't need granular join/leave events for the room. |
|
One thing I noticed while joining the same room with the same pubkey from different clients is that, as soon as I join in the second client, i am "kicked out" of the room in the first. It's not uncommon to join the same av room from two different devices (mobile/desktop), is this behaviour some limitation of LiveKit or intentional? I have a suspicion that since we are identifying clients by pubkey only one client with the same pubkey is allowed to be in the room at a time but I might be wrong. cc @fiatjaf |
I think this sounds ok. Does the relay need to "join" the call to see the list of subscribers? |
I don't know the answer to the question, but we could solve this by generating a random device ID. |
|
We're running into some interesting design challenges with the no-text/livekit stuff. I think we should remove |
If we're going to have the relay publish the list of participants instead of clients reading that from the LiveKit server directly then we can get rid of the jwt-identify=pubkey clause, right? Then this is solved.
I think this is good, yes. The |
Sounds good, so the p-tag in the list has the key(s) the user is connected from? We'll need that to show who is who in the call.
I like where this is going, but it's probably worth opening a separate PR/discussion to flesh it out. @staab wanna take a staab at it? 🥁 |
|
Please take a look at the last two commits. Just fleshing these two things out. Very simple changes. I'll try to implement |
|
I think the |
|
It looks like you can set arbitrary keys and values on a livekit participant at JWT time and these values are available on the Participant further down the line (like in the active speaker callback) although I haven't tested it yet. Maybe the best thing to do is set |
Good point. Let's go back to having the pubkey at the |
|
@Anderson-Juhasc have you seen this? |
|
I don't get why you guys are not just targeting NIP-53 events at Communities with an h-tag. |
NIP-53 works fine for public broadcast type events but group av rooms have different semantics. NIP-29 has a robust, clear access control policy enforced by the relay, NIP-53 is vague about this. These are a few reasons why I don't think NIP-53 fits here:
I think this approach is pragmatic and solves what we need: opt-in av rooms with relay access control + participant lists. That's it. We don't need all the bells and whistles and generic things NIP-53 provides.
What is better about using NIP-53 here? It makes the implementation way more complicated that it needs to be in my view. |
|
It looks like we need to include the full livekit identity string in the kind 39004. Otherwise it's overly complicated to handle the I think the 39004 tags should change from: to: And we can note (again) that the first 64 chars of |
That's an implementation detail, right? I don't think it's useful for clients, it's only useful for the relay to keep track of things, so I don't think we should standardize it for now. I'd say you could do that on your implementation (and I'll have to fix mine too, thank you), but others might not care, and clients should only look at the pubkey, not at the identity. (Also whenever you get a webhook you could query the LiveKit server for the full list of online participants and recreate the |
|
Yes I suppose it is an implementation detail. And I think you are right that querying livekit for the full list on every webhook is safer. Let's do that. |
This adjusts our implementation of the Livekit presence event to match the NIP (nostr-protocol/nips#2238 (comment)). Specifically we now expect the user's Nostr pubkey in the `participant` tag instead of the livekit identity string. I also fixed a bug I found where a malformed `participant` tag would crash the rendering of VoiceWidget, causing it to appear frozen. There is a corresponding zooid PR [here](coracle-social/zooid#11) Co-authored-by: mplorentz <mplorentz@noreply.gitea.coracle.social> Reviewed-on: https://gitea.coracle.social/coracle/flotilla/pulls/101 Co-authored-by: Matt Lorentz <mplorentz@noreply.coracle.social> Co-committed-by: Matt Lorentz <mplorentz@noreply.coracle.social>


No description provided.