- allowed (the current one) will serve it's initial purpose : a token there will allow a user to publish/subscribe.
- allowed_subscribers : the user that provide a token in this list will only be allowed to join the room as a publisher with the 'subscribe_only' flag. WIthout that flag, the user will be rejected.
- allowed_publishers : the user that provide a token in this list will only be allowed to join as a publisher and to publish, but not to subscribe to any feed. I need it in some scenarios where some users are blind. They can join the room, all subscribers will see them but they will not be able to subscribe to any feed.
In basic use cases, you populate the allowed list for publishers, and the allowed_subscribers for subscriber_only publishers. You can use the ACL API to add token in the list you want :
{
"request" : "allowed",
"secret" : "<room secret, mandatory if configured>",
"action" : "enable|disable|add|remove",
"room" : <unique numeric ID of the room to update>,
"allowed" : [
// Array of strings (tokens users might pass in "join", only for add|remove)
],
"allowed_subscribers" : [ // Array of strings (tokens users might pass in "join", only for add|remove) Will only be able to join the room as subscriber_only ],
"allowed_publishers" : [ // Array of strings (tokens users might pass in "join", only for add|remove) Will not be able to subscribe to any feed in the room ]
}
And when you have to join as a subscriber_only, you send a join request like :
{
"request" : "join",
"ptype" : "publisher",
"room" : <unique ID of the room to join>,
"id" : <unique ID to register for the publisher; optional, will be chosen by the plugin if missing>,
"display" : "<display name for the publisher; optional>",
"token" : "<invitation token, in case the room has an ACL; optional>",
"subscriber_only" : "<boolean>"
}
If you don't provide subscriber_only : true, the videoroom keep it's default behavior and will assume that you must be a publisher, and will check the token against allowed or allowed_publishers.