@snapcall/stream-ui 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,11 @@ import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster,
4
4
  import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
5
5
  import {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback} from "react";
6
6
  import "inobounce";
7
+ import {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
7
8
  import {v4 as $3Sbms$v4} from "uuid";
8
9
  import {WebSocketTransport as $3Sbms$WebSocketTransport, Peer as $3Sbms$Peer} from "protoo-client";
9
10
  import {Device as $3Sbms$Device} from "mediasoup-client";
10
11
  import {setTag as $3Sbms$setTag, addBreadcrumb as $3Sbms$addBreadcrumb, captureException as $3Sbms$captureException} from "@sentry/browser";
11
- import {getParser as $3Sbms$getParser} from "bowser";
12
12
  import {toCanvas as $3Sbms$toCanvas} from "qrcode";
13
13
 
14
14
 
@@ -43,6 +43,7 @@ const $b24a50393389544f$export$42a852a2b6b56249 = (0, $3Sbms$styledcomponents).d
43
43
  flex-direction: row;
44
44
  align-items: center;
45
45
  width: ${(props)=>props.width};
46
+ max-width: 100%;
46
47
  padding-top: 10px;
47
48
  padding-right: ${(props)=>props.hasButton ? 15 : 20}px;
48
49
  padding-bottom: 10px;
@@ -55,6 +56,7 @@ const $b24a50393389544f$export$42a852a2b6b56249 = (0, $3Sbms$styledcomponents).d
55
56
  `;
56
57
  const $b24a50393389544f$export$8f314e512d92575f = (0, $3Sbms$styledcomponents).div`
57
58
  display: flex;
59
+ overflow: hidden;
58
60
 
59
61
  svg,
60
62
  img {
@@ -94,8 +96,8 @@ const $b24a50393389544f$export$c16180567ca88cd7 = (0, $3Sbms$styledcomponents).p
94
96
  const $b24a50393389544f$export$353f5b6fc5456de1 = (0, $3Sbms$styledcomponents).button`
95
97
  display: flex;
96
98
  color: #fff;
97
- background-color: #242324;
98
- border: 2px solid #242324;
99
+ background-color: #2d2d2d;
100
+ border: 2px solid #343434;
99
101
  border-radius: 50px;
100
102
  padding: 4px 10px 6px;
101
103
  font-weight: 700;
@@ -104,7 +106,7 @@ const $b24a50393389544f$export$353f5b6fc5456de1 = (0, $3Sbms$styledcomponents).b
104
106
  box-sizing: border-box;
105
107
 
106
108
  &:hover {
107
- border: 2px solid #8d8d8d;
109
+ border: 2px solid #8d8d8d !important;
108
110
  }
109
111
  `;
110
112
  const $b24a50393389544f$export$caedbd4804e2ac32 = (0, $3Sbms$styledcomponents).div`
@@ -138,17 +140,17 @@ const $b24a50393389544f$export$ccff7fe96c96c97 = (0, $3Sbms$styledcomponents).sp
138
140
  `;
139
141
  const $b24a50393389544f$export$eed52d0855891930 = (0, $3Sbms$styledcomponents).div`
140
142
  display: flex;
141
- min-width: 13px;
142
- min-height: 13px;
143
- max-height: 13px;
144
- max-width: 13px;
143
+ min-width: 14px;
144
+ min-height: 14px;
145
+ max-height: 14px;
146
+ max-width: 14px;
145
147
  margin-right: 5px;
146
148
  overflow: hidden;
147
149
 
148
150
  img,
149
151
  svg {
150
- width: 13px;
151
- height: 13px;
152
+ width: 14px;
153
+ height: 14px;
152
154
  border-radius: 50px;
153
155
  box-sizing: border-box;
154
156
  object-fit: cover;
@@ -156,6 +158,18 @@ const $b24a50393389544f$export$eed52d0855891930 = (0, $3Sbms$styledcomponents).d
156
158
  `;
157
159
 
158
160
 
161
+ const $6d331dd378347945$export$5640675ad9afe3e2 = (event)=>{
162
+ event.currentTarget.onerror = null;
163
+ const imageContainer = event.currentTarget?.parentElement;
164
+ const notificationContainer = imageContainer?.parentElement;
165
+ if (notificationContainer) notificationContainer.style.paddingLeft = "20px";
166
+ imageContainer?.remove();
167
+ };
168
+ const $6d331dd378347945$export$d8de94b16800bb18 = (event)=>{
169
+ event.currentTarget.onerror = null;
170
+ const imageContainer = event.currentTarget?.parentElement;
171
+ imageContainer?.remove();
172
+ };
159
173
  const $6d331dd378347945$export$14834abbfce3b8cd = ({ children: children , options: options = {} })=>{
160
174
  const width = options.width || "auto";
161
175
  const backgroundColor = options.backgroundColor || "rgba(45, 45, 45, 0.75)";
@@ -168,7 +182,8 @@ const $6d331dd378347945$export$14834abbfce3b8cd = ({ children: children , option
168
182
  options.icon && (typeof options.icon === "string" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b24a50393389544f$export$8f314e512d92575f), {
169
183
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
170
184
  alt: "Icon",
171
- src: options.icon
185
+ src: options.icon,
186
+ onError: $6d331dd378347945$export$5640675ad9afe3e2
172
187
  })
173
188
  }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b24a50393389544f$export$8f314e512d92575f), {
174
189
  children: options.icon
@@ -207,12 +222,14 @@ const $6d331dd378347945$export$14834abbfce3b8cd = ({ children: children , option
207
222
  ]
208
223
  }),
209
224
  options.button && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $b24a50393389544f$export$353f5b6fc5456de1), {
225
+ style: options.button.style,
210
226
  onClick: options.button.action,
211
227
  children: [
212
228
  options.button.icon && (typeof options.button.icon === "string" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b24a50393389544f$export$caedbd4804e2ac32), {
213
229
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
214
230
  alt: "Button icon",
215
- src: options.button.icon
231
+ src: options.button.icon,
232
+ onError: $6d331dd378347945$export$d8de94b16800bb18
216
233
  })
217
234
  }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b24a50393389544f$export$caedbd4804e2ac32), {
218
235
  children: options.button.icon
@@ -290,6 +307,7 @@ const $a5146f9062d7bf28$export$3a57e165650c636f = (message, options = {})=>{
290
307
 
291
308
 
292
309
 
310
+
293
311
  const $67e45b2e30dcc030$var$audioContextConstructor = window.AudioContext || window.webkitAudioContext;
294
312
  const $67e45b2e30dcc030$var$AUDIO_MUTE_DETECTION_TIME = 2000;
295
313
  const $67e45b2e30dcc030$var$SPEAK_DETECTION_TIME = 500;
@@ -384,8 +402,14 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
384
402
  this.stream.getTracks().forEach((track)=>{
385
403
  this.stream.removeTrack(track);
386
404
  });
387
- this.audioStreamSource.disconnect(this.analyser);
388
- this.audioContext.close();
405
+ try {
406
+ this.audioStreamSource.disconnect(this.analyser);
407
+ } catch (err1) {
408
+ console.error("audioStreamSource failed to disconnect", err1);
409
+ }
410
+ this.audioContext.close().catch((err)=>{
411
+ console.error("audioContext failed to close", err);
412
+ });
389
413
  this.audioLevels = [];
390
414
  }
391
415
  static isAPIAvailable() {
@@ -394,43 +418,77 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
394
418
  }
395
419
 
396
420
 
421
+ class $82e31ca38889c079$var$AudioRenderer {
422
+ constructor({ consumerId: consumerId }){
423
+ this.consumerId = consumerId;
424
+ this.audio = new Audio();
425
+ this.audio.id = consumerId;
426
+ this.audio.autoplay = true;
427
+ document.body.appendChild(this.audio);
428
+ }
429
+ destroy() {
430
+ this.audio.pause();
431
+ this.audio.srcObject = null;
432
+ document.body.removeChild(this.audio);
433
+ }
434
+ setSource(srcObject) {
435
+ this.audio.srcObject = srcObject;
436
+ }
437
+ async setSink(sinkId) {
438
+ await this.audio.setSinkId?.(sinkId);
439
+ }
440
+ async play() {
441
+ await this.audio.play().catch((err)=>{
442
+ console.warn("failed to play");
443
+ setTimeout(()=>{
444
+ this.play();
445
+ }, 1000);
446
+ });
447
+ }
448
+ }
449
+ var $82e31ca38889c079$export$2e2bcd8739ae039 = $82e31ca38889c079$var$AudioRenderer;
450
+
451
+
397
452
 
398
- const $c238d62666faeac8$export$674c90a250a8b2c5 = (video)=>{
453
+ const $850842193b726422$export$218be676a714a9df = '<svg width="103" height="36" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".8" fill="#fff"><path d="M10.994 33.06c.903 0 1.658-.734 1.392-1.581a5.249 5.249 0 0 0-1.279-2.124 5.171 5.171 0 0 0-3.673-1.535 5.171 5.171 0 0 0-3.673 1.535c-.595.6-1.03 1.33-1.28 2.124-.265.847.49 1.582 1.393 1.582h7.12ZM10.65 16.2c-.902 0-1.658.735-1.392 1.582.25.794.685 1.524 1.28 2.124a5.171 5.171 0 0 0 3.672 1.535 5.172 5.172 0 0 0 3.674-1.535 5.25 5.25 0 0 0 1.279-2.124c.266-.847-.49-1.582-1.393-1.582h-7.12ZM14.21 31.455c0 .887.75 1.63 1.606 1.35a5.187 5.187 0 0 0 2.067-1.279 5.264 5.264 0 0 0 1.521-3.706c0-1.39-.547-2.723-1.52-3.705a5.187 5.187 0 0 0-2.068-1.278c-.856-.281-1.606.462-1.606 1.349v7.27ZM7.434 17.806c0-.887-.75-1.63-1.607-1.35a5.186 5.186 0 0 0-2.066 1.279 5.264 5.264 0 0 0-1.522 3.706c0 1.39.548 2.723 1.522 3.705a5.186 5.186 0 0 0 2.066 1.278c.857.281 1.607-.462 1.607-1.349v-7.27Z"/><path d="M32.965 31.098c-1.442 0-2.601-.227-3.478-.68-.865-.465-1.517-1.043-1.955-1.734a.416.416 0 0 1-.052-.187c0-.125.057-.227.173-.306l.986-.731a.286.286 0 0 1 .208-.085c.103 0 .201.062.294.187.773 1.224 2.07 1.836 3.893 1.836.796 0 1.471-.142 2.025-.425.565-.284.848-.737.848-1.36 0-.465-.161-.827-.485-1.088-.311-.26-.796-.493-1.453-.697-.6-.181-.975-.289-1.125-.323-.992-.283-1.707-.504-2.146-.663-1.107-.408-1.84-.878-2.198-1.41-.357-.534-.536-1.089-.536-1.667 0-.476.15-.986.45-1.53.311-.555.796-1.025 1.453-1.41.67-.397 1.506-.595 2.51-.595 1.05 0 1.932.13 2.647.39.716.25 1.396.67 2.042 1.258.081.08.121.159.121.238 0 .114-.057.204-.173.272l-1.107.731a.469.469 0 0 1-.225.085c-.104 0-.202-.05-.294-.153-.692-.725-1.644-1.088-2.856-1.088-.692 0-1.228.102-1.609.306-.37.204-.617.431-.744.68-.115.25-.173.47-.173.663 0 .408.162.737.485.986.323.25.801.476 1.436.68.058.023.502.153 1.332.391.52.136 1.056.29 1.61.46 1.21.396 2.019.9 2.422 1.512.416.612.623 1.201.623 1.768 0 .612-.15 1.196-.45 1.75-.288.556-.801 1.02-1.54 1.395-.727.362-1.713.544-2.959.544ZM44.114 21.766c.865 0 1.667.249 2.405.748.739.487 1.108 1.388 1.108 2.702v5.321a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085H46.14a.423.423 0 0 1-.277-.085.407.407 0 0 1-.087-.272v-5.032c-.035-.646-.22-1.155-.554-1.53-.323-.373-.744-.56-1.263-.56-.37 0-.738.102-1.107.306-.358.192-.664.492-.918.9-.253.397-.403.896-.45 1.496v4.42a.365.365 0 0 1-.103.272c-.058.057-.145.085-.26.085h-1.125a.423.423 0 0 1-.276-.085.407.407 0 0 1-.087-.272v-8.193c0-.114.029-.199.087-.255a.378.378 0 0 1 .276-.102h1.125c.116 0 .202.034.26.102.069.056.103.141.103.255v.204c0 .079.012.141.035.187a.168.168 0 0 0 .121.05c.092 0 .214-.062.364-.186a4.02 4.02 0 0 1 1.038-.612c.38-.148.738-.221 1.073-.221ZM57.436 28.207c.023.34.081.607.173.8.093.18.289.322.589.424.184.068.277.165.277.29a.396.396 0 0 1-.052.17l-.485.951c-.092.204-.242.278-.45.221-.669-.147-1.13-.47-1.384-.969-.058-.124-.115-.187-.173-.187-.058 0-.121.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.056-1.02-.207-.408-.311-.799-.311-1.173 0-.612.19-1.161.571-1.648.392-.488.975-.828 1.748-1.02.53-.125 1.269-.221 2.215-.29.646-.045 1.113-.09 1.401-.135.231-.034.335-.17.312-.408-.058-.51-.23-.918-.52-1.224-.276-.318-.743-.476-1.4-.476-.428 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.104.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288 0-.034.011-.085.034-.153a3.292 3.292 0 0 1 1.367-1.564c.635-.397 1.46-.595 2.475-.595.992 0 1.834.255 2.526.765.693.498 1.062 1.224 1.108 2.176.011.453.017 1.06.017 1.819.012.759.017 1.308.017 1.648Zm-4.326 1.445c.312 0 .652-.073 1.021-.22.38-.148.715-.403 1.004-.766.3-.374.484-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.162-.09-.277-.067l-.675.067c-.75.069-1.361.148-1.834.238-.462.08-.86.227-1.194.442a.984.984 0 0 0-.485.884c0 .465.208.782.623.952.416.17.871.255 1.367.255ZM64.486 21.766c1.107 0 1.967.26 2.578.782.611.51 1.027 1.116 1.246 1.819a6.83 6.83 0 0 1 .329 2.073c0 .692-.11 1.389-.329 2.091-.22.692-.635 1.298-1.246 1.82-.611.509-1.47.764-2.578.764-.9 0-1.65-.238-2.25-.714-.08-.08-.161-.119-.242-.119-.116 0-.173.096-.173.29v3.569c0 .113-.035.198-.104.255-.058.068-.144.102-.26.102H60.42a.378.378 0 0 1-.277-.102c-.058-.057-.086-.142-.086-.255V22.344c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.038c.116 0 .202.034.26.102.069.056.104.141.104.255 0 .09.011.164.034.22.035.046.075.069.122.069.057 0 .109-.023.155-.068.612-.533 1.396-.8 2.354-.8Zm-.173 7.785c.888 0 1.54-.3 1.955-.9.427-.601.64-1.338.64-2.21 0-.873-.213-1.61-.64-2.21-.415-.601-1.067-.902-1.955-.902-.877 0-1.518.3-1.921.901-.393.59-.589 1.326-.589 2.21 0 .884.197 1.627.589 2.227.403.59 1.044.884 1.92.884ZM76.268 31.097c-1.316 0-2.452-.277-3.41-.833a5.531 5.531 0 0 1-2.163-2.277c-.484-.975-.726-2.08-.726-3.315 0-1.236.242-2.335.727-3.298a5.507 5.507 0 0 1 2.163-2.295c.957-.555 2.094-.833 3.409-.833 1.246 0 2.324.25 3.236.748a5.437 5.437 0 0 1 2.163 2.09c.034.069.052.131.052.188 0 .125-.087.215-.26.272l-1.298.323a.39.39 0 0 1-.12.017c-.151 0-.266-.074-.347-.221-.715-1.156-1.857-1.734-3.426-1.734-.97 0-1.771.221-2.406.663a3.907 3.907 0 0 0-1.401 1.75c-.3.715-.45 1.491-.45 2.33 0 .838.15 1.615.45 2.329.3.713.767 1.291 1.401 1.733.635.442 1.437.663 2.406.663.911 0 1.701-.21 2.37-.628.681-.42 1.165-1.06 1.454-1.921.08-.216.225-.306.433-.272l1.315.17c.196.034.294.124.294.272 0 .022-.012.079-.035.17-.507 1.303-1.246 2.283-2.215 2.94-.957.646-2.163.97-3.616.97ZM91.216 28.207c.023.34.08.607.173.8.092.18.288.322.588.424.185.068.277.165.277.29a.396.396 0 0 1-.052.17l-.484.951c-.093.204-.243.278-.45.221-.67-.147-1.13-.47-1.385-.969-.057-.124-.115-.187-.173-.187-.057 0-.12.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.055-1.02-.208-.408-.312-.799-.312-1.173 0-.612.19-1.161.571-1.648.393-.488.975-.828 1.748-1.02.53-.125 1.27-.221 2.215-.29.646-.045 1.113-.09 1.402-.135.23-.034.334-.17.311-.408-.057-.51-.23-.918-.519-1.224-.277-.318-.744-.476-1.401-.476-.427 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.103.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288a.53.53 0 0 1 .034-.153 3.293 3.293 0 0 1 1.368-1.564c.634-.397 1.459-.595 2.474-.595.992 0 1.834.255 2.527.765.692.498 1.06 1.224 1.107 2.176.012.453.017 1.06.017 1.819.012.759.018 1.308.018 1.648Zm-4.326 1.445c.311 0 .651-.073 1.02-.22.381-.148.716-.403 1.004-.766.3-.374.485-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.161-.09-.277-.067l-.675.067c-.75.069-1.36.148-1.834.238-.461.08-.86.227-1.194.442a.984.984 0 0 0-.484.884c0 .465.207.782.622.952.416.17.871.255 1.368.255ZM95.687 30.536a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085h-1.125a.424.424 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.029-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.116 0 .202.034.26.102.069.056.104.141.104.255v11.746ZM100.033 30.536a.364.364 0 0 1-.104.272c-.057.057-.144.085-.26.085h-1.124a.423.423 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.115 0 .202.034.26.102.069.056.103.141.103.255v11.746Z" stroke="#fff" stroke-width=".5"/><path d="M43.151 8.686c.296 0 .554-.036.774-.108.22-.076.402-.182.546-.318.148-.14.258-.308.33-.504.072-.2.108-.422.108-.666a1.75 1.75 0 0 0-.108-.63 1.245 1.245 0 0 0-.324-.48 1.41 1.41 0 0 0-.546-.3 2.516 2.516 0 0 0-.78-.108h-1.206v3.114h1.206Zm0-4.362c.58 0 1.082.068 1.506.204.424.136.774.326 1.05.57.276.244.48.536.612.876.136.34.204.712.204 1.116 0 .42-.07.806-.21 1.158-.14.348-.35.648-.63.9s-.632.448-1.056.588c-.42.14-.912.21-1.476.21h-1.206V13h-1.614V4.324h2.82Zm6.819 2.424c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222Zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516Zm12.85-5.106L60.866 13h-1.188c-.136 0-.23-.088-.282-.264L58.29 9.178c-.036-.12-.07-.238-.102-.354a5.729 5.729 0 0 1-.072-.36 6.81 6.81 0 0 1-.084.366c-.028.12-.06.24-.096.36l-1.122 3.546c-.048.176-.154.264-.318.264h-1.14l-1.95-6.156h1.182c.108 0 .2.026.276.078a.363.363 0 0 1 .15.198l.882 3.288c.044.18.082.356.114.528.036.172.066.344.09.516.044-.172.09-.344.138-.516l.162-.528 1.02-3.3a.382.382 0 0 1 .138-.198.429.429 0 0 1 .258-.078h.654c.104 0 .192.026.264.078a.363.363 0 0 1 .15.198l.99 3.3c.052.18.1.358.144.534.048.172.094.344.138.516.052-.34.126-.69.222-1.05l.906-3.288a.405.405 0 0 1 .15-.198.429.429 0 0 1 .258-.078h1.128Zm4.704 2.37c0-.192-.028-.372-.084-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.826.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm6.668-2.196c.192-.368.42-.656.684-.864a1.45 1.45 0 0 1 .936-.318c.284 0 .512.062.684.186l-.096 1.11a.294.294 0 0 1-.09.156.239.239 0 0 1-.15.042c-.06 0-.15-.01-.27-.03a2.01 2.01 0 0 0-.342-.03 1.11 1.11 0 0 0-.786.282c-.1.088-.19.196-.27.324a3.44 3.44 0 0 0-.216.438V13h-1.482V6.844h.87c.152 0 .258.028.318.084.06.052.1.148.12.288l.09.696Zm6.87 1.302c0-.192-.029-.372-.085-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.827.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm9.134-1.692a1.451 1.451 0 0 0-.552-.432 1.597 1.597 0 0 0-.636-.126c-.224 0-.426.042-.606.126a1.21 1.21 0 0 0-.462.384 1.8 1.8 0 0 0-.294.648c-.068.26-.102.568-.102.924 0 .36.028.666.084.918.06.248.144.452.252.612.108.156.24.27.396.342.156.068.33.102.522.102.308 0 .57-.064.786-.192.216-.128.42-.31.612-.546v-2.76Zm1.482-4.332V13h-.906c-.196 0-.32-.09-.372-.27l-.126-.594a3.09 3.09 0 0 1-.858.69c-.32.176-.694.264-1.122.264-.336 0-.644-.07-.924-.21a2.098 2.098 0 0 1-.726-.606 3.033 3.033 0 0 1-.468-.99 5.072 5.072 0 0 1-.162-1.344c0-.456.062-.88.186-1.272s.302-.732.534-1.02c.232-.288.51-.512.834-.672a2.384 2.384 0 0 1 1.092-.246c.344 0 .638.054.882.162.244.108.462.254.654.438V4.084h1.482Zm5.863 7.32c.168.204.35.348.546.432.2.084.41.126.63.126.228 0 .432-.04.612-.12.184-.084.34-.212.468-.384a1.93 1.93 0 0 0 .294-.666 4.05 4.05 0 0 0 .102-.972c0-.676-.112-1.164-.336-1.464-.224-.304-.546-.456-.966-.456-.284 0-.532.066-.744.198a2.38 2.38 0 0 0-.606.546v2.76Zm0-3.804a3.02 3.02 0 0 1 .822-.618c.304-.156.65-.234 1.038-.234.356 0 .676.07.96.21.288.14.532.342.732.606.204.26.36.576.468.948.108.372.162.79.162 1.254 0 .5-.062.954-.186 1.362a3.132 3.132 0 0 1-.534 1.05 2.4 2.4 0 0 1-.828.672c-.324.16-.684.24-1.08.24a2.103 2.103 0 0 1-.954-.216 1.891 1.891 0 0 1-.366-.246c-.108-.1-.212-.21-.312-.33l-.066.414c-.024.104-.066.178-.126.222a.37.37 0 0 1-.234.066h-.978V4.084h1.482V7.6Zm10.743-.756-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084H97.68l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188Z"/></g></svg>';
454
+
455
+
456
+ const $15ddac3121cc3a5d$var$getWatermarkedCanvas = (canvas)=>new Promise((resolve)=>{
457
+ const dpr = window.devicePixelRatio || 1;
458
+ const context = canvas.getContext("2d");
459
+ const svgBlob = new Blob([
460
+ (0, $850842193b726422$export$218be676a714a9df)
461
+ ], {
462
+ type: "image/svg+xml;charset=utf-8"
463
+ });
464
+ const blobUrl = URL.createObjectURL(svgBlob);
465
+ const watermarkImage = new Image();
466
+ watermarkImage.onload = ()=>{
467
+ const x = canvas.width / dpr - watermarkImage.width - 16;
468
+ const y = canvas.height / dpr - watermarkImage.height - 16;
469
+ context?.drawImage(watermarkImage, x, y);
470
+ resolve(canvas);
471
+ };
472
+ watermarkImage.src = blobUrl;
473
+ });
474
+ const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video)=>{
475
+ const { videoWidth: videoWidth , videoHeight: videoHeight } = video;
476
+ const orientation = videoWidth > videoHeight ? "landscape" : "portrait";
477
+ const sourceWidth = orientation === "portrait" ? videoWidth : videoHeight;
478
+ const sourceHeight = orientation === "landscape" ? videoHeight : videoWidth;
479
+ const sourceX = orientation === "landscape" ? (videoWidth - sourceWidth) / 2 : 0;
480
+ const sourceY = orientation === "portrait" ? (videoHeight - sourceHeight) / 2 : 0;
399
481
  const canvas = document.createElement("canvas");
400
482
  const ctx = canvas.getContext("2d");
401
- let offsetHeight = video.offsetHeight;
402
- let offsetWidth = video.offsetWidth;
403
- const stream = video.srcObject;
404
- const track = stream.getVideoTracks()[0];
405
- const settings = track.getSettings();
406
- const width = settings.width || 0;
407
- const height = settings.height || 0;
408
- if (width > height) {
409
- offsetWidth += height - offsetHeight;
410
- offsetHeight = height;
411
- let cropW = width - offsetWidth;
412
- if (cropW < 0) {
413
- cropW = 0;
414
- offsetWidth = width;
415
- }
416
- canvas.width = offsetWidth;
417
- canvas.height = Math.min(offsetHeight, height);
418
- ctx?.drawImage(video, cropW / 2, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height);
419
- } else {
420
- offsetHeight += width - offsetWidth;
421
- offsetWidth = width;
422
- let cropH = height - offsetHeight;
423
- if (cropH < 0) {
424
- cropH = 0;
425
- offsetHeight = height;
426
- }
427
- canvas.width = Math.min(offsetWidth, width);
428
- canvas.height = offsetHeight;
429
- ctx?.drawImage(video, 0, cropH / 2, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height);
430
- }
431
- return canvas.toDataURL("image/jpeg");
483
+ const dpr = window.devicePixelRatio || 1;
484
+ canvas.width = sourceWidth * dpr;
485
+ canvas.height = sourceHeight * dpr;
486
+ ctx?.scale(dpr, dpr);
487
+ ctx?.drawImage(video, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, canvas.width / dpr, canvas.height / dpr);
488
+ const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas);
489
+ return watermarkedCanvas.toDataURL("image/jpeg");
432
490
  };
433
- const $c238d62666faeac8$export$4a210166cc9cb64b = async (src)=>{
491
+ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
434
492
  const video = document.createElement("video");
435
493
  const stream = new MediaStream();
436
494
  stream.addTrack(src);
@@ -445,7 +503,8 @@ const $c238d62666faeac8$export$4a210166cc9cb64b = async (src)=>{
445
503
  canvas.height = video.height;
446
504
  canvas.width = video.width;
447
505
  ctx?.drawImage(video, 0, 0);
448
- return canvas.toDataURL("image/jpeg");
506
+ const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas);
507
+ return watermarkedCanvas.toDataURL("image/jpeg");
449
508
  };
450
509
 
451
510
 
@@ -457,7 +516,7 @@ const $c31e3fb4360572af$export$818d60b2e626da0c = {
457
516
  CONSUME_ERROR: "CONS1",
458
517
  SOCKET_LOST: "SOCK1"
459
518
  };
