diff --git a/src/mod/applications/mod_conference/conference_api.c b/src/mod/applications/mod_conference/conference_api.c index 0ca6b08de0..1e4d536dce 100644 --- a/src/mod/applications/mod_conference/conference_api.c +++ b/src/mod/applications/mod_conference/conference_api.c @@ -2306,7 +2306,7 @@ switch_status_t conference_api_sub_floor(conference_member_t *member, switch_str if (member == NULL) return SWITCH_STATUS_GENERR; - if (conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER)) { + if (conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER) && !conference_utils_test_flag(member->conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) { if (stream != NULL) { stream->write_function(stream, "-ERR cannot set floor on a member in an active video role\n"); } diff --git a/src/mod/applications/mod_conference/conference_member.c b/src/mod/applications/mod_conference/conference_member.c index d72fcf5153..152dfb8aa5 100644 --- a/src/mod/applications/mod_conference/conference_member.c +++ b/src/mod/applications/mod_conference/conference_member.c @@ -1081,7 +1081,7 @@ void conference_member_set_floor_holder(conference_obj_t *conference, conference member = lmember = conference_member_get(conference, id); } - if (member && conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER)) { + if (member && conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER) && !conference_utils_test_flag(conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) { goto end; } diff --git a/src/mod/applications/mod_conference/conference_utils.c b/src/mod/applications/mod_conference/conference_utils.c index c1932ead74..22de5ce6c3 100644 --- a/src/mod/applications/mod_conference/conference_utils.c +++ b/src/mod/applications/mod_conference/conference_utils.c @@ -214,6 +214,8 @@ void conference_utils_set_cflags(const char *flags, conference_flag_t *f) f[CFLAG_MANAGE_INBOUND_VIDEO_BITRATE] = 1; } else if (!strcasecmp(argv[i], "video-muxing-personal-canvas")) { f[CFLAG_PERSONAL_CANVAS] = 1; + } else if (!strcasecmp(argv[i], "ded-vid-layer-audio-floor")) { + f[CFLAG_DED_VID_LAYER_AUDIO_FLOOR] = 1; } } diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 6efb7c72df..1218020567 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -312,7 +312,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob //(!conference_utils_test_flag(conference, CFLAG_VID_FLOOR) || switch_channel_test_flag(channel, CF_VIDEO))) { - if (!conference_utils_member_test_flag(imember, MFLAG_DED_VID_LAYER)) { + if (!conference_utils_member_test_flag(imember, MFLAG_DED_VID_LAYER) || conference_utils_test_flag(conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) { conference_member_set_floor_holder(conference, imember, 0); floor_holder = conference->floor_holder; } diff --git a/src/mod/applications/mod_conference/mod_conference.h b/src/mod/applications/mod_conference/mod_conference.h index a11015321e..bb887536e1 100644 --- a/src/mod/applications/mod_conference/mod_conference.h +++ b/src/mod/applications/mod_conference/mod_conference.h @@ -261,6 +261,7 @@ typedef enum { CFLAG_REFRESH_LAYOUT, CFLAG_VIDEO_MUTE_EXIT_CANVAS, CFLAG_NO_MOH, + CFLAG_DED_VID_LAYER_AUDIO_FLOOR, ///////////////////////////////// CFLAG_MAX } conference_flag_t;