PageSourceSearch

https://wrc.life/wp-content/plugins/webinar-and-video-conference-w…/blocks/dist/jitsi.js?ver=1788308523

js wrc.life collected 2026-10-05 22:55:55 UTC 13,272 bytes, 364 lines download raw bytes

1jQuery(window).on('elementor/frontend/init', function () {
2  'use strict';
3  elementorFrontend.hooks.addAction(
4    'frontend/element_ready/jitsi_elementor.default',
5    function () {
6      if (jitsi_free.api_select == 'jaas') {
7        if (jitsi_free.jwt) {
8          initJitsiJass('.jitsi-wrapper-elementor');
9        } else {
10          initJitsi('.jitsi-wrapper-elementor');
11        }
12      } else if (jitsi_free.api_select == 'branded') {
13        initJitsiBranded('.jitsi-wrapper-elementor');
14      } else {
15        initJitsi('.jitsi-wrapper-elementor');
16      }
17    }
18  );
19});
20
21
22
23function initJitsi(elem) {
24
25  if (window.location.protocol == 'http:') {
26    jQuery(elem).each(function (index, element) {
27      jQuery(element).html(
28        '<div class="device-status device-status-error" role="alert" tabindex="-1"><div class="jitsi-icon jitsi-icon-default device-icon device-icon--warning"><svg fill="none" height="16" width="16" viewBox="0 0 18 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.233 14.325L9.708.911a.817.817 0 00-1.417 0L.768 14.325a.78.78 0 00-.1.382.8.8 0 00.808.793h15.05a.82.82 0 00.39-.098.785.785 0 00.318-1.077zm-14.39-.41L9 2.937l6.158 10.978H2.842zm5.349-2.378c0-.438.355-.793.792-.793h.032a.793.793 0 110 1.586h-.032a.793.793 0 01-.792-.793zM9 6.781a.808.808 0 00-.808.809v1.554a.808.808 0 001.617 0V7.59A.808.808 0 009 6.782z" fill="#040404"></path></svg></div><span role="heading">For Jitsi Meet to work properly. You need SSL on your site.</span></div>'
29      );
30    });
31    return false;
32  }
33
34  const api = [];
35
36  jQuery(elem).each(function (index, element) {
37    var roomName = 'meeting/' + jQuery(element).data('name'),
38      width = jQuery(element).data('width'),
39      height = jQuery(element).data('height'),
40      muted = jQuery(element).data('mute'),
41      videoMuted = jQuery(element).data('videomute'),
42      screenSharing = jQuery(element).data('screen'),
43      // Free/default mode always uses the server-computed free domain, never the
44      // element's data-domain attribute -- that value can be stale or manually
45      // edited in saved block markup and must not be trusted for the domain the
46      // meeting iframe actually connects to.
47      domain = (typeof jitsi_free !== 'undefined' && jitsi_free.free_domain) || jQuery(element).data('domain');
48
49    let toolbarButtons = [
50      'camera',
51      'chat',
52      'closedcaptions',
53      'download',
54      'embedmeeting',
55      'etherpad',
56      'feedback',
57      'filmstrip',
58      'fullscreen',
59      'hangup',
60      'help',
61      'livestreaming',
62      'microphone',
63      'mute-everyone',
64      'mute-video-everyone',
65      'participants-pane',
66      'profile',
67      'raisehand',
68      'recording',
69      'security',
70      'select-background',
71      'settings',
72      'shareaudio',
73      'sharedvideo',
74      'shortcuts',
75      'stats',
76      'tileview',
77      'toggle-camera',
78      'videoquality',
79      '__end',
80    ];
81
82    Boolean(jQuery(element).data('invite')) && toolbarButtons.push('invite');
83    Boolean(jQuery(element).data('screen')) && toolbarButtons.push('desktop');
84
85    const options = {
86      roomName,
87      width,
88      height,
89      parentNode: element,
90      configOverwrite: {
91        startWithAudioMuted: muted,
92        startWithVideoMuted: videoMuted,
93       // startScreenSharing: screenSharing,
94        enableWelcomePage: false,
95        enableCLosePage: false,
96        toolbarButtons: toolbarButtons,
97      },
98      interfaceConfigOverwrite: {
99        SHOW_CHROME_EXTENSION_BANNER: false,
100        SHOW_PROMOTIONAL_CLOSE_PAGE: false,
101      },
102    };
103
104    var userInfo = jQuery(element).data('userinfo');
105    if (userInfo && userInfo != '') {
106      userInfo = userInfo.split(',');
107      options.userInfo = {
108        displayName: userInfo[0],
109        email: userInfo[1],
110      };
111    }
112
113    api[index] = new JitsiMeetExternalAPI(domain, options);
114    api[index].executeCommand('toggleWhiteboard');
115  });
116}
117
118
119function initJitsiJass(elem) {
120  //Jitsi Call
121  const domain = '8x8.vc';
122  const api = [];
123
124  console.log('[Jitsi Debug] initJitsiJass called. appid=', jitsi_free.appid, 'jwt present=', !!jitsi_free.jwt, 'jwt length=', jitsi_free.jwt ? jitsi_free.jwt.length : 0);
125
126  if (window.location.protocol == 'http:') {
127    jQuery('.jitsi-wrapper').each(function (index, element) {
128      jQuery(element).html(
129        '<div class="device-status device-status-error" role="alert" tabindex="-1"><div class="jitsi-icon jitsi-icon-default device-icon device-icon--warning">
129<svg fill="none" height="16" width="16" viewBox="0 0 18 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.233 14.325L9.708.911a.817.817 0 00-1.417 0L.768 14.325a.78.78 0 00-.1.382.8.8 0 00.808.793h15.05a.82.82 0 00.39-.098.785.785 0 00.318-1.077zm-14.39-.41L9 2.937l6.158 10.978H2.842zm5.349-2.378c0-.438.355-.793.792-.793h.032a.793.793 0 110 1.586h-.032a.793.793 0 01-.792-.793zM9 6.781a.808.808 0 00-.808.809v1.554a.808.808 0 001.617 0V7.59A.808.808 0 009 6.782z" fill="#040404"></path></svg></div><span role="heading">For Jitsi Meet to work properly. You need SSL on your site.</span></div>'
130      );
131    });
132    return false;
133  }
134
135  jQuery(elem).each(function (index, element) {
136    if (!jQuery(element).hasClass('.jitsi-wrapper-rendered')) {
137      if (window.location.protocol == 'http:') {
138        jQuery(element).html(
139          '<div class="device-status device-status-error" role="alert" tabindex="-1"><div class="jitsi-icon jitsi-icon-default device-icon device-icon--warning"><svg fill="none" height="16" width="16" viewB
139ox="0 0 18 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.233 14.325L9.708.911a.817.817 0 00-1.417 0L.768 14.325a.78.78 0 00-.1.382.8.8 0 00.808.793h15.05a.82.82 0 00.39-.098.785.785 0 00.318-1.077zm-14.39-.41L9 2.937l6.158 10.978H2.842zm5.349-2.378c0-.438.355-.793.792-.793h.032a.793.793 0 110 1.586h-.032a.793.793 0 01-.792-.793zM9 6.781a.808.808 0 00-.808.809v1.554a.808.808 0 001.617 0V7.59A.808.808 0 009 6.782z" fill="#040404"></path></svg></div><span role="heading">For Jitsi Meet to work properly. You need SSL on your site.</span></div>'
140        );
141        return false;
142      }
143
144      let toolbarButtons = [
145        'camera',
146        'chat',
147        'closedcaptions',
148        'download',
149        'embedmeeting',
150        'etherpad',
151        'feedback',
152        'filmstrip',
153        'fullscreen',
154        'hangup',
155        'help',
156        'livestreaming',
157        'microphone',
158        'mute-everyone',
159        'mute-video-everyone',
160        'participants-pane',
161        'profile',
162        'raisehand',
163        'recording',
164        'security',
165        'select-background',
166        'settings',
167        'shareaudio',
168        'sharedvideo',
169        'shortcuts',
170        'stats',
171        'tileview',
172        'toggle-camera',
173        'videoquality',
174        '__end',
175      ];
176
177      var roomName = jitsi_free.appid + '/' + jQuery(element).data('name'),
178        width = jQuery(element).data('width'),
179        height = jQuery(element).data('height'),
180        configOverwrite = {
181          startWithAudioMuted: jQuery(element).data('mute'),
182          startWithVideoMuted: jQuery(element).data('videomute'),
183          enableWelcomePage: false,
184          enableCLosePage: false,
185          toolbarButtons: toolbarButtons,
186          prejoinConfig: {
187            enabled:0,
188          },
189        };
190
191      const options = {
192        roomName,
193        width,
194        height,
195        parentNode: element,
196        jwt: jitsi_free.jwt,
197        configOverwrite: configOverwrite,
198        interfaceConfigOverwrite: {
199          SHOW_CHROME_EXTENSION_BANNER: false,
200          SHOW_PROMOTIONAL_CLOSE_PAGE: false,
201          SHOW_POWERED_BY: false,
202          DEFAULT_LOGO_URL: 'https://8x8.vc/current/images/watermark.svg',
203          JITSI_WATERMARK_LINK: 'https://www.8x8.com/',
204          SHOW_BRAND_WATERMARK: true,
205          SHOW_JITSI_WATERMARK: true,
206          BRAND_WATERMARK_LINK: 'https://www.8x8.com/',
207        },
208      };
209
210      var userInfo = jQuery(element).data('userinfo');
211      if (userInfo && userInfo != '') {
212        userInfo = userInfo.split(',');
213        options.userInfo = {
214          displayName: userInfo[0],
215          email: userInfo[1],
216        };
217      }
218
219      console.log('[Jitsi Debug] initJitsiJass creating JitsiMeetExternalAPI. domain=', domain, 'roomName=', roomName, 'jwt present in options=', !!options.jwt);
220
221      api[index] = new JitsiMeetExternalAPI(domain, options);
222      jQuery(element).addClass('jitsi-wrapper-rendered');
223    }
224  });
225}
226
227function initJitsiBranded(elem) {
228  const api = [];
229
230  jQuery(elem).each(function (index, element) {
231    if (!jQuery(element).hasClass('jitsi-wrapper-rendered')) {
232      if (window.location.protocol == 'http:') {
233        jQuery(element).html(
234          '<div class="device-status device-status-error" role="alert" tabindex="-1"><div class="jitsi-icon jitsi-icon-default device-icon device-icon--warning">
234<svg fill="none" height="16" width="16" viewBox="0 0 18 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.233 14.325L9.708.911a.817.817 0 00-1.417 0L.768 14.325a.78.78 0 00-.1.382.8.8 0 00.808.793h15.05a.82.82 0 00.39-.098.785.785 0 00.318-1.077zm-14.39-.41L9 2.937l6.158 10.978H2.842zm5.349-2.378c0-.438.355-.793.792-.793h.032a.793.793 0 110 1.586h-.032a.793.793 0 01-.792-.793zM9 6.781a.808.808 0 00-.808.809v1.554a.808.808 0 001.617 0V7.59A.808.808 0 009 6.782z" fill="#040404"></path></svg></div><span role="heading">For Jitsi Meet to work properly. You need SSL on your site.</span></div>'
235        );
236        return false;
237      }
238
239      let toolbarButtons = [
240        'camera',
241        'chat',
242        'closedcaptions',
243        'download',
244        'embedmeeting',
245        'etherpad',
246        'feedback',
247        'filmstrip',
248        'fullscreen',
249        'hangup',
250        'help',
251        'livestreaming',
252        'microphone',
253        'mute-everyone',
254        'mute-video-everyone',
255        'participants-pane',
256        'profile',
257        'raisehand',
258        'recording',
259        'security',
260        'select-background',
261        'settings',
262        'shareaudio',
263        'sharedvideo',
264        'shortcuts',
265        'stats',
266        'tileview',
267        'toggle-camera',
268        'videoquality',
269        '__end',
270      ];
271
272      Boolean(jQuery(element).data('invite')) && toolbarButtons.push('invite');
273      Boolean(jQuery(element).data('screen')) && toolbarButtons.push('desktop');
274
275      var domain = jitsi_free.custom_domain;
276      
277      // Strip protocol and trailing slashes for Jitsi API compatibility
278      if (domain) {
279        domain = domain.replace(/^https?:\/\//, '').replace(/\/$/, '');
280      }
281
282      var roomName = jQuery(element).data('name'),
283        width = jQuery(element).data('width'),
284        height = jQuery(element).data('height'),
285        muted = jQuery(element).data('mute'),
286        videoMuted = jQuery(element).data('videomute'),
287        configOverwrite = {
288          startWithAudioMuted: muted,
289          startWithVideoMuted: videoMuted,
290          enableWelcomePage: false,
291          enableCLosePage: false,
292          toolbarButtons: toolbarButtons,
293          prejoinConfig: {
294            enabled: 0,
295          },
296        };
297
298      const options = {
299        roomName,
300        width,
301        height,
302        parentNode: element,
303        configOverwrite: configOverwrite,
304        interfaceConfigOverwrite: {
305          SHOW_CHROME_EXTENSION_BANNER: false,
306          SHOW_PROMOTIONAL_CLOSE_PAGE: false,
307          SHOW_POWERED_BY: false,
308          DEFAULT_LOGO_URL: 'https://8x8.vc/current/images/watermark.svg',
309          JITSI_WATERMARK_LINK: 'https://www.8x8.com/',
310          SHOW_BRAND_WATERMARK: true,
311          SHOW_JITSI_WATERMARK: true,
312          BRAND_WATERMARK_LINK: 'https://www.8x8.com/',
313        },
314      };
315
316      var userInfo = jQuery(element).data('userinfo');
317      if (userInfo && userInfo != '') {
318        userInfo = userInfo.split(',');
319        options.userInfo = {
320          displayName: userInfo[0],
321          email: userInfo[1],
322        };
323      }
324
325      // Add JWT token if available
326      var jwtToken = jQuery(element).data('jwt');
327      if (!jwtToken && typeof jitsi_free !== 'undefined' && jitsi_free.jwt) {
328        jwtToken = jitsi_free.jwt;
329      }
330
331      if (jwtToken && jwtToken != '') {
332        options.jwt = jwtToken;
333      }
334
335      console.log('[initJitsiBranded] Creating API with domain:', domain, 'hasJWT:', !!options.jwt);
336
337      api[index] = new JitsiMeetExternalAPI(domain, options);
338      jQuery(element).addClass('jitsi-wrapper-rendered');
339    }
340  });
341}
342
343jQuery(document).ready(function () {
344  'use strict';
345  
346  console.log('[Jitsi Free] Initializing with api_select:', jitsi_free.api_select);
347  
348  if (jitsi_free.api_select == 'jaas') {
349    if (jitsi_free.jwt) {
350      console.log('[Jitsi Free] Using JaaS mode with JWT');
351      initJitsiJass('.jitsi-wrapper');
352    } else {
353      console.log('[Jitsi Free] Using JaaS mode without JWT (fallback to free)');
354      initJitsi('.jitsi-wrapper');
355    }
356  } else if (jitsi_free.api_select == 'branded') {
357    console.log('[Jitsi Free] Using Managed Branded Meeting mode');
358    initJitsiBranded('.jitsi-wrapper');
359  } else {
360    console.log('[Jitsi Free] Using Free mode (default)');
361    initJitsi('.jitsi-wrapper');
362  }
363
364});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.