460
- const $c31e3fb4360572af$var$VIDEO_CONSTRAINS = {
519
+ const $c31e3fb4360572af$export$d21ffcc5eb136bfa = {
461
520
  qvga: {
462
521
  width: {
463
522
  ideal: 320
@@ -520,11 +579,13 @@ const $c31e3fb4360572af$var$fetchAgentInfo = async ({ apiKey: apiKey , email: em
520
579
  });
521
580
  return agent;
522
581
  };
523
- class $c31e3fb4360572af$export$2e2bcd8739ae039 {
582
+ const $c31e3fb4360572af$var$StreamerEventTargetType = EventTarget;
583
+ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$StreamerEventTargetType {
524
584
  pendingDeviceRequest = {};
525
585
  joinOptions = {};
526
586
  devicesList = [];
527
587
  constructor(){
588
+ super();
528
589
  navigator.mediaDevices.addEventListener("devicechange", ()=>this.onDeviceChange());
529
590
  this.iceServers = [
530
591
  {
@@ -553,18 +614,59 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
553
614
  this.webcamProducer = null;
554
615
  this.screenshareProducer = null;
555
616
  this.customMessages = new Map();
617
+ this.audioRenderers = {};
618
+ }
619
+ getState() {
620
+ const peers = [];
621
+ this.peers.forEach((peer, key)=>{
622
+ const deviceState = {
623
+ microphone: {
624
+ enabled: false,
625
+ muted: false
626
+ },
627
+ camera: {
628
+ enabled: false
629
+ },
630
+ screenshare: {
631
+ enabled: false
632
+ }
633
+ };
634
+ peer.producersData.forEach((producer)=>{
635
+ if (producer.deviceType === "microphone") {
636
+ deviceState.microphone.enabled = true;
637
+ deviceState.microphone.muted = producer.paused;
638
+ } else if (producer.deviceType === "screen") deviceState.screenshare.enabled = true;
639
+ else if (producer.deviceType === "webcam") deviceState.camera.enabled = true;
640
+ });
641
+ peers.push({
642
+ peerId: key,
643
+ displayName: peer.displayName,
644
+ deviceState: deviceState
645
+ });
646
+ });
647
+ return {
648
+ roomId: this.roomId,
649
+ peerId: this.peerId,
650
+ displayName: this.displayName,
651
+ callId: undefined,
652
+ deviceState: this.getDevicesState(),
653
+ peers: peers
654
+ };
556
655
  }
557
656
  onStartSpeak() {
558
657
  if (this.micProducer && !this.micProducer.paused) {
559
- const event = new CustomEvent("localStartSpeak");
560
- window.dispatchEvent(event);
658
+ const event = new CustomEvent("localStartSpeak", {
659
+ cancelable: true,
660
+ bubbles: true
661
+ });
662
+ this.dispatchEvent(event);
561
663
  this.protoo.notify("startSpeak");
562
664
  }
563
665
  }
564
666
  onStopSpeak() {
565
667
  if (this.micProducer && !this.micProducer.paused) {
566
668
  const event = new CustomEvent("localStopSpeak");
567
- window.dispatchEvent(event);
669
+ this.dispatchEvent(event);
568
670
  this.protoo.notify("stopSpeak");
569
671
  }
570
672
  }
@@ -574,7 +676,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
574
676
  code: code
575
677
  }
576
678
  });
577
- window.dispatchEvent(event);
679
+ this.dispatchEvent(event);
578
680
  }
579
681
  async generateToken(bid) {
580
682
  const url = "https://g.snapcall.io/stream";
@@ -608,7 +710,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
608
710
  url = `${"wss://g.snapcall.io/stream"}/${instanceId}/?roomId=${room}&peerId=${this.peerId}`;
609
711
  } catch (roomError) {
610
712
  const event = new CustomEvent("invalidRoom");
611
- window.dispatchEvent(event);
713
+ this.dispatchEvent(event);
612
714
  }
613
715
  if (!url) throw new Error("Invalid socket URL");
614
716
  this.protooTransport = new $3Sbms$WebSocketTransport(url, {
@@ -636,16 +738,17 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
636
738
  const { id: id , displayName: displayName } = notification.data;
637
739
  this.peers.set(id, {
638
740
  id: id,
741
+ peerId: id,
639
742
  displayName: displayName,
640
743
  producersData: []
641
744
  });
642
745
  const event = new CustomEvent("newPeer", {
643
746
  detail: {
644
- id: id,
747
+ peerId: id,
645
748
  displayName: displayName
646
749
  }
647
750
  });
648
- window.dispatchEvent(event);
751
+ this.dispatchEvent(event);
649
752
  } else if (notification.method === "newProducer") {
650
753
  const { peerId: peerId , producerId: producerId , deviceType: deviceType , paused: paused } = notification.data;
651
754
  await this.consumeProducer({
@@ -656,6 +759,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
656
759
  });
657
760
  } else if (notification.method === "peerClosed") {
658
761
  const { peerId: peerId , relatedConsumers: relatedConsumers } = notification.data;
762
+ this.peers.delete(peerId);
659
763
  relatedConsumers.forEach((consumer)=>{
660
764
  this.onConsumerClose({
661
765
  consumerId: consumer.id
@@ -666,7 +770,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
666
770
  peerId: peerId
667
771
  }
668
772
  });
669
- window.dispatchEvent(event);
773
+ this.dispatchEvent(event);
670
774
  } else if (notification.method === "consumerClosed") {
671
775
  const { consumerId: consumerId } = notification.data;
672
776
  this.onConsumerClose({
@@ -680,34 +784,36 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
680
784
  displayName: displayName
681
785
  }
682
786
  });
683
- window.dispatchEvent(event);
787
+ this.dispatchEvent(event);
684
788
  } else if (notification.method === "requestDevice") {
685
789
  this.pendingDeviceRequest[notification.data.requestId] = notification.data;
686
790
  const event = new CustomEvent("requestDevice", {
687
791
  detail: notification.data
688
792
  });
689
- window.dispatchEvent(event);
793
+ this.dispatchEvent(event);
690
794
  } else if (notification.method === "startSpeak") ;
691
795
  else if (notification.method === "stopSpeak") ;
692
796
  else if (notification.method === "producerPaused" || notification.method === "producerResumed") {
797
+ if (notification.data?.deviceType === "microphone") {
798
+ const { peerId: peerId , producerId: producerId } = notification.data;
799
+ const microphoneData = this.peers.get(peerId)?.producersData.find((ele)=>producerId === ele.producerId);
800
+ if (microphoneData) microphoneData.paused = notification.method === "producerPaused" ? true : false;
801
+ }
693
802
  const event = new CustomEvent(notification.method, {
694
803
  detail: notification.data
695
804
  });
696
- window.dispatchEvent(event);
805
+ this.dispatchEvent(event);
697
806
  } else if (notification.method === "requestDeviceResult") {
698
807
  const event = new CustomEvent(notification.method, {
699
808
  detail: notification.data
700
809
  });
701
- window.dispatchEvent(event);
810
+ this.dispatchEvent(event);
702
811
  } else if (notification.method === "terminateRoom") {
703
- this.closeWebrtcTransport(this.sendAudioTransports);
704
- this.closeWebrtcTransport(this.recvAudioTransports);
705
- this.closeWebrtcTransport(this.sendVideoTransports);
706
- this.closeWebrtcTransport(this.recvVideoTransports);
812
+ this.release();
707
813
  const event = new CustomEvent(notification.method, {
708
814
  detail: notification.data
709
815
  });
710
- window.dispatchEvent(event);
816
+ this.dispatchEvent(event);
711
817
  } else if (notification.method === "customMessage") {
712
818
  const { messageId: messageId , chunk: chunk1 , chunkIndex: chunkIndex , totalChunks: totalChunks } = notification.data.event;
713
819
  const existingMessage = this.customMessages.get(messageId);
@@ -735,7 +841,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
735
841
  event: parsedEvent
736
842
  }
737
843
  });
738
- window.dispatchEvent(event);
844
+ this.dispatchEvent(event);
739
845
  this.customMessages.delete(messageId);
740
846
  }
741
847
  }
@@ -759,7 +865,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
759
865
  } catch (error) {
760
866
  console.error(error);
761
867
  $3Sbms$captureException(error);
762
- window.dispatchEvent(new CustomEvent("browserDetectionFailed"));
868
+ this.dispatchEvent(new CustomEvent("browserDetectionFailed"));
763
869
  }
764
870
  return new $3Sbms$Device({
765
871
  handlerName: "Chrome74"
@@ -899,7 +1005,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
899
1005
  apiKey: this.joinOptions.apiKey,
900
1006
  email: this.joinOptions.email
901
1007
  });
902
- if (agentInfo) window.dispatchEvent(new CustomEvent("agentIdentity", {
1008
+ if (agentInfo) this.dispatchEvent(new CustomEvent("agentIdentity", {
903
1009
  detail: {
904
1010
  success: true,
905
1011
  email: this.joinOptions.email
@@ -907,7 +1013,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
907
1013
  }));
908
1014
  } catch (agentInfoError) {
909
1015
  console.warn(agentInfoError);
910
- window.dispatchEvent(new CustomEvent("agentIdentity", {
1016
+ this.dispatchEvent(new CustomEvent("agentIdentity", {
911
1017
  detail: {
912
1018
  success: false
913
1019
  }
@@ -918,16 +1024,22 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
918
1024
  email: this.joinOptions.email
919
1025
  });
920
1026
  this.peers = new Map(peers.map((peer)=>[
921
- peer.id,
1027
+ peer.id || peer.peerId,
922
1028
  {
923
- ...peer
924
- }
1029
+ ...peer,
1030
+ peerId: peer.id || peer.peerId
1031
+ },
925
1032
  ]));
926
1033
  const callId = await this.getCallId();
927
- window.dispatchEvent(new CustomEvent("enterRoom", {
1034
+ this.dispatchEvent(new CustomEvent("enterRoom", {
928
1035
  detail: {
929
1036
  peerId: this.peerId,
930
- peers: peers,
1037
+ peers: peers.map((peer)=>{
1038
+ return {
1039
+ ...peer,
1040
+ peerId: peer.id || peer.peerId
1041
+ };
1042
+ }),
931
1043
  callId: callId
932
1044
  }
933
1045
  }));
@@ -936,7 +1048,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
936
1048
  // Consume Peers
937
1049
  peers.forEach((peer)=>{
938
1050
  this.consumePeer({
939
- peerId: peer.id,
1051
+ peerId: peer.id || peer.peerId,
940
1052
  producersData: peer.producersData
941
1053
  });
942
1054
  });
@@ -974,13 +1086,15 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
974
1086
  this.micProducer?.close();
975
1087
  this.micProducer = undefined;
976
1088
  const event = new CustomEvent("microphoneMute");
977
- window.dispatchEvent(event);
1089
+ this.dispatchEvent(event);
978
1090
  await this.protoo.request("closeProducer", {
979
1091
  producerId: producerId
980
1092
  });
981
1093
  }
982
1094
  async onDeviceChange() {
983
1095
  console.log("detecting device change");
1096
+ const deviceListChangeEvent = new CustomEvent("devicesListChange");
1097
+ this.dispatchEvent(deviceListChangeEvent);
984
1098
  if (!this.protoo.closed && this.micProducer) {
985
1099
  const lists = await navigator.mediaDevices.enumerateDevices();
986
1100
  const inputs = lists.filter((media)=>media.kind === "audioinput");
@@ -1010,7 +1124,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1010
1124
  detail: defaultDevice
1011
1125
  });
1012
1126
  this.audioInputDefaultDevice = defaultDevice;
1013
- window.dispatchEvent(event);
1127
+ this.dispatchEvent(event);
1014
1128
  console.log("new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
1015
1129
  }
1016
1130
  this.switchMicrophone("default");
@@ -1054,7 +1168,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1054
1168
  this.micProducer = micProducer;
1055
1169
  this.muted = false;
1056
1170
  const event = new CustomEvent("microphoneEnabled");
1057
- window.dispatchEvent(event);
1171
+ this.dispatchEvent(event);
1058
1172
  }
1059
1173
  }
1060
1174
  async muteMicrophone() {
@@ -1066,7 +1180,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1066
1180
  });
1067
1181
  this.muted = true;
1068
1182
  const event = new CustomEvent("microphoneMute");
1069
- window.dispatchEvent(event);
1183
+ this.dispatchEvent(event);
1070
1184
  }
1071
1185
  }
1072
1186
  async unMuteMicrophone() {
@@ -1078,7 +1192,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1078
1192
  });
1079
1193
  this.muted = false;
1080
1194
  const event = new CustomEvent("microphoneUnmute");
1081
- window.dispatchEvent(event);
1195
+ this.dispatchEvent(event);
1082
1196
  }
1083
1197
  }
1084
1198
  async toggleMute() {
@@ -1094,17 +1208,31 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1094
1208
  };
1095
1209
  }
1096
1210
  }
1097
- endCall() {
1098
- this.protoo.close();
1099
- this.protooTransport.close();
1211
+ release() {
1212
+ console.log("release");
1100
1213
  this.closeWebrtcTransport(this.sendAudioTransports);
1101
1214
  this.closeWebrtcTransport(this.recvAudioTransports);
1102
1215
  this.closeWebrtcTransport(this.sendVideoTransports);
1103
1216
  this.closeWebrtcTransport(this.recvVideoTransports);
1217
+ this.webcamTrack?.stop();
1218
+ this.webcamTrack = null;
1219
+ this.protooTransport.close();
1220
+ this.protoo.close();
1221
+ this.micProducer?.close();
1222
+ this.screenshareProducer?.close();
1223
+ this.webcamProducer?.close();
1224
+ this.consumers.forEach((consumer)=>{
1225
+ consumer.mediaSoupConsumer.close();
1226
+ });
1104
1227
  this.consumers.clear();
1105
1228
  this.audioLevel?.release();
1106
- const event = new CustomEvent("snapcallEvent_callEnd");
1107
- window.dispatchEvent(event);
1229
+ }
1230
+ endCall() {
1231
+ this.release();
1232
+ const event = new CustomEvent("leaveRoom");
1233
+ this.dispatchEvent(event);
1234
+ const deprecatedEvent = new CustomEvent("snapcallEvent_callEnd");
1235
+ this.dispatchEvent(deprecatedEvent);
1108
1236
  }
1109
1237
  terminateRoom() {
1110
1238
  this.protoo.request("terminateRoom");
@@ -1123,7 +1251,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1123
1251
  numberOfAvailableWebcams: this.webcams.size
1124
1252
  }
1125
1253
  });
1126
- window.dispatchEvent(event);
1254
+ this.dispatchEvent(event);
1127
1255
  }
1128
1256
  isVideoZoomAvailable() {
1129
1257
  return this.webcamZoom.available;
@@ -1175,16 +1303,85 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1175
1303
  });
1176
1304
  }
1177
1305
  }
1178
- async enableVideo() {
1306
+ scaleVideo() {
1307
+ try {
1308
+ let videoCount = 0;
1309
+ this.consumers.forEach((consumer)=>{
1310
+ if (consumer.mediaSoupConsumer.kind === "video") videoCount++;
1311
+ });
1312
+ if (this.screenshareProducer && !this.screenshareProducer.closed) videoCount++;
1313
+ let scale = {
1314
+ scaleResolutionDownBy: 1
1315
+ };
1316
+ if (videoCount >= 3) scale = {
1317
+ scaleResolutionDownBy: 2
1318
+ };
1319
+ if (videoCount >= 9) scale = {
1320
+ scaleResolutionDownBy: 4
1321
+ };
1322
+ if (this.webcamProducer && !this.webcamProducer.closed) {
1323
+ console.log(`scaling video by ${scale.scaleResolutionDownBy}`);
1324
+ this.webcamProducer?.setRtpEncodingParameters?.(scale).catch((err)=>{
1325
+ console.error("scaleResolutionDownBy not supported", err);
1326
+ });
1327
+ }
1328
+ } catch (error) {
1329
+ console.error("scaleVideo error", error);
1330
+ }
1331
+ }
1332
+ async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
1333
+ if (!this.webcam.device) throw new Error("no webcam devices");
1334
+ if (rotate) {
1335
+ const webcams = Array.from(this.webcams.keys());
1336
+ const deviceId = this.webcam?.device?.deviceId || "unknow";
1337
+ let newWebcamIndex = webcams.indexOf(deviceId);
1338
+ if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
1339
+ else newWebcamIndex = 0;
1340
+ const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
1341
+ if (!newWebcamDevice) throw new Error("no webcam device");
1342
+ this.webcam.device = newWebcamDevice;
1343
+ this.webcam.resolution = "hd";
1344
+ } else {
1345
+ if (device) this.webcam.device = device;
1346
+ if (resolution) this.webcam.resolution = resolution;
1347
+ }
1348
+ const stream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
1349
+ video: {
1350
+ deviceId: {
1351
+ ideal: this.webcam.device.deviceId
1352
+ },
1353
+ ...$c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution]
1354
+ }
1355
+ }));
1356
+ if (!this.sendVideoTransports) throw new Error("video transport not found");
1357
+ const track = stream.getVideoTracks()[0];
1358
+ this.webcamTrack = track;
1359
+ await this.webcamProducer?.replaceTrack?.({
1360
+ track: track
1361
+ });
1362
+ const capabilities = await track.getCapabilities?.() || navigator.mediaDevices.getSupportedConstraints?.();
1363
+ this.webcamZoom = {
1364
+ available: Boolean(capabilities?.zoom),
1365
+ min: capabilities?.zoom?.min || 0,
1366
+ max: capabilities?.zoom?.max || 0
1367
+ };
1368
+ const event = new CustomEvent("localVideoChange", {
1369
+ detail: {
1370
+ camera: this.getCurrentWebcam()
1371
+ }
1372
+ });
1373
+ this.dispatchEvent(event);
1374
+ }
1375
+ async enableVideo(config) {
1179
1376
  await this.updateWebcams();
1180
- const { resolution: resolution } = this.webcam;
1377
+ if (config?.device) this.webcam.device = config.device;
1181
1378
  if (!this.webcam.device) throw new Error("no webcam devices");
1182
1379
  const stream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
1183
1380
  video: {
1184
1381
  deviceId: {
1185
1382
  ideal: this.webcam.device.deviceId
1186
1383
  },
1187
- ...$c31e3fb4360572af$var$VIDEO_CONSTRAINS[resolution]
1384
+ ...$c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution]
1188
1385
  }
1189
1386
  }));
1190
1387
  if (!this.sendVideoTransports) throw new Error("video transport not found");
@@ -1196,7 +1393,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1196
1393
  min: capabilities?.zoom?.min || 0,
1197
1394
  max: capabilities?.zoom?.max || 0
1198
1395
  };
1199
- const encodings = undefined ? $c31e3fb4360572af$var$WEBCAM_SIMULCAST_ENCODINGS : undefined;
1396
+ const encodings = undefined;
1200
1397
  const codecOptions = {
1201
1398
  videoGoogleStartBitrate: 1000
1202
1399
  };
@@ -1210,48 +1407,24 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1210
1407
  deviceType: deviceType
1211
1408
  }
1212
1409
  });
1410
+ this.scaleVideo();
1213
1411
  this.webcamProducer.on("transportclose", ()=>{
1214
1412
  this.webcamProducer = null;
1215
1413
  });
1216
1414
  this.webcamProducer.on("trackended", ()=>{
1217
1415
  this.disableVideo().catch(()=>{});
1218
1416
  });
1219
- const event = new CustomEvent("localVideoAvailable");
1220
- window.dispatchEvent(event);
1221
- }
1222
- async rotateVideo() {
1223
- await this.updateWebcams();
1224
- const webcams = Array.from(this.webcams.keys());
1225
- const deviceId = this.webcam?.device?.deviceId || "unknow";
1226
- let newWebcamIndex = webcams.indexOf(deviceId);
1227
- if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
1228
- else newWebcamIndex = 0;
1229
- const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
1230
- if (!newWebcamDevice) throw new Error("no webcam device");
1231
- this.webcam.device = newWebcamDevice;
1232
- this.webcam.resolution = "hd";
1233
- this.webcamProducer?.track?.stop?.();
1234
- const stream = await navigator.mediaDevices.getUserMedia({
1235
- video: {
1236
- deviceId: {
1237
- exact: this.webcam.device.deviceId
1238
- },
1239
- ...$c31e3fb4360572af$var$VIDEO_CONSTRAINS[this.webcam.resolution]
1417
+ const event = new CustomEvent("localVideoAvailable", {
1418
+ detail: {
1419
+ camera: this.getCurrentWebcam()
1240
1420
  }
1241
1421
  });
1242
- const track = stream.getVideoTracks()[0];
1243
- this.webcamTrack = track;
1244
- await this.webcamProducer?.replaceTrack?.({
1245
- track: track
1422
+ this.dispatchEvent(event);
1423
+ }
1424
+ async rotateVideo() {
1425
+ await this.switchWebcam({
1426
+ rotate: true
1246
1427
  });
1247
- const capabilities = await track.getCapabilities();
1248
- this.webcamZoom = {
1249
- available: Boolean(capabilities.zoom),
1250
- min: capabilities?.zoom?.min || 0,
1251
- max: capabilities?.zoom?.max || 0
1252
- };
1253
- const event = new CustomEvent("localVideoRotate");
1254
- window.dispatchEvent(event);
1255
1428
  }
1256
1429
  async zoomVideo() {
1257
1430
  if (!this.webcamZoom.available) throw new Error("Webcam zoom is not available");
@@ -1283,7 +1456,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1283
1456
  });
1284
1457
  this.webcamProducer = null;
1285
1458
  const event = new CustomEvent("localVideoUnavailable");
1286
- window.dispatchEvent(event);
1459
+ this.dispatchEvent(event);
1287
1460
  }
1288
1461
  async enableScreenshare() {
1289
1462
  const stream = await this.handleGetUserMediaError("screen", navigator.mediaDevices.getDisplayMedia({
@@ -1305,7 +1478,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1305
1478
  if (!stream) return;
1306
1479
  if (!this.sendVideoTransports) throw new Error("video screen transport not found");
1307
1480
  const track = stream.getVideoTracks()[0];
1308
- const encodings = undefined ? $c31e3fb4360572af$var$SCREEN_SHARING_SIMULCAST_ENCODINGS : undefined;
1481
+ const encodings = undefined;
1309
1482
  const codecOptions = {
1310
1483
  videoGoogleStartBitrate: 1000
1311
1484
  };
@@ -1326,7 +1499,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1326
1499
  this.disableScreenshare().catch(()=>{});
1327
1500
  });
1328
1501
  const event = new CustomEvent("screenshareEnabled");
1329
- window.dispatchEvent(event);
1502
+ this.dispatchEvent(event);
1330
1503
  }
1331
1504
  async disableScreenshare() {
1332
1505
  if (this.screenshareProducer) {
@@ -1337,30 +1510,29 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1337
1510
  this.screenshareProducer = null;
1338
1511
  }
1339
1512
  const event = new CustomEvent("screenshareDisabled");
1340
- window.dispatchEvent(event);
1513
+ this.dispatchEvent(event);
1341
1514
  }
1342
1515
  onConsumerClose({ consumerId: consumerId }) {
1343
1516
  const consumer = this.consumers.get(consumerId);
1344
1517
  if (consumer) {
1518
+ const producerId = consumer.mediaSoupConsumer.producerId;
1519
+ this.peers.forEach((value)=>{
1520
+ const index = value.producersData.findIndex((ele)=>ele.producerId === producerId);
1521
+ if (index !== -1) value.producersData.splice(index, 1);
1522
+ });
1345
1523
  consumer.mediaSoupConsumer.close();
1346
1524
  this.consumers.delete(consumerId);
1525
+ this.scaleVideo();
1347
1526
  const event = new CustomEvent("consumerClose", {
1348
1527
  detail: {
1349
1528
  peerId: consumer.mediaSoupConsumer.appData.peerId,
1350
1529
  deviceType: consumer.deviceType
1351
1530
  }
1352
1531
  });
1353
- window.dispatchEvent(event);
1532
+ if (consumer.deviceType === "microphone") this.deleteAudioRenderer(consumerId);
1533
+ this.dispatchEvent(event);
1354
1534
  }
1355
1535
  }
1356
- requestVoice({ consumerId: consumerId , element: element }) {
1357
- const consumer = this.consumers.get(consumerId);
1358
- if (consumer) {
1359
- const mediaStream = new MediaStream();
1360
- mediaStream.addTrack(consumer.mediaSoupConsumer.track);
1361
- element.srcObject = mediaStream;
1362
- } else console.error(`Audio consumer ${consumerId} not found`);
1363
- }
1364
1536
  requestVideo({ consumerId: consumerId , element: element }) {
1365
1537
  const consumer = this.consumers.get(consumerId);
1366
1538
  if (consumer) {
@@ -1373,8 +1545,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1373
1545
  }
1374
1546
  async captureVideo(videoElement) {
1375
1547
  let image;
1376
- if (videoElement) image = (0, $c238d62666faeac8$export$674c90a250a8b2c5)(videoElement);
1377
- else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $c238d62666faeac8$export$4a210166cc9cb64b)(this.webcamProducer.track);
1548
+ if (videoElement) image = await (0, $15ddac3121cc3a5d$export$674c90a250a8b2c5)(videoElement);
1549
+ else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $15ddac3121cc3a5d$export$4a210166cc9cb64b)(this.webcamProducer.track);
1378
1550
  else throw new Error("no video to capture");
1379
1551
  return image;
1380
1552
  }
@@ -1419,6 +1591,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1419
1591
  transportId: transport.transport.id,
1420
1592
  rtpCapabilities: this.mediasoupDevice.rtpCapabilities
1421
1593
  });
1594
+ const peer = this.peers.get(peerId);
1595
+ if (peer) peer.producersData.push({
1596
+ producerId: producerId,
1597
+ deviceType: deviceType,
1598
+ paused: paused
1599
+ });
1422
1600
  const { producerId: resolvedProducerId , id: id , kind: kind , rtpParameters: rtpParameters , appData: appData } = data;
1423
1601
  console.log("Data: ", data);
1424
1602
  try {
@@ -1438,6 +1616,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1438
1616
  mediaSoupConsumer: consumer,
1439
1617
  deviceType: deviceType
1440
1618
  });
1619
+ this.scaleVideo();
1441
1620
  const event = new CustomEvent("newConsumer", {
1442
1621
  detail: {
1443
1622
  peerId: peerId,
@@ -1446,7 +1625,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1446
1625
  paused: paused
1447
1626
  }
1448
1627
  });
1449
- window.dispatchEvent(event);
1628
+ this.dispatchEvent(event);
1629
+ if (consumer.kind === "audio") {
1630
+ const audioRenderer = this.createAudioRenderer(consumer.id);
1631
+ const mediaStream = new MediaStream();
1632
+ mediaStream.addTrack(consumer.track);
1633
+ audioRenderer.setSource(mediaStream);
1634
+ audioRenderer.play();
1635
+ }
1450
1636
  if (consumer.kind === "video") await this.protoo.request("resumeConsumer", {
1451
1637
  consumerId: consumer.id
1452
1638
  });
@@ -1466,7 +1652,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1466
1652
  displayName: displayName
1467
1653
  }
1468
1654
  });
1469
- window.dispatchEvent(event);
1655
+ this.dispatchEvent(event);
1470
1656
  }
1471
1657
  async requestPeerDevice(remotePeerId, deviceType) {
1472
1658
  return this.protoo.request("requestPeerDevice", {
@@ -1542,6 +1728,66 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 {
1542
1728
  });
1543
1729
  await Promise.all(chunksPromises);
1544
1730
  }
1731
+ async listAudioDevices() {
1732
+ const devices = await navigator.mediaDevices.enumerateDevices();
1733
+ return devices.filter((device)=>device.kind === "audioinput" || device.kind === "audiooutput");
1734
+ }
1735
+ async listVideoDevices() {
1736
+ const devices = await navigator.mediaDevices.enumerateDevices();
1737
+ return devices.filter((device)=>device.kind === "videoinput");
1738
+ }
1739
+ isListDevicesSupported() {
1740
+ return Boolean(navigator.mediaDevices?.enumerateDevices);
1741
+ }
1742
+ getCurrentWebcam() {
1743
+ return this.webcam;
1744
+ }
1745
+ getWebcamsList() {
1746
+ return this.webcams;
1747
+ }
1748
+ async setWebcamResolution(resolution) {
1749
+ if (this.webcam.device) await this.switchWebcam({
1750
+ resolution: resolution
1751
+ });
1752
+ else {
1753
+ this.webcam.resolution = resolution;
1754
+ const e = new CustomEvent("localVideoChange", {
1755
+ detail: {
1756
+ camera: this.getCurrentWebcam()
1757
+ }
1758
+ });
1759
+ this.dispatchEvent(e);
1760
+ }
1761
+ }
1762
+ createAudioRenderer(consumerId) {
1763
+ const renderer = new (0, $82e31ca38889c079$export$2e2bcd8739ae039)({
1764
+ consumerId: consumerId
1765
+ });
1766
+ this.audioRenderers[consumerId] = renderer;
1767
+ return renderer;
1768
+ }
1769
+ deleteAudioRenderer(consumerId) {
1770
+ this.audioRenderers[consumerId]?.destroy();
1771
+ delete this.audioRenderers[consumerId];
1772
+ }
1773
+ async playAudioRenderer(consumerId) {
1774
+ await this.audioRenderers[consumerId]?.play();
1775
+ }
1776
+ async setAudioSink(sinkId) {
1777
+ const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)=>console.warn("Failed to setSinkId on renderer (consumerId: %s): ", consumerId, err)));
1778
+ await Promise.allSettled(promises);
1779
+ }
1780
+ dispatchEvent(event) {
1781
+ const result = super.dispatchEvent(event);
1782
+ window.dispatchEvent(event);
1783
+ return result;
1784
+ }
1785
+ async getShareLinkData(url) {
1786
+ const data = await this.protoo.request("shareLink", {
1787
+ url: url
1788
+ });
1789
+ return data;
1790
+ }
1545
1791
  }
1546
1792
 
1547
1793
 
@@ -1782,46 +2028,46 @@ var $a1ac29d50bdaa837$export$2e2bcd8739ae039 = $a1ac29d50bdaa837$var$SnapcallLog
1782
2028
 
1783
2029
 
1784
2030
  const $2da9626742e3560b$export$6546b255bd3a2004 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
1785
- width: "21",
1786
- height: "20",
1787
- viewBox: "0 0 21 20",
2031
+ width: "24",
2032
+ height: "24",
2033
+ viewBox: "0 0 24 24",
1788
2034
  fill: "none",
1789
2035
  xmlns: "http://www.w3.org/2000/svg",
1790
2036
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
1791
- d: "M17.5 0h-10a3 3 0 0 0-3 3v1h-1a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3Zm-3 17a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-7h12v7Zm0-9h-12V7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Zm4 5a1 1 0 0 1-1 1h-1V7a3 3 0 0 0-.18-1h2.18v7Zm0-9h-12V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Z",
2037
+ d: "M19 2H9a3 3 0 0 0-3 3v1H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3Zm-3 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7h12v7Zm0-9H4V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Zm4 5a1 1 0 0 1-1 1h-1V9a3 3 0 0 0-.18-1H20v7Zm0-9H8V5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1Z",
1792
2038
  fill: "#fff"
1793
2039
  })
1794
2040
  });
1795
2041
  const $2da9626742e3560b$export$92ce62e1201c4fc0 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
1796
- width: "19",
1797
- height: "20",
1798
- viewBox: "0 0 19 20",
2042
+ width: "24",
2043
+ height: "24",
2044
+ viewBox: "0 0 24 24",
1799
2045
  fill: "none",
1800
2046
  xmlns: "http://www.w3.org/2000/svg",
1801
2047
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
1802
- d: "M18.5 6.94a1.307 1.307 0 0 0-.06-.27v-.09a1.07 1.07 0 0 0-.19-.28l-6-6a1.07 1.07 0 0 0-.28-.19.32.32 0 0 0-.09 0 .88.88 0 0 0-.33-.11H7.5a3 3 0 0 0-3 3v1h-1a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V6.94Zm-6-3.53L15.09 6H13.5a1 1 0 0 1-1-1V3.41Zm0 13.59a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5v1Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3v5Z",
2048
+ d: "M21 8.94a1.307 1.307 0 0 0-.06-.27v-.09a1.07 1.07 0 0 0-.19-.28l-6-6a1.071 1.071 0 0 0-.28-.19.32.32 0 0 0-.09 0 .88.88 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3V8.94Zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1V5.41ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5v1Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3v5Z",
1803
2049
  fill: "#fff"
1804
2050
  })
1805
2051
  });
1806
2052
  const $2da9626742e3560b$export$6470d09a29d34d08 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
1807
- width: "23",
1808
- height: "22",
1809
- viewBox: "0 0 23 22",
2053
+ width: "24",
2054
+ height: "24",
2055
+ viewBox: "0 0 24 24",
1810
2056
  fill: "none",
1811
2057
  xmlns: "http://www.w3.org/2000/svg",
1812
2058
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
1813
- d: "M7.5 20h-4a1 1 0 0 1-1-1v-4a1 1 0 1 0-2 0v4a3 3 0 0 0 3 3h4a1 1 0 0 0 0-2Zm14-6a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 0 0 2h4a3 3 0 0 0 3-3v-4a1 1 0 0 0-1-1Zm-2-14h-4a1 1 0 1 0 0 2h4a1 1 0 0 1 1 1v4a1 1 0 0 0 2 0V3a3 3 0 0 0-3-3Zm-18 8a1 1 0 0 0 1-1V3a1 1 0 0 1 1-1h4a1 1 0 0 0 0-2h-4a3 3 0 0 0-3 3v4a1 1 0 0 0 1 1Zm8-4h-4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1Zm-1 4h-2V6h2v2Zm5 2h4a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1Zm1-4h2v2h-2V6Zm-5 6h-4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-1 4h-2v-2h2v2Zm5-1a1 1 0 0 0 1-1 1 1 0 0 0 0-2h-1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1Zm4-3a1 1 0 0 0-1 1v3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-4 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",
2059
+ d: "M8 21H4a1 1 0 0 1-1-1v-4a1 1 0 1 0-2 0v4a3 3 0 0 0 3 3h4a1 1 0 0 0 0-2Zm14-6a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 0 0 2h4a3 3 0 0 0 3-3v-4a1 1 0 0 0-1-1ZM20 1h-4a1 1 0 1 0 0 2h4a1 1 0 0 1 1 1v4a1 1 0 0 0 2 0V4a3 3 0 0 0-3-3ZM2 9a1 1 0 0 0 1-1V4a1 1 0 0 1 1-1h4a1 1 0 0 0 0-2H4a3 3 0 0 0-3 3v4a1 1 0 0 0 1 1Zm8-4H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1ZM9 9H7V7h2v2Zm5 2h4a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1Zm1-4h2v2h-2V7Zm-5 6H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-1 4H7v-2h2v2Zm5-1a1 1 0 0 0 1-1 1 1 0 0 0 0-2h-1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1Zm4-3a1 1 0 0 0-1 1v3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1Zm-4 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",
1814
2060
  fill: "#fff"
