-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
AudioBridge-List_Announcements #3391
base: master
Are you sure you want to change the base?
AudioBridge-List_Announcements #3391
Conversation
While this is an interesting requirement, I wouldn't add this to the list of participants. It's true that we highjacked the participants structure for announcements, but they are not really participants. I'd much rather see a new "listannouncements" request or something like this, pretty much as we do for forwarders. This would allow us to differentiate announcements, and also protect them separately: to do a |
@lminiero
|
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.
Thanks! Added some notes inline.
src/plugins/janus_audiobridge.c
Outdated
* to be recreated (which might be needed if the audio for generated by | ||
* the participant becomes garbled); \c rtp_forward allows you to forward | ||
* the participants of a specific room and their details; \c listannouncements | ||
* list all playing announcements of a specific room and their details; |
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.
lists (missing s)
\verbatim | ||
{ | ||
"request" : "listannouncements", | ||
"room" : <unique numeric ID of the room> |
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.
As discussed in my previous comments, I think this should be protected by the room's secret. Only admins should be allowed to see which announcements exist in the room, since a secret is required to play them in the first place.
goto prepare_response; | ||
} | ||
janus_refcount_increase(&audiobridge->ref); | ||
/* Return a list of all announcements */ |
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.
This is missing the secret check, as discussed in my previous comment. You can refer to how other requests handle it to see how it can be done in a short snippet. Besides, you're also missing a check on whether the audiobridge instance has already been marked as destroyed, which must happen before increasing the reference.
Requirement:
As of today, we need the
file_id
of a playback audio file (announcement) to stop playing.A random admin may not know the
file_id
to stop itProposol
Add a list of
announcements
intolistparticipants
apiin that case the response of the
listparticipants
api would be: