Skip to content

Commit

Permalink
Add info on moderation to list of publishers, if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Apr 7, 2021
1 parent 702af25 commit e674f1a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ room-<unique room ID>: {
"display" : "<display name of active publisher #1, if any>",
"audio_codec" : "<audio codec used by active publisher #1, if any>",
"video_codec" : "<video codec used by active publisher #1, if any>",
"audio_moderated" : <set to true if audio has been moderated for this participant>,
"video_moderated" : <set to true if video has been moderated for this participant>,
"data_moderated" : <set to true if data has been moderated for this participant>,
"simulcast" : "<true if the publisher uses simulcast (VP8 and H.264 only)>",
"talking" : <true|false, whether the publisher is talking or not (only if audio levels are used)>,
},
Expand Down Expand Up @@ -598,6 +601,9 @@ room-<unique room ID>: {
"display" : "<display name of the new publisher, if any>",
"audio_codec" : "<audio codec used the new publisher, if any>",
"video_codec" : "<video codec used by the new publisher, if any>",
"audio_moderated" : <set to true if audio has been moderated for this participant>,
"video_moderated" : <set to true if video has been moderated for this participant>,
"data_moderated" : <set to true if data has been moderated for this participant>,
"simulcast" : "<true if the publisher uses simulcast (VP8 and H.264 only)>",
"talking" : <true|false, whether the publisher is talking or not (only if audio levels are used)>,
}
Expand Down Expand Up @@ -5098,6 +5104,12 @@ void janus_videoroom_setup_media(janus_plugin_session *handle) {
json_object_set_new(pl, "audio_codec", json_string(janus_audiocodec_name(participant->acodec)));
if(participant->video)
json_object_set_new(pl, "video_codec", json_string(janus_videocodec_name(participant->vcodec)));
if(participant->audio_muted)
json_object_set_new(pl, "audio_moderated", json_true());
if(participant->video_muted)
json_object_set_new(pl, "video_moderated", json_true());
if(participant->data_muted)
json_object_set_new(pl, "data_moderated", json_true());
if(participant->ssrc[0] || participant->rid[0])
json_object_set_new(pl, "simulcast", json_true());
if(participant->audio_level_extmap_id > 0)
Expand Down Expand Up @@ -6258,6 +6270,12 @@ static void *janus_videoroom_handler(void *data) {
json_object_set_new(pl, "audio_codec", json_string(janus_audiocodec_name(p->acodec)));
if(p->video)
json_object_set_new(pl, "video_codec", json_string(janus_videocodec_name(p->vcodec)));
if(p->audio_muted)
json_object_set_new(pl, "audio_moderated", json_true());
if(p->video_muted)
json_object_set_new(pl, "video_moderated", json_true());
if(p->data_muted)
json_object_set_new(pl, "data_moderated", json_true());
if(p->ssrc[0] || p->rid[0])
json_object_set_new(pl, "simulcast", json_true());
if(p->audio_level_extmap_id > 0)
Expand Down

0 comments on commit e674f1a

Please sign in to comment.