1815
2061
  })
1816
2062
  });
1817
2063
  const $2da9626742e3560b$export$1095c93890fce526 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
1818
- width: "21",
1819
- height: "20",
1820
- viewBox: "0 0 21 20",
2064
+ width: "24",
2065
+ height: "24",
2066
+ viewBox: "0 0 24 24",
1821
2067
  fill: "none",
1822
2068
  xmlns: "http://www.w3.org/2000/svg",
1823
2069
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
1824
- d: "m19.82 7.55-1.89-.63.89-1.78A1 1 0 0 0 18.63 4L16.5 1.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 12 0H9a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89a1 1 0 0 0-1.14.19L2.37 4a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 2.37 16l2.13 2.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L18.63 16a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95Zm-1.32 3.23-1.2.4A2 2 0 0 0 16.14 14l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2H9.72l-.4-1.2a2 2 0 0 0-2.82-1.16l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4V9.22l1.2-.4A2 2 0 0 0 4.86 6l-.57-1.11 1.1-1.1 1.11.57A2 2 0 0 0 9.32 3.2l.4-1.2h1.56l.4 1.2a2 2 0 0 0 2.82 1.16l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM10.5 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z",
2070
+ d: "m21.32 9.55-1.89-.63.89-1.78A1 1 0 0 0 20.13 6L18 3.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 13.5 2h-3a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89A1 1 0 0 0 6 3.87L3.87 6a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 3.87 18L6 20.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L20.13 18a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95ZM20 12.78l-1.2.4A2 2 0 0 0 17.64 16l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2h-1.59l-.4-1.2A2 2 0 0 0 8 17.64l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4v-1.56l1.2-.4A2 2 0 0 0 6.36 8l-.57-1.11 1.1-1.1L8 6.36a2 2 0 0 0 2.82-1.16l.4-1.2h1.56l.4 1.2A2 2 0 0 0 16 6.36l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z",
1825
2071
  fill: "#fff"
1826
2072
  })
1827
2073
  });
@@ -1853,9 +2099,17 @@ const $2da9626742e3560b$export$5170987d58ae338d = ()=>/*#__PURE__*/ (0, $3Sbms$j
1853
2099
  viewBox: "0 0 24 24",
1854
2100
  fill: "none",
1855
2101
  xmlns: "http://www.w3.org/2000/svg",
1856
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
1857
- d: "M12.83 13.45a1 1 0 0 0-1.66 0l-4 6a1 1 0 0 0 0 1A1 1 0 0 0 8 21h8a1 1 0 0 0 .88-.53 1 1 0 0 0-.05-1l-4-6.02ZM9.87 19 12 15.8l2.13 3.2H9.87ZM19 3H5a3 3 0 0 0-3 3v9a3 3 0 0 0 3 3h.85a1 1 0 0 0 0-2H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-.85a1 1 0 0 0 0 2H19a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Z",
1858
- fill: "#fff"
2102
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("g", {
2103
+ clipPath: "url(#pip)",
2104
+ fill: "#fff",
2105
+ children: [
2106
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2107
+ d: "M0 5v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3Zm17-1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14Z"
2108
+ }),
2109
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2110
+ d: "M10 14v4.879a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V14a3 3 0 0 0-3-3h-8a3 3 0 0 0-3 3ZM10 11.149c0 .113-.02.226-.06.332a.85.85 0 0 1-.8.519H5.736a.851.851 0 0 1 0-1.702h1.353l-2.792-2.8a.851.851 0 1 1 1.2-1.2l2.8 2.8V7.744a.851.851 0 0 1 1.703 0v3.405Z"
2111
+ })
2112
+ ]
1859
2113
  })
1860
2114
  });
1861
2115
 
@@ -1897,6 +2151,7 @@ const $4ee077ee5e6fe3e7$export$b286f91cddfedb5a = (0, $3Sbms$styledcomponents).d
1897
2151
  white-space: nowrap;
1898
2152
  max-height: 70vh;
1899
2153
  overflow: auto;
2154
+ border: 1px solid rgba(255, 255, 255, 0.1);
1900
2155
 
1901
2156
  ${$4ee077ee5e6fe3e7$export$d00c23c5e97ada8}:not(:last-child) {
1902
2157
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
@@ -1983,7 +2238,7 @@ const $ab29487ffcc05855$export$1e86fd0e1db89578 = (0, $3Sbms$styledcomponents).d
1983
2238
  justify-content: space-between;
1984
2239
  align-items: center;
1985
2240
  background-color: ${(props)=>props.theme.backgroundColor};
1986
- height: 60px;
2241
+ height: 65px;
1987
2242
  padding: 0 15px;
1988
2243
 
1989
2244
  @media (max-height: 500px) {
@@ -2000,6 +2255,8 @@ const $ab29487ffcc05855$export$4dc2e6a0e59ffa13 = (0, $3Sbms$styledcomponents).s
2000
2255
  line-height: 16px;
2001
2256
  color: #fff;
2002
2257
  margin-left: 5px;
2258
+ position: relative;
2259
+ bottom: 1px;
2003
2260
  `;
2004
2261
  const $ab29487ffcc05855$export$8376625f8bb18347 = (0, $3Sbms$styledcomponents).div`
2005
2262
  display: flex;
@@ -2340,6 +2597,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
2340
2597
 
2341
2598
 
2342
2599
  const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1ce5e673de)();
2600
+ const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
2343
2601
  const $f235befa4cdc42d6$var$Header = ()=>{
2344
2602
  const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , options: options , muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
2345
2603
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
@@ -2435,7 +2693,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2435
2693
  ]
2436
2694
  },
2437
2695
  ];
2438
- if (document.pictureInPictureEnabled) computedCategories[0].items.push({
2696
+ if (document.pictureInPictureEnabled && $f235befa4cdc42d6$var$browser.platform.type === "desktop") computedCategories[0].items.push({
2439
2697
  id: "pip",
2440
2698
  title: "Picture-in-Picture",
2441
2699
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$5170987d58ae338d), {}),
@@ -2476,25 +2734,26 @@ var $f235befa4cdc42d6$export$2e2bcd8739ae039 = $f235befa4cdc42d6$var$Header;
2476
2734
 
2477
2735
 
2478
2736
 
2479
- const $ecd263152c3a54ee$var$useWindowSize = (element)=>{
2737
+ const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
2480
2738
  const [size, setSize] = (0, $3Sbms$useState)([
2481
2739
  0,
2482
2740
  0
2483
2741
  ]);
2484
2742
  (0, $3Sbms$useLayoutEffect)(()=>{
2485
2743
  const updateSize = ()=>setSize([
2486
- element?.offsetWidth || window.innerWidth,
2487
- element?.offsetHeight || window.innerHeight,
2744
+ element?.offsetWidth || 0,
2745
+ element?.offsetHeight || 0
2488
2746
  ]);
2489
- window.addEventListener("resize", updateSize);
2490
- updateSize();
2491
- return ()=>window.removeEventListener("resize", updateSize);
2747
+ if (element) {
2748
+ const observer = new ResizeObserver(updateSize);
2749
+ observer.observe(element);
2750
+ return ()=>observer.unobserve(element);
2751
+ }
2492
2752
  }, [
2493
2753
  element
2494
2754
  ]);
2495
2755
  return size;
2496
2756
  };
2497
- var $ecd263152c3a54ee$export$2e2bcd8739ae039 = $ecd263152c3a54ee$var$useWindowSize;
2498
2757
 
2499
2758
 
2500
2759
 
@@ -2504,15 +2763,11 @@ var $ecd263152c3a54ee$export$2e2bcd8739ae039 = $ecd263152c3a54ee$var$useWindowSi
2504
2763
 
2505
2764
 
2506
2765
 
2507
-
2508
- const $6043ae1b48c5aa97$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
2509
- fill: ${(props)=>props.theme.controlsIconColor};
2510
- `;
2511
2766
  const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash , status: status , deviceRequest: deviceRequest })=>{
2512
2767
  if (slash) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2513
- width: "25",
2514
- height: "25",
2515
- viewBox: "0 0 25 25",
2768
+ width: "24",
2769
+ height: "24",
2770
+ viewBox: "0 0 24 24",
2516
2771
  fill: "none",
2517
2772
  xmlns: "http://www.w3.org/2000/svg",
2518
2773
  children: [
@@ -2548,13 +2803,13 @@ const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash ,
2548
2803
  ]
2549
2804
  });
2550
2805
  if (status) return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
2551
- width: "12",
2552
- height: "13",
2553
- viewBox: "0 0 12 13",
2806
+ width: "14",
2807
+ height: "14",
2808
+ viewBox: "0 0 14 14",
2554
2809
  fill: "none",
2555
2810
  xmlns: "http://www.w3.org/2000/svg",
2556
2811
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2557
- d: "M5.125 1.676a1.167 1.167 0 0 1 1.72-.082c.211.222.327.517.322.823v1.99a.583.583 0 1 0 1.166 0v-1.99A2.333 2.333 0 0 0 4.25.94a.583.583 0 1 0 .875.735ZM9.92 7.241h.117a.583.583 0 0 0 .583-.472c.042-.282.057-.567.047-.852a.583.583 0 1 0-1.167 0c0 .215-.021.43-.064.642a.584.584 0 0 0 .484.682Zm1.75 3.535L1.17.276a.583.583 0 1 0-.828.823l3.325 3.348v1.47a2.333 2.333 0 0 0 3.5 2.018l.851.852A3.5 3.5 0 0 1 2.5 5.917a.583.583 0 0 0-1.167 0 4.667 4.667 0 0 0 4.084 4.626v1.207H4.25a.583.583 0 0 0 0 1.167h3.5a.583.583 0 0 0 0-1.167H6.583v-1.207a4.59 4.59 0 0 0 2.246-.928l1.983 1.984a.584.584 0 0 0 .829-.823h.029ZM6 7.084a1.167 1.167 0 0 1-1.167-1.167v-.303l1.43 1.435A1.015 1.015 0 0 1 6 7.084Z",
2812
+ d: "M6.125 2.176a1.167 1.167 0 0 1 1.72-.082c.211.222.326.517.321.823v1.99a.583.583 0 1 0 1.167 0v-1.99A2.333 2.333 0 0 0 5.25 1.44a.583.583 0 1 0 .875.735Zm4.795 5.565h.117a.583.583 0 0 0 .583-.472c.042-.282.057-.567.046-.852a.584.584 0 0 0-1.166 0c0 .215-.022.43-.064.642a.583.583 0 0 0 .484.682Zm1.75 3.535L2.17.776a.583.583 0 1 0-.829.823l3.325 3.348v1.47a2.333 2.333 0 0 0 3.5 2.018l.852.852A3.5 3.5 0 0 1 3.5 6.417a.583.583 0 0 0-1.167 0 4.667 4.667 0 0 0 4.083 4.626v1.207H5.25a.583.583 0 0 0 0 1.167h3.5a.583.583 0 0 0 0-1.167H7.583v-1.207a4.59 4.59 0 0 0 2.246-.928l1.983 1.984a.584.584 0 0 0 .829-.823h.029ZM7 7.584a1.167 1.167 0 0 1-1.167-1.167v-.303l1.43 1.435A1.015 1.015 0 0 1 7 7.584Z",
2558
2813
  fill: "#fff"
2559
2814
  })
2560
2815
  });
@@ -2576,13 +2831,14 @@ const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash ,
2576
2831
  ]
2577
2832
  });
2578
2833
  return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
2579
- width: "16",
2580
- height: "22",
2581
- viewBox: "0 0 16 22",
2834
+ width: "24",
2835
+ height: "24",
2836
+ viewBox: "0 0 24 24",
2582
2837
  fill: "none",
2583
2838
  xmlns: "http://www.w3.org/2000/svg",
2584
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($6043ae1b48c5aa97$var$ThemedPath, {
2585
- d: "M8 14a4 4 0 0 0 4-4V4a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM6 4a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V4Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 0 0-2 0 8 8 0 0 0 7 7.93V20H5a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2H9v-2.07A8 8 0 0 0 16 10Z"
2839
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2840
+ d: "M12 15a4 4 0 0 0 4-4V5a4 4 0 1 0-8 0v6a4 4 0 0 0 4 4ZM10 5a2 2 0 1 1 4 0v6a2 2 0 0 1-4 0V5Zm10 6a1 1 0 0 0-2 0 6 6 0 1 1-12 0 1 1 0 1 0-2 0 8 8 0 0 0 7 7.93V21H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2h-2v-2.07A8 8 0 0 0 20 11Z",
2841
+ fill: "#fff"
2586
2842
  })
2587
2843
  });
2588
2844
  };
@@ -2590,15 +2846,11 @@ var $6043ae1b48c5aa97$export$2e2bcd8739ae039 = $6043ae1b48c5aa97$var$Microphone;
2590
2846
 
2591
2847
 
2592
2848
 
2593
-
2594
- const $04e57b1f07a8e9f4$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
2595
- fill: ${(props)=>props.theme.controlsIconColor};
2596
- `;
2597
2849
  const $04e57b1f07a8e9f4$var$Camera = ({ slash: slash , status: status , deviceRequest: deviceRequest })=>{
2598
2850
  if (slash) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2599
- width: "25",
2600
- height: "25",
2601
- viewBox: "0 0 25 25",
2851
+ width: "24",
2852
+ height: "24",
2853
+ viewBox: "0 0 24 24",
2602
2854
  fill: "none",
2603
2855
  xmlns: "http://www.w3.org/2000/svg",
2604
2856
  children: [
@@ -2615,13 +2867,13 @@ const $04e57b1f07a8e9f4$var$Camera = ({ slash: slash , status: status , deviceRe
2615
2867
  ]
2616
2868
  });
2617
2869
  if (status) return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
2618
- width: "12",
2619
- height: "13",
2620
- viewBox: "0 0 12 13",
2870
+ width: "14",
2871
+ height: "14",
2872
+ viewBox: "0 0 14 14",
2621
2873
  fill: "none",
2622
2874
  xmlns: "http://www.w3.org/2000/svg",
2623
2875
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2624
- d: "M3.498 3.169 1.164.836a.586.586 0 0 0-.828.828L1.695 3A1.75 1.75 0 0 0 .167 4.75v3.5A1.75 1.75 0 0 0 1.917 10h5.25a1.75 1.75 0 0 0 1.108-.403l2.56 2.567a.582.582 0 0 0 .83 0 .582.582 0 0 0 0-.828L3.497 3.169Zm3.669 5.664h-5.25a.583.583 0 0 1-.584-.583v-3.5a.583.583 0 0 1 .584-.584h.927l4.591 4.597a.583.583 0 0 1-.268.07Zm4.392-5.162a.583.583 0 0 0-.583 0l-2.06 1.015A1.75 1.75 0 0 0 7.167 3h-.781a.583.583 0 1 0 0 1.166h.782a.583.583 0 0 1 .583.584v.875a.944.944 0 0 0 0 .11.38.38 0 0 0 .03.117s.028.035.04.059a.583.583 0 0 0 .088.122s.058.035.087.058l.1.065c.044.006.089.006.133 0a.41.41 0 0 0 .082 0 .949.949 0 0 0 .11 0 .38.38 0 0 0 .118-.03l2.129-1.015v3.337a.584.584 0 0 0 1.166 0V4.166a.583.583 0 0 0-.274-.495Z",
2876
+ d: "M4.497 3.669 2.164 1.336a.586.586 0 1 0-.828.828L2.695 3.5a1.75 1.75 0 0 0-1.529 1.75v3.5a1.75 1.75 0 0 0 1.75 1.75h5.25a1.75 1.75 0 0 0 1.109-.403l2.56 2.567a.583.583 0 0 0 .957-.19.582.582 0 0 0-.128-.638L4.497 3.669Zm3.67 5.664h-5.25a.583.583 0 0 1-.584-.583v-3.5a.583.583 0 0 1 .583-.584h.928l4.59 4.597a.583.583 0 0 1-.268.07Zm4.392-5.162a.583.583 0 0 0-.583 0l-2.06 1.015A1.75 1.75 0 0 0 8.166 3.5h-.781a.583.583 0 0 0 0 1.166h.781a.583.583 0 0 1 .584.584v.875a.944.944 0 0 0 0 .11.38.38 0 0 0 .029.117s.03.035.04.059a.584.584 0 0 0 .088.122s.059.035.088.058l.099.065c.044.006.09.006.134 0a.41.41 0 0 0 .082 0 .949.949 0 0 0 .11 0 .38.38 0 0 0 .117-.03l2.13-1.015v3.337a.583.583 0 0 0 1.166 0V4.666a.584.584 0 0 0-.274-.495Z",
2625
2877
  fill: "#fff"
2626
2878
  })
2627
2879
  });
@@ -2643,13 +2895,14 @@ const $04e57b1f07a8e9f4$var$Camera = ({ slash: slash , status: status , deviceRe
2643
2895
  ]
2644
2896
  });
2645
2897
  return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
2646
- width: "20",
2647
- height: "12",
2648
- viewBox: "0 0 20 12",
2898
+ width: "24",
2899
+ height: "24",
2900
+ viewBox: "0 0 24 24",
2649
2901
  fill: "none",
2650
2902
  xmlns: "http://www.w3.org/2000/svg",
2651
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($04e57b1f07a8e9f4$var$ThemedPath, {
2652
- d: "M19.53 1.15a1 1 0 0 0-1 0L15 2.89A3 3 0 0 0 12 0H3a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 19 11a1 1 0 0 0 .875-.514A1 1 0 0 0 20 10V2a1 1 0 0 0-.47-.85ZM13 9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5V5.12l3-1.5v4.76Z"
2903
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2904
+ d: "M21.53 7.15a1 1 0 0 0-1 0L17 8.89A3 3 0 0 0 14 6H5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h9a3 3 0 0 0 3-2.89l3.56 1.78A1 1 0 0 0 21 17a1 1 0 0 0 .875-.514A1 1 0 0 0 22 16V8a1 1 0 0 0-.47-.85ZM15 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6Zm5-.62-3-1.5v-1.76l3-1.5v4.76Z",
2905
+ fill: "#fff"
2653
2906
  })
2654
2907
  });
2655
2908
  };
@@ -2667,18 +2920,18 @@ const $1ca024917df8f7bc$var$ThemedArrowPath = (0, $3Sbms$styledcomponents).path`
2667
2920
  `;
2668
2921
  const $1ca024917df8f7bc$var$Screen = ({ arrow: arrow , white: white , deviceRequest: deviceRequest })=>{
2669
2922
  if (deviceRequest) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2670
- width: "31",
2923
+ width: "30",
2671
2924
  height: "30",
2672
- viewBox: "0 0 31 30",
2925
+ viewBox: "0 0 30 30",
2673
2926
  fill: "none",
2674
2927
  xmlns: "http://www.w3.org/2000/svg",
2675
2928
  children: [
2676
2929
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2677
- d: "M6.75 3.75h17.5A3.75 3.75 0 0 1 28 7.5v10a3.75 3.75 0 0 1-3.75 3.75H6.75A3.75 3.75 0 0 1 3 17.5v-10a3.75 3.75 0 0 1 3.75-3.75Z",
2930
+ d: "M6.25 3.75h17.5A3.75 3.75 0 0 1 27.5 7.5v10a3.75 3.75 0 0 1-3.75 3.75H6.25A3.75 3.75 0 0 1 2.5 17.5v-10a3.75 3.75 0 0 1 3.75-3.75Z",
2678
2931
  fill: "url(#screenTop)"
2679
2932
  }),
2680
2933
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2681
- d: "M14.25 23.75v-2.5h2.5v2.5h5a1.25 1.25 0 0 1 0 2.5H9.25a1.25 1.25 0 0 1 0-2.5h5Z",
2934
+ d: "M13.75 23.75v-2.5h2.5v2.5h5a1.25 1.25 0 0 1 0 2.5H8.75a1.25 1.25 0 0 1 0-2.5h5Z",
2682
2935
  fill: "url(#screenBottom)"
2683
2936
  })
2684
2937
  ]
@@ -2706,6 +2959,22 @@ var $1ca024917df8f7bc$export$2e2bcd8739ae039 = $1ca024917df8f7bc$var$Screen;
2706
2959
 
2707
2960
 
2708
2961
 
2962
+
2963
+ const $435a6fc13d21296b$var$ThemedCirclePlain = (0, $3Sbms$styledcomponents).circle`
2964
+ stroke: ${({ theme: theme })=>theme.primaryColor};
2965
+ `;
2966
+ const $435a6fc13d21296b$var$ThemedCircleAlpha = (0, $3Sbms$styledcomponents).circle`
2967
+ stroke: ${({ theme: theme })=>$435a6fc13d21296b$var$hex2rgba(theme.primaryColor, 0.7683870967741935)};
2968
+ `;
2969
+ const $435a6fc13d21296b$var$hex2rgba = (hex, alpha)=>{
2970
+ const rh = hex.slice(1, 3);
2971
+ const gh = hex.slice(3, 5);
2972
+ const bh = hex.slice(5, 7);
2973
+ const rrgb = parseInt(rh, 16);
2974
+ const grgb = parseInt(gh, 16);
2975
+ const brgb = parseInt(bh, 16);
2976
+ return `rgba(${rrgb}, ${grgb}, ${brgb}, ${alpha})`;
2977
+ };
2709
2978
  const $435a6fc13d21296b$var$Ripple = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2710
2979
  xmlns: "http://www.w3.org/2000/svg",
