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

Add metadata for videoroom publishers #3467

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spscream
Copy link
Contributor

@spscream spscream commented Oct 28, 2024

I want to introduce ability to set metadata for publishers on join.
I added metadata field with json_t and save info to it on join and send it in "joined"/"published" events.

We use it on our branch now to build custom business logic for videoroom, for example we set in metadata now:

  • server_id from which user has connected(we build remote publishers logic for our backends around this field)
  • users ip/network, we use it to build acl for publishers, we have "contours" feature for our publishers, screen sharing of user can be viewed only from users from the same network/contour/group/role as publisher

@danjenkins
Copy link
Contributor

I've used display with stringified json before for exactly this purpose so it would be great to have a proper meta data field

@lminiero
Copy link
Member

It does make sense, yes, but as it is it looks like it's an immutable object. I'd add an option to modify the metadata object in a configure request (and notify the change to other attendees), just as you can edit the display name dynamically.

@lminiero lminiero added the multistream Related to Janus 1.x label Oct 28, 2024
@spscream spscream force-pushed the feature/metadata branch 2 times, most recently from 35f15cf to d3a1a0d Compare November 4, 2024 11:13
@spscream
Copy link
Contributor Author

spscream commented Nov 4, 2024

added ability to update metadata

@spscream spscream force-pushed the feature/metadata branch 2 times, most recently from 5e3bfa0 to 04f5886 Compare November 7, 2024 07:24
@lminiero
Copy link
Member

Thanks for the changes, looks good to me! Once you fix the conflicts, I think this is ready to be merged.

@spscream
Copy link
Contributor Author

@lminiero rebased

@lminiero
Copy link
Member

Thanks! The only thing I'm wondering about, now, is that if you use a configure to update both display and metadata (and maybe something else) you get different notifications for eadh of them, instead of a single event that notifies a change on everything. But that's something I can look into later on, especially considering it may have been an issue before already (e.g., with display and other properties).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants