Skip to content

Commit

Permalink
Add missing info to videoroom "list" response (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamirante authored Apr 15, 2020
1 parent a043669 commit fe0d9f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,15 @@ static json_t *janus_videoroom_process_synchronous_request(janus_videoroom_sessi
json_object_set_new(rl, "rec_dir", json_string(room->rec_dir));
/* TODO: Should we list participants as well? or should there be a separate API call on a specific room for this? */
json_object_set_new(rl, "num_participants", json_integer(g_hash_table_size(room->participants)));
json_object_set_new(rl, "audiolevel_ext", room->audiolevel_ext ? json_true() : json_false());
json_object_set_new(rl, "audiolevel_event", room->audiolevel_event ? json_true() : json_false());
if(room->audiolevel_event) {
json_object_set_new(rl, "audio_active_packets", json_integer(room->audio_active_packets));
json_object_set_new(rl, "audio_level_average", json_integer(room->audio_level_average));
}
json_object_set_new(rl, "videoorient_ext", room->videoorient_ext ? json_true() : json_false());
json_object_set_new(rl, "playoutdelay_ext", room->playoutdelay_ext ? json_true() : json_false());
json_object_set_new(rl, "transport_wide_cc_ext", room->transport_wide_cc_ext ? json_true() : json_false());
json_array_append_new(list, rl);
}
janus_refcount_decrease(&room->ref);
Expand Down

0 comments on commit fe0d9f8

Please sign in to comment.