2711
2980
  style: {
@@ -2721,12 +2990,11 @@ const $435a6fc13d21296b$var$Ripple = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2721
2990
  viewBox: "0 0 100 100",
2722
2991
  preserveAspectRatio: "xMidYMid",
2723
2992
  children: [
2724
- /*#__PURE__*/ (0, $3Sbms$jsxs)("circle", {
2993
+ /*#__PURE__*/ (0, $3Sbms$jsxs)($435a6fc13d21296b$var$ThemedCirclePlain, {
2725
2994
  cx: "50",
2726
2995
  cy: "50",
2727
2996
  r: "0",
2728
2997
  fill: "none",
2729
- stroke: "#6765fc",
2730
2998
  children: [
2731
2999
  /*#__PURE__*/ (0, $3Sbms$jsx)("animate", {
2732
3000
  attributeName: "r",
@@ -2750,12 +3018,11 @@ const $435a6fc13d21296b$var$Ripple = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2750
3018
  })
2751
3019
  ]
2752
3020
  }),
2753
- /*#__PURE__*/ (0, $3Sbms$jsxs)("circle", {
3021
+ /*#__PURE__*/ (0, $3Sbms$jsxs)($435a6fc13d21296b$var$ThemedCircleAlpha, {
2754
3022
  cx: "50",
2755
3023
  cy: "50",
2756
3024
  r: "0",
2757
3025
  fill: "none",
2758
- stroke: "rgba(102, 100, 252, 0.7683870967741935)",
2759
3026
  children: [
2760
3027
  /*#__PURE__*/ (0, $3Sbms$jsx)("animate", {
2761
3028
  attributeName: "r",
@@ -2786,13 +3053,13 @@ var $435a6fc13d21296b$export$2e2bcd8739ae039 = $435a6fc13d21296b$var$Ripple;
2786
3053
 
2787
3054
 
2788
3055
  const $57da43088f4a416a$var$User = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
2789
- width: "20",
2790
- height: "22",
2791
- viewBox: "0 0 20 22",
3056
+ width: "24",
3057
+ height: "24",
3058
+ viewBox: "0 0 24 24",
2792
3059
  fill: "none",
2793
3060
  xmlns: "http://www.w3.org/2000/svg",
2794
3061
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
2795
- d: "M13.71 11.71a6 6 0 1 0-7.42 0 10 10 0 0 0-6.22 8.18 1.006 1.006 0 0 0 2 .22 8 8 0 0 1 15.9 0 1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1 10 10 0 0 0-6.25-8.19ZM10 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z",
3062
+ d: "M15.71 12.71a6 6 0 1 0-7.42 0 10 10 0 0 0-6.22 8.18 1.006 1.006 0 1 0 2 .22 8 8 0 0 1 15.9 0 1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1 10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z",
2796
3063
  fill: "#fff"
2797
3064
  })
2798
3065
  });
@@ -2801,18 +3068,235 @@ var $57da43088f4a416a$export$2e2bcd8739ae039 = $57da43088f4a416a$var$User;
2801
3068
 
2802
3069
 
2803
3070
 
2804
- const $6efc75079651494a$var$Blink = (0, $3Sbms$keyframes)`
2805
- 50% {
2806
- border-color: #6967fc;
2807
- }
3071
+ const $7ec04c1818c68245$export$b302ef9d8310f71 = (0, $3Sbms$styledcomponents).div`
3072
+ display: flex;
3073
+ flex: 1;
3074
+ flex-direction: ${(props)=>props.direction};
3075
+ background-color: ${(props)=>props.theme.backgroundColor};
3076
+ padding: 0 10px;
3077
+ position: relative;
3078
+ overflow: hidden;
2808
3079
  `;
2809
- const $6efc75079651494a$var$Flash = (0, $3Sbms$keyframes)`
2810
- 0% {
2811
- opacity: 0.9;
2812
- }
2813
- 100% {
2814
- opacity: 0;
2815
- }
3080
+ const $7ec04c1818c68245$export$5d87c823a66d4f1a = (0, $3Sbms$styledcomponents).div`
3081
+ display: flex;
3082
+ width: ${(props)=>{
3083
+ if (props.audioTiles) return "100%";
3084
+ if (props.orientation === "landscape" && props.reduced) return "20%";
3085
+ return "100%";
3086
+ }};
3087
+ height: ${(props)=>{
3088
+ if (props.audioTiles) return "100%";
3089
+ if (props.orientation === "portrait" && props.reduced) return "50%";
3090
+ return "100%";
3091
+ }};
3092
+ flex-direction: row;
3093
+ flex-wrap: wrap;
3094
+ justify-content: center;
3095
+ align-content: center;
3096
+ gap: ${(props)=>props.audioTiles ? "48px" : "15px"};
3097
+ overflow: scroll;
3098
+ `;
3099
+ const $7ec04c1818c68245$export$798352b46783b18d = (0, $3Sbms$styledcomponents).div`
3100
+ display: flex;
3101
+ justify-content: center;
3102
+ align-items: center;
3103
+ position: relative;
3104
+ background-color: ${(props)=>props.theme.streamTileBackgroundColor};
3105
+ border: ${(props)=>{
3106
+ if (props.activeBorder) return `2px solid ${props.theme.primaryColor}`;
3107
+ else if (props.border) return `2px solid ${props.theme.streamTileBorderColor}`;
3108
+ return `2px solid ${props.theme.backgroundColor}`;
3109
+ }};
3110
+ border-radius: 20px;
3111
+ color: #cbcbcb;
3112
+ box-sizing: border-box;
3113
+ max-height: 100%;
3114
+ cursor: ${(props)=>props.cursor ? props.cursor : "default"};
3115
+ `;
3116
+ const $7ec04c1818c68245$export$d574f5511ec1d79a = (0, $3Sbms$styledcomponents).video`
3117
+ position: absolute;
3118
+ top: 0;
3119
+ left: 0;
3120
+ width: 100%;
3121
+ height: 100%;
3122
+ object-fit: cover;
3123
+ border-radius: inherit;
3124
+ transform: ${(props)=>props.mirror ? "scale(-1, 1)" : "none"};
3125
+ z-index: ${(props)=>props.zIndex ? props.zIndex : "unset"};
3126
+ `;
3127
+ const $7ec04c1818c68245$export$778ed67917f5eacf = (0, $3Sbms$styledcomponents).div`
3128
+ display: flex;
3129
+ position: absolute;
3130
+ top: 8px;
3131
+ left: 8px;
3132
+ gap: 8px;
3133
+ z-index: 15;
3134
+ `;
3135
+ const $7ec04c1818c68245$export$92fe811838849d7d = (0, $3Sbms$styledcomponents).div`
3136
+ display: flex;
3137
+ justify-content: center;
3138
+ align-items: center;
3139
+ width: 26px;
3140
+ height: 26px;
3141
+ border-radius: 50%;
3142
+ background-color: rgba(28, 32, 36, 0.25);
3143
+ `;
3144
+ const $7ec04c1818c68245$export$a878cdfb933a1421 = (0, $3Sbms$styledcomponents).div`
3145
+ position: absolute;
3146
+ display: flex;
3147
+ align-items: center;
3148
+ gap: 5px;
3149
+ background: rgba(27, 32, 36, 0.25);
3150
+ border-radius: 50px;
3151
+ padding: 5px 10px 5px 5px;
3152
+ bottom: 8px;
3153
+ left: 8px;
3154
+ color: white;
3155
+ z-index: 15;
3156
+ `;
3157
+ const $7ec04c1818c68245$export$b430fec6b171ceb5 = (0, $3Sbms$styledcomponents).span`
3158
+ display: inline-block;
3159
+ font-size: 11px;
3160
+ font-weight: 700;
3161
+ max-width: 100%;
3162
+ white-space: nowrap;
3163
+ overflow: hidden;
3164
+ text-overflow: ellipsis;
3165
+ box-sizing: border-box;
3166
+ `;
3167
+ const $7ec04c1818c68245$export$f6525863ef5a71a9 = (0, $3Sbms$styledcomponents).div`
3168
+ display: flex;
3169
+ justify-content: center;
3170
+ align-items: center;
3171
+ width: 14px;
3172
+ height: 14px;
3173
+ padding: 3px 4px;
3174
+ box-sizing: border-box;
3175
+ background-color: #2d2d2d;
3176
+ border-radius: 50px;
3177
+ font-size: 9px;
3178
+ font-weight: 700;
3179
+ line-height: 8px;
3180
+ `;
3181
+ const $7ec04c1818c68245$export$f217faec90120a0c = (0, $3Sbms$styledcomponents).div`
3182
+ display: flex;
3183
+ justify-content: center;
3184
+ align-items: center;
3185
+ flex-direction: column;
3186
+ width: 100%;
3187
+ height: 100%;
3188
+ border-radius: inherit;
3189
+ z-index: 10;
3190
+ background: ${(props)=>props.streaming ? "linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8))" : "none"};
3191
+ `;
3192
+ const $7ec04c1818c68245$export$df42e007689062b0 = (0, $3Sbms$styledcomponents).p`
3193
+ text-align: center;
3194
+ font-weight: 600;
3195
+ font-size: ${(props)=>{
3196
+ if (props.size === "small") return "12px";
3197
+ if (props.size === "medium") return "14px";
3198
+ if (props.size === "large") return "16px";
3199
+ return "16px";
3200
+ }};
3201
+ margin: 12px 6px;
3202
+ `;
3203
+ const $7ec04c1818c68245$export$81d5557f9199e44d = (0, $3Sbms$styledcomponents).div`
3204
+ display: flex;
3205
+ max-width: 90%;
3206
+ background: rgba(45, 45, 45, 0.5);
3207
+ border-radius: 50px;
3208
+ padding: ${(props)=>{
3209
+ if (props.size === "small") return "6px";
3210
+ if (props.size === "medium") return "6px";
3211
+ if (props.size === "large") return "10px";
3212
+ return "10px";
3213
+ }};
3214
+ gap: ${(props)=>{
3215
+ if (props.size === "small") return "8px";
3216
+ if (props.size === "medium") return "12px";
3217
+ if (props.size === "large") return "18px";
3218
+ return "18px";
3219
+ }};
3220
+ gap: 18px;
3221
+ box-sizing: border-box;
3222
+ `;
3223
+ const $7ec04c1818c68245$export$2c451b1e9e28138c = (0, $3Sbms$styledcomponents).button`
3224
+ display: flex;
3225
+ justify-content: center;
3226
+ align-items: center;
3227
+ border: none;
3228
+ border-radius: 50%;
3229
+ background-color: #2d2d2d;
3230
+ padding: ${(props)=>{
3231
+ if (props.size === "small") return "2px";
3232
+ if (props.size === "medium") return "6px";
3233
+ if (props.size === "large") return "12px";
3234
+ return 0;
3235
+ }};
3236
+ border: 2px solid transparent;
3237
+
3238
+ &:hover {
3239
+ border: 2px solid ${({ theme: theme })=>theme.primaryColor};
3240
+ box-sizing: border-box;
3241
+ }
3242
+ `;
3243
+ const $7ec04c1818c68245$export$6ddfb572d7b6d164 = (0, $3Sbms$styledcomponents).div`
3244
+ display: flex;
3245
+ justify-content: center;
3246
+ align-items: center;
3247
+ width: 56px;
3248
+ height: 56px;
3249
+ background-color: #2d2d2d;
3250
+ border-radius: 30%;
3251
+ `;
3252
+ const $7ec04c1818c68245$export$a2930b41faa750f4 = (0, $3Sbms$styledcomponents).span`
3253
+ font-size: 26px;
3254
+ font-weight: 600;
3255
+ line-height: 20px;
3256
+ color: #fff;
3257
+ `;
3258
+ const $7ec04c1818c68245$export$2d75367b6e042d67 = (0, $3Sbms$styledcomponents).img`
3259
+ width: inherit;
3260
+ height: inherit;
3261
+ border-radius: inherit;
3262
+ `;
3263
+ const $7ec04c1818c68245$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).img`
3264
+ border: 2px solid #fff;
3265
+ border-radius: 8px;
3266
+ width: 36px;
3267
+ height: 36px;
3268
+ `;
3269
+ const $7ec04c1818c68245$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).div`
3270
+ display: flex;
3271
+ justify-content: center;
3272
+ align-items: center;
3273
+ background-color: #2d2d2d;
3274
+ width: 13px;
3275
+ height: 13px;
3276
+ border-radius: 50px;
3277
+ color: #fff;
3278
+ font-size: 7px;
3279
+ font-weight: 700;
3280
+
3281
+ svg {
3282
+ width: 9px;
3283
+ height: 9px;
3284
+ }
3285
+ `;
3286
+
3287
+
3288
+ const $6efc75079651494a$var$Blink = (color)=>(0, $3Sbms$keyframes)`
3289
+ 50% {
3290
+ border-color: ${color};
3291
+ }
3292
+ `;
3293
+ const $6efc75079651494a$var$Flash = (0, $3Sbms$keyframes)`
3294
+ 0% {
3295
+ opacity: 0.9;
3296
+ }
3297
+ 100% {
3298
+ opacity: 0;
3299
+ }
2816
3300
  `;
2817
3301
  const $6efc75079651494a$export$c983850c6c9d8b0e = (0, $3Sbms$keyframes)`
2818
3302
  0% {
@@ -2861,8 +3345,8 @@ const $6efc75079651494a$export$ba5a75b023bcdce2 = (0, $3Sbms$styledcomponents).d
2861
3345
  position: relative;
2862
3346
  width: 100%;
2863
3347
  height: 100%;
2864
- background-color: ${(props)=>props.theme.streamTileBackgroundColor};
2865
- border: ${(props)=>props.border ? `2px solid ${props.theme.streamTileBorderColor}` : "none"};
3348
+ background-color: ${(props)=>props.border ? props.theme.streamTileBackgroundColor : "transparent"};
3349
+ border: 2px solid ${(props)=>props.border ? props.theme.streamTileBorderColor : "transparent"};
2866
3350
  border-radius: 20px;
2867
3351
  box-sizing: border-box;
2868
3352
 
@@ -2914,7 +3398,7 @@ const $6efc75079651494a$export$3f538be5f07ec098 = (0, $3Sbms$styledcomponents).d
2914
3398
  z-index: 50;
2915
3399
  color: #fff;
2916
3400
  overflow: hidden;
2917
- animation: ${$6efc75079651494a$var$Blink} 1.3s infinite;
3401
+ animation: ${(props)=>$6efc75079651494a$var$Blink(props.theme.primaryColor)} 1.3s infinite;
2918
3402
  `;
2919
3403
  const $6efc75079651494a$export$31bbfacf5347c84a = (0, $3Sbms$styledcomponents).div`
2920
3404
  display: flex;
@@ -2939,8 +3423,8 @@ const $6efc75079651494a$export$dfd6aceefcfce0c9 = (0, $3Sbms$styledcomponents).d
2939
3423
  margin-top: 15px;
2940
3424
  `;
2941
3425
  const $6efc75079651494a$export$a85169f132f25a9d = (0, $3Sbms$styledcomponents).button`
2942
- background-color: ${(props)=>props.active ? "#6967fc" : "transparent"};
2943
- border: 2px solid #6967fc;
3426
+ background-color: ${(props)=>props.active ? props.theme.primaryColor : "transparent"};
3427
+ border: 2px solid ${({ theme: theme })=>theme.primaryColor};
2944
3428
  border-radius: 50px;
2945
3429
  padding: 8px 18px;
2946
3430
  color: #fff;
@@ -2949,7 +3433,7 @@ const $6efc75079651494a$export$a85169f132f25a9d = (0, $3Sbms$styledcomponents).b
2949
3433
  line-height: 22px;
2950
3434
 
2951
3435
  &:hover {
2952
- background-color: #6967fc;
3436
+ background-color: ${({ theme: theme })=>theme.primaryColor};
2953
3437
  }
2954
3438
  `;
2955
3439
  const $6efc75079651494a$export$e07ea3386b3cb3d9 = (0, $3Sbms$styledcomponents).button`
@@ -2982,8 +3466,9 @@ const $6efc75079651494a$export$9e533c08c30af08 = (0, $3Sbms$styledcomponents).di
2982
3466
  position: absolute;
2983
3467
  width: 100%;
2984
3468
  height: 100%;
2985
- background-color: rgba(0, 0, 0, 0.75);
2986
- z-index: 16;
3469
+ background-color: ${(props)=>props.show ? "rgba(0, 0, 0, 0.75)" : "transparent"};
3470
+ transition: all ${({ show: show })=>show ? "0.2s" : "0.66s"};
3471
+ z-index: ${({ show: show })=>show ? 16 : -1};
2987
3472
  `;
2988
3473
  const $6efc75079651494a$export$2b501aee548bae06 = (0, $3Sbms$styledcomponents).div`
2989
3474
  position: absolute;
@@ -3009,240 +3494,29 @@ const $6efc75079651494a$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).i
3009
3494
  width: 36px;
3010
3495
  height: 36px;
3011
3496
  `;
3012
-
3013
-
3014
-
3015
- const $7ec04c1818c68245$export$b302ef9d8310f71 = (0, $3Sbms$styledcomponents).div`
3016
- display: flex;
3017
- flex: 1;
3018
- flex-direction: ${(props)=>props.direction};
3019
- background-color: ${(props)=>props.theme.backgroundColor};
3020
- padding: 16px 10px;
3021
- position: relative;
3022
- overflow: hidden;
3023
- `;
3024
- const $7ec04c1818c68245$export$5d87c823a66d4f1a = (0, $3Sbms$styledcomponents).div`
3025
- display: flex;
3026
- width: ${(props)=>{
3027
- if (props.audioTiles) return "100%";
3028
- if (props.orientation === "landscape") {
3029
- if (props.reduced) return "20%";
3030
- return "80%";
3031
- }
3032
- return "100%";
3033
- }};
3034
- height: ${(props)=>{
3035
- if (props.audioTiles) return "100%";
3036
- if (props.orientation === "portrait" && props.reduced) return "50%";
3037
- return "100%";
3038
- }};
3039
- flex-direction: row;
3040
- flex-wrap: wrap;
3041
- justify-content: center;
3042
- align-content: center;
3043
- gap: ${(props)=>props.audioTiles ? "48px" : "15px"};
3044
- overflow: scroll;
3045
- `;
3046
- const $7ec04c1818c68245$export$798352b46783b18d = (0, $3Sbms$styledcomponents).div`
3047
- display: flex;
3048
- justify-content: center;
3049
- align-items: center;
3050
- position: relative;
3051
- background-color: ${(props)=>props.theme.streamTileBackgroundColor};
3052
- border: ${(props)=>{
3053
- if (props.activeBorder) return "2px solid #6967fc";
3054
- else if (props.border) return `2px solid ${props.theme.streamTileBorderColor}`;
3055
- return "none";
3056
- }};
3057
- border-radius: 20px;
3058
- color: #cbcbcb;
3059
- box-sizing: border-box;
3060
- max-height: 100%;
3061
- cursor: ${(props)=>props.cursor ? props.cursor : "default"};
3062
- `;
3063
- const $7ec04c1818c68245$export$d574f5511ec1d79a = (0, $3Sbms$styledcomponents).video`
3064
- position: absolute;
3065
- top: 0;
3066
- left: 0;
3067
- width: 100%;
3068
- height: 100%;
3069
- object-fit: cover;
3070
- border-radius: inherit;
3071
- transform: ${(props)=>props.mirror ? "scale(-1, 1)" : "none"};
3072
- z-index: ${(props)=>props.zIndex ? props.zIndex : "unset"};
3073
- `;
3074
- const $7ec04c1818c68245$export$778ed67917f5eacf = (0, $3Sbms$styledcomponents).div`
3075
- display: flex;
3076
- position: absolute;
3077
- top: 16px;
3078
- left: 16px;
3079
- gap: 8px;
3080
- z-index: 15;
3081
-
3082
- @media (max-width: 500px) {
3083
- top: 8px;
3084
- left: 8px;
3085
- }
3086
- `;
3087
- const $7ec04c1818c68245$export$92fe811838849d7d = (0, $3Sbms$styledcomponents).div`
3088
- display: flex;
3089
- justify-content: center;
3090
- align-items: center;
3091
- width: 26px;
3092
- height: 26px;
3093
- border-radius: 50%;
3094
- background-color: rgba(28, 32, 36, 0.25);
3095
- `;
3096
- const $7ec04c1818c68245$export$b430fec6b171ceb5 = (0, $3Sbms$styledcomponents).div`
3097
- position: absolute;
3098
- display: flex;
3099
- bottom: 10px;
3100
- left: 16px;
3101
- color: white;
3102
- font-size: 12px;
3103
- right: 16px;
3104
- z-index: 15;
3105
-
3106
- p {
3107
- display: inline-block;
3108
- max-width: 100%;
3109
- background: rgba(27, 33, 39, 0.3);
3110
- border-radius: 10px;
3111
- padding: 10px;
3112
- margin: 0;
3113
- white-space: nowrap;
3114
- overflow: hidden;
3115
- text-overflow: ellipsis;
3116
- box-sizing: border-box;
3117
- }
3118
-
3119
- @media (max-width: 500px) {
3120
- bottom: 7.5px;
3121
- left: 8px;
3122
- }
3123
- `;
3124
- const $7ec04c1818c68245$export$f217faec90120a0c = (0, $3Sbms$styledcomponents).div`
3125
- display: flex;
3126
- justify-content: center;
3127
- align-items: center;
3128
- flex-direction: column;
3129
- width: 100%;
3130
- height: 100%;
3131
- border-radius: inherit;
3132
- z-index: 10;
3133
- background: ${(props)=>props.streaming ? "linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8))" : "none"};
3134
- `;
3135
- const $7ec04c1818c68245$export$df42e007689062b0 = (0, $3Sbms$styledcomponents).p`
3136
- text-align: center;
3137
- font-weight: 600;
3138
- font-size: ${(props)=>{
3139
- if (props.size === "small") return "12px";
3140
- if (props.size === "medium") return "14px";
3141
- if (props.size === "large") return "16px";
3142
- return "16px";
3143
- }};
3144
- margin: 12px 6px;
3145
- `;
3146
- const $7ec04c1818c68245$export$81d5557f9199e44d = (0, $3Sbms$styledcomponents).div`
3147
- display: flex;
3148
- max-width: 90%;
3149
- background: rgba(45, 45, 45, 0.5);
3150
- border-radius: 50px;
3151
- padding: ${(props)=>{
3152
- if (props.size === "small") return "6px";
3153
- if (props.size === "medium") return "6px";
3154
- if (props.size === "large") return "10px";
3155
- return "10px";
3156
- }};
3157
- gap: ${(props)=>{
3158
- if (props.size === "small") return "8px";
3159
- if (props.size === "medium") return "12px";
3160
- if (props.size === "large") return "18px";
3161
- return "18px";
3162
- }};
3163
- gap: 18px;
3164
- box-sizing: border-box;
3165
- `;
3166
- const $7ec04c1818c68245$export$2c451b1e9e28138c = (0, $3Sbms$styledcomponents).button`
3167
- display: flex;
3168
- justify-content: center;
3169
- align-items: center;
3170
- border: none;
3171
- border-radius: 50%;
3172
- background-color: #2d2d2d;
3173
- padding: ${(props)=>{
3174
- if (props.size === "small") return "2px";
3175
- if (props.size === "medium") return "6px";
3176
- if (props.size === "large") return "12px";
3177
- return 0;
3178
- }};
3179
- border: 2px solid transparent;
3180
-
3181
- &:hover {
3182
- border: 2px solid #6967fc;
3183
- box-sizing: border-box;
3184
- }
3185
- `;
3186
- const $7ec04c1818c68245$export$6ddfb572d7b6d164 = (0, $3Sbms$styledcomponents).div`
3187
- display: flex;
3188
- justify-content: center;
3189
- align-items: center;
3190
- width: 56px;
3191
- height: 56px;
3192
- background-color: #2d2d2d;
3193
- border-radius: 30%;
3194
- `;
3195
- const $7ec04c1818c68245$export$a2930b41faa750f4 = (0, $3Sbms$styledcomponents).span`
3196
- font-size: 26px;
3197
- font-weight: 600;
3198
- line-height: 20px;
3199
- color: #fff;
3200
- `;
3201
- const $7ec04c1818c68245$export$2d75367b6e042d67 = (0, $3Sbms$styledcomponents).img`
3202
- width: inherit;
3203
- height: inherit;
3204
- border-radius: inherit;
3205
- `;
3206
- const $7ec04c1818c68245$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).img`
3207
- border: 2px solid #fff;
3208
- border-radius: 8px;
3209
- width: 36px;
3210
- height: 36px;
3211
- `;
3212
- const $7ec04c1818c68245$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).div`
3213
- display: flex;
3214
- justify-content: center;
3215
- align-items: center;
3216
- background-color: #2d2d2d;
3217
- width: 13px;
3218
- height: 13px;
3219
- border-radius: 50px;
3220
- color: #fff;
3221
- font-size: 7px;
3497
+ const $6efc75079651494a$export$500c3c5544c37412 = (0, $3Sbms$styledcomponents)((0, $7ec04c1818c68245$export$a878cdfb933a1421))`
3498
+ padding: 5px 10px;
3499
+ font-size: 11px;
3222
3500
  font-weight: 700;
3223
-
3224
- svg {
3225
- width: 9px;
3226
- height: 9px;
3227
- }
3501
+ line-height: 13px;
3228
3502
  `;
3229
3503
 
3230
3504
 
3505
+
3231
3506
  const $a53a1c6f62ad0fcc$var$getRequestButtonSize = (containerWidth)=>{
3232
3507
  if (containerWidth < 200) return "small";
3233
3508
  if (containerWidth < 300) return "medium";
3234
3509
  return "large";
3235
3510
  };
3236
3511
  const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 , height: height = 0 })=>{
3237
- const audioElementRef = (0, $3Sbms$useRef)(null);
3238
3512
  const videoElementRef = (0, $3Sbms$useRef)(null);
3239
3513
  const [hover, setHover] = (0, $3Sbms$useState)(false);
3240
3514
  const [requestingDevice, setRequestingDevice] = (0, $3Sbms$useState)(null);
3241
3515
  const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
3242
3516
  const requestingDeviceTimeoutRef = (0, $3Sbms$useRef)(null);
3243
- const { userInteractionTriggered: userInteractionTriggered } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3517
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3244
3518
  const { highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
3245
- const isSharingScreen = highlightedTile?.type === "screenshare" && highlightedTile.data.local;
3519
+ const isSharingScreen = highlightedTile?.type === "screenshare" && highlightedTile.peerId === selfPeerId;
3246
3520
  const microphoneActive = stream.microphone && !stream.muted;
3247
3521
  const showRequestDevice = !requestingDevice && hover && !highlightedTile && (!microphoneActive || !stream.webcam);
3248
3522
  const tileWidth = `${width}px`;
@@ -3262,15 +3536,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3262
3536
  const requestScreen = ()=>{
3263
3537
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestPeerDevice(stream.id, "screen");
3264
3538
  setRequestingDevice("screen");
3265
- };
3266
- (0, $3Sbms$useEffect)(()=>{
3267
- if (stream.microphone && audioElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVoice({
3268
- consumerId: stream.microphone,
3269
- element: audioElementRef.current
3270
- });
3271
- }, [
3272
- stream.microphone
3273
- ]);
3539
+ };
3274
3540
  (0, $3Sbms$useEffect)(()=>{
3275
3541
  if (!videoElementRef.current) throw new Error("videoElementRef not available");
3276
3542
  if (stream.webcam && videoElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVideo({
@@ -3312,9 +3578,9 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3312
3578
  }
3313
3579
  }
3314
3580
  };
3315
- window.addEventListener("requestDeviceResult", onRequestDeviceResult);
3581
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("requestDeviceResult", onRequestDeviceResult);
3316
3582
  return ()=>{
3317
- window.removeEventListener("requestDeviceResult", onRequestDeviceResult);
3583
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("requestDeviceResult", onRequestDeviceResult);
3318
3584
  };
3319
3585
  }, [
3320
3586
  stream.id,
@@ -3323,52 +3589,17 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3323
3589
  (0, $3Sbms$useEffect)(()=>{
3324
3590
  const onCustomMessage = async (event)=>{
3325
3591
  const { peerId: peerId } = event.detail;
3326
- const { type: type , imageSrc: imageSrc } = event.detail.event;
3327
- if (type === "snapshot" && peerId === stream.id) {
3328
- setFlashAnimation(true);
3329
- const statusIcon = stream.displayName ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$49ac927a2aaad85), {
3330
- children: stream.displayName.slice(0, 1).toUpperCase()
3331
- }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$49ac927a2aaad85), {
3332
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
3333
- });
3334
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)("Snapshot shared.", {
3335
- width: "272px",
3336
- icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$26fe7ec9351ff761), {
3337
- src: imageSrc
3338
- }),
3339
- messageStyle: {
3340
- fontWeight: 600,
3341
- fontSize: "16px"
3342
- },
3343
- button: {
3344
- text: "Open",
3345
- action: ({ close: close })=>{
3346
- window.open(imageSrc, "_blank");
3347
- close();
3348
- }
3349
- },
3350
- status: {
3351
- text: "From",
3352
- boldText: stream.displayName || "User",
3353
- icon: statusIcon
3354
- },
3355
- duration: 10000
3356
- });
3357
- }
3592
+ const { type: type } = event.detail.event;
3593
+ if (type === "snapshot" && peerId === stream.id) setFlashAnimation(true);
3358
3594
  };
3359
- window.addEventListener("customMessage", onCustomMessage);
3595
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
3360
3596
  return ()=>{
3361
- window.removeEventListener("customMessage", onCustomMessage);
3597
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
3362
3598
  };
3363
3599
  }, [
3364
3600
  stream.id,
3365
3601
  stream.displayName
3366
3602
  ]);
3367
- (0, $3Sbms$useEffect)(()=>{
3368
- if (userInteractionTriggered && audioElementRef.current?.paused) audioElementRef.current.play();
3369
- }, [
3370
- userInteractionTriggered
3371
- ]);
3372
3603
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$798352b46783b18d), {
3373
3604
  onMouseEnter: onMouseEnter,
3374
3605
  onMouseLeave: onMouseLeave,
@@ -3381,10 +3612,6 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3381
3612
  cursor: showRequestDevice ? "pointer" : "default",
3382
3613
  "data-peer-id": stream.id,
3383
3614
  children: [
3384
- /*#__PURE__*/ (0, $3Sbms$jsx)("audio", {
3385
- ref: audioElementRef,
3386
- autoPlay: true
3387
- }),
3388
3615
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$d574f5511ec1d79a), {
3389
3616
  ref: videoElementRef,
3390
3617
  style: {
@@ -3460,10 +3687,17 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3460
3687
  ]
3461
3688
  })
3462
3689
  }),
3463
- !showRequestDevice && stream.displayName && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
3464
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
3465
- children: stream.displayName
3466
- })
3690
+ !showRequestDevice && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$a878cdfb933a1421), {
3691
+ children: [
3692
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$f6525863ef5a71a9), {
3693
+ children: stream.displayName ? /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
3694
+ children: stream.displayName.slice(0, 1).toUpperCase()
3695
+ }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
3696
+ }),
3697
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
3698
+ children: stream.displayName || "User"
3699
+ })
3700
+ ]
3467
3701
  })
3468
3702
  ]
3469
3703
  });
@@ -3527,33 +3761,11 @@ const $76e24981612b551d$export$a87ec69641e9884 = (0, $3Sbms$styledcomponents).sp
3527
3761
 
3528
3762
 
3529
3763
  const $21c8ac858b8a352e$var$AudioTile = ({ stream: stream })=>{
3530
- const audioElementRef = (0, $3Sbms$useRef)(null);
3531
- const isMicrophoneActive = stream.microphone && !stream.muted;
3532
- const onMicrophoneEnabled = ()=>{
3533
- if (audioElementRef.current?.paused) audioElementRef.current.play();
3534
- };
3535
- (0, $3Sbms$useEffect)(()=>{
3536
- if (stream.microphone && audioElementRef.current && stream.microphone !== "self") (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVoice({
3537
- consumerId: stream.microphone,
3538
- element: audioElementRef.current
3539
- });
3540
- }, [
3541
- stream.microphone
3542
- ]);
3543
- (0, $3Sbms$useEffect)(()=>{
3544
- if (stream.id !== "self") {
3545
- window.addEventListener("microphoneEnabled", onMicrophoneEnabled);
3546
- return ()=>window.removeEventListener("microphoneEnabled", onMicrophoneEnabled);
3547
- }
3548
- }, [
3549
- stream.id
3550
- ]);
3764
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3765
+ const isSelf = selfPeerId === stream.id;
3766
+ const isMicrophoneActive = (stream.microphone || isSelf) && !stream.muted;
3551
3767
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $76e24981612b551d$export$d669f73461f8cadf), {
3552
3768
  children: [
3553
- /*#__PURE__*/ (0, $3Sbms$jsx)("audio", {
3554
- ref: audioElementRef,
3555
- autoPlay: true
3556
- }),
3557
3769
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $76e24981612b551d$export$235e35bd03f702fb), {
3558
3770
  children: [
3559
3771
  stream.displayName && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a2930b41faa750f4), {
@@ -3599,18 +3811,15 @@ var $f260365f66cb6a6f$export$2e2bcd8739ae039 = $f260365f66cb6a6f$var$Reduce;
3599
3811
 
3600
3812
 
3601
3813
 
3602
-
3603
- const $57ab7b9a012d9acd$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
3604
- fill: ${(props)=>props.theme.controlsIconColor};
3605
- `;
3606
- const $57ab7b9a012d9acd$var$Cross = ({ width: width = 15 , height: height = 15 })=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
3607
- width: width,
3608
- height: height,
3609
- viewBox: "0 0 15 15",
3814
+ const $57ab7b9a012d9acd$var$Cross = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
3815
+ width: "24",
3816
+ height: "24",
3817
+ viewBox: "0 0 24 24",
3610
3818
  fill: "none",
3611
3819
  xmlns: "http://www.w3.org/2000/svg",
3612
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($57ab7b9a012d9acd$var$ThemedPath, {
3613
- d: "M1.292 1.292a1 1 0 0 1 1.416 0L8 6.586l5.292-5.294a1.002 1.002 0 0 1 1.416 1.416L9.414 8l5.294 5.292a1.001 1.001 0 1 1-1.416 1.416L8 9.414l-5.292 5.294a1 1 0 1 1-1.416-1.416L6.586 8 1.292 2.708a1 1 0 0 1 0-1.416Z"
3820
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3821
+ d: "M7.21 7.21a.714.714 0 0 1 1.011 0l3.78 3.78 3.778-3.78a.716.716 0 0 1 1.012 1.011l-3.781 3.78 3.78 3.778a.716.716 0 0 1-.779 1.167.716.716 0 0 1-.232-.155L12 13.01l-3.779 3.78a.716.716 0 0 1-1.011-1.01L10.99 12 7.21 8.221a.714.714 0 0 1 0-1.011Z",
3822
+ fill: "#fff"
3614
3823
  })
3615
3824
  });
3616
3825
  var $57ab7b9a012d9acd$export$2e2bcd8739ae039 = $57ab7b9a012d9acd$var$Cross;
@@ -3942,7 +4151,7 @@ var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSessio
3942
4151
 
3943
4152
 
3944
4153
  const $5939a59dc7c96d41$var$minimumTileWidth = 126;
3945
- const $5939a59dc7c96d41$var$maximumTileWidth = 300;
4154
+ const $5939a59dc7c96d41$var$maximumTileWidth = 150;
3946
4155
  const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePresenting , width: width , height: height })=>{
3947
4156
  const [extended, setExtended] = (0, $3Sbms$useState)(false);
3948
4157
  const [zoom, setZoom] = (0, $3Sbms$useState)(false);
@@ -3956,7 +4165,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
3956
4165
  const SelfTileRef = (0, $3Sbms$useRef)(null);
3957
4166
  const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , selfDisplayName: selfDisplayName , muted: muted , streaming: streaming , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3958
4167
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
3959
- const [containerWidth, containerHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)(videosContainerRef.current);
4168
+ const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(videosContainerRef.current);
3960
4169
  const isAlone = streams.length < 1;
3961
4170
  const cursor = streaming && !isAlone && !extended ? "pointer" : "default";
3962
4171
  let tileSize = "100%";
@@ -3971,7 +4180,8 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
3971
4180
  });
3972
4181
  tileSize = `${computedWidth}px`;
3973
4182
  }
3974
- const onLocalVideoRotate = ()=>{
4183
+ const onLocalVideoChange = (event)=>{
4184
+ if (!event.detail?.camera?.device) return;
3975
4185
  if (!videoElementRef.current) throw new Error("videoElementRef not available");
3976
4186
  const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(videoElementRef.current);
3977
4187
  setFacingMode(newFacingMode);
@@ -4036,6 +4246,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4036
4246
  if (SelfTileRef.current) (0, $d02c24b66b4606fd$export$ab7d69e250642927)({
4037
4247
  element: SelfTileRef.current
4038
4248
  });
4249
+ if (deviceType === "screen") return;
4039
4250
  setDeviceRequest({
4040
4251
  device: deviceType,
4041
4252
  requesterId: peerId
@@ -4092,11 +4303,11 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4092
4303
  extended
4093
4304
  ]);
4094
4305
  (0, $3Sbms$useEffect)(()=>{
4095
- window.addEventListener("localVideoRotate", onLocalVideoRotate);
4096
- window.addEventListener("requestDevice", onDeviceRequest);
4306
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
4307
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("requestDevice", onDeviceRequest);
4097
4308
  return ()=>{
4098
- window.removeEventListener("localVideoRotate", onLocalVideoRotate);
4099
- window.removeEventListener("requestDevice", onDeviceRequest);
4309
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
4310
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("requestDevice", onDeviceRequest);
4100
4311
  };
4101
4312
  }, []);
4102
4313
  const content = /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
@@ -4140,8 +4351,8 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4140
4351
  ]
4141
4352
  })
4142
4353
  }),
4143
- !extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
4144
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
4354
+ !extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$500c3c5544c37412), {
4355
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
4145
4356
  children: "You"
4146
4357
  })
4147
4358
  }),
@@ -4172,10 +4383,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4172
4383
  onClick: onZoomClick,
4173
4384
  children: [
4174
4385
  zoom ? "2" : "1",
4175
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
4176
- width: 8,
4177
- height: 8
4178
- })
4386
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {})
4179
4387
  ]
4180
4388
  }),
4181
4389
  /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
@@ -4221,7 +4429,9 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4221
4429
  })
4222
4430
  ]
4223
4431
  }),
4224
- extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$9e533c08c30af08), {})
4432
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$9e533c08c30af08), {
4433
+ show: extended
4434
+ })
4225
4435
  ]
4226
4436
  });
4227
4437
  };
@@ -4236,6 +4446,7 @@ var $5939a59dc7c96d41$export$2e2bcd8739ae039 = $5939a59dc7c96d41$var$SelfStreamT
4236
4446
 
4237
4447
 
4238
4448
 
4449
+
4239
4450
  const $a2c4dc31896a66fb$export$690f2758eb588c46 = (0, $3Sbms$styledcomponents).div`
4240
4451
  display: flex;
4241
4452
  justify-content: center;
@@ -4253,25 +4464,27 @@ const $a2c4dc31896a66fb$export$2ccbea1af5dfeb73 = (0, $3Sbms$styledcomponents).v
4253
4464
  `;
4254
4465
 
4255
4466
 
4256
- const $306a53f44040492f$var$Screenshare = ({ data: data })=>{
4467
+ const $306a53f44040492f$var$ScreenshareTile = (tile)=>{
4468
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4257
4469
  const videoElementRef = (0, $3Sbms$useRef)(null);
4470
+ const isSelf = tile.peerId === selfPeerId;
4258
4471
  (0, $3Sbms$useEffect)(()=>{
4259
- if (data.consumerId && videoElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVideo({
4260
- consumerId: data.consumerId,
4472
+ if (tile.data.consumerId && videoElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVideo({
4473
+ consumerId: tile.data.consumerId,
4261
4474
  element: videoElementRef.current
4262
4475
  });
4263
4476
  }, [
4264
- data.consumerId
4477
+ tile.data.consumerId
4265
4478
  ]);
4266
4479
  (0, $3Sbms$useEffect)(()=>{
4267
- if (data.local && videoElementRef.current) {
4480
+ if (isSelf && videoElementRef.current) {
4268
4481
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalScreenshare(videoElementRef.current);
4269
4482
  return ()=>{
4270
4483
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
4271
4484
  };
4272
4485
  }
4273
4486
  }, [
4274
- data.local
4487
+ isSelf
4275
4488
  ]);
4276
4489
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2c4dc31896a66fb$export$690f2758eb588c46), {
4277
4490
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2c4dc31896a66fb$export$2ccbea1af5dfeb73), {
@@ -4282,7 +4495,7 @@ const $306a53f44040492f$var$Screenshare = ({ data: data })=>{
4282
4495
  })
4283
4496
  });
4284
4497
  };
4285
- var $306a53f44040492f$export$2e2bcd8739ae039 = $306a53f44040492f$var$Screenshare;
4498
+ var $306a53f44040492f$export$2e2bcd8739ae039 = $306a53f44040492f$var$ScreenshareTile;
4286
4499
 
4287
4500
 
4288
4501
 
@@ -4298,6 +4511,148 @@ const $04dc495b2c5350ca$export$2cb99e4be0dc4646 = (url)=>new Promise((resolve, r
4298
4511
 
4299
4512
 
4300
4513
 
4514
+
4515
+
4516
+
4517
+
4518
+
4519
+
4520
+ const $6a95863cd4ef501c$export$eb5bbbfc393ab8ac = (0, $3Sbms$styledcomponents).div`
4521
+ max-width: 100%;
4522
+ margin-top: 60px;
4523
+ margin-bottom: 20px;
4524
+ padding: 0 25px;
4525
+ box-sizing: border-box;
4526
+ `;
4527
+ const $6a95863cd4ef501c$export$ebce8992dc3bd82 = (0, $3Sbms$styledcomponents).div`
4528
+ font-size: 20px;
4529
+ font-weight: 700;
4530
+ margin-bottom: 30px;
4531
+ `;
4532
+ const $6a95863cd4ef501c$export$e6c0b06d6e2dd9e3 = (0, $3Sbms$styledcomponents).div`
4533
+ display: flex;
4534
+ flex-direction: column;
4535
+ gap: 17px;
4536
+ `;
4537
+ const $6a95863cd4ef501c$export$8503ce930eaa5c44 = (0, $3Sbms$styledcomponents).img`
4538
+ border-radius: 8px;
4539
+ width: 36px;
4540
+ height: 36px;
4541
+ `;
4542
+ const $6a95863cd4ef501c$export$a300a79023cea761 = (0, $3Sbms$styledcomponents).div`
4543
+ display: flex;
4544
+ justify-content: center;
4545
+ align-items: center;
4546
+ background-color: #2d2d2d;
4547
+ width: 100%;
4548
+ border-radius: 50px;
4549
+ color: #fff;
4550
+ font-size: 7px;
4551
+ font-weight: 700;
4552
+
4553
+ svg {
4554
+ width: 8px;
4555
+ height: 8px;
4556
+ }
4557
+ `;
4558
+
4559
+
4560
+ const $f81bfa56534026c2$export$e9785ae652b3a722 = (item)=>{
4561
+ const { roomId: roomId } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
4562
+ if (roomId) {
4563
+ const key = `stream_share_history_${roomId}`;
4564
+ try {
4565
+ const storedHistory = localStorage.getItem(key);
4566
+ if (storedHistory) {
4567
+ const parsedStoredHistory = JSON.parse(storedHistory);
4568
+ parsedStoredHistory.push({
4569
+ ...item,
4570
+ id: parsedStoredHistory.length
4571
+ });
4572
+ const stringifiedHistory = JSON.stringify(parsedStoredHistory);
4573
+ localStorage.setItem(key, stringifiedHistory);
4574
+ } else {
4575
+ const stringifiedHistory = JSON.stringify([
4576
+ {
4577
+ ...item,
4578
+ id: 0
4579
+ },
4580
+ ]);
4581
+ localStorage.setItem(key, stringifiedHistory);
4582
+ }
4583
+ } catch (localStorageError) {
4584
+ console.warn(localStorageError);
4585
+ }
4586
+ } else console.warn("Undefined room ID");
4587
+ };
4588
+ const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
4589
+ const [history, setHistory] = (0, $3Sbms$useState)([]);
4590
+ (0, $3Sbms$useEffect)(()=>{
4591
+ try {
4592
+ const { roomId: roomId } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
4593
+ const storedHistory = localStorage.getItem(`stream_share_history_${roomId}`);
4594
+ if (storedHistory) {
4595
+ const parsedStoredHistory = JSON.parse(storedHistory);
4596
+ setHistory(parsedStoredHistory);
4597
+ }
4598
+ } catch (localStorageError) {
4599
+ console.warn(localStorageError);
4600
+ }
4601
+ }, []);
4602
+ if (history.length < 1) return null;
4603
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6a95863cd4ef501c$export$eb5bbbfc393ab8ac), {
4604
+ children: [
4605
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$ebce8992dc3bd82), {
4606
+ children: "Shared with you"
4607
+ }),
4608
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$e6c0b06d6e2dd9e3), {
4609
+ children: history.map((item)=>{
4610
+ let itemStatus = undefined;
4611
+ if (item.statusText) {
4612
+ itemStatus = {
4613
+ text: "From",
4614
+ boldText: item.statusText
4615
+ };
4616
+ if (item.statusIconUrl) itemStatus.icon = item.statusIconUrl;
4617
+ if (item.statusIconLetter) itemStatus.icon = /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$a300a79023cea761), {
4618
+ children: item.statusIconLetter.slice(0, 1).toUpperCase()
4619
+ });
4620
+ if (item.statusIconUser) itemStatus.icon = /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$a300a79023cea761), {
4621
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
4622
+ });
4623
+ }
4624
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6d331dd378347945$export$14834abbfce3b8cd), {
4625
+ options: {
4626
+ width: "325px",
4627
+ backgroundColor: "#2d2d2d",
4628
+ ellipsis: true,
4629
+ icon: item.iconUrl ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$8503ce930eaa5c44), {
4630
+ style: {
4631
+ ...item.iconStyle
4632
+ },
4633
+ src: item.iconUrl,
4634
+ onError: (0, $6d331dd378347945$export$5640675ad9afe3e2)
4635
+ }) : undefined,
4636
+ button: {
4637
+ text: "Open",
4638
+ action: ()=>window.open(item.url, "_blank"),
4639
+ style: {
4640
+ backgroundColor: "#515151",
4641
+ border: "2px solid #515151"
4642
+ }
4643
+ },
4644
+ status: itemStatus
4645
+ },
4646
+ children: item.title
4647
+ }, item.id);
4648
+ })
4649
+ })
4650
+ ]
4651
+ });
4652
+ };
4653
+
4654
+
4655
+
4301
4656
  const $34a6fb3d684caabd$export$f4a8a05247f8d4c = (0, $3Sbms$styledcomponents).div`
4302
4657
  display: flex;
4303
4658
  justify-content: center;
@@ -4326,8 +4681,10 @@ const $5e2ac34f2c3f1b42$export$8bd7ff36223ef5c1 = "youtube_start";
4326
4681
  const $5e2ac34f2c3f1b42$export$1712c056f28ddd33 = "youtube_play";
4327
4682
  const $5e2ac34f2c3f1b42$export$405a29439cf92237 = "youtube_pause";
4328
4683
  const $5e2ac34f2c3f1b42$export$649698d6e35b1ef3 = "youtube_stop";
4329
- const $5e2ac34f2c3f1b42$var$YoutubeTile = ({ data: data })=>{
4330
- const [player, setPlayer] = (0, $3Sbms$useState)(null);
4684
+ const $5e2ac34f2c3f1b42$var$YoutubeTile = (tile)=>{
4685
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4686
+ const [player1, setPlayer] = (0, $3Sbms$useState)(null);
4687
+ const isSelf = tile.peerId === selfPeerId;
4331
4688
  const onVideoStateChange = (event)=>{
4332
4689
  const time = event.target.getCurrentTime();
4333
4690
  if (event.data === YT.PlayerState.PAUSED) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
@@ -4340,6 +4697,16 @@ const $5e2ac34f2c3f1b42$var$YoutubeTile = ({ data: data })=>{
4340
4697
  });
4341
4698
  };
4342
4699
  (0, $3Sbms$useEffect)(()=>{
4700
+ const onVideoReady = (event)=>{
4701
+ const player = event.target;
4702
+ if (!isSelf) (0, $f81bfa56534026c2$export$e9785ae652b3a722)({
4703
+ title: player.videoTitle || "Video",
4704
+ url: `https://youtube.com/watch?v=${tile.data.videoId}`,
4705
+ iconUrl: `https://i.ytimg.com/vi/${tile.data.videoId}/mqdefault.jpg`,
4706
+ statusText: "YouTube",
4707
+ statusIconUrl: "https://stream-assets.snapcall.io/icons/youtube.png"
4708
+ });
4709
+ };
4343
4710
  setPlayer((currentPlayer)=>{
4344
4711
  if (currentPlayer) currentPlayer.destroy();
4345
4712
  return null;
@@ -4348,74 +4715,77 @@ const $5e2ac34f2c3f1b42$var$YoutubeTile = ({ data: data })=>{
4348
4715
  const youtubePlayer = new YT.Player("youtube-player", {
4349
4716
  height: "390",
4350
4717
  width: "640",
4351
- videoId: data.videoId,
4718
+ videoId: tile.data.videoId,
4352
4719
  playerVars: {
4353
4720
  autoplay: 1,
4354
- controls: data.local ? 1 : 0,
4721
+ controls: isSelf ? 1 : 0,
4355
4722
  playsinline: 1,
4356
4723
  enablejsapi: 1,
4357
4724
  origin: window.location.origin,
4358
4725
  rel: 0,
4359
- start: data.time || 0
4726
+ start: tile.data.time || 0
4360
4727
  },
4361
4728
  events: {
4362
- onStateChange: data.local ? onVideoStateChange : undefined
4729
+ onReady: onVideoReady,
4730
+ onStateChange: isSelf ? onVideoStateChange : undefined
4363
4731
  }
4364
4732
  });
4365
4733
  setPlayer(youtubePlayer);
4366
4734
  };
4367
4735
  if (window?.YT?.loaded) window.onYouTubeIframeAPIReady();
4368
4736
  else (0, $04dc495b2c5350ca$export$2cb99e4be0dc4646)("https://www.youtube.com/iframe_api");
4369
- if (data.local) {
4737
+ if (isSelf) {
4370
4738
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
4371
4739
  type: $5e2ac34f2c3f1b42$export$8bd7ff36223ef5c1,
4372
- videoId: data.videoId
4740
+ videoId: tile.data.videoId
4373
4741
  });
4374
4742
  return ()=>{
4375
4743
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
4376
4744
  type: $5e2ac34f2c3f1b42$export$649698d6e35b1ef3,
4377
- videoId: data.videoId
4745
+ videoId: tile.data.videoId
4378
4746
  });
4379
4747
  };
4380
4748
  }
4381
4749
  }, [
4382
- data
4750
+ tile.data,
4751
+ isSelf
4383
4752
  ]);
4384
4753
  (0, $3Sbms$useEffect)(()=>{
4385
- if (!data.local && player) {
4754
+ if (!isSelf && player1) {
4386
4755
  const onCustomMessage = (event)=>{
4387
4756
  const { type: type , time: time } = event.detail.event;
4388
4757
  if (type === $5e2ac34f2c3f1b42$export$405a29439cf92237) {
4389
- player.pauseVideo();
4390
- player.seekTo(time, true);
4758
+ player1.pauseVideo();
4759
+ player1.seekTo(time, true);
4391
4760
  } else if (type === $5e2ac34f2c3f1b42$export$1712c056f28ddd33) {
4392
- player.playVideo();
4393
- player.seekTo(time, true);
4761
+ player1.playVideo();
4762
+ player1.seekTo(time, true);
4394
4763
  }
4395
4764
  };
4396
- window.addEventListener("customMessage", onCustomMessage);
4765
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
4397
4766
  return ()=>{
4398
- window.removeEventListener("customMessage", onCustomMessage);
4767
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
4399
4768
  };
4400
4769
  }
4401
- if (data.local && player) {
4770
+ if (isSelf && player1) {
4402
4771
  const onNewPeer = (event)=>{
4403
- const { id: id } = event.detail;
4404
- const time = player.getCurrentTime();
4405
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(id, {
4772
+ const { peerId: peerId } = event.detail;
4773
+ const time = player1.getCurrentTime();
4774
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(peerId, {
4406
4775
  type: $5e2ac34f2c3f1b42$export$8bd7ff36223ef5c1,
4407
- videoId: data.videoId,
4776
+ videoId: tile.data.videoId,
4408
4777
  time: time
4409
4778
  });
4410
4779
  };
4411
- window.addEventListener("newPeer", onNewPeer);
4780
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newPeer", onNewPeer);
4412
4781
  return ()=>{
4413
- window.removeEventListener("newPeer", onNewPeer);
4782
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newPeer", onNewPeer);
4414
4783
  };
4415
4784
  }
4416
4785
  }, [
4417
- data,
4418
- player
4786
+ tile.data,
4787
+ isSelf,
4788
+ player1
4419
4789
  ]);
4420
4790
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $34a6fb3d684caabd$export$f4a8a05247f8d4c), {
4421
4791
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $34a6fb3d684caabd$export$b0da35797f3be127), {
@@ -4430,7 +4800,190 @@ var $5e2ac34f2c3f1b42$export$2e2bcd8739ae039 = $5e2ac34f2c3f1b42$var$YoutubeTile
4430
4800
 
4431
4801
 
4432
4802
 
4803
+
4804
+
4805
+
4806
+ const $ab48431cd035ee30$export$e19cf0169f1019bf = (0, $3Sbms$styledcomponents).div`
4807
+ display: flex;
4808
+ position: relative;
4809
+ height: 100%;
4810
+ max-width: 100%;
4811
+ `;
4812
+ const $ab48431cd035ee30$export$6ac7409a4d5f70a2 = (0, $3Sbms$styledcomponents).img`
4813
+ max-height: 100%;
4814
+ object-fit: contain;
4815
+ border-radius: 20px;
4816
+ `;
4817
+ const $ab48431cd035ee30$export$1a3b9916b31bd5c3 = (0, $3Sbms$styledcomponents).div`
4818
+ display: flex;
4819
+ flex-direction: column;
4820
+ justify-content: space-between;
4821
+ position: absolute;
4822
+ width: 100%;
4823
+ height: 100%;
4824
+ padding: 16px;
4825
+ box-sizing: border-box;
4826
+ `;
4827
+ const $ab48431cd035ee30$export$8b251419efc915eb = (0, $3Sbms$styledcomponents).div`
4828
+ display: flex;
4829
+ justify-content: space-between;
4830
+ align-items: center;
4831
+ `;
4832
+ const $ab48431cd035ee30$export$7c309220fd1fb205 = (0, $3Sbms$styledcomponents).span`
4833
+ font-size: 12px;
4834
+ font-weight: 700;
4835
+ color: #fff;
4836
+ text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15);
4837
+ `;
4838
+ const $ab48431cd035ee30$export$7622450089705ca3 = (0, $3Sbms$styledcomponents).a`
4839
+ color: #fff;
4840
+ padding: 6px 12px;
4841
+ font-size: 14px;
4842
+ font-weight: 700;
4843
+ line-height: 16px;
4844
+ background: rgba(28, 32, 36, 0.5);
4845
+ border: none;
4846
+ border-radius: 50px;
4847
+ text-decoration: none;
4848
+ cursor: pointer;
4849
+ `;
4850
+ const $ab48431cd035ee30$export$a06f1c675e846f6f = (0, $3Sbms$styledcomponents).div`
4851
+ display: flex;
4852
+ justify-content: center;
4853
+ `;
4854
+ const $ab48431cd035ee30$export$f9985cea9f8ad92f = (0, $3Sbms$styledcomponents).button`
4855
+ width: 36px;
4856
+ height: 36px;
4857
+ padding: 7px;
4858
+ background: rgba(28, 32, 36, 0.5);
4859
+ border: none;
4860
+ border-radius: 50px;
4861
+ `;
4862
+ const $ab48431cd035ee30$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).img`
4863
+ border: 2px solid #fff;
4864
+ border-radius: 8px;
4865
+ width: 36px;
4866
+ height: 36px;
4867
+ `;
4868
+ const $ab48431cd035ee30$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).div`
4869
+ display: flex;
4870
+ justify-content: center;
4871
+ align-items: center;
4872
+ background-color: #2d2d2d;
4873
+ width: 13px;
4874
+ height: 13px;
4875
+ border-radius: 50px;
4876
+ color: #fff;
4877
+ font-size: 7px;
4878
+ font-weight: 700;
4879
+
4880
+ svg {
4881
+ width: 9px;
4882
+ height: 9px;
4883
+ }
4884
+ `;
4885
+
4886
+
4887
+ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
4888
+ const { dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
4889
+ const snapshotImageRef = (0, $3Sbms$useRef)(null);
4890
+ const [downloadURL, setDownloadURL] = (0, $3Sbms$useState)(tile.data.url);
4891
+ const [containerWidth, setContainerWidth] = (0, $3Sbms$useState)("auto");
4892
+ const filename = (0, $3Sbms$useMemo)(()=>{
4893
+ const slashSplit = tile.data.url.split("/");
4894
+ const name = slashSplit[slashSplit.length - 1];
4895
+ return name;
4896
+ }, [
4897
+ tile.data.url
4898
+ ]);
4899
+ const onCloseClick = ()=>{
4900
+ dispatch({
4901
+ type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
4902
+ });
4903
+ };
4904
+ const updateContainerSize = ()=>{
4905
+ if (snapshotImageRef.current) {
4906
+ const { clientWidth: clientWidth } = snapshotImageRef.current;
4907
+ setContainerWidth(`${clientWidth}px`);
4908
+ }
4909
+ };
4910
+ const formattedTime = new Date(tile.data.createdAt).toLocaleTimeString([], {
4911
+ hour: "2-digit",
4912
+ minute: "2-digit"
4913
+ });
4914
+ (0, $3Sbms$useEffect)(()=>{
4915
+ const img = document.createElement("img");
4916
+ img.onload = ()=>{
4917
+ const canvas = document.createElement("canvas");
4918
+ const canvasContext = canvas.getContext("2d");
4919
+ canvas.width = img.width;
4920
+ canvas.height = img.height;
4921
+ canvasContext?.drawImage(img, 0, 0);
4922
+ const dataURL = canvas.toDataURL("image/jpeg");
4923
+ setDownloadURL(dataURL);
4924
+ };
4925
+ img.crossOrigin = "anonymous";
4926
+ img.src = tile.data.url;
4927
+ }, [
4928
+ tile.data.url
4929
+ ]);
4930
+ (0, $3Sbms$useEffect)(()=>{
4931
+ window.addEventListener("resize", updateContainerSize);
4932
+ return ()=>{
4933
+ window.removeEventListener("resize", updateContainerSize);
4934
+ };
4935
+ }, [
4936
+ snapshotImageRef
4937
+ ]);
4938
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$e19cf0169f1019bf), {
4939
+ style: {
4940
+ width: containerWidth
4941
+ },
4942
+ children: [
4943
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$6ac7409a4d5f70a2), {
4944
+ onLoad: updateContainerSize,
4945
+ ref: snapshotImageRef,
4946
+ src: tile.data.url,
4947
+ crossOrigin: "anonymous"
4948
+ }),
4949
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$1a3b9916b31bd5c3), {
4950
+ children: [
4951
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$8b251419efc915eb), {
4952
+ children: [
4953
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$7c309220fd1fb205), {
4954
+ children: [
4955
+ "Snapshot \xb7 ",
4956
+ formattedTime
4957
+ ]
4958
+ }),
4959
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$7622450089705ca3), {
4960
+ href: downloadURL,
4961
+ target: "_blank",
4962
+ download: filename,
4963
+ children: "Save photo"
4964
+ })
4965
+ ]
4966
+ }),
4967
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$a06f1c675e846f6f), {
4968
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$f9985cea9f8ad92f), {
4969
+ onClick: onCloseClick,
4970
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {})
4971
+ })
4972
+ })
4973
+ ]
4974
+ })
4975
+ ]
4976
+ });
4977
+ };
4978
+ var $1671f9473ff0a07a$export$2e2bcd8739ae039 = $1671f9473ff0a07a$var$SnapshotTile;
4979
+
4980
+
4981
+
4982
+
4983
+
4984
+
4433
4985
  const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
4986
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4434
4987
  const { dispatch: dispatch , highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
4435
4988
  (0, $3Sbms$useEffect)(()=>{
4436
4989
  const onRemoteScreensharingUpdate = (event)=>{
@@ -4441,6 +4994,7 @@ const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
4441
4994
  payload: {
4442
4995
  type: "screenshare",
4443
4996
  peerId: peerId,
4997
+ isGlobal: true,
4444
4998
  data: {
4445
4999
  consumerId: consumerId
4446
5000
  }
@@ -4458,29 +5012,29 @@ const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
4458
5012
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
4459
5013
  payload: {
4460
5014
  type: "screenshare",
4461
- peerId: "self",
4462
- data: {
4463
- local: true
4464
- }
5015
+ peerId: String(selfPeerId),
5016
+ isGlobal: true,
5017
+ data: {}
4465
5018
  }
4466
5019
  });
4467
- else if (highlightedTile?.type === "screenshare" && highlightedTile.data.local) dispatch({
5020
+ else if (highlightedTile?.type === "screenshare" && highlightedTile.peerId === selfPeerId) dispatch({
4468
5021
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
4469
5022
  });
4470
5023
  };
4471
- window.addEventListener("newConsumer", onRemoteScreensharingUpdate);
4472
- window.addEventListener("consumerClose", onRemoteScreensharingUpdate);
4473
- window.addEventListener("screenshareEnabled", onScreensharingUpdate);
4474
- window.addEventListener("screenshareDisabled", onScreensharingUpdate);
5024
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newConsumer", onRemoteScreensharingUpdate);
5025
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("consumerClose", onRemoteScreensharingUpdate);
5026
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreensharingUpdate);
5027
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareDisabled", onScreensharingUpdate);
4475
5028
  return ()=>{
4476
- window.removeEventListener("newConsumer", onRemoteScreensharingUpdate);
4477
- window.removeEventListener("consumerClose", onRemoteScreensharingUpdate);
4478
- window.removeEventListener("screenshareEnabled", onScreensharingUpdate);
4479
- window.removeEventListener("screenshareDisabled", onScreensharingUpdate);
5029
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newConsumer", onRemoteScreensharingUpdate);
5030
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("consumerClose", onRemoteScreensharingUpdate);
5031
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreensharingUpdate);
5032
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareDisabled", onScreensharingUpdate);
4480
5033
  };
4481
5034
  }, [
4482
5035
  dispatch,
4483
- highlightedTile
5036
+ highlightedTile,
5037
+ selfPeerId
4484
5038
  ]);
4485
5039
  return null;
4486
5040
  };
@@ -4490,6 +5044,7 @@ var $288d5802b3a8deca$export$2e2bcd8739ae039 = $288d5802b3a8deca$var$Screenshare
4490
5044
 
4491
5045
 
4492
5046
 
5047
+
4493
5048
  const $e4ddb9f41b4a5cba$var$YoutubeEvents = ()=>{
4494
5049
  const { dispatch: dispatch , highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
4495
5050
  (0, $3Sbms$useEffect)(()=>{
@@ -4501,29 +5056,120 @@ const $e4ddb9f41b4a5cba$var$YoutubeEvents = ()=>{
4501
5056
  payload: {
4502
5057
  type: "youtube",
4503
5058
  peerId: peerId,
5059
+ isGlobal: true,
4504
5060
  data: {
4505
5061
  videoId: videoId,
4506
5062
  time: time
4507
5063
  }
4508
5064
  }
4509
- });
4510
- else if (type === (0, $5e2ac34f2c3f1b42$export$649698d6e35b1ef3)) {
4511
- if (highlightedTile?.type === "youtube" && highlightedTile.data.videoId === videoId) dispatch({
4512
- type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
4513
- });
5065
+ });
5066
+ else if (type === (0, $5e2ac34f2c3f1b42$export$649698d6e35b1ef3)) {
5067
+ if (highlightedTile?.type === "youtube" && highlightedTile.data.videoId === videoId) dispatch({
5068
+ type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
5069
+ });
5070
+ }
5071
+ };
5072
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
5073
+ return ()=>{
5074
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
5075
+ };
5076
+ }, [
5077
+ dispatch,
5078
+ highlightedTile
5079
+ ]);
5080
+ return null;
5081
+ };
5082
+ var $e4ddb9f41b4a5cba$export$2e2bcd8739ae039 = $e4ddb9f41b4a5cba$var$YoutubeEvents;
5083
+
5084
+
5085
+
5086
+
5087
+
5088
+
5089
+
5090
+
5091
+
5092
+
5093
+ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5094
+ const { dispatch: dispatch , streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
5095
+ (0, $3Sbms$useEffect)(()=>{
5096
+ const onCustomMessage = async (event)=>{
5097
+ const { peerId: peerId } = event.detail;
5098
+ const { type: type , imageSrc: imageSrc } = event.detail.event;
5099
+ if (type === "snapshot") {
5100
+ const sender = streams.find((stream)=>stream.id === peerId);
5101
+ if (sender) {
5102
+ const statusIcon = sender.displayName ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$49ac927a2aaad85), {
5103
+ children: sender.displayName.slice(0, 1).toUpperCase()
5104
+ }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$49ac927a2aaad85), {
5105
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
5106
+ });
5107
+ const createdAtDate = new Date();
5108
+ const notificationStatus = {
5109
+ text: "From",
5110
+ boldText: sender.displayName || "User",
5111
+ icon: statusIcon
5112
+ };
5113
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)("Snapshot shared.", {
5114
+ width: "290px",
5115
+ icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$26fe7ec9351ff761), {
5116
+ src: imageSrc,
5117
+ crossOrigin: "anonymous"
5118
+ }),
5119
+ messageStyle: {
5120
+ fontWeight: 600,
5121
+ fontSize: "16px"
5122
+ },
5123
+ button: {
5124
+ text: "Open",
5125
+ action: ({ close: close })=>{
5126
+ dispatch({
5127
+ type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
5128
+ payload: {
5129
+ type: "snapshot",
5130
+ peerId: peerId,
5131
+ isGlobal: false,
5132
+ data: {
5133
+ url: imageSrc,
5134
+ createdAt: createdAtDate.getTime()
5135
+ }
5136
+ }
5137
+ });
5138
+ close();
5139
+ }
5140
+ },
5141
+ status: notificationStatus,
5142
+ duration: 10000
5143
+ });
5144
+ const formattedTime = createdAtDate.toLocaleTimeString([], {
5145
+ hour: "2-digit",
5146
+ minute: "2-digit"
5147
+ });
5148
+ (0, $f81bfa56534026c2$export$e9785ae652b3a722)({
5149
+ title: `Snapshot · ${formattedTime}`,
5150
+ url: imageSrc,
5151
+ iconUrl: imageSrc,
5152
+ iconStyle: {
5153
+ border: "2px solid #fff"
5154
+ },
5155
+ statusText: notificationStatus.boldText,
5156
+ statusIconLetter: sender.displayName ? sender.displayName.slice(0, 1).toUpperCase() : undefined,
5157
+ statusIconUser: sender.displayName ? false : true
5158
+ });
5159
+ }
4514
5160
  }
4515
5161
  };
4516
- window.addEventListener("customMessage", onCustomMessage);
5162
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
4517
5163
  return ()=>{
4518
- window.removeEventListener("customMessage", onCustomMessage);
5164
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
4519
5165
  };
4520
5166
  }, [
4521
- dispatch,
4522
- highlightedTile
5167
+ streams,
5168
+ dispatch
4523
5169
  ]);
4524
5170
  return null;
4525
5171
  };
4526
- var $e4ddb9f41b4a5cba$export$2e2bcd8739ae039 = $e4ddb9f41b4a5cba$var$YoutubeEvents;
5172
+ var $75c30c42d3b87293$export$2e2bcd8739ae039 = $75c30c42d3b87293$var$SnapshotEvents;
4527
5173
 
4528
5174
 
4529
5175
 
@@ -4538,16 +5184,20 @@ const $45ecd59ec682eca0$export$ff6e704acc4ce2a3 = (0, $3Sbms$styledcomponents).d
4538
5184
  `;
4539
5185
 
4540
5186
 
5187
+
4541
5188
  const $b496fc6f0d99c06d$var$HighlightedTile = (tile)=>{
4542
5189
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4543
5190
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $45ecd59ec682eca0$export$ff6e704acc4ce2a3), {
4544
5191
  orientation: orientation,
4545
5192
  children: [
4546
5193
  tile.type === "screenshare" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $306a53f44040492f$export$2e2bcd8739ae039), {
4547
- data: tile.data
5194
+ ...tile
4548
5195
  }),
4549
5196
  tile.type === "youtube" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5e2ac34f2c3f1b42$export$2e2bcd8739ae039), {
4550
- data: tile.data
5197
+ ...tile
5198
+ }),
5199
+ tile.type === "snapshot" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1671f9473ff0a07a$export$2e2bcd8739ae039), {
5200
+ ...tile
4551
5201
  })
4552
5202
  ]
4553
5203
  });
@@ -4561,9 +5211,9 @@ const $b496fc6f0d99c06d$export$3936649e725efc86 = ()=>{
4561
5211
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
4562
5212
  });
4563
5213
  };
4564
- window.addEventListener("peerClosed", onPeerClosed);
5214
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerClosed", onPeerClosed);
4565
5215
  return ()=>{
4566
- window.removeEventListener("peerClosed", onPeerClosed);
5216
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerClosed", onPeerClosed);
4567
5217
  };
4568
5218
  }, [
4569
5219
  dispatch,
@@ -4572,7 +5222,8 @@ const $b496fc6f0d99c06d$export$3936649e725efc86 = ()=>{
4572
5222
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
4573
5223
  children: [
4574
5224
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $288d5802b3a8deca$export$2e2bcd8739ae039), {}),
4575
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $e4ddb9f41b4a5cba$export$2e2bcd8739ae039), {})
5225
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $e4ddb9f41b4a5cba$export$2e2bcd8739ae039), {}),
5226
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $75c30c42d3b87293$export$2e2bcd8739ae039), {})
4576
5227
  ]
4577
5228
  });
4578
5229
  };
@@ -4586,6 +5237,10 @@ var $b496fc6f0d99c06d$export$2e2bcd8739ae039 = $b496fc6f0d99c06d$var$Highlighted
4586
5237
 
4587
5238
 
4588
5239
 
5240
+
5241
+ const $93a0377c243d965e$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
5242
+ fill: ${({ theme: theme })=>theme.primaryColor};
5243
+ `;
4589
5244
  const $93a0377c243d965e$export$c4868e4a24d48fad = /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
