Open keremcadirci opened 2 weeks ago
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 listforwarders
, for instance, you need to know the room secret if configured, while this is not true for participants, and I think announcements are something only admins with access to the secret should have access to.
@lminiero listannouncements
api added
{
"request" : "listannouncements",
"room" : <unique numeric ID of the room>
}
{
"audiobridge" : "announcements",
"room" : <unique numeric ID of the room>,
"announcements" : [ // Array of announcement objects
{ // Announcement #1
"file_id" : "<unique string ID of the announcement>",
"filename": "<path to the Opus file to play>",
"playing" : <true|false, whether or not the file is playing>,
"loop": <true|false, depending on whether or not the file is playing in a loop forever>
}
// Other announcements
]
}
Requirement:
As of today, we need the
file_id
of a playback audio file (announcement) to stop playing. A random admin may not know thefile_id
to stop itProposol
Add a list of
announcements
intolistparticipants
api in that case the response of thelistparticipants
api would be: