From 2403b415292bd7778225e3be3e623576a7773fd1 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 4 Dec 2025 19:57:35 -0500 Subject: [PATCH] More work on Jitsi for IDAA --- static/idaa_novi_iframe_jitsi_meeting.html | 7 ++++++- static/jitsi_iframe_api.html | 22 +++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/static/idaa_novi_iframe_jitsi_meeting.html b/static/idaa_novi_iframe_jitsi_meeting.html index 439df2a9..ec7ea5c5 100644 --- a/static/idaa_novi_iframe_jitsi_meeting.html +++ b/static/idaa_novi_iframe_jitsi_meeting.html @@ -34,6 +34,11 @@ let reaction_sound = true; let raise_hand_sound = true; + // Moderator settings, unchecked (false) by default. + let start_muted = false; // "Everyone starts muted" + let start_hidden = true; // "Everyone starts hidden" + let reactions_muted = true; // "Mute reaction sounds for everyone" + let idaa_osit_site_key = '8VTOJ0X5hvT6JdiTJsGEzQ'; // 'restricted-access' // let idaa_ae_api_root_url = 'https://sk-idaa.oneskyit.com/idaa/jitsi_meet'; let idaa_ae_api_root_url = @@ -78,7 +83,7 @@ ); idaa_ae_iframe_element.src = - `${idaa_ae_api_root_url}?uuid=${novi_customer_uid}&email=${novi_current_user_obj.Email}&full_name=${full_name}&moderator=${is_moderator}&room=${room_name}&iframe=true&key=${idaa_osit_site_key}&incoming_msg_sound=${incoming_msg_sound}&participant_joined_sound=${participant_joined_sound}&participant_left_sound=${participant_left_sound}&reaction_sound=${reaction_sound}&raise_hand_sound=${raise_hand_sound}` + `${idaa_ae_api_root_url}?uuid=${novi_customer_uid}&email=${novi_current_user_obj.Email}&full_name=${full_name}&moderator=${is_moderator}&room=${room_name}&iframe=true&key=${idaa_osit_site_key}&incoming_msg_sound=${incoming_msg_sound}&participant_joined_sound=${participant_joined_sound}&participant_left_sound=${participant_left_sound}&reaction_sound=${reaction_sound}&raise_hand_sound=${raise_hand_sound}&start_muted=${start_muted}&start_hidden=${start_hidden}&reactions_muted=${reactions_muted}` ; // url.searchParams.delete('event_id'); diff --git a/static/jitsi_iframe_api.html b/static/jitsi_iframe_api.html index 6984f57d..dbfe5383 100644 --- a/static/jitsi_iframe_api.html +++ b/static/jitsi_iframe_api.html @@ -111,6 +111,11 @@ let email = user_email ?? 'test+unknown@oneskyit.com'; // Replace spaces with plus symbol in email addresses email = email.replace(/\s+/g, '+'); + + // Get moderator settings from URL parameters + let start_muted_param = url_params.get('start_muted') === 'true'; + let start_hidden_param = url_params.get('start_hidden') === 'true'; + let reactions_muted_param = url_params.get('reactions_muted') === 'true'; // let is_moderator = user_moderator === 'true' || user_moderator === true ? true : false; // 1. Function to fetch the JWT from your backend @@ -141,11 +146,11 @@ // email: 'test@example.com', // moderator: true - id: room_name + '_' + (is_moderator ? 'mod' : 'user') + '_' + Math.floor(Math.random() * 10000), + id: novi_user_id, name: display_name, // avatar: 'https://example.com/avatar.png', // Not used at this time email: email, - moderator: true + moderator: is_moderator }, // 'features': For enabling/disabling major Jitsi tools @@ -158,10 +163,10 @@ // 'settings': For moderator default checkboxes in the settings panel settings: { - startMuted: true, // Corresponds to "Everyone starts muted" - startHidden: true, // Corresponds to "Everyone starts hidden" + startMuted: start_muted_param, // Corresponds to "Everyone starts muted" + startHidden: start_hidden_param, // Corresponds to "Everyone starts hidden" // followMe: false, // Corresponds to "Everyone follows me" - reactionsMuted: true, // Corresponds to "Mute reaction sounds for everyone" + reactionsMuted: reactions_muted_param, // Corresponds to "Mute reaction sounds for everyone" }, // *END* 'context' @@ -225,6 +230,8 @@ startWithVideoMuted: true, // Mutes the local user upon joining enableLobby: is_moderator, + disableReactionsModeration: false, // This hides the "Mute reaction sounds for everyone" option even from moderators. Does it actually disables reactions as well??? + // OMG THESE disabledSounds ACTUALLY WORK!!!! // Use the disableSounds array to disable per browser session instance. This should be configurable though. The JWT payload (above in getJitsiJwt()) does not seem to support it? @@ -254,6 +261,11 @@ //], disabledSounds: disabled_sounds.filter(sound => sound), // Remove any null/undefined entries + + // disabledNotifications: [ + // 'notify.chatMessages', // shown when receiving chat messages while the chat window is closed + // 'notify.grantedTo', // shown when moderator rights were granted to a participant + // ] }, interfaceConfigOverwrite: {