4590
5245
  width: "14",
4591
5246
  height: "14",
@@ -4604,9 +5259,8 @@ const $93a0377c243d965e$export$edf27be85e5f6da0 = /*#__PURE__*/ (0, $3Sbms$jsxs)
4604
5259
  fill: "none",
4605
5260
  xmlns: "http://www.w3.org/2000/svg",
4606
5261
  children: [
4607
- /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4608
- d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",
4609
- fill: "#6967FC"
5262
+ /*#__PURE__*/ (0, $3Sbms$jsx)($93a0377c243d965e$var$ThemedPath, {
5263
+ d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"
4610
5264
  }),
4611
5265
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4612
5266
  d: "M12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 13a1 1 0 0 1-1-1V8a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",
@@ -4615,19 +5269,18 @@ const $93a0377c243d965e$export$edf27be85e5f6da0 = /*#__PURE__*/ (0, $3Sbms$jsxs)
4615
5269
  ]
4616
5270
  });
4617
5271
  const $93a0377c243d965e$export$c7df1b15b59b1df2 = /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
4618
- width: "25",
5272
+ width: "24",
4619
5273
  height: "24",
4620
- viewBox: "0 0 25 24",
5274
+ viewBox: "0 0 24 24",
4621
5275
  fill: "none",
4622
5276
  xmlns: "http://www.w3.org/2000/svg",
4623
5277
  children: [
4624
- /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4625
- d: "M20.558 22H4.443a3.023 3.023 0 0 1-2.617-4.534L9.883 3.511a3.023 3.023 0 0 1 5.235 0l8.057 13.955A3.023 3.023 0 0 1 20.558 22Z",
4626
- fill: "#6967FC"
5278
+ /*#__PURE__*/ (0, $3Sbms$jsx)($93a0377c243d965e$var$ThemedPath, {
5279
+ d: "M20.058 22H3.943a3.023 3.023 0 0 1-2.617-4.534L9.383 3.511a3.023 3.023 0 0 1 5.235 0l8.057 13.955A3.023 3.023 0 0 1 20.058 22Z"
4627
5280
  }),
4628
5281
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4629
- d: "M12.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12.5 14a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",
4630
- fill: "#ffffff"
5282
+ d: "M12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 14a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1Z",
5283
+ fill: "#fff"
4631
5284
  })
4632
5285
  ]
4633
5286
  });
@@ -4692,13 +5345,13 @@ var $b8963bf62cf5b984$export$2e2bcd8739ae039 = $b8963bf62cf5b984$var$tooltip;
4692
5345
 
4693
5346
 
4694
5347
  const $cdab47bb8796991e$var$Video = ()=>{
4695
- const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , selfDisplayName: selfDisplayName , orientation: orientation , userInteractionTriggered: userInteractionTriggered , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5348
+ const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , selfDisplayName: selfDisplayName , orientation: orientation , userInteractionTriggered: userInteractionTriggered , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4696
5349
  const [tileSize, setTileSize] = (0, $3Sbms$useState)({
4697
5350
  width: 0,
4698
5351
  height: 0
4699
5352
  });
4700
5353
  const { streams: streams , highlightedTile: highlightedTile , dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
4701
- const [windowWidth, windowHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)();
5354
+ const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(remoteTilesContainerRef.current);
4702
5355
  (0, $3Sbms$useEffect)(()=>{
4703
5356
  if (options.GDPRDisclaimer) (0, $b8963bf62cf5b984$export$2e2bcd8739ae039)({
4704
5357
  message: "Para mejorar la calidad de nuestro servicio, esta llamada ser\xe1 grabada",
@@ -4709,13 +5362,12 @@ const $cdab47bb8796991e$var$Video = ()=>{
4709
5362
  options.GDPRDisclaimer
4710
5363
  ]);
4711
5364
  (0, $3Sbms$useEffect)(()=>{
4712
- if (remoteTilesContainerRef?.current && windowWidth && windowHeight) {
5365
+ if (remoteTilesContainerRef?.current && containerWidth && containerHeight) {
4713
5366
  const ratio = 1;
4714
5367
  const numberOfTiles = remoteTilesContainerRef.current.childElementCount;
4715
- const { offsetWidth: offsetWidth , offsetHeight: offsetHeight } = remoteTilesContainerRef.current;
4716
5368
  const videoWidth = (0, $b8e10de7c6dba8c4$export$4d43009c33055644)({
4717
- availableWidth: offsetWidth - 16 * (numberOfTiles - 1),
4718
- availableHeight: offsetHeight - 16 * (numberOfTiles - 1),
5369
+ availableWidth: containerWidth - 16 * (numberOfTiles - 1),
5370
+ availableHeight: containerHeight - 16 * (numberOfTiles - 1),
4719
5371
  numberOfTiles: numberOfTiles,
4720
5372
  ratio: ratio
4721
5373
  });
@@ -4727,8 +5379,8 @@ const $cdab47bb8796991e$var$Video = ()=>{
4727
5379
  }
4728
5380
  }, [
4729
5381
  remoteTilesContainerRef,
4730
- windowWidth,
4731
- windowHeight,
5382
+ containerWidth,
5383
+ containerHeight,
4732
5384
  streams.length,
4733
5385
  highlightedTile
4734
5386
  ]);
@@ -4743,11 +5395,11 @@ const $cdab47bb8796991e$var$Video = ()=>{
4743
5395
  ]);
4744
5396
  (0, $3Sbms$useEffect)(()=>{
4745
5397
  const onNewPeer = (event)=>{
4746
- const { id: id , displayName: displayName } = event.detail;
5398
+ const { peerId: peerId , displayName: displayName } = event.detail;
4747
5399
  dispatch({
4748
5400
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).ADD_STREAM,
4749
5401
  payload: {
4750
- id: id,
5402
+ id: peerId,
4751
5403
  displayName: displayName
4752
5404
  }
4753
5405
  });
@@ -4785,7 +5437,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
4785
5437
  const onEnterRoom = (event)=>{
4786
5438
  const { peers: peers } = event.detail;
4787
5439
  const roomStreams = peers.map((peer)=>({
4788
- id: peer.id,
5440
+ id: peer.peerId,
4789
5441
  displayName: peer.displayName
4790
5442
  }));
4791
5443
  dispatch({
@@ -4823,27 +5475,27 @@ const $cdab47bb8796991e$var$Video = ()=>{
4823
5475
  }
4824
5476
  });
4825
5477
  };
4826
- window.addEventListener("enterRoom", onEnterRoom);
4827
- window.addEventListener("newPeer", onNewPeer);
4828
- window.addEventListener("peerClosed", onPeerClosed);
4829
- window.addEventListener("newConsumer", onConsumerUpdate);
4830
- window.addEventListener("consumerClose", onConsumerUpdate);
4831
- window.addEventListener("producerPaused", onProducerUpdate);
4832
- window.addEventListener("producerResumed", onProducerUpdate);
4833
- window.addEventListener("displayName", onDisplayName);
4834
- window.addEventListener("peerStartSpeak", onPeerSpeakingUpdate);
4835
- window.addEventListener("peerStopSpeak", onPeerSpeakingUpdate);
5478
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
5479
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newPeer", onNewPeer);
5480
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerClosed", onPeerClosed);
5481
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newConsumer", onConsumerUpdate);
5482
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("consumerClose", onConsumerUpdate);
5483
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("producerPaused", onProducerUpdate);
5484
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("producerResumed", onProducerUpdate);
5485
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("displayName", onDisplayName);
5486
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerStartSpeak", onPeerSpeakingUpdate);
5487
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerStopSpeak", onPeerSpeakingUpdate);
4836
5488
  return ()=>{
4837
- window.removeEventListener("enterRoom", onEnterRoom);
4838
- window.removeEventListener("newPeer", onNewPeer);
4839
- window.removeEventListener("peerClosed", onPeerClosed);
4840
- window.removeEventListener("newConsumer", onConsumerUpdate);
4841
- window.removeEventListener("consumerClose", onConsumerUpdate);
4842
- window.removeEventListener("producerPaused", onProducerUpdate);
4843
- window.removeEventListener("producerResumed", onProducerUpdate);
4844
- window.removeEventListener("displayName", onDisplayName);
4845
- window.removeEventListener("peerStartSpeak", onPeerSpeakingUpdate);
4846
- window.removeEventListener("peerStopSpeak", onPeerSpeakingUpdate);
5489
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
5490
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newPeer", onNewPeer);
5491
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerClosed", onPeerClosed);
5492
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newConsumer", onConsumerUpdate);
5493
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("consumerClose", onConsumerUpdate);
5494
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("producerPaused", onProducerUpdate);
5495
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("producerResumed", onProducerUpdate);
5496
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("displayName", onDisplayName);
5497
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerStartSpeak", onPeerSpeakingUpdate);
5498
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerStopSpeak", onPeerSpeakingUpdate);
4847
5499
  };
4848
5500
  }, [
4849
5501
  dispatch
@@ -4869,8 +5521,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
4869
5521
  children: [
4870
5522
  options.audioTiles && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $21c8ac858b8a352e$export$2e2bcd8739ae039), {
4871
5523
  stream: {
4872
- id: "self",
4873
- microphone: "self",
5524
+ id: String(selfPeerId),
4874
5525
  muted: selfMuted,
4875
5526
  displayName: selfDisplayName
4876
5527
  }
@@ -4902,14 +5553,17 @@ var $cdab47bb8796991e$export$2e2bcd8739ae039 = $cdab47bb8796991e$var$Video;
4902
5553
 
4903
5554
 
4904
5555
  const $f0e90fb231c59fab$var$HangUp = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
4905
- width: "23",
4906
- height: "11",
4907
- viewBox: "0 0 23 11",
5556
+ width: "25",
5557
+ height: "24",
5558
+ viewBox: "0 0 25 24",
4908
5559
  fill: "none",
4909
5560
  xmlns: "http://www.w3.org/2000/svg",
4910
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4911
- d: "M6.39 9.965c.133-.133.315-.23.479-.333.329-.21.673-.396 1.029-.557a1.713 1.713 0 0 0 .896-2.107l-.14-.406a10.43 10.43 0 0 1 2.822-.4 10.43 10.43 0 0 1 2.822.4l-.085.424a1.713 1.713 0 0 0 .896 2.107c.355.163.699.35 1.03.557.163.103.326.218.484.34a2.569 2.569 0 0 0 3.324-.31l1.816-1.816a2.57 2.57 0 0 0-.248-3.88 16.269 16.269 0 0 0-19.968.035l-.23.23a2.569 2.569 0 0 0-.584 2.737c.13.339.331.647.59.902l1.816 1.817a2.57 2.57 0 0 0 3.251.26Zm-3.935-3.33a.856.856 0 0 1-.145-1.02.899.899 0 0 1 .242-.288 14.556 14.556 0 0 1 17.855.043.933.933 0 0 1 .345.647.855.855 0 0 1-.248.66l-1.817 1.817a.856.856 0 0 1-1.083.127 9.275 9.275 0 0 0-.582-.4c-.389-.249-.795-.47-1.217-.66l.454-1.24a.856.856 0 0 0-.508-1.103 12.407 12.407 0 0 0-8.477 0 .856.856 0 0 0-.46.46.856.856 0 0 0-.03.66l.472 1.223c-.425.201-.837.428-1.235.679a9.282 9.282 0 0 0-.581.4.856.856 0 0 1-1.084-.128L2.455 6.635Z",
4912
- fill: "#fff"
5561
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("g", {
5562
+ clipPath: "url(#hangup)",
5563
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
5564
+ d: "M6.942 16.21c.144-.145.34-.25.517-.36a8.735 8.735 0 0 1 1.113-.603 1.851 1.851 0 0 0 .969-2.278l-.151-.438a11.279 11.279 0 0 1 3.05-.432c1.032.003 2.058.149 3.05.432l-.091.458a1.852 1.852 0 0 0 .968 2.278 9.55 9.55 0 0 1 1.113.602c.177.111.354.235.524.366a2.777 2.777 0 0 0 3.593-.333l1.964-1.964a2.776 2.776 0 0 0-.269-4.196 17.588 17.588 0 0 0-21.586.04l-.249.248a2.777 2.777 0 0 0-.63 2.958c.14.367.358.7.637.976l1.963 1.964a2.777 2.777 0 0 0 3.515.281Zm-4.254-3.6a.926.926 0 0 1-.156-1.104.98.98 0 0 1 .26-.31 15.736 15.736 0 0 1 19.303.045 1.009 1.009 0 0 1 .373.7.925.925 0 0 1-.269.714l-1.963 1.964a.925.925 0 0 1-1.172.137 9.979 9.979 0 0 0-.628-.432c-.42-.27-.86-.508-1.316-.713l.491-1.342a.925.925 0 0 0-.55-1.191 13.412 13.412 0 0 0-9.163 0 .926.926 0 0 0-.498.497.926.926 0 0 0-.032.714l.51 1.322c-.46.217-.905.462-1.335.733-.214.135-.423.279-.629.432a.926.926 0 0 1-1.171-.138L2.688 12.61Z",
5565
+ fill: "#fff"
5566
+ })
4913
5567
  })
4914
5568
  });
4915
5569
  var $f0e90fb231c59fab$export$2e2bcd8739ae039 = $f0e90fb231c59fab$var$HangUp;
@@ -4917,18 +5571,15 @@ var $f0e90fb231c59fab$export$2e2bcd8739ae039 = $f0e90fb231c59fab$var$HangUp;
4917
5571
 
4918
5572
 
4919
5573
 
4920
-
4921
- const $58d405d56c1abe95$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
4922
- fill: ${(props)=>props.theme.controlsIconColor};
4923
- `;
4924
5574
  const $58d405d56c1abe95$var$Rotate = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
4925
- width: "20",
4926
- height: "20",
4927
- viewBox: "0 0 20 20",
5575
+ width: "25",
5576
+ height: "24",
5577
+ viewBox: "0 0 25 24",
4928
5578
  fill: "none",
4929
5579
  xmlns: "http://www.w3.org/2000/svg",
4930
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($58d405d56c1abe95$var$ThemedPath, {
4931
- d: "M17.91 13.51h-4.53a1 1 0 0 0 0 2h2.4A8 8 0 0 1 2 10a1 1 0 0 0-2 0 10 10 0 0 0 16.88 7.23V19a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-.97-.99ZM10 0a10 10 0 0 0-6.88 2.77V1a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 0 1 18 10a1 1 0 0 0 2 0A10 10 0 0 0 10 0Z"
5580
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
5581
+ d: "M20.41 15.51h-4.53a1 1 0 0 0 0 2h2.4A8 8 0 0 1 4.5 12a1 1 0 1 0-2 0 10 10 0 0 0 16.88 7.23V21a1 1 0 0 0 2 0v-4.5a1 1 0 0 0-.97-.99ZM12.5 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 0 1 20.5 12a1 1 0 0 0 2 0 10 10 0 0 0-10-10Z",
5582
+ fill: "#F7F7F7"
4932
5583
  })
4933
5584
  });
4934
5585
  var $58d405d56c1abe95$export$2e2bcd8739ae039 = $58d405d56c1abe95$var$Rotate;
@@ -4998,12 +5649,12 @@ var $8b7bd174d29d9a1f$export$2e2bcd8739ae039 = $8b7bd174d29d9a1f$var$Spinner;
4998
5649
 
4999
5650
  const $a2d206a438475087$var$YoutubeIcon = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5000
5651
  width: "24",
5001
- height: "16",
5002
- viewBox: "0 0 24 16",
5652
+ height: "25",
5653
+ viewBox: "0 0 24 25",
5003
5654
  fill: "none",
5004
5655
  xmlns: "http://www.w3.org/2000/svg",
5005
5656
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
5006
- d: "M23 5.71a8.499 8.499 0 0 0-.91-4.13 2.92 2.92 0 0 0-1.72-1A78.36 78.36 0 0 0 12 .27a78.45 78.45 0 0 0-8.34.3 2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48.29 48.29 0 0 0 0 6.48 9.55 9.55 0 0 0 .3 2c.12.505.365.972.71 1.36a2.86 2.86 0 0 0 1.49.78c2.156.266 4.328.376 6.5.33 3.5.05 6.57 0 10.2-.28a2.88 2.88 0 0 0 1.53-.78c.28-.28.49-.623.61-1 .358-1.097.533-2.246.52-3.4.04-.56.04-3.94.04-4.54ZM9.74 10.85V4.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08Z",
5657
+ d: "M23 10.21a8.499 8.499 0 0 0-.91-4.13 2.92 2.92 0 0 0-1.72-1A78.362 78.362 0 0 0 12 4.77a78.45 78.45 0 0 0-8.34.3 2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48.29 48.29 0 0 0 0 6.48 9.55 9.55 0 0 0 .3 2c.12.505.365.972.71 1.36a2.86 2.86 0 0 0 1.49.78c2.156.266 4.328.376 6.5.33 3.5.05 6.57 0 10.2-.28a2.88 2.88 0 0 0 1.53-.78c.28-.28.49-.623.61-1 .358-1.097.533-2.246.52-3.4.04-.56.04-3.94.04-4.54ZM9.74 15.35V9.16l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08Z",
5007
5658
  fill: "#fff"
5008
5659
  })
5009
5660
  });
@@ -5011,21 +5662,16 @@ var $a2d206a438475087$export$2e2bcd8739ae039 = $a2d206a438475087$var$YoutubeIcon
5011
5662
 
5012
5663
 
5013
5664
 
5014
-
5015
- const $1ec1d06e0a21fdaa$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
5016
- fill: ${(props)=>props.white ? "#fff" : props.theme.controlsIconColor};
5017
- `;
5018
- const $1ec1d06e0a21fdaa$var$Link = ({ size: size , white: white })=>{
5019
- const iconSize = size || 20;
5665
+ const $1ec1d06e0a21fdaa$var$Link = ()=>{
5020
5666
  return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5021
- width: iconSize,
5022
- height: iconSize,
5023
- viewBox: `0 0 ${iconSize} ${iconSize}`,
5667
+ width: "24",
5668
+ height: "24",
5669
+ viewBox: "0 0 24 24",
5024
5670
  fill: "none",
5025
5671
  xmlns: "http://www.w3.org/2000/svg",
5026
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($1ec1d06e0a21fdaa$var$ThemedPath, {
5027
- d: "m10.11 13.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1.004 1.004 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1.004 1.004 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0L8.47 5.19a1.004 1.004 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.471 2.471 0 0 1 0 3.5l-3.88 3.88a1.002 1.002 0 0 0 .325 1.639.999.999 0 0 0 1.095-.219l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM6.83 13.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1.004 1.004 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z",
5028
- white: white
5672
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
5673
+ d: "m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1.004 1.004 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1.004 1.004 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1.004 1.004 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.471 2.471 0 0 1 0 3.5l-3.88 3.88a1.002 1.002 0 0 0 .325 1.639.999.999 0 0 0 1.095-.219l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1.004 1.004 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z",
5674
+ fill: "#fff"
5029
5675
  })
5030
5676
  });
5031
5677
  };
@@ -5061,7 +5707,7 @@ const $ae07ea3548d561ea$export$6e8af0bd0a2aaa77 = (0, $3Sbms$styledcomponents).b
5061
5707
  min-height: 48px;
5062
5708
  background-color: ${(props)=>{
5063
5709
  if (props.danger) return "#d84949";
5064
- if (props.primary) return "#6967fc";
5710
+ if (props.primary) return props.theme.primaryColor;
5065
5711
  return props.theme.controlsBackgroundColor;
5066
5712
  }};
5067
5713
  border: ${(props)=>props.danger || props.primary ? "2px solid transparent" : `2px solid ${props.theme.controlsBorderColor}`};
@@ -5080,7 +5726,7 @@ const $ae07ea3548d561ea$export$6e8af0bd0a2aaa77 = (0, $3Sbms$styledcomponents).b
5080
5726
  border: 2px solid
5081
5727
  ${(props)=>{
5082
5728
  if (props.danger) return "#fc7d7d";
5083
- if (props.primary) return "#9e9cfc";
5729
+ if (props.primary) return "#a3ceff";
5084
5730
  return props.theme.controlsHoverBorderColor;
5085
5731
  }};
5086
5732
  }
@@ -5116,9 +5762,9 @@ const $db92fac48417791a$var$isScreenshareSupported = Boolean(navigator.mediaDevi
5116
5762
  const $db92fac48417791a$var$HighlightButton = ()=>{
5117
5763
  const highlightMenuRef = (0, $3Sbms$useRef)(null);
5118
5764
  const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
5119
- const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5765
+ const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5120
5766
  const { highlightedTile: highlightedTile , dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
5121
- const isPresenting = Boolean(highlightedTile?.data.local);
5767
+ const isPresenting = Boolean(highlightedTile?.isGlobal && highlightedTile?.peerId === selfPeerId);
5122
5768
  (0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(highlightMenuRef, ()=>setIsHighlightMenuOpen(false));
5123
5769
  const onHighlightClick = async ()=>{
5124
5770
  if (isPresenting) dispatch({
@@ -5164,11 +5810,16 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
5164
5810
  ]
5165
5811
  },
5166
5812
  ];
5167
- if ($db92fac48417791a$var$isScreenshareSupported) menuCategories[0].items.push({
5168
- id: "screensharing",
5169
- title: "Screen Sharing",
5170
- jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
5171
- action: onScreenshareClick
5813
+ if ($db92fac48417791a$var$isScreenshareSupported) menuCategories.push({
5814
+ id: "2",
5815
+ items: [
5816
+ {
5817
+ id: "screensharing",
5818
+ title: "Screen Sharing",
5819
+ jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
5820
+ action: onScreenshareClick
5821
+ },
5822
+ ]
5172
5823
  });
5173
5824
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
5174
5825
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ae07ea3548d561ea$export$3f103e2d692ed6d2), {
@@ -5255,9 +5906,9 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
5255
5906
  setWebcamCount(numberOfAvailableWebcams);
5256
5907
  };
5257
5908
  (0, $3Sbms$useEffect)(()=>{
5258
- window.addEventListener("webcamsUpdate", onNewWebcamCount);
5909
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("webcamsUpdate", onNewWebcamCount);
5259
5910
  return ()=>{
5260
- window.removeEventListener("webcamsUpdate", onNewWebcamCount);
5911
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("webcamsUpdate", onNewWebcamCount);
5261
5912
  };
5262
5913
  }, []);
5263
5914
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ae07ea3548d561ea$export$b6ba9bc16b3ff153), {
@@ -5337,7 +5988,6 @@ var $69a9c49ece80e773$export$2e2bcd8739ae039 = $69a9c49ece80e773$var$ControlBar;
5337
5988
 
5338
5989
 
5339
5990
 
5340
-
5341
5991
  const $8d3d0e80c56cde5c$export$9d03e7b857083c37 = (0, $3Sbms$styledcomponents).div`
5342
5992
  position: absolute;
5343
5993
  width: 100%;
@@ -5386,8 +6036,8 @@ const $8d3d0e80c56cde5c$export$b421c25a8e0ea22e = (0, $3Sbms$styledcomponents).b
5386
6036
  padding: 0;
5387
6037
 
5388
6038
  svg {
5389
- height: 10px;
5390
- width: 10px;
6039
+ height: 15px;
6040
+ width: 15px;
5391
6041
 
5392
6042
  path {
5393
6043
  fill: #000;
@@ -5418,12 +6068,11 @@ const $8d3d0e80c56cde5c$export$51760c3b0f5567d2 = (0, $3Sbms$styledcomponents).p
5418
6068
  const $5b80b81d7b095f89$var$QuickConnect = ()=>{
5419
6069
  const QuickConnectContainerRef = (0, $3Sbms$useRef)(null);
5420
6070
  const QuickConnectRef = (0, $3Sbms$useRef)(null);
5421
- const { selfPeerId: selfPeerId , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5422
- const [windowWidth, windowHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)();
6071
+ const { selfPeerId: selfPeerId , selfDisplayName: selfDisplayName , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5423
6072
  (0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(QuickConnectContainerRef, ()=>{
5424
6073
  if (isQuickConnectPopupVisible) setIsQuickConnectPopupVisible(false);
5425
6074
  });
5426
- const desktop = windowWidth > windowHeight;
6075
+ const desktop = orientation === "landscape";
5427
6076
  const qrCodeURL = (0, $3Sbms$useMemo)(()=>{
5428
6077
  let url = new URL(window.location.href);
5429
6078
  if (selfPeerId) {
@@ -5435,11 +6084,13 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
5435
6084
  url.searchParams.set("microphone-enabled", "0");
5436
6085
  url.searchParams.set("camera-enabled", "1");
5437
6086
  url.searchParams.set("quick-connect", selfPeerId);
6087
+ if (selfDisplayName) url.searchParams.set("name", selfDisplayName);
5438
6088
  }
5439
6089
  return url.href;
5440
6090
  }, [
5441
6091
  options.sharedURL,
5442
- selfPeerId
6092
+ selfPeerId,
6093
+ selfDisplayName
5443
6094
  ]);
5444
6095
  const onQuickConnectPopupCloseClick = ()=>setIsQuickConnectPopupVisible(false);
5445
6096
  (0, $3Sbms$useEffect)(()=>{
@@ -5447,9 +6098,9 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
5447
6098
  const { type: type } = event.detail.event;
5448
6099
  if (type === "quick_connect_close") setIsQuickConnectPopupVisible(false);
5449
6100
  };
5450
- window.addEventListener("customMessage", onCustomMessage);
6101
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
5451
6102
  return ()=>{
5452
- window.removeEventListener("customMessage", onCustomMessage);
6103
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
5453
6104
  };
5454
6105
  }, [
5455
6106
  setIsQuickConnectPopupVisible
@@ -5463,9 +6114,14 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
5463
6114
  if (selfPeerId) {
5464
6115
  const urlParams = new URLSearchParams(window.location.href);
5465
6116
  const quickConnectParam = urlParams.get("quick-connect");
5466
- if (quickConnectParam) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(quickConnectParam, {
5467
- type: "quick_connect_close"
5468
- });
6117
+ const quickConnectNameParam = urlParams.get("name");
6118
+ if (quickConnectParam) {
6119
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(quickConnectParam, {
6120
+ type: "quick_connect_close"
6121
+ });
6122
+ if (quickConnectNameParam) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setDisplayName(`${quickConnectNameParam} (mobile)`);
6123
+ else (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setDisplayName("Mobile");
6124
+ }
5469
6125
  }
5470
6126
  }, [
5471
6127
  selfPeerId
@@ -5514,47 +6170,42 @@ var $b26ed507544ea00c$export$2e2bcd8739ae039 = $b26ed507544ea00c$var$capitalizeF
5514
6170
 
5515
6171
 
5516
6172
 
5517
-
5518
- const $b93bcb828d5c97d8$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
5519
- fill: ${(props)=>props.theme.controlsIconColor};
5520
- `;
5521
6173
  const $b93bcb828d5c97d8$var$External = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5522
- width: "16",
5523
- height: "16",
5524
- viewBox: "0 0 16 16",
6174
+ width: "20",
6175
+ height: "20",
6176
+ viewBox: "0 0 20 20",
5525
6177
  fill: "none",
5526
6178
  xmlns: "http://www.w3.org/2000/svg",
5527
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($b93bcb828d5c97d8$var$ThemedPath, {
5528
- d: "M12.5 7.115a.75.75 0 0 0-.75.75v5.385A.75.75 0 0 1 11 14H2.75a.75.75 0 0 1-.75-.75V5a.75.75 0 0 1 .75-.75h5.385a.75.75 0 0 0 0-1.5H2.75A2.25 2.25 0 0 0 .5 5v8.25a2.25 2.25 0 0 0 2.25 2.25H11a2.25 2.25 0 0 0 2.25-2.25V7.865a.75.75 0 0 0-.75-.75Zm2.94-6.15a.75.75 0 0 0-.405-.405.75.75 0 0 0-.285-.06h-4.5a.75.75 0 0 0 0 1.5h2.693L5.218 9.717a.75.75 0 0 0 .244 1.23.751.751 0 0 0 .82-.164L14 3.058V5.75a.75.75 0 1 0 1.5 0v-4.5a.75.75 0 0 0-.06-.285Z"
6179
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6180
+ d: "M15 9.017a.833.833 0 0 0-.833.833v5.983a.833.833 0 0 1-.833.833H4.167a.833.833 0 0 1-.833-.833V6.667a.833.833 0 0 1 .833-.834h5.983a.833.833 0 0 0 0-1.667H4.167a2.5 2.5 0 0 0-2.5 2.5v9.167a2.5 2.5 0 0 0 2.5 2.5h9.167a2.5 2.5 0 0 0 2.5-2.5V9.85A.833.833 0 0 0 15 9.017Zm3.267-6.834a.834.834 0 0 0-.45-.45.834.834 0 0 0-.317-.067h-5a.833.833 0 0 0 0 1.667h2.992l-8.583 8.575a.832.832 0 0 0 0 1.184.833.833 0 0 0 1.183 0l8.575-8.584V7.5a.833.833 0 1 0 1.667 0v-5a.835.835 0 0 0-.067-.317Z",
6181
+ fill: "#fff"
5529
6182
  })
5530
6183
  });
5531
6184
  var $b93bcb828d5c97d8$export$2e2bcd8739ae039 = $b93bcb828d5c97d8$var$External;
5532
6185
 
5533
6186
 
5534
6187
 
5535
-
5536
- const $781ad5a3ab7061c2$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
5537
- fill: ${(props)=>props.theme.controlsIconColor};
5538
- `;
5539
- const $781ad5a3ab7061c2$var$Arrow = ({ direction: direction , small: small })=>{
6188
+ const $781ad5a3ab7061c2$var$Arrow = ({ direction: direction })=>{
5540
6189
  if (direction === "right") return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5541
- width: "8",
5542
- height: "12",
5543
- viewBox: "0 0 8 12",
6190
+ width: "20",
6191
+ height: "20",
6192
+ viewBox: "0 0 20 20",
5544
6193
  fill: "none",
5545
6194
  xmlns: "http://www.w3.org/2000/svg",
5546
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($781ad5a3ab7061c2$var$ThemedPath, {
5547
- d: "M6.83 5.29 2.59 1.05a1 1 0 1 0-1.42 1.41L4.71 6 1.17 9.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1 1 0 0 0 0-1.42Z"
6195
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6196
+ d: "M8.233 14.37a.834.834 0 0 1-.59-1.423L10.59 10 7.643 7.054a.833.833 0 1 1 1.179-1.179l3.535 3.536a.833.833 0 0 1 0 1.178l-3.535 3.536a.83.83 0 0 1-.59.244Z",
6197
+ fill: "#fff"
5548
6198
  })
5549
6199
  });
5550
6200
  if (direction === "left") return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5551
- width: "16",
5552
- height: "18",
5553
- viewBox: "0 0 16 18",
6201
+ width: "32",
6202
+ height: "32",
6203
+ viewBox: "0 0 32 32",
5554
6204
  fill: "none",
5555
6205
  xmlns: "http://www.w3.org/2000/svg",
5556
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($781ad5a3ab7061c2$var$ThemedPath, {
5557
- d: "M14.667 7.666H4.547l4.4-4.386a1.339 1.339 0 1 0-1.893-1.894L.387 8.053a1.333 1.333 0 0 0-.28.44 1.333 1.333 0 0 0 0 1.013c.063.164.158.313.28.44l6.667 6.667a1.333 1.333 0 0 0 1.893 0 1.332 1.332 0 0 0 0-1.893l-4.4-4.387h10.12a1.333 1.333 0 1 0 0-2.667Z"
6206
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6207
+ d: "M22.667 14.666h-10.12l4.4-4.386a1.34 1.34 0 0 0-1.893-1.894l-6.667 6.667a1.334 1.334 0 0 0-.28.44 1.334 1.334 0 0 0 0 1.013c.063.164.158.314.28.44l6.666 6.667a1.333 1.333 0 0 0 1.894 0 1.334 1.334 0 0 0 0-1.893l-4.4-4.387h10.12a1.333 1.333 0 1 0 0-2.667Z",
6208
+ fill: "#fff"
5558
6209
  })
5559
6210
  });
5560
6211
  return null;
@@ -5564,19 +6215,32 @@ var $781ad5a3ab7061c2$export$2e2bcd8739ae039 = $781ad5a3ab7061c2$var$Arrow;
5564
6215
 
5565
6216
 
5566
6217
 
6218
+ const $c45f2504881e174b$var$Speaker = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
6219
+ width: "24",
6220
+ height: "24",
6221
+ viewBox: "0 0 24 24",
6222
+ fill: "none",
6223
+ xmlns: "http://www.w3.org/2000/svg",
6224
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6225
+ d: "M12.43 4.1a1 1 0 0 0-1 .12L6.65 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3.65l4.73 3.78A1 1 0 0 0 12 20a.91.91 0 0 0 .43-.1A1 1 0 0 0 13 19V5a1 1 0 0 0-.57-.9ZM11 16.92l-3.38-2.7A1 1 0 0 0 7 14H4v-4h3a1 1 0 0 0 .62-.22L11 7.08v9.84Zm8.66-10.58a1.004 1.004 0 1 0-1.42 1.42 5.998 5.998 0 0 1-.38 8.84 1 1 0 0 0 .64 1.76 1 1 0 0 0 .64-.23 8 8 0 0 0 .52-11.79Zm-2.83 2.83a1.003 1.003 0 1 0-1.42 1.42A2 2 0 0 1 16 12a2.001 2.001 0 0 1-.71 1.53.997.997 0 1 0 1.28 1.53A4 4 0 0 0 18 12a4.06 4.06 0 0 0-1.17-2.83Z",
6226
+ fill: "#fff"
6227
+ })
6228
+ });
6229
+ var $c45f2504881e174b$export$2e2bcd8739ae039 = $c45f2504881e174b$var$Speaker;
6230
+
6231
+
6232
+
5567
6233
 
5568
6234
 
5569
- const $910dd7d7d872a463$var$ThemedPath = (0, $3Sbms$styledcomponents).path`
5570
- fill: ${(props)=>props.theme.controlsIconColor};
5571
- `;
5572
6235
  const $910dd7d7d872a463$var$Checkmark = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5573
- width: "12",
5574
- height: "8",
5575
- viewBox: "0 0 12 8",
6236
+ width: "20",
6237
+ height: "20",
6238
+ viewBox: "0 0 20 20",
5576
6239
  fill: "none",
5577
6240
  xmlns: "http://www.w3.org/2000/svg",
5578
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($910dd7d7d872a463$var$ThemedPath, {
5579
- d: "M11.032.407a.75.75 0 0 0-1.065 0L4.38 6.002 2.032 3.647A.766.766 0 1 0 .967 4.75l2.88 2.88a.75.75 0 0 0 1.065 0l6.12-6.12a.75.75 0 0 0 0-1.103Z"
6241
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6242
+ d: "M15.592 6.008a.833.833 0 0 0-1.184 0L8.2 12.225 5.592 9.608a.852.852 0 0 0-1.184 1.225l3.2 3.2a.833.833 0 0 0 1.184 0l6.8-6.8a.834.834 0 0 0 0-1.225Z",
6243
+ fill: "#fff"
5580
6244
  })
5581
6245
  });
5582
6246
  var $910dd7d7d872a463$export$2e2bcd8739ae039 = $910dd7d7d872a463$var$Checkmark;
@@ -5672,6 +6336,22 @@ const $658749b7ab14b607$export$db1aade9877208c7 = (0, $3Sbms$styledcomponents).b
5672
6336
  padding: 16px 18px;
5673
6337
  font-size: 14px;
5674
6338
  color: ${(props)=>props.theme.settingsTextColor};
6339
+
6340
+ span {
6341
+ display: flex;
6342
+ align-items: center;
6343
+ }
6344
+ `;
6345
+ const $658749b7ab14b607$export$bb67e2c42c95a3ae = (0, $3Sbms$styledcomponents).div`
6346
+ display: flex;
6347
+ align-items: center;
6348
+ margin-right: 10px;
6349
+ `;
6350
+ const $658749b7ab14b607$export$f132d77f01dce0a3 = (0, $3Sbms$styledcomponents).p`
6351
+ margin: 0;
6352
+ text-overflow: ellipsis;
6353
+ white-space: nowrap;
6354
+ overflow: hidden;
5675
6355
  `;
5676
6356
  const $658749b7ab14b607$export$4f015f15aa624b3d = (0, $3Sbms$styledcomponents).div`
5677
6357
  display: flex;
@@ -5684,48 +6364,325 @@ const $658749b7ab14b607$export$a172e59999e5ae8e = (0, $3Sbms$styledcomponents).d
5684
6364
  position: relative;
5685
6365
  width: 40px;
5686
6366
  height: 20px;
5687
- background-color: ${(props)=>props.checked ? "#6967fc" : "#b5b5b5"};
6367
+ background-color: ${(props)=>props.checked ? props.theme.primaryColor : "#b5b5b5"};
5688
6368
  border-radius: 10px;
5689
6369
  padding: 5px;
5690
6370
  box-sizing: border-box;
5691
6371
  transition: all 0.4s;
5692
6372
 
5693
- &::after {
5694
- position: absolute;
5695
- display: block;
5696
- content: '';
5697
- right: ${(props)=>props.checked ? "calc(0% + 15px)" : "calc(100% - 5px)"};
5698
- transform: translate(100%, 0);
5699
- background-color: #fff;
5700
- width: 10px;
5701
- height: 10px;
5702
- border-radius: 50%;
5703
- transition: all 0.4s;
5704
- }
5705
- `;
6373
+ &::after {
6374
+ position: absolute;
6375
+ display: block;
6376
+ content: '';
6377
+ right: ${(props)=>props.checked ? "calc(0% + 15px)" : "calc(100% - 5px)"};
6378
+ transform: translate(100%, 0);
6379
+ background-color: #fff;
6380
+ width: 10px;
6381
+ height: 10px;
6382
+ border-radius: 50%;
6383
+ transition: all 0.4s;
6384
+ }
6385
+ `;
6386
+ const $658749b7ab14b607$export$87d6be27a51dc3c4 = (0, $3Sbms$styledcomponents).div`
6387
+ display: flex;
6388
+ flex-direction: column;
6389
+ justify-content: center;
6390
+ align-items: center;
6391
+ padding: 22px;
6392
+ gap: 10px;
6393
+ background-color: #686868;
6394
+ border-radius: 15px;
6395
+ `;
6396
+ const $658749b7ab14b607$export$30ccd51431e4a7b0 = (0, $3Sbms$styledcomponents).p`
6397
+ font-weight: 700;
6398
+ font-size: 16px;
6399
+ line-height: 16px;
6400
+ text-align: center;
6401
+ margin: 0;
6402
+ `;
6403
+ const $658749b7ab14b607$export$73afb47ae3e10bf1 = (0, $3Sbms$styledcomponents).p`
6404
+ font-weight: 500;
6405
+ font-size: 14px;
6406
+ line-height: 16px;
6407
+ text-align: center;
6408
+ margin: 0;
6409
+ `;
6410
+
6411
+
6412
+ const $1694791461215de9$var$languagesList = [
6413
+ "english"
6414
+ ];
6415
+ const $1694791461215de9$export$604ba5624273df44 = ()=>{
6416
+ try {
6417
+ const storedTheme = localStorage.getItem("stream_ui_language");
6418
+ if (storedTheme) return storedTheme;
6419
+ return "english";
6420
+ } catch (localStorageError) {
6421
+ console.warn(localStorageError);
6422
+ return "english";
6423
+ }
6424
+ };
6425
+ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
6426
+ const { language: language , setLanguage: setLanguage } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6427
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
6428
+ children: [
6429
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6430
+ children: [
6431
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6432
+ children: "Languages"
6433
+ }),
6434
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6435
+ onClick: back,
6436
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
6437
+ direction: "left"
6438
+ })
6439
+ })
6440
+ ]
6441
+ }),
6442
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
6443
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6444
+ children: [
6445
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6446
+ children: "Language"
6447
+ }),
6448
+ $1694791461215de9$var$languagesList.map((lang)=>{
6449
+ const checked = language === lang;
6450
+ const onLanguageClick = ()=>{
6451
+ setLanguage(lang);
6452
+ };
6453
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6454
+ onClick: onLanguageClick,
6455
+ children: [
6456
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6457
+ children: (0, $b26ed507544ea00c$export$2e2bcd8739ae039)(lang)
6458
+ }),
6459
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6460
+ children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6461
+ })
6462
+ ]
6463
+ }, lang);
6464
+ })
6465
+ ]
6466
+ })
6467
+ })
6468
+ ]
6469
+ });
6470
+ };
6471
+ var $1694791461215de9$export$2e2bcd8739ae039 = $1694791461215de9$var$LanguageSubMenu;
6472
+
6473
+
6474
+
6475
+
6476
+
6477
+
6478
+
6479
+
6480
+
6481
+
6482
+ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6483
+ const [micDevices, setMicDevices] = (0, $3Sbms$useState)([]);
6484
+ const [currentMic, setCurrentMic] = (0, $3Sbms$useState)(null);
6485
+ const [speakerDevices, setSpeakerDevices] = (0, $3Sbms$useState)([]);
6486
+ const [currentSpeaker, setCurrentSpeaker] = (0, $3Sbms$useState)(null);
6487
+ const canChangeSpeakers = speakerDevices.length > 0 && "setSinkId" in HTMLAudioElement.prototype;
6488
+ const listDevices = ()=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).listAudioDevices().then((devices)=>{
6489
+ const speakers = devices.filter((device)=>device.kind === "audiooutput" && device.label);
6490
+ const mics = devices.filter((device)=>device.kind === "audioinput" && device.label);
6491
+ setMicDevices(mics);
6492
+ setSpeakerDevices(speakers);
6493
+ // For chrome
6494
+ const speaker = speakers.find((device)=>device.deviceId === "default");
6495
+ const mic = mics.find((device)=>device.deviceId === "default");
6496
+ setCurrentMic(mic || null);
6497
+ setCurrentSpeaker(speaker || null);
6498
+ });
6499
+ const onMicClick = (0, $3Sbms$useCallback)(async (mic)=>{
6500
+ if (currentMic?.deviceId === mic.deviceId) return;
6501
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchMicrophone(mic.deviceId);
6502
+ setCurrentMic(mic);
6503
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${mic.label}`);
6504
+ }, [
6505
+ currentMic
6506
+ ]);
6507
+ const onSpeakerClick = (0, $3Sbms$useCallback)((speaker)=>{
6508
+ if (currentSpeaker?.deviceId === speaker.deviceId) return;
6509
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setAudioSink(speaker.deviceId);
6510
+ setCurrentSpeaker(speaker);
6511
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${speaker.label}`);
6512
+ }, [
6513
+ currentSpeaker
6514
+ ]);
6515
+ (0, $3Sbms$useEffect)(()=>{
6516
+ listDevices();
6517
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("devicesListChange", listDevices);
6518
+ return ()=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("devicesListChange", listDevices);
6519
+ }, []);
6520
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
6521
+ children: [
6522
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6523
+ children: [
6524
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6525
+ children: "Audio"
6526
+ }),
6527
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6528
+ onClick: back,
6529
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
6530
+ direction: "left"
6531
+ })
6532
+ })
6533
+ ]
6534
+ }),
6535
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
6536
+ children: [
6537
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6538
+ children: [
6539
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6540
+ children: "Microphone"
6541
+ }),
6542
+ canChangeSpeakers && micDevices.map((mic)=>{
6543
+ const checked = mic.deviceId === currentMic?.deviceId;
6544
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6545
+ onClick: ()=>onMicClick(mic),
6546
+ children: [
6547
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6548
+ children: mic.label
6549
+ }),
6550
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6551
+ children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6552
+ })
6553
+ ]
6554
+ }, mic.deviceId);
6555
+ }),
6556
+ !canChangeSpeakers && micDevices.length < 1 && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
6557
+ children: [
6558
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
6559
+ children: "Microphone is blocked."
6560
+ }),
6561
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
6562
+ children: "Please accept microphone sharing before accessing these options."
6563
+ })
6564
+ ]
6565
+ })
6566
+ ]
6567
+ }),
6568
+ canChangeSpeakers && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6569
+ children: [
6570
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6571
+ children: "Speakers"
6572
+ }),
6573
+ speakerDevices.map((speaker)=>{
6574
+ const checked = speaker.deviceId === currentSpeaker?.deviceId;
6575
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6576
+ onClick: ()=>onSpeakerClick(speaker),
6577
+ children: [
6578
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6579
+ children: speaker.label
6580
+ }),
6581
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6582
+ children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6583
+ })
6584
+ ]
6585
+ }, speaker.deviceId);
6586
+ })
6587
+ ]
6588
+ })
6589
+ ]
6590
+ })
6591
+ ]
6592
+ });
6593
+ };
6594
+ var $b7a5d5760b390f40$export$2e2bcd8739ae039 = $b7a5d5760b390f40$var$AudioSubMenu;
6595
+
5706
6596
 
5707
6597
 
5708
- const $1694791461215de9$var$languagesList = [
5709
- "english"
5710
- ];
5711
- const $1694791461215de9$export$604ba5624273df44 = ()=>{
5712
- try {
5713
- const storedTheme = localStorage.getItem("stream_ui_language");
5714
- if (storedTheme) return storedTheme;
5715
- return "english";
5716
- } catch (localStorageError) {
5717
- console.warn(localStorageError);
5718
- return "english";
6598
+
6599
+
6600
+
6601
+
6602
+
6603
+
6604
+
6605
+ const $57896f163f7e1230$var$resolutions = Object.keys((0, $c31e3fb4360572af$export$d21ffcc5eb136bfa)).map((key)=>{
6606
+ const constraints = (0, $c31e3fb4360572af$export$d21ffcc5eb136bfa);
6607
+ switch(constraints[key].height.ideal){
6608
+ case 240:
6609
+ return {
6610
+ name: "Low definition (240p)",
6611
+ key: key
6612
+ };
6613
+ case 480:
6614
+ return {
6615
+ name: "Standard definition (480p)",
6616
+ key: key
6617
+ };
6618
+ case 720:
6619
+ return {
6620
+ name: "Hight definition (720p)",
6621
+ key: key
6622
+ };
6623
+ default:
6624
+ return {
6625
+ name: "",
6626
+ key: key
6627
+ };
5719
6628
  }
5720
- };
5721
- const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
5722
- const { language: language , setLanguage: setLanguage } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6629
+ }).filter((def)=>def.name !== "");
6630
+ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6631
+ const [cameraDevices, setCameraDevices] = (0, $3Sbms$useState)(Array.from((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getWebcamsList().values()).filter((device)=>device.deviceId));
6632
+ const [currentCamera, setCurrentCamera] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentWebcam());
6633
+ const listDevices = async ()=>{
6634
+ const devices = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listVideoDevices();
6635
+ const authorisedCameras = devices.filter((device)=>device.deviceId);
6636
+ if (authorisedCameras.length > 0) setCameraDevices(authorisedCameras);
6637
+ };
6638
+ const onCameraClick = async (camera)=>{
6639
+ if (currentCamera.device?.deviceId === camera.deviceId) return;
6640
+ if (currentCamera.device) {
6641
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchWebcam({
6642
+ device: camera
6643
+ });
6644
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${camera.label}`, {
6645
+ duration: 3000
6646
+ });
6647
+ } else {
6648
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
6649
+ device: camera,
6650
+ resolution: currentCamera.resolution
6651
+ });
6652
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${camera.label}`, {
6653
+ duration: 3000
6654
+ });
6655
+ }
6656
+ };
6657
+ const onSendResolutionClick = async (resolution)=>{
6658
+ if (currentCamera.resolution === resolution.key) return;
6659
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setWebcamResolution(resolution.key);
6660
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Using ${resolution.name} resolution`, {
6661
+ duration: 3000
6662
+ });
6663
+ };
6664
+ const onLocalVideoChange = (event)=>{
6665
+ setCurrentCamera({
6666
+ ...event.detail.camera
6667
+ });
6668
+ };
6669
+ (0, $3Sbms$useEffect)(()=>{
6670
+ listDevices();
6671
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("devicesListChange", listDevices);
6672
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
6673
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
6674
+ return ()=>{
6675
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("devicesListChange", listDevices);
6676
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
6677
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
6678
+ };
6679
+ }, []);
5723
6680
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
5724
6681
  children: [
5725
6682
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
5726
6683
  children: [
5727
6684
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
5728
- children: "Languages"
6685
+ children: "Video"
5729
6686
  }),
5730
6687
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
5731
6688
  onClick: back,
@@ -5735,46 +6692,78 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
5735
6692
  })
5736
6693
  ]
5737
6694
  }),
5738
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
5739
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
5740
- children: [
5741
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
5742
- children: "Language"
5743
- }),
5744
- $1694791461215de9$var$languagesList.map((lang)=>{
5745
- const checked = language === lang;
5746
- const onLanguageClick = ()=>{
5747
- setLanguage(lang);
5748
- };
5749
- return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
5750
- onClick: onLanguageClick,
6695
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
6696
+ children: [
6697
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6698
+ children: [
6699
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6700
+ children: "Camera"
6701
+ }),
6702
+ cameraDevices.map((camera)=>{
6703
+ const checked = camera.deviceId === currentCamera.device?.deviceId;
6704
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6705
+ onClick: ()=>onCameraClick(camera),
6706
+ children: [
6707
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6708
+ children: camera.label
6709
+ }),
6710
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6711
+ children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6712
+ })
6713
+ ]
6714
+ }, camera.deviceId);
6715
+ }),
6716
+ cameraDevices.length < 1 && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
5751
6717
  children: [
5752
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
5753
- children: (0, $b26ed507544ea00c$export$2e2bcd8739ae039)(lang)
6718
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
6719
+ children: "Camera is blocked."
5754
6720
  }),
5755
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
5756
- children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6721
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
6722
+ children: "Please accept camera sharing before accessing these options."
5757
6723
  })
5758
6724
  ]
5759
- }, lang);
5760
- })
5761
- ]
5762
- })
6725
+ })
6726
+ ]
6727
+ }),
6728
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6729
+ children: [
6730
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6731
+ children: "Send Resolution (maximum)"
6732
+ }),
6733
+ $57896f163f7e1230$var$resolutions.map((resolution)=>{
6734
+ const checked = resolution.key === currentCamera.resolution;
6735
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6736
+ onClick: ()=>onSendResolutionClick(resolution),
6737
+ children: [
6738
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6739
+ children: resolution.name
6740
+ }),
6741
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6742
+ children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
6743
+ })
6744
+ ]
6745
+ }, resolution.key);
6746
+ })
6747
+ ]
6748
+ })
6749
+ ]
5763
6750
  })
5764
6751
  ]
5765
6752
  });
5766
6753
  };
5767
- var $1694791461215de9$export$2e2bcd8739ae039 = $1694791461215de9$var$LanguageSubMenu;
6754
+ var $57896f163f7e1230$export$2e2bcd8739ae039 = $57896f163f7e1230$var$VideoSubMenu;
5768
6755
 
5769
6756
 
5770
6757
 
5771
6758
  const $c11e4c21ca692a16$var$Menu = ()=>{
5772
6759
  const [currentMenu, setCurrentMenu] = (0, $3Sbms$useState)("base");
5773
6760
  const menuPopupRef = (0, $3Sbms$useRef)(null);
5774
- const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6761
+ const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5775
6762
  const onCloseClick = ()=>setIsSettingsMenuVisible(false);
5776
6763
  const menuBack = ()=>setCurrentMenu("base");
5777
6764
  const onLanguageMenuClick = ()=>setCurrentMenu("languages");
6765
+ const onAudioClick = ()=>setCurrentMenu("audio");
6766
+ const onVideoClick = ()=>setCurrentMenu("video");
5778
6767
  /* const onDarkModeClick = () => {
5779
6768
  if (theme === 'dark') {
5780
6769
  setTheme('light');
@@ -5842,6 +6831,49 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
5842
6831
  })
5843
6832
  ]
5844
6833
  }),
6834
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6835
+ children: [
6836
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6837
+ children: "Devices"
6838
+ }),
6839
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).isListDevicesSupported() && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6840
+ onClick: onAudioClick,
6841
+ children: [
6842
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
6843
+ children: [
6844
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
6845
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {})
6846
+ }),
6847
+ "Audio"
6848
+ ]
6849
+ }),
6850
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
6851
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
6852
+ direction: "right"
6853
+ })
6854
+ })
6855
+ ]
6856
+ }),
6857
+ !options.audioTiles && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6858
+ onClick: onVideoClick,
6859
+ children: [
6860
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
6861
+ children: [
6862
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
6863
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {})
6864
+ }),
6865
+ "Video"
6866
+ ]
6867
+ }),
6868
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
6869
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
6870
+ direction: "right"
6871
+ })
6872
+ })
6873
+ ]
6874
+ })
6875
+ ]
6876
+ }),
5845
6877
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
5846
6878
  children: [
5847
6879
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
@@ -5864,6 +6896,12 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
5864
6896
  }),
5865
6897
  currentMenu === "languages" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1694791461215de9$export$2e2bcd8739ae039), {
5866
6898
  back: menuBack
6899
+ }),
6900
+ currentMenu === "audio" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b7a5d5760b390f40$export$2e2bcd8739ae039), {
6901
+ back: menuBack
6902
+ }),
6903
+ currentMenu === "video" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57896f163f7e1230$export$2e2bcd8739ae039), {
6904
+ back: menuBack
5867
6905
  })
5868
6906
  ]
5869
6907
  });
@@ -5878,7 +6916,6 @@ var $c11e4c21ca692a16$export$2e2bcd8739ae039 = $c11e4c21ca692a16$var$Menu;
5878
6916
 
5879
6917
 
5880
6918
 
5881
-
5882
6919
  const $d677836e2f373a45$export$b679a9a7caefa4b1 = (0, $3Sbms$styledcomponents).div`
5883
6920
  position: absolute;
5884
6921
  width: 100%;
@@ -5973,7 +7010,7 @@ const $d677836e2f373a45$export$176dd61d50c7f3d7 = (0, $3Sbms$styledcomponents).d
5973
7010
 
5974
7011
  &:focus {
5975
7012
  outline: none;
5976
- border: 1px solid #6967fc;
7013
+ border: 1px solid ${({ theme: theme })=>theme.primaryColor};
5977
7014
  }
5978
7015
  }
5979
7016
  `;
@@ -5988,7 +7025,7 @@ const $d677836e2f373a45$export$baf775d6bf9683d5 = (0, $3Sbms$styledcomponents).s
5988
7025
  margin-top: 10px;
5989
7026
  `;
5990
7027
  const $d677836e2f373a45$export$3711c5e6a7ba3fdc = (0, $3Sbms$styledcomponents).button`
5991
- background-color: #6967fc;
7028
+ background-color: ${({ theme: theme })=>theme.primaryColor};
5992
7029
  padding: 8px 18px;
5993
7030
  border-radius: 50px;
5994
7031
  margin: 30px auto 0;
@@ -6006,10 +7043,9 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
6006
7043
  const youtubePopupRef = (0, $3Sbms$useRef)(null);
6007
7044
  const [youtubeInputValue, setYoutubeInputValue] = (0, $3Sbms$useState)("");
6008
7045
  const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
6009
- const { isYoutubePopupVisible: isYoutubePopupVisible , setIsYoutubePopupVisible: setIsYoutubePopupVisible } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7046
+ const { isYoutubePopupVisible: isYoutubePopupVisible , setIsYoutubePopupVisible: setIsYoutubePopupVisible , selfPeerId: selfPeerId , orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6010
7047
  const { dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
6011
- const [windowWidth, windowHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)();
6012
- const desktop = windowWidth > windowHeight;
7048
+ const desktop = orientation === "landscape";
6013
7049
  (0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(youtubePopupRef, ()=>{
6014
7050
  if (isYoutubePopupVisible) setIsYoutubePopupVisible(false);
6015
7051
  });
@@ -6022,10 +7058,10 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
6022
7058
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
6023
7059
  payload: {
6024
7060
  type: "youtube",
6025
- peerId: "self",
7061
+ peerId: String(selfPeerId),
7062
+ isGlobal: true,
6026
7063
  data: {
6027
- videoId: videoId,
6028
- local: true
7064
+ videoId: videoId
6029
7065
  }
6030
7066
  }
6031
7067
  });
@@ -6108,103 +7144,14 @@ var $49372cd9190da903$export$2e2bcd8739ae039 = $49372cd9190da903$var$YoutubePopu
6108
7144
 
6109
7145
 
6110
7146
 
6111
-
6112
- const $3456a3b2458f2971$var$LinkNotificationContainer = (0, $3Sbms$styledcomponents).div`
6113
- display: flex;
6114
- flex-direction: row;
6115
- align-items: center;
6116
- max-width: 300px;
6117
- `;
6118
- const $3456a3b2458f2971$var$LinkNotificationIcon = (0, $3Sbms$styledcomponents).img`
6119
- width: 36px;
6120
- height: 36px;
6121
- border-radius: 8px;
6122
- margin-right: 10px;
6123
- background-color: #fff;
6124
- `;
6125
- const $3456a3b2458f2971$var$LinkNotificationMessageContainer = (0, $3Sbms$styledcomponents).div`
6126
- max-width: 185px;
6127
- `;
6128
- const $3456a3b2458f2971$var$LinkNotificationTitle = (0, $3Sbms$styledcomponents).p`
6129
- margin: 0;
6130
- font-weight: 700;
6131
- font-size: 14px;
6132
- text-overflow: ellipsis;
6133
- white-space: nowrap;
6134
- overflow: hidden;
6135
- `;
6136
- const $3456a3b2458f2971$var$LinkNotificationText = (0, $3Sbms$styledcomponents).p`
6137
- margin: 0;
6138
- font-weigth: 500;
6139
- font-size: 12px;
6140
- text-overflow: ellipsis;
6141
- white-space: nowrap;
6142
- overflow: hidden;
6143
- `;
6144
- const $3456a3b2458f2971$var$LinkNotificationButton = (0, $3Sbms$styledcomponents).button`
6145
- background-color: #2d2d2d;
6146
- font: inherit;
6147
- font-weight: 700;
6148
- color: inherit;
6149
- border: none;
6150
- border-radius: 50px;
6151
- padding: 6px 12px;
6152
- margin-left: 10px;
6153
- cursor: pointer;
6154
- outline: inherit;
6155
- box-sizing: border-box;
6156
- :hover {
6157
- padding: 4px 10px;
6158
- border: 2px solid #8d8d8d;
6159
- }
6160
- `;
6161
- const $3456a3b2458f2971$var$linkToast = async ({ url: url , linkData: linkData })=>{
6162
- const onIconError = ({ currentTarget: currentTarget })=>{
6163
- currentTarget.onerror = null;
6164
- currentTarget.src = `https://www.google.com/s2/favicons?domain=${linkData.domain}&sz=32`;
6165
- };
6166
- (0, $3Sbms$reacthottoast)(/*#__PURE__*/ (0, $3Sbms$jsxs)($3456a3b2458f2971$var$LinkNotificationContainer, {
6167
- children: [
6168
- /*#__PURE__*/ (0, $3Sbms$jsx)($3456a3b2458f2971$var$LinkNotificationIcon, {
6169
- src: linkData.iconSrc,
6170
- alt: `favicon for ${linkData.domain}`,
6171
- onError: onIconError
6172
- }),
6173
- /*#__PURE__*/ (0, $3Sbms$jsxs)($3456a3b2458f2971$var$LinkNotificationMessageContainer, {
6174
- children: [
6175
- /*#__PURE__*/ (0, $3Sbms$jsx)($3456a3b2458f2971$var$LinkNotificationTitle, {
6176
- children: linkData.title
6177
- }),
6178
- /*#__PURE__*/ (0, $3Sbms$jsx)($3456a3b2458f2971$var$LinkNotificationText, {
6179
- children: linkData.domain
6180
- })
6181
- ]
6182
- }),
6183
- /*#__PURE__*/ (0, $3Sbms$jsx)($3456a3b2458f2971$var$LinkNotificationButton, {
6184
- onClick: ()=>window.open(url, "_blank"),
6185
- children: "Open"
6186
- })
6187
- ]
6188
- }), {
6189
- style: {
6190
- maxWidth: "300px"
6191
- },
6192
- duration: 10000
6193
- });
6194
- };
6195
- var $3456a3b2458f2971$export$2e2bcd8739ae039 = $3456a3b2458f2971$var$linkToast;
6196
-
6197
-
6198
-
6199
-
6200
7147
  const $dc26e7b014ddcf8c$var$PaypalWhite = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
6201
- width: "14",
6202
- height: "16",
6203
- viewBox: "0 0 14 16",
7148
+ width: "24",
7149
+ height: "24",
7150
+ viewBox: "0 0 24 24",
6204
7151
  fill: "none",
6205
7152
  xmlns: "http://www.w3.org/2000/svg",
6206
7153
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6207
- d: "M12.625 4.736a2.55 2.55 0 0 0-.382-.349 3.15 3.15 0 0 0-.772-2.493C10.75 1.079 9.517.667 7.81.667H3.667a1.262 1.262 0 0 0-1.242 1.06L.698 12.666a1.022 1.022 0 0 0 1.01 1.19h1.777l-.055.347a.978.978 0 0 0 .966 1.131h2.156a1.174 1.174 0 0 0 1.167-.98l.427-2.687.008-.037h.199c2.688 0 4.367-1.328 4.857-3.841a3.433 3.433 0 0 0-.585-3.052Zm-8.397 4.4-.476 3.023-.057.363H2.07L3.73 2H7.81c1.29 0 2.211.27 2.661.776a1.978 1.978 0 0 1 .405 1.822l-.012.075c-.008.05-.015.1-.029.164a3.898 3.898 0 0 1-1.337 2.447 4.452 4.452 0 0 1-2.811.789H5.47a1.253 1.253 0 0 0-1.243 1.063Zm7.673-1.604c-.367 1.886-1.495 2.764-3.548 2.764H8.03a1.174 1.174 0 0 0-1.168.982l-.433 2.716L4.812 14l.319-2.023.407-2.568h1.146c.105 0 .197-.016.299-.02.24-.008.478-.017.702-.045.137-.017.262-.048.393-.072.182-.034.364-.067.534-.114.127-.036.246-.081.366-.124.16-.057.317-.116.465-.186.112-.053.22-.111.325-.172a4.513 4.513 0 0 0 .685-.475c.126-.108.245-.224.358-.346.075-.08.152-.158.222-.244a4.71 4.71 0 0 0 .32-.462c.05-.082.107-.157.154-.243.135-.247.251-.504.347-.769.006-.016.014-.029.02-.045l.01-.021c.131.477.137.98.017 1.461Z",
7154
+ d: "M20.437 7.104a3.825 3.825 0 0 0-.573-.523 4.727 4.727 0 0 0-1.158-3.74C17.622 1.619 15.775 1 13.214 1H7a1.892 1.892 0 0 0-1.863 1.592l-2.59 16.406a1.533 1.533 0 0 0 1.516 1.785h2.664l-.082.52A1.467 1.467 0 0 0 8.093 23h3.235a1.762 1.762 0 0 0 1.75-1.47l.641-4.031.01-.055h.3c4.032 0 6.55-1.993 7.285-5.762a5.15 5.15 0 0 0-.877-4.578Zm-12.595 6.6-.714 4.535-.087.544H4.606L7.097 3h6.117c1.936 0 3.318.404 3.992 1.164a2.966 2.966 0 0 1 .608 2.733l-.018.113c-.012.076-.023.15-.044.246a5.847 5.847 0 0 1-2.005 3.67 6.678 6.678 0 0 1-4.217 1.183H9.706a1.88 1.88 0 0 0-1.864 1.595ZM19.351 11.3c-.55 2.828-2.242 4.145-5.322 4.145h-.484a1.762 1.762 0 0 0-1.75 1.473l-.65 4.074L8.717 21l.478-3.034.611-3.853h1.72c.156 0 .295-.023.448-.029.359-.012.716-.026 1.053-.067.205-.026.393-.073.59-.11.272-.05.545-.1.8-.17.191-.053.369-.122.55-.186a7.68 7.68 0 0 0 .698-.279c.168-.079.328-.167.486-.257a6.745 6.745 0 0 0 1.027-.713 6.56 6.56 0 0 0 .537-.519c.113-.12.23-.237.334-.367.173-.221.334-.452.48-.693.076-.122.161-.235.231-.363.203-.371.377-.757.521-1.154.009-.024.021-.044.03-.068.004-.01.01-.02.014-.032.198.717.207 1.472.026 2.193Z",
6208
7155
  fill: "#fff"
6209
7156
  })
6210
7157
  });
@@ -6226,22 +7173,22 @@ const $dc26e7b014ddcf8c$var$PaypalColored = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("
6226
7173
  width: "14",
6227
7174
  height: "14",
6228
7175
  rx: "7",
6229
- fill: "url(#a)"
7176
+ fill: "url(#paypalPattern)"
6230
7177
  }),
6231
7178
  /*#__PURE__*/ (0, $3Sbms$jsxs)("defs", {
6232
7179
  children: [
6233
7180
  /*#__PURE__*/ (0, $3Sbms$jsx)("pattern", {
6234
- id: "a",
7181
+ id: "paypalPattern",
6235
7182
  patternContentUnits: "objectBoundingBox",
6236
7183
  width: "1",
6237
7184
  height: "1",
6238
7185
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("use", {
6239
- xlinkHref: "#b",
7186
+ xlinkHref: "#paypalImage",
6240
7187
  transform: "matrix(.00308 0 0 .00308 .154 .154)"
6241
7188
  })
6242
7189
  }),
6243
7190
  /*#__PURE__*/ (0, $3Sbms$jsx)("image", {
6244
- id: "b",
7191
+ id: "paypalImage",
6245
7192
  width: "225",
6246
7193
  height: "225",
6247
7194
  xlinkHref: "data:image/png;base64,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"
@@ -6255,6 +7202,7 @@ var $dc26e7b014ddcf8c$export$2e2bcd8739ae039 = $dc26e7b014ddcf8c$var$Paypal;
6255
7202
 
6256
7203
 
6257
7204
 
7205
+
6258
7206
  const $554f3984e3212196$export$ed0d510542cc4e55 = (0, $3Sbms$styledcomponents).div`
6259
7207
  position: absolute;
6260
7208
  width: 100%;
@@ -6349,7 +7297,7 @@ const $554f3984e3212196$export$dcb32b2b413109d8 = (0, $3Sbms$styledcomponents).d
6349
7297
 
6350
7298
  &:focus {
6351
7299
  outline: none;
6352
- border: 1px solid #6967fc;
7300
+ border: 1px solid ${({ theme: theme })=>theme.primaryColor};
6353
7301
  }
6354
7302
  }
6355
7303
  `;
@@ -6364,7 +7312,7 @@ const $554f3984e3212196$export$711a92c06f80c3bd = (0, $3Sbms$styledcomponents).s
6364
7312
  margin-top: 10px;
6365
7313
  `;
6366
7314
  const $554f3984e3212196$export$aec21c9a4da7a1b7 = (0, $3Sbms$styledcomponents).button`
6367
- background-color: #6967fc;
7315
+ background-color: ${({ theme: theme })=>theme.primaryColor};
6368
7316
  padding: 8px 18px;
6369
7317
  border-radius: 50px;
6370
7318
  margin: 30px auto 0;
@@ -6374,12 +7322,55 @@ const $554f3984e3212196$export$aec21c9a4da7a1b7 = (0, $3Sbms$styledcomponents).b
6374
7322
  font-weight: 700;
6375
7323
  line-height: 18px;
6376
7324
  `;
7325
+ const $554f3984e3212196$export$9e155375d8fb1f67 = (0, $3Sbms$styledcomponents).img`
7326
+ width: 36px;
7327
+ height: 36px;
7328
+ border-radius: 8px;
7329
+ `;
7330
+ const $554f3984e3212196$export$5e3f251c730829 = (0, $3Sbms$styledcomponents).div`
7331
+ display: flex;
7332
+ gap: 5px;
7333
+ `;
6377
7334
 
6378
7335
 
6379
7336
 
6380
7337
 
6381
7338
  const $98933bbc579a3e66$export$a1eac7fdbc2db4af = "linkshare_sent";
6382
- const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>(0, $a5146f9062d7bf28$export$3a57e165650c636f)(`${senderName || "User"} sent you an invoice.`, {
7339
+ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
7340
+ let notificationStatusText = new URL(data.url).hostname;
7341
+ if (notificationStatusText.startsWith("www.")) notificationStatusText = notificationStatusText.slice(4);
7342
+ const notificationIcon = data.ogImage ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$9e155375d8fb1f67), {
7343
+ src: data.ogImage
7344
+ }) : undefined;
7345
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(data.title, {
7346
+ width: "350px",
7347
+ icon: notificationIcon,
7348
+ status: {
7349
+ icon: data.favicon,
7350
+ text: "From",
7351
+ boldText: notificationStatusText
7352
+ },
7353
+ button: {
7354
+ text: "Open",
7355
+ action: ({ close: close })=>{
7356
+ window.open(data.url, "_blank");
7357
+ close();
7358
+ }
7359
+ },
7360
+ ellipsis: true,
7361
+ duration: 10000
7362
+ });
7363
+ (0, $f81bfa56534026c2$export$e9785ae652b3a722)({
7364
+ title: data.title,
7365
+ url: data.url,
7366
+ iconUrl: data.ogImage,
7367
+ statusIconUrl: data.favicon,
7368
+ statusText: notificationStatusText
7369
+ });
7370
+ };
7371
+ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
7372
+ const title = `${senderName || "User"} sent you an invoice.`;
7373
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(title, {
6383
7374
  button: {
6384
7375
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {}),
6385
7376
  text: "Pay",
@@ -6394,79 +7385,89 @@ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>(
6394
7385
  },
6395
7386
  duration: 10000
6396
7387
  });
7388
+ (0, $f81bfa56534026c2$export$e9785ae652b3a722)({
7389
+ title: title,
7390
+ url: url,
7391
+ statusIconUrl: "https://stream-assets.snapcall.io/icons/paypal.png",
7392
+ statusText: "PayPal"
7393
+ });
7394
+ };
6397
7395
  const $98933bbc579a3e66$var$LinksharePopup = ()=>{
6398
7396
  const linksharePopupRef = (0, $3Sbms$useRef)(null);
7397
+ const linkshareInputRef = (0, $3Sbms$useRef)(null);
6399
7398
  const [linkshareInputValue, setLinkshareInputValue] = (0, $3Sbms$useState)("");
6400
7399
  const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
6401
- const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6402
- const [windowWidth, windowHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)();
7400
+ const [isLoading, setIsLoading] = (0, $3Sbms$useState)(false);
7401
+ const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6403
7402
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
6404
- const desktop = windowWidth > windowHeight;
7403
+ const desktop = orientation === "landscape";
6405
7404
  const onCustomMessage = (0, $3Sbms$useCallback)((event)=>{
6406
- const { event: eventData } = event.detail;
6407
- if (eventData?.type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) (0, $3456a3b2458f2971$export$2e2bcd8739ae039)(eventData.data);
6408
- else if (eventData?.type === "paypal_invoice") {
6409
- const sender = streams.find((stream)=>stream.id === eventData.from);
6410
- $98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.displayName, eventData.data.url);
7405
+ const { type: type , data: data } = event.detail.event;
7406
+ if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data);
7407
+ else if (type === "paypal_invoice") {
7408
+ const sender = streams.find((stream)=>stream.id === event.detail.peerId);
7409
+ $98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.displayName, data.url);
6411
7410
  }
6412
7411
  }, [
6413
7412
  streams
6414
7413
  ]);
6415
- const onShareClick = (0, $3Sbms$useCallback)((event)=>{
7414
+ const onShareClick = async (event)=>{
6416
7415
  event.preventDefault();
7416
+ if (!linkshareInputValue) return;
6417
7417
  setErrorMessage(null);
7418
+ setIsLoading(true);
6418
7419
  let url;
6419
7420
  try {
6420
- url = new URL(linkshareInputValue.match(/^http[s]?:\/\//) ? linkshareInputValue : `https://${linkshareInputValue}`);
7421
+ url = new URL(linkshareInputValue);
6421
7422
  if (url.protocol === "http") url.protocol = "https";
6422
7423
  } catch (err) {
6423
7424
  setErrorMessage("Invalid link");
6424
7425
  console.error(err);
6425
- return;
6426
7426
  }
6427
- if (url.href.indexOf("paypal.com/invoice") !== -1) {
6428
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
6429
- type: "paypal_invoice",
6430
- from: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).peerId,
6431
- data: {
6432
- url: url
7427
+ if (url) {
7428
+ try {
7429
+ if (url.href.indexOf("paypal.com/invoice") !== -1) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
7430
+ type: "paypal_invoice",
7431
+ data: {
7432
+ url: url
7433
+ }
7434
+ });
7435
+ else {
7436
+ const data = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getShareLinkData(url.href);
7437
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
7438
+ type: $98933bbc579a3e66$export$a1eac7fdbc2db4af,
7439
+ data: data
7440
+ });
6433
7441
  }
6434
- });
6435
- if (streams.length < 2) (0, $3Sbms$reacthottoast)(`Link sent to ${streams[0].displayName || "User"}`);
6436
- else (0, $3Sbms$reacthottoast)("Link sent to users");
6437
- } else (0, $c9e496369b59be7a$export$2f377c2162fd02b2).protoo.request("shareLink", {
6438
- url: url
6439
- }).then((linkData)=>{
6440
- if (!linkData.favicon || !linkData.title || !linkData.domain || !linkData.url) throw new Error("Link Preview Error");
6441
- if (streams.length < 2) {
6442
- (0, $3Sbms$reacthottoast)(`Link sent to ${streams[0].displayName || "User"}`);
6443
- return;
7442
+ if (streams.length < 2) (0, $3Sbms$reacthottoast)(`Link sent to ${streams[0]?.displayName || "User"}`);
7443
+ else (0, $3Sbms$reacthottoast)("Link sent to users");
7444
+ setIsLinksharePopupVisible(false);
7445
+ } catch (err) {
7446
+ console.error(err);
7447
+ (0, $3Sbms$reacthottoast)("Failed to send link", {
7448
+ className: "error"
7449
+ });
6444
7450
  }
6445
- (0, $3Sbms$reacthottoast)("Link sent to users");
6446
- }).catch((error)=>{
6447
- console.error(error);
6448
- (0, $3Sbms$reacthottoast)("Failed to send link", {
6449
- className: "error"
6450
- });
6451
- });
6452
- setIsLinksharePopupVisible(false);
6453
- }, [
6454
- streams,
6455
- linkshareInputValue,
6456
- setIsLinksharePopupVisible
6457
- ]);
7451
+ setLinkshareInputValue("");
7452
+ }
7453
+ setIsLoading(false);
7454
+ };
6458
7455
  const onCloseClick = ()=>setIsLinksharePopupVisible(false);
6459
7456
  (0, $3Sbms$useEffect)(()=>{
6460
- window.addEventListener("customMessage", onCustomMessage);
7457
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
6461
7458
  return ()=>{
6462
- window.removeEventListener("customMessage", onCustomMessage);
7459
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
6463
7460
  };
6464
7461
  }, [
6465
7462
  onCustomMessage
6466
7463
  ]);
7464
+ const onPopupTransitionEnd = ()=>{
7465
+ if (isLinksharePopupVisible) linkshareInputRef.current?.focus();
7466
+ };
6467
7467
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$ed0d510542cc4e55), {
6468
7468
  open: isLinksharePopupVisible,
6469
7469
  desktop: desktop,
7470
+ onTransitionEnd: onPopupTransitionEnd,
6470
7471
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $554f3984e3212196$export$93c2cc854b34757d), {
6471
7472
  ref: linksharePopupRef,
6472
7473
  desktop: desktop,
@@ -6499,6 +7500,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
6499
7500
  }),
6500
7501
  /*#__PURE__*/ (0, $3Sbms$jsx)("input", {
6501
7502
  id: "linkshare-popup-input",
7503
+ ref: linkshareInputRef,
6502
7504
  placeholder: "https://www.example.com",
6503
7505
  value: linkshareInputValue,
6504
7506
  onChange: (changeEvent)=>setLinkshareInputValue(changeEvent.target.value),
@@ -6513,8 +7515,17 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
6513
7515
  }),
6514
7516
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$aec21c9a4da7a1b7), {
6515
7517
  type: "submit",
6516
- disabled: linkshareInputValue.length < 1,
6517
- children: "Share Link"
7518
+ disabled: isLoading,
7519
+ children: isLoading ? /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $554f3984e3212196$export$5e3f251c730829), {
7520
+ children: [
7521
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8b7bd174d29d9a1f$export$2e2bcd8739ae039), {
7522
+ size: "18px"
7523
+ }),
7524
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
7525
+ children: "Link is creating..."
7526
+ })
7527
+ ]
7528
+ }) : "Share Link"
6518
7529
  })
6519
7530
  ]
6520
7531
  })
@@ -6558,6 +7569,7 @@ var $01986a58bfba8001$export$2e2bcd8739ae039 = $01986a58bfba8001$var$Settings;
6558
7569
 
6559
7570
 
6560
7571
 
7572
+
6561
7573
  const $61b9018279e658f9$export$104f28dc79f055f4 = (0, $3Sbms$styledcomponents).div`
6562
7574
  display: flex;
6563
7575
  flex: 1;
@@ -6566,6 +7578,7 @@ const $61b9018279e658f9$export$104f28dc79f055f4 = (0, $3Sbms$styledcomponents).d
6566
7578
  align-items: center;
6567
7579
  background-color: #000;
6568
7580
  color: #fff;
7581
+ padding-top: 70px;
6569
7582
  `;
6570
7583
  const $61b9018279e658f9$export$51071a7ce784448 = (0, $3Sbms$styledcomponents).span`
6571
7584
  font-size: 60px;
@@ -6582,7 +7595,7 @@ const $61b9018279e658f9$export$f4e7b895a81715e9 = (0, $3Sbms$styledcomponents).p
6582
7595
  margin: 0;
6583
7596
  `;
6584
7597
  const $61b9018279e658f9$export$3a4deda42b6182b7 = (0, $3Sbms$styledcomponents).button`
6585
- background-color: #6967fc;
7598
+ background-color: ${({ theme: theme })=>theme.primaryColor};
6586
7599
  border: none;
6587
7600
  border-radius: 50px;
6588
7601
  padding: 12px 18px;
@@ -6627,7 +7640,8 @@ const $df41bfe6da05853a$var$EndView = ()=>{
6627
7640
  ended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$3a4deda42b6182b7), {
6628
7641
  onClick: onGoBackClick,
6629
7642
  children: "Go back to call"
6630
- })
7643
+ }),
7644
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f81bfa56534026c2$export$ad5f39c592532e2d), {})
6631
7645
  ]
6632
7646
  });
6633
7647
  };
@@ -6636,6 +7650,7 @@ var $df41bfe6da05853a$export$2e2bcd8739ae039 = $df41bfe6da05853a$var$EndView;
6636
7650
 
6637
7651
 
6638
7652
 
7653
+
6639
7654
  const $805d92fa41e6e1b0$var$connected = new Audio("https://cdn.snapcall.io/stream/connected.mp3");
6640
7655
  const $805d92fa41e6e1b0$var$disconnected = new Audio("https://cdn.snapcall.io/stream/disconnected.mp3");
6641
7656
  const $805d92fa41e6e1b0$var$userConnected = new Audio("https://cdn.snapcall.io/stream/user-connected.mp3");
@@ -6673,13 +7688,13 @@ const $805d92fa41e6e1b0$var$Sounds = ()=>{
6673
7688
  }
6674
7689
  };
6675
7690
  (0, $3Sbms$useEffect)(()=>{
6676
- window.addEventListener("newPeer", onNewPeer);
6677
- window.addEventListener("peerClosed", onPeerClosed);
6678
- window.addEventListener("snapcallEvent_callEnd", onLeaveRoom);
7691
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newPeer", onNewPeer);
7692
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerClosed", onPeerClosed);
7693
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
6679
7694
  return ()=>{
6680
- window.removeEventListener("newPeer", onNewPeer);
6681
- window.removeEventListener("peerClosed", onPeerClosed);
6682
- window.removeEventListener("snapcallEvent_callEnd", onLeaveRoom);
7695
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newPeer", onNewPeer);
7696
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerClosed", onPeerClosed);
7697
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
6683
7698
  };
6684
7699
  }, []);
6685
7700
  (0, $3Sbms$useEffect)(()=>{
@@ -6798,6 +7813,7 @@ const $52580db2e49cdd90$export$3bfd0d5209a8006a = ()=>{
6798
7813
  }
6799
7814
  };
6800
7815
  const $52580db2e49cdd90$export$f30cb9bc4f736419 = {
7816
+ primaryColor: "#268AFA",
6801
7817
  backgroundColor: "#fff",
6802
7818
  controlBarBackground: "#fff",
6803
7819
  logoColor: "#000",
@@ -6813,6 +7829,7 @@ const $52580db2e49cdd90$export$f30cb9bc4f736419 = {
6813
7829
  settingsCloseBackgroundColor: "#eaebec"
6814
7830
  };
6815
7831
  const $52580db2e49cdd90$export$3e936a8db52a10a0 = {
7832
+ primaryColor: "#268AFA",
6816
7833
  backgroundColor: "#000",
6817
7834
  controlBarBackground: "linear-gradient(180deg, #000000 0%, #131313 100%)",
6818
7835
  logoColor: "#fff",
@@ -6925,9 +7942,9 @@ const $d6008ea114507578$var$SvgDefinitions = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("
6925
7942
  }),
6926
7943
  /*#__PURE__*/ (0, $3Sbms$jsxs)("linearGradient", {
6927
7944
  id: "screenTop",
6928
- x1: "15.5",
7945
+ x1: "15",
6929
7946
  y1: "3.75",
6930
- x2: "15.5",
7947
+ x2: "15",
6931
7948
  y2: "21.25",
6932
7949
  gradientUnits: "userSpaceOnUse",
6933
7950
  children: [
@@ -6942,9 +7959,9 @@ const $d6008ea114507578$var$SvgDefinitions = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("
6942
7959
  }),
6943
7960
  /*#__PURE__*/ (0, $3Sbms$jsxs)("linearGradient", {
6944
7961
  id: "screenBottom",
6945
- x1: "15.5",
7962
+ x1: "15",
6946
7963
  y1: "21.25",
6947
- x2: "15.5",
7964
+ x2: "15",
6948
7965
  y2: "26.25",
6949
7966
  gradientUnits: "userSpaceOnUse",
6950
7967
  children: [
@@ -6956,6 +7973,21 @@ const $d6008ea114507578$var$SvgDefinitions = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("
6956
7973
  stopColor: "#969696"
6957
7974
  })
6958
7975
  ]
7976
+ }),
7977
+ /*#__PURE__*/ (0, $3Sbms$jsx)("clipPath", {
7978
+ id: "hangup",
7979
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
7980
+ fill: "#fff",
7981
+ transform: "translate(.5)",
7982
+ d: "M0 0h24v24H0z"
7983
+ })
7984
+ }),
7985
+ /*#__PURE__*/ (0, $3Sbms$jsx)("clipPath", {
7986
+ id: "pip",
7987
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
7988
+ fill: "#fff",
7989
+ d: "M0 0h24v24H0z"
7990
+ })
6959
7991
  })
6960
7992
  ]
6961
7993
  })
@@ -7188,13 +8220,20 @@ const $15a01b611391c1e7$var$audioSource = new Blob([
7188
8220
  type: "audio/mpeg"
7189
8221
  });
7190
8222
  const $15a01b611391c1e7$var$audioURL = URL.createObjectURL($15a01b611391c1e7$var$audioSource);
7191
- const $15a01b611391c1e7$export$69078aa817990b40 = async ()=>{
8223
+ let $15a01b611391c1e7$var$mediaResult = undefined;
8224
+ const $15a01b611391c1e7$export$716eeec86fd18da7 = ()=>{
8225
+ $15a01b611391c1e7$var$mediaResult?.getAudioTracks().forEach((track)=>{
8226
+ track.stop();
8227
+ });
8228
+ $15a01b611391c1e7$var$mediaResult = undefined;
8229
+ };
8230
+ const $15a01b611391c1e7$export$494039379563c94d = async ()=>{
7192
8231
  try {
7193
8232
  const audioObject = new Audio($15a01b611391c1e7$var$audioURL);
7194
8233
  await audioObject.play();
7195
8234
  } catch (err) {
7196
8235
  console.warn("User interaction is required, asking audio GUM");
7197
- await navigator.mediaDevices.getUserMedia({
8236
+ $15a01b611391c1e7$var$mediaResult = await navigator.mediaDevices.getUserMedia({
7198
8237
  audio: true
7199
8238
  });
7200
8239
  }
@@ -7267,6 +8306,7 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
7267
8306
 
7268
8307
 
7269
8308
 
8309
+
7270
8310
  const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
7271
8311
  const $26ed036cbc17809a$var$currentLanguage = (0, $1694791461215de9$export$604ba5624273df44)();
7272
8312
  let $26ed036cbc17809a$var$timestampCriticalError = -1;
@@ -7288,14 +8328,14 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
7288
8328
  const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
7289
8329
  const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
7290
8330
  const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
7291
- const [windowWidth, windowHeight] = (0, $ecd263152c3a54ee$export$2e2bcd8739ae039)();
7292
- const orientation = windowWidth > windowHeight ? "landscape" : "portrait";
8331
+ const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(streamUIContainerRef.current);
8332
+ const orientation = containerWidth > containerHeight ? "landscape" : "portrait";
7293
8333
  const styledTheme = theme === "dark" ? (0, $52580db2e49cdd90$export$3e936a8db52a10a0) : (0, $52580db2e49cdd90$export$f30cb9bc4f736419);
7294
8334
  const onEnterRoom = async (event)=>{
7295
- const { peerId: peerId } = event.detail;
8335
+ const peerId = event.detail.peerId;
7296
8336
  setSelfPeerId(peerId);
7297
8337
  try {
7298
- await (0, $15a01b611391c1e7$export$69078aa817990b40)();
8338
+ await (0, $15a01b611391c1e7$export$494039379563c94d)();
7299
8339
  setUserInteractionTriggered(true);
7300
8340
  } catch (userInteractionError) {
7301
8341
  console.error("User interaction trigger failed", userInteractionError);
@@ -7322,6 +8362,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
7322
8362
  setSelfDisplayName(displayName);
7323
8363
  };
7324
8364
  const onCallEnd = ()=>{
8365
+ (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
7325
8366
  setStreamState("ended");
7326
8367
  setMuted(true);
7327
8368
  setStreaming(false);
@@ -7329,6 +8370,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
7329
8370
  setUserInteractionTriggered(false);
7330
8371
  };
7331
8372
  const onCallTerminated = ()=>{
8373
+ (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
7332
8374
  setStreamState("terminated");
7333
8375
  };
7334
8376
  const onInvalidRoom = ()=>{
@@ -7376,37 +8418,37 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
7376
8418
  language
7377
8419
  ]);
7378
8420
  (0, $3Sbms$useEffect)(()=>{
7379
- window.addEventListener("enterRoom", onEnterRoom);
7380
- window.addEventListener("localVideoAvailable", onWebcamUpdate);
7381
- window.addEventListener("localVideoUnavailable", onWebcamUpdate);
7382
- window.addEventListener("screenshareEnabled", onScreenshareUpdate);
7383
- window.addEventListener("screenshareDisabled", onScreenshareUpdate);
7384
- window.addEventListener("microphoneEnabled", onMicrophoneUpdate);
7385
- window.addEventListener("microphoneMute", onMicrophoneUpdate);
7386
- window.addEventListener("microphoneUnmute", onMicrophoneUpdate);
7387
- window.addEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
7388
- window.addEventListener("selfDisplayName", onSelfDisplayNameUpdate);
7389
- window.addEventListener("terminateRoom", onCallTerminated);
7390
- window.addEventListener("snapcallEvent_callEnd", onCallEnd);
7391
- window.addEventListener("invalidRoom", onInvalidRoom);
7392
- window.addEventListener("agentIdentity", onAgentIdentity);
7393
- window.addEventListener("criticalError", onCriticalError);
8421
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
8422
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onWebcamUpdate);
8423
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoUnavailable", onWebcamUpdate);
8424
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreenshareUpdate);
8425
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareDisabled", onScreenshareUpdate);
8426
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneEnabled", onMicrophoneUpdate);
8427
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneMute", onMicrophoneUpdate);
8428
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneUnmute", onMicrophoneUpdate);
8429
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
8430
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("selfDisplayName", onSelfDisplayNameUpdate);
8431
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("terminateRoom", onCallTerminated);
8432
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onCallEnd);
8433
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("invalidRoom", onInvalidRoom);
8434
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("agentIdentity", onAgentIdentity);
8435
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("criticalError", onCriticalError);
7394
8436
  return ()=>{
7395
- window.removeEventListener("enterRoom", onEnterRoom);
7396
- window.removeEventListener("localVideoAvailable", onWebcamUpdate);
7397
- window.removeEventListener("localVideoUnavailable", onWebcamUpdate);
7398
- window.removeEventListener("screenshareEnabled", onScreenshareUpdate);
7399
- window.removeEventListener("screenshareDisabled", onScreenshareUpdate);
7400
- window.removeEventListener("microphoneEnabled", onMicrophoneUpdate);
7401
- window.removeEventListener("microphoneMute", onMicrophoneUpdate);
7402
- window.removeEventListener("microphoneUnmute", onMicrophoneUpdate);
7403
- window.removeEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
7404
- window.removeEventListener("selfDisplayName", onSelfDisplayNameUpdate);
7405
- window.removeEventListener("terminateRoom", onCallTerminated);
7406
- window.removeEventListener("snapcallEvent_callEnd", onCallEnd);
7407
- window.removeEventListener("invalidRoom", onInvalidRoom);
7408
- window.removeEventListener("agentIdentity", onAgentIdentity);
7409
- window.removeEventListener("criticalError", onCriticalError);
8437
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
8438
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onWebcamUpdate);
8439
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoUnavailable", onWebcamUpdate);
8440
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreenshareUpdate);
8441
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareDisabled", onScreenshareUpdate);
8442
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneEnabled", onMicrophoneUpdate);
8443
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneMute", onMicrophoneUpdate);
8444
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneUnmute", onMicrophoneUpdate);
8445
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
8446
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("selfDisplayName", onSelfDisplayNameUpdate);
8447
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("terminateRoom", onCallTerminated);
8448
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onCallEnd);
8449
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("invalidRoom", onInvalidRoom);
8450
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("agentIdentity", onAgentIdentity);
8451
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("criticalError", onCriticalError);
7410
8452
  };
7411
8453
  }, []);
7412
8454
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
@@ -7506,10 +8548,13 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
7506
8548
  window.dispatchEvent(event);
7507
8549
  },
7508
8550
  sendNotification: $a5146f9062d7bf28$export$3a57e165650c636f,
7509
- joinRoom: (...args)=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).init(...args),
7510
- leaveRoom: (...args)=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).endCall(...args),
7511
- terminateRoom: (...args)=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).terminateRoom(...args),
7512
- generateToken: (...args)=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).generateToken(...args)
8551
+ joinRoom: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).init.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8552
+ leaveRoom: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).endCall.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8553
+ terminateRoom: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).terminateRoom.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8554
+ generateToken: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).generateToken.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8555
+ addEventListener: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8556
+ dispatchEvent: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).dispatchEvent.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8557
+ getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2))
7513
8558
  };
7514
8559
  window.streamUI = $24075a5d702d64b3$export$3f94917203ab7078;
7515
8560
  // Backward compatibility