@snapcall/stream-ui 1.8.1 → 1.10.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.
- package/dist/stream-ui.esm.js +409 -267
- package/dist/stream-ui.js +409 -267
- package/dist/stream-ui.umd.js +228 -206
- package/dist/types.d.ts +23 -16
- package/package.json +1 -1
package/dist/stream-ui.esm.js
CHANGED
|
@@ -325,6 +325,9 @@ const $a3e657fb86ae23f3$export$604ba5624273df44 = ()=>{
|
|
|
325
325
|
const $18fb8799f38eb407$export$84584c2a98eb6753 = {
|
|
326
326
|
name: "English",
|
|
327
327
|
translation: {
|
|
328
|
+
header: {
|
|
329
|
+
free: "Free version"
|
|
330
|
+
},
|
|
328
331
|
notifications: {
|
|
329
332
|
screensharingError: "An error occured when trying to toggle screensharing",
|
|
330
333
|
microphoneError: "An error occured when trying to toggle the microphone",
|
|
@@ -356,6 +359,14 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
|
|
|
356
359
|
pictureInPicture: "Picture-in-Picture",
|
|
357
360
|
screenSharing: "Screen sharing"
|
|
358
361
|
},
|
|
362
|
+
blockedFeature: {
|
|
363
|
+
titleConnected: "Upgrade to Pro",
|
|
364
|
+
titleGuest: "Feature not available",
|
|
365
|
+
descriptionConnected: "On a free plan, you can't use this feature. Upgrade your plan to enjoy all in-call features.",
|
|
366
|
+
descriptionGuest: "You are participating in a call created with a free version of SnapCall. This feature is only available with a Pro version.",
|
|
367
|
+
dismissGuest: "Okay",
|
|
368
|
+
dismissConnected: "Upgrade to Pro"
|
|
369
|
+
},
|
|
359
370
|
copyLink: {
|
|
360
371
|
title: "Copy link",
|
|
361
372
|
description: "Copy link into clipboard",
|
|
@@ -449,11 +460,6 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
|
|
|
449
460
|
decline: "Decline",
|
|
450
461
|
you: "You"
|
|
451
462
|
},
|
|
452
|
-
invite: {
|
|
453
|
-
title: "Share link to start a conversation",
|
|
454
|
-
copy: "Copy",
|
|
455
|
-
description: "You are currently the only participant. Invite people to start the conversation."
|
|
456
|
-
},
|
|
457
463
|
greeting: {
|
|
458
464
|
mainTitle: "Welcome to SnapCall",
|
|
459
465
|
sideTitle: "Are you ready to join?",
|
|
@@ -470,6 +476,9 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
|
|
|
470
476
|
const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
471
477
|
name: "Fran\xe7ais",
|
|
472
478
|
translation: {
|
|
479
|
+
header: {
|
|
480
|
+
free: "Version gratuite"
|
|
481
|
+
},
|
|
473
482
|
notifications: {
|
|
474
483
|
screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
|
|
475
484
|
microphoneError: "Une erreur est survenue pendant l'activation du micro",
|
|
@@ -501,6 +510,14 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
|
501
510
|
pictureInPicture: "Picture-in-Picture",
|
|
502
511
|
screenSharing: "Partage d'\xe9cran"
|
|
503
512
|
},
|
|
513
|
+
blockedFeature: {
|
|
514
|
+
titleConnected: "Souscrire au plan Pro",
|
|
515
|
+
titleGuest: "Fonctionnalit\xe9 non disponible",
|
|
516
|
+
descriptionConnected: "Vous n'avez pas acc\xe8s \xe0 cette fonctionnalit\xe9. Souscrivez au plan Pro pour d\xe9bloquer toutes les fonctionnalit\xe9s de SnapCall.",
|
|
517
|
+
descriptionGuest: "Vous participez \xe0 un appel cr\xe9\xe9 avec la version gratuite de SnapCall. Cette fonctionnalit\xe9 n'est disponible qu'avec une version Pro.",
|
|
518
|
+
dismissGuest: "D'accord",
|
|
519
|
+
dismissConnected: "Souscrire \xe0 Pro"
|
|
520
|
+
},
|
|
504
521
|
copyLink: {
|
|
505
522
|
title: "Copier le lien",
|
|
506
523
|
description: "Copier le lien dans le presse-papiers",
|
|
@@ -594,11 +611,6 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
|
594
611
|
decline: "D\xe9cliner",
|
|
595
612
|
you: "Vous"
|
|
596
613
|
},
|
|
597
|
-
invite: {
|
|
598
|
-
title: "Partagez le lien pour commencer une conversation",
|
|
599
|
-
copy: "Copier",
|
|
600
|
-
description: "Vous \xeates actuellement le seul participant. Inviter des personnes pour commencer la conversation."
|
|
601
|
-
},
|
|
602
614
|
greeting: {
|
|
603
615
|
mainTitle: "Bienvenue sur SnapCall",
|
|
604
616
|
sideTitle: "Pr\xeat \xe0 rejoindre ?",
|
|
@@ -615,6 +627,9 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
|
615
627
|
const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
|
|
616
628
|
name: "Italiano",
|
|
617
629
|
translation: {
|
|
630
|
+
header: {
|
|
631
|
+
free: "Versione gratuita"
|
|
632
|
+
},
|
|
618
633
|
notifications: {
|
|
619
634
|
screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
|
|
620
635
|
microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
|
|
@@ -646,6 +661,14 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
|
|
|
646
661
|
pictureInPicture: "Immagine nell'immagine",
|
|
647
662
|
screenSharing: "Condivisione dello schermo"
|
|
648
663
|
},
|
|
664
|
+
blockedFeature: {
|
|
665
|
+
titleConnected: "L'aggiornamento a Pro",
|
|
666
|
+
titleGuest: "Funzione non disponibile",
|
|
667
|
+
descriptionConnected: "Su un piano gratuito, non puoi utilizzare questa funzione. Aggiorna il tuo piano per usufruire di tutte le funzionalit\xe0 in chiamata.",
|
|
668
|
+
descriptionGuest: "Stai partecipando a una chiamata creata con una versione gratuita di SnapCall. Questa funzione \xe8 disponibile solo con una versione Pro.",
|
|
669
|
+
dismissGuest: "Okay",
|
|
670
|
+
dismissConnected: "L'aggiornamento a Pro"
|
|
671
|
+
},
|
|
649
672
|
copyLink: {
|
|
650
673
|
title: "Copia il link",
|
|
651
674
|
description: "Copia il link negli appunti",
|
|
@@ -743,11 +766,6 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
|
|
|
743
766
|
decline: "Declinare",
|
|
744
767
|
you: "Voi"
|
|
745
768
|
},
|
|
746
|
-
invite: {
|
|
747
|
-
title: "Condividi link per avviare una conversazione",
|
|
748
|
-
copy: "Copiare",
|
|
749
|
-
description: "Attualmente sei l'unico partecipante. Invita le persone ad iniziare la conversazione."
|
|
750
|
-
},
|
|
751
769
|
greeting: {
|
|
752
770
|
mainTitle: "Benvenuto a SnapCall",
|
|
753
771
|
sideTitle: "Sei pronto per unirti?",
|
|
@@ -786,6 +804,8 @@ var $384d985bb9605c35$export$2e2bcd8739ae039 = (0, $3Sbms$i18next);
|
|
|
786
804
|
|
|
787
805
|
|
|
788
806
|
|
|
807
|
+
|
|
808
|
+
|
|
789
809
|
const $0f65a9eaf4a1e910$var$LogLevel = {
|
|
790
810
|
error: 1,
|
|
791
811
|
warn: 2,
|
|
@@ -1420,6 +1440,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1420
1440
|
pendingDeviceRequest = {};
|
|
1421
1441
|
joinOptions = {};
|
|
1422
1442
|
devicesList = [];
|
|
1443
|
+
plan = undefined;
|
|
1444
|
+
permissions = [];
|
|
1423
1445
|
constructor(){
|
|
1424
1446
|
super();
|
|
1425
1447
|
navigator.mediaDevices.addEventListener("devicechange", ()=>this.onDeviceChange());
|
|
@@ -1543,7 +1565,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1543
1565
|
if (!this.peerId) this.peerId = (0, $3Sbms$v4)();
|
|
1544
1566
|
let url;
|
|
1545
1567
|
try {
|
|
1546
|
-
const { instanceId:
|
|
1568
|
+
const { streamer_instance: instanceId , plan: { permissions: permissions , name: name } , } = await fetch(`${this.config.apiUrl}/streams/${room}/info`, {
|
|
1547
1569
|
method: "get",
|
|
1548
1570
|
headers: {
|
|
1549
1571
|
"Content-Type": "application/json"
|
|
@@ -1552,6 +1574,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1552
1574
|
if (response.ok) return response.json();
|
|
1553
1575
|
throw new Error("Invalid room ID");
|
|
1554
1576
|
});
|
|
1577
|
+
this.permissions = permissions;
|
|
1578
|
+
this.plan = name;
|
|
1555
1579
|
url = `${this.config.streamerServer}/${instanceId}/?roomId=${room}&peerId=${this.peerId}`;
|
|
1556
1580
|
} catch (roomError) {
|
|
1557
1581
|
const event = new $c31e3fb4360572af$var$SnapcallEvent("invalidRoom", {
|
|
@@ -1821,7 +1845,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1821
1845
|
peerId: peer.id || peer.peerId
|
|
1822
1846
|
};
|
|
1823
1847
|
}),
|
|
1824
|
-
callId: callId
|
|
1848
|
+
callId: callId,
|
|
1849
|
+
plan: this.plan,
|
|
1850
|
+
permissions: this.permissions
|
|
1825
1851
|
}
|
|
1826
1852
|
}));
|
|
1827
1853
|
$c31e3fb4360572af$var$log.log("joinRoom", "peers", peers);
|
|
@@ -2141,6 +2167,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2141
2167
|
this.mediaPipeOption = options;
|
|
2142
2168
|
}
|
|
2143
2169
|
async initVideoBackground() {
|
|
2170
|
+
if (!this.permissions.find((permission)=>permission === "virtual_background")) throw new Error("feature not allowed");
|
|
2144
2171
|
if (this.useVideoBackground === true) return;
|
|
2145
2172
|
this.useVideoBackground = true;
|
|
2146
2173
|
if (!this.webcamProducer || this.webcamProducer.closed) return;
|
|
@@ -2317,6 +2344,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2317
2344
|
this.dispatchEvent(event);
|
|
2318
2345
|
}
|
|
2319
2346
|
async enableScreenshare() {
|
|
2347
|
+
if (!this.permissions.find((permission)=>permission === "screen_sharing")) throw new Error("feature not allowed");
|
|
2320
2348
|
const stream = await this.handleGetUserMediaError("screen", navigator.mediaDevices.getDisplayMedia({
|
|
2321
2349
|
audio: false,
|
|
2322
2350
|
video: {
|
|
@@ -2409,11 +2437,13 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2409
2437
|
} else $c31e3fb4360572af$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
|
|
2410
2438
|
}
|
|
2411
2439
|
async captureVideo(videoElement) {
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2440
|
+
if (this.permissions.find((permission)=>permission === "instant_picture")) {
|
|
2441
|
+
let image;
|
|
2442
|
+
if (videoElement) image = await (0, $15ddac3121cc3a5d$export$674c90a250a8b2c5)(videoElement);
|
|
2443
|
+
else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $15ddac3121cc3a5d$export$4a210166cc9cb64b)(this.webcamProducer.track);
|
|
2444
|
+
else throw new Error("no video to capture");
|
|
2445
|
+
return image;
|
|
2446
|
+
} else throw new Error("feature not allowed");
|
|
2417
2447
|
}
|
|
2418
2448
|
requestLocalVideo(element) {
|
|
2419
2449
|
$c31e3fb4360572af$var$log.info("requestLocalVideo");
|
|
@@ -2531,6 +2561,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2531
2561
|
this.dispatchEvent(event);
|
|
2532
2562
|
}
|
|
2533
2563
|
async requestPeerDevice(remotePeerId, deviceType) {
|
|
2564
|
+
if (!this.permissions.find((permission)=>permission === "request_input")) throw new Error("feature not allowed");
|
|
2534
2565
|
return this.protoo.request("requestPeerDevice", {
|
|
2535
2566
|
remotePeerId: remotePeerId,
|
|
2536
2567
|
deviceType: deviceType
|
|
@@ -2699,6 +2730,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2699
2730
|
...config
|
|
2700
2731
|
};
|
|
2701
2732
|
}
|
|
2733
|
+
getPermissions() {
|
|
2734
|
+
return this.permissions;
|
|
2735
|
+
}
|
|
2702
2736
|
}
|
|
2703
2737
|
|
|
2704
2738
|
|
|
@@ -3178,7 +3212,7 @@ const $ab29487ffcc05855$export$4dc2e6a0e59ffa13 = (0, $3Sbms$styledcomponents).s
|
|
|
3178
3212
|
font-size: 16px;
|
|
3179
3213
|
font-weight: 300;
|
|
3180
3214
|
line-height: 16px;
|
|
3181
|
-
color:
|
|
3215
|
+
color: rgba(255, 255, 255, 0.5);
|
|
3182
3216
|
margin-left: 5px;
|
|
3183
3217
|
position: relative;
|
|
3184
3218
|
bottom: 1px;
|
|
@@ -3553,7 +3587,7 @@ const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1c
|
|
|
3553
3587
|
const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
|
|
3554
3588
|
const $f235befa4cdc42d6$var$Header = ()=>{
|
|
3555
3589
|
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
3556
|
-
const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
3590
|
+
const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , permissions: permissions , plan: plan , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
3557
3591
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
3558
3592
|
const [extraOptions, setExtraOptions] = (0, $3Sbms$useState)(options.extraSettingsOptions || []);
|
|
3559
3593
|
const onSetExtraSettingsOptions = (event)=>{
|
|
@@ -3601,14 +3635,17 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
3601
3635
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).endCall();
|
|
3602
3636
|
};
|
|
3603
3637
|
const onScanQuickConnectClick = ()=>{
|
|
3604
|
-
|
|
3605
|
-
|
|
3638
|
+
if (permissions.find((permission)=>permission === "quick_connect")) {
|
|
3639
|
+
setIsQuickConnectPopupVisible(true);
|
|
3640
|
+
(0, $3Sbms$hotjarbrowser).event("quickConnectClick");
|
|
3641
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
3606
3642
|
};
|
|
3607
3643
|
const onSettingsMenuClick = ()=>{
|
|
3608
3644
|
setIsSettingsMenuVisible(true);
|
|
3609
3645
|
};
|
|
3610
3646
|
const onVirtualBackgroundClick = ()=>{
|
|
3611
|
-
setIsVirtualBackgroundPopupVisible(true);
|
|
3647
|
+
if (permissions.find((permission)=>permission === "virtual_background")) setIsVirtualBackgroundPopupVisible(true);
|
|
3648
|
+
else setBlockedFeaturePopupOpen(true);
|
|
3612
3649
|
};
|
|
3613
3650
|
const computedCategories = [
|
|
3614
3651
|
{
|
|
@@ -3665,13 +3702,15 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
3665
3702
|
});
|
|
3666
3703
|
return computedCategories;
|
|
3667
3704
|
}, [
|
|
3705
|
+
t,
|
|
3706
|
+
options.sharedURL,
|
|
3668
3707
|
muted,
|
|
3669
3708
|
streaming,
|
|
3670
|
-
|
|
3709
|
+
permissions,
|
|
3671
3710
|
setIsQuickConnectPopupVisible,
|
|
3711
|
+
setBlockedFeaturePopupOpen,
|
|
3672
3712
|
setIsSettingsMenuVisible,
|
|
3673
|
-
setIsVirtualBackgroundPopupVisible,
|
|
3674
|
-
t,
|
|
3713
|
+
setIsVirtualBackgroundPopupVisible,
|
|
3675
3714
|
]);
|
|
3676
3715
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab29487ffcc05855$export$1e86fd0e1db89578), {
|
|
3677
3716
|
children: [
|
|
@@ -3681,7 +3720,10 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
3681
3720
|
size: options.logo?.size
|
|
3682
3721
|
}),
|
|
3683
3722
|
options.logo?.text && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$4dc2e6a0e59ffa13), {
|
|
3684
|
-
children: options.logo
|
|
3723
|
+
children: options.logo?.text
|
|
3724
|
+
}),
|
|
3725
|
+
plan === "individual" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$4dc2e6a0e59ffa13), {
|
|
3726
|
+
children: `${options.logo?.text ? " \xb7 " : ""}${t("header.free")}`
|
|
3685
3727
|
})
|
|
3686
3728
|
]
|
|
3687
3729
|
}),
|
|
@@ -4517,7 +4559,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
4517
4559
|
const [requestingDevice, setRequestingDevice] = (0, $3Sbms$useState)(null);
|
|
4518
4560
|
const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
|
|
4519
4561
|
const requestingDeviceTimeoutRef = (0, $3Sbms$useRef)(null);
|
|
4520
|
-
const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
4562
|
+
const { selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
4521
4563
|
const { highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
4522
4564
|
const isSharingScreen = highlightedTile?.type === "screenshare" && highlightedTile.peerId === selfPeerId;
|
|
4523
4565
|
const microphoneActive = stream.microphone && !stream.muted;
|
|
@@ -4529,16 +4571,22 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
4529
4571
|
const onMouseEnter = ()=>setHover(true);
|
|
4530
4572
|
const onMouseLeave = ()=>setHover(false);
|
|
4531
4573
|
const requestMicrophone = ()=>{
|
|
4532
|
-
(
|
|
4533
|
-
|
|
4574
|
+
if (permissions.find((permission)=>permission === "request_input")) {
|
|
4575
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestPeerDevice(stream.id, "microphone");
|
|
4576
|
+
setRequestingDevice("microphone");
|
|
4577
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
4534
4578
|
};
|
|
4535
4579
|
const requestWebcam = ()=>{
|
|
4536
|
-
(
|
|
4537
|
-
|
|
4580
|
+
if (permissions.find((permission)=>permission === "request_input")) {
|
|
4581
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestPeerDevice(stream.id, "webcam");
|
|
4582
|
+
setRequestingDevice("webcam");
|
|
4583
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
4538
4584
|
};
|
|
4539
4585
|
const requestScreen = ()=>{
|
|
4540
|
-
(
|
|
4541
|
-
|
|
4586
|
+
if (permissions.find((permission)=>permission === "request_input")) {
|
|
4587
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestPeerDevice(stream.id, "screen");
|
|
4588
|
+
setRequestingDevice("screen");
|
|
4589
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
4542
4590
|
};
|
|
4543
4591
|
(0, $3Sbms$useEffect)(()=>{
|
|
4544
4592
|
if (!videoElementRef.current) throw new Error("videoElementRef not available");
|
|
@@ -5176,7 +5224,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
5176
5224
|
const videoElementRef = (0, $3Sbms$useRef)(null);
|
|
5177
5225
|
const videoMediaProviderRef = (0, $3Sbms$useRef)(null);
|
|
5178
5226
|
const SelfTileRef = (0, $3Sbms$useRef)(null);
|
|
5179
|
-
const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
5227
|
+
const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
5180
5228
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
5181
5229
|
const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(videosContainerRef.current);
|
|
5182
5230
|
const cursor = streaming && !extended ? "pointer" : "default";
|
|
@@ -5220,42 +5268,44 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
5220
5268
|
}
|
|
5221
5269
|
};
|
|
5222
5270
|
const onSnapshotClick = async ()=>{
|
|
5223
|
-
if (
|
|
5224
|
-
if (!
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5271
|
+
if (permissions.find((permission)=>permission === "instant_picture")) {
|
|
5272
|
+
if (!snapshotAnimation && !snapshotImage) {
|
|
5273
|
+
if (!videoElementRef.current) throw new Error("Video element is not available");
|
|
5274
|
+
setSnapshotAnimation(true);
|
|
5275
|
+
const base64Image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElementRef.current);
|
|
5276
|
+
setSnapshotImage(base64Image);
|
|
5277
|
+
try {
|
|
5278
|
+
const { objectUrl: objectUrl } = await fetch(`${options.streamApiURL}/uploadSnapshot`, {
|
|
5279
|
+
method: "POST",
|
|
5280
|
+
body: JSON.stringify({
|
|
5281
|
+
file: base64Image
|
|
5282
|
+
})
|
|
5283
|
+
}).then((rawResponse)=>rawResponse.json());
|
|
5284
|
+
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
|
|
5285
|
+
type: "snapshot",
|
|
5286
|
+
imageSrc: objectUrl
|
|
5287
|
+
});
|
|
5288
|
+
let notificationMessage = t("snapshot.sentToUsers");
|
|
5289
|
+
if (streams.length === 1) {
|
|
5290
|
+
const userName = streams[0].profile.name || t("misc.user");
|
|
5291
|
+
notificationMessage = t("snapshot.sentToUser", {
|
|
5292
|
+
user: userName
|
|
5293
|
+
});
|
|
5294
|
+
}
|
|
5295
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(notificationMessage, {
|
|
5296
|
+
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$26fe7ec9351ff761), {
|
|
5297
|
+
src: base64Image
|
|
5298
|
+
}),
|
|
5299
|
+
duration: 2500
|
|
5300
|
+
});
|
|
5301
|
+
} catch (sendMessageError) {
|
|
5302
|
+
(0, $3Sbms$reacthottoast)(t("snapshot.error"), {
|
|
5303
|
+
className: "error"
|
|
5244
5304
|
});
|
|
5305
|
+
console.error(sendMessageError);
|
|
5245
5306
|
}
|
|
5246
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(notificationMessage, {
|
|
5247
|
-
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$26fe7ec9351ff761), {
|
|
5248
|
-
src: base64Image
|
|
5249
|
-
}),
|
|
5250
|
-
duration: 2500
|
|
5251
|
-
});
|
|
5252
|
-
} catch (sendMessageError) {
|
|
5253
|
-
(0, $3Sbms$reacthottoast)(t("snapshot.error"), {
|
|
5254
|
-
className: "error"
|
|
5255
|
-
});
|
|
5256
|
-
console.error(sendMessageError);
|
|
5257
5307
|
}
|
|
5258
|
-
}
|
|
5308
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
5259
5309
|
};
|
|
5260
5310
|
const onDeviceRequest = (event)=>{
|
|
5261
5311
|
const { peerId: peerId , deviceType: deviceType } = event.detail;
|
|
@@ -6259,104 +6309,8 @@ var $b496fc6f0d99c06d$export$2e2bcd8739ae039 = $b496fc6f0d99c06d$var$Highlighted
|
|
|
6259
6309
|
|
|
6260
6310
|
|
|
6261
6311
|
|
|
6262
|
-
const $b56218b5a57cb77c$export$dd2ac23a70f320dd = (0, $3Sbms$styledcomponents).div`
|
|
6263
|
-
display: ${({ show: show })=>show ? "flex" : "none"};
|
|
6264
|
-
flex-direction: column;
|
|
6265
|
-
justify-content: center;
|
|
6266
|
-
align-items: center;
|
|
6267
|
-
position: relative;
|
|
6268
|
-
width: ${({ width: width })=>width};
|
|
6269
|
-
height: ${({ height: height })=>height};
|
|
6270
|
-
background-color: ${({ theme: theme })=>theme.streamTileBackgroundColor};
|
|
6271
|
-
border: 2px solid ${({ theme: theme })=>theme.streamTileBorderColor};
|
|
6272
|
-
border-radius: 20px;
|
|
6273
|
-
box-sizing: border-box;
|
|
6274
|
-
color: #fff;
|
|
6275
|
-
font-family: Lato;
|
|
6276
|
-
padding: 20px;
|
|
6277
|
-
`;
|
|
6278
|
-
const $b56218b5a57cb77c$export$2dabfbe763cc7a4 = (0, $3Sbms$styledcomponents).h2`
|
|
6279
|
-
font-weight: 600;
|
|
6280
|
-
font-size: 16px;
|
|
6281
|
-
text-align: center;
|
|
6282
|
-
max-width: 300px;
|
|
6283
|
-
`;
|
|
6284
|
-
const $b56218b5a57cb77c$export$6ed6e36e1b456f96 = (0, $3Sbms$styledcomponents).div`
|
|
6285
|
-
position: relative;
|
|
6286
|
-
display: flex;
|
|
6287
|
-
align-items: center;
|
|
6288
|
-
height: 50px;
|
|
6289
|
-
width: 100%;
|
|
6290
|
-
max-width: 300px;
|
|
6291
|
-
background-color: ${({ theme: theme })=>theme.popupBackgroundSecondaryColor};
|
|
6292
|
-
border: 1px solid ${({ theme: theme })=>theme.popupBorderColor};
|
|
6293
|
-
border-radius: 15px;
|
|
6294
|
-
padding: 0 10px;
|
|
6295
|
-
box-sizing: border-box;
|
|
6296
|
-
`;
|
|
6297
|
-
const $b56218b5a57cb77c$export$5f759de1870a3e41 = (0, $3Sbms$styledcomponents).div`
|
|
6298
|
-
display: flex;
|
|
6299
|
-
align-items: center;
|
|
6300
|
-
width: 100%;
|
|
6301
|
-
gap: 5px;
|
|
6302
|
-
|
|
6303
|
-
svg {
|
|
6304
|
-
width: 20px;
|
|
6305
|
-
height: 20px;
|
|
6306
|
-
}
|
|
6307
|
-
`;
|
|
6308
|
-
const $b56218b5a57cb77c$export$c6b180e8ec79154e = (0, $3Sbms$styledcomponents).p`
|
|
6309
|
-
color: #242324;
|
|
6310
|
-
font-size: 15px;
|
|
6311
|
-
font-weight: 600;
|
|
6312
|
-
width: 100%;
|
|
6313
|
-
text-overflow: ellipsis;
|
|
6314
|
-
white-space: nowrap;
|
|
6315
|
-
overflow: hidden;
|
|
6316
|
-
line-height: 15px;
|
|
6317
|
-
`;
|
|
6318
|
-
const $b56218b5a57cb77c$export$d7f3ab4b3437ad97 = (0, $3Sbms$styledcomponents).button`
|
|
6319
|
-
position: absolute;
|
|
6320
|
-
right: 5px;
|
|
6321
|
-
display: flex;
|
|
6322
|
-
justify-content: center;
|
|
6323
|
-
align-items: center;
|
|
6324
|
-
background-color: ${({ theme: theme })=>theme.primaryColor};
|
|
6325
|
-
border: none;
|
|
6326
|
-
border-radius: 8px;
|
|
6327
|
-
height: 32px;
|
|
6328
|
-
color: #fff;
|
|
6329
|
-
font-weight: 600;
|
|
6330
|
-
font-size: 16px;
|
|
6331
|
-
padding: 8px 12px;
|
|
6332
|
-
line-height: 18px;
|
|
6333
|
-
`;
|
|
6334
|
-
const $b56218b5a57cb77c$export$c22678f0e7b404e0 = (0, $3Sbms$styledcomponents).p`
|
|
6335
|
-
font-size: 12px;
|
|
6336
|
-
font-weight: 400;
|
|
6337
|
-
max-width: 300px;
|
|
6338
|
-
text-align: center;
|
|
6339
|
-
`;
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
6312
|
|
|
6345
6313
|
|
|
6346
|
-
const $1ec1d06e0a21fdaa$var$Link = ({ color: color })=>{
|
|
6347
|
-
return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
6348
|
-
width: "24",
|
|
6349
|
-
height: "24",
|
|
6350
|
-
viewBox: "0 0 24 24",
|
|
6351
|
-
fill: "none",
|
|
6352
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6353
|
-
children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
|
|
6354
|
-
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",
|
|
6355
|
-
fill: color || "#fff"
|
|
6356
|
-
})
|
|
6357
|
-
});
|
|
6358
|
-
};
|
|
6359
|
-
var $1ec1d06e0a21fdaa$export$2e2bcd8739ae039 = $1ec1d06e0a21fdaa$var$Link;
|
|
6360
6314
|
|
|
6361
6315
|
|
|
6362
6316
|
|
|
@@ -6409,67 +6363,6 @@ const $93a0377c243d965e$export$c7df1b15b59b1df2 = /*#__PURE__*/ (0, $3Sbms$jsxs)
|
|
|
6409
6363
|
});
|
|
6410
6364
|
|
|
6411
6365
|
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
const $f0b0b18fe6c6ae77$var$InvitationTile = ({ show: show , orientation: orientation , width: width , height: height })=>{
|
|
6415
|
-
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6416
|
-
const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6417
|
-
const onCopyCallLinkClick = async ()=>{
|
|
6418
|
-
try {
|
|
6419
|
-
await (0, $57162bcada7d6f66$export$2e2bcd8739ae039)(options.sharedURL || window.location.href);
|
|
6420
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("copyLink.copied"), {
|
|
6421
|
-
duration: 2000
|
|
6422
|
-
});
|
|
6423
|
-
} catch (copyError) {
|
|
6424
|
-
console.warn(copyError);
|
|
6425
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("copyLink.error"), {
|
|
6426
|
-
icon: (0, $93a0377c243d965e$export$edf27be85e5f6da0)
|
|
6427
|
-
});
|
|
6428
|
-
}
|
|
6429
|
-
};
|
|
6430
|
-
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $b56218b5a57cb77c$export$dd2ac23a70f320dd), {
|
|
6431
|
-
show: show,
|
|
6432
|
-
width: width,
|
|
6433
|
-
height: height,
|
|
6434
|
-
orientation: orientation,
|
|
6435
|
-
children: [
|
|
6436
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b56218b5a57cb77c$export$2dabfbe763cc7a4), {
|
|
6437
|
-
children: t("invite.title")
|
|
6438
|
-
}),
|
|
6439
|
-
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $b56218b5a57cb77c$export$6ed6e36e1b456f96), {
|
|
6440
|
-
children: [
|
|
6441
|
-
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $b56218b5a57cb77c$export$5f759de1870a3e41), {
|
|
6442
|
-
children: [
|
|
6443
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {
|
|
6444
|
-
color: "black"
|
|
6445
|
-
}),
|
|
6446
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b56218b5a57cb77c$export$c6b180e8ec79154e), {
|
|
6447
|
-
children: options.sharedURL || window.location.href
|
|
6448
|
-
})
|
|
6449
|
-
]
|
|
6450
|
-
}),
|
|
6451
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b56218b5a57cb77c$export$d7f3ab4b3437ad97), {
|
|
6452
|
-
onClick: onCopyCallLinkClick,
|
|
6453
|
-
children: t("invite.copy")
|
|
6454
|
-
})
|
|
6455
|
-
]
|
|
6456
|
-
}),
|
|
6457
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b56218b5a57cb77c$export$c22678f0e7b404e0), {
|
|
6458
|
-
children: t("invite.description")
|
|
6459
|
-
})
|
|
6460
|
-
]
|
|
6461
|
-
});
|
|
6462
|
-
};
|
|
6463
|
-
var $f0b0b18fe6c6ae77$export$2e2bcd8739ae039 = $f0b0b18fe6c6ae77$var$InvitationTile;
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
6366
|
const $b8963bf62cf5b984$var$Container = (0, $3Sbms$styledcomponents).div`
|
|
6474
6367
|
background-color: rgba(45, 45, 45, 0.75);
|
|
6475
6368
|
display: flex;
|
|
@@ -6536,7 +6429,6 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
6536
6429
|
});
|
|
6537
6430
|
const { streams: streams , highlightedTile: highlightedTile , dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
6538
6431
|
const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(remoteTilesContainerRef.current);
|
|
6539
|
-
const showInvitation = !options.audioTiles && streams.length < 1 && !highlightedTile && containerWidth > 0;
|
|
6540
6432
|
(0, $3Sbms$useEffect)(()=>{
|
|
6541
6433
|
if (options.GDPRDisclaimer) (0, $b8963bf62cf5b984$export$2e2bcd8739ae039)({
|
|
6542
6434
|
message: "Para mejorar la calidad de nuestro servicio, esta llamada ser\xe1 grabada",
|
|
@@ -6550,7 +6442,6 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
6550
6442
|
if (remoteTilesContainerRef?.current) {
|
|
6551
6443
|
const ratio = 1;
|
|
6552
6444
|
let numberOfTiles = remoteTilesContainerRef.current.childElementCount;
|
|
6553
|
-
if (!showInvitation) numberOfTiles -= 1;
|
|
6554
6445
|
const videoWidth = (0, $b8e10de7c6dba8c4$export$4d43009c33055644)({
|
|
6555
6446
|
availableWidth: containerWidth - 16 * (numberOfTiles - 1),
|
|
6556
6447
|
availableHeight: containerHeight - 16 * (numberOfTiles - 1),
|
|
@@ -6568,8 +6459,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
6568
6459
|
containerWidth,
|
|
6569
6460
|
containerHeight,
|
|
6570
6461
|
streams.length,
|
|
6571
|
-
highlightedTile
|
|
6572
|
-
showInvitation,
|
|
6462
|
+
highlightedTile
|
|
6573
6463
|
]);
|
|
6574
6464
|
(0, $3Sbms$useEffect)(()=>{
|
|
6575
6465
|
if (userInteractionTriggered) {
|
|
@@ -6723,12 +6613,6 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
6723
6613
|
width: tileSize.width,
|
|
6724
6614
|
height: tileSize.height
|
|
6725
6615
|
}, stream.id);
|
|
6726
|
-
}),
|
|
6727
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f0b0b18fe6c6ae77$export$2e2bcd8739ae039), {
|
|
6728
|
-
show: showInvitation,
|
|
6729
|
-
width: `${tileSize.width}px`,
|
|
6730
|
-
height: `${tileSize.height}px`,
|
|
6731
|
-
orientation: orientation
|
|
6732
6616
|
})
|
|
6733
6617
|
]
|
|
6734
6618
|
})
|
|
@@ -6860,6 +6744,22 @@ var $a2d206a438475087$export$2e2bcd8739ae039 = $a2d206a438475087$var$YoutubeIcon
|
|
|
6860
6744
|
|
|
6861
6745
|
|
|
6862
6746
|
|
|
6747
|
+
const $1ec1d06e0a21fdaa$var$Link = ({ color: color })=>{
|
|
6748
|
+
return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
6749
|
+
width: "24",
|
|
6750
|
+
height: "24",
|
|
6751
|
+
viewBox: "0 0 24 24",
|
|
6752
|
+
fill: "none",
|
|
6753
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6754
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
|
|
6755
|
+
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",
|
|
6756
|
+
fill: color || "#fff"
|
|
6757
|
+
})
|
|
6758
|
+
});
|
|
6759
|
+
};
|
|
6760
|
+
var $1ec1d06e0a21fdaa$export$2e2bcd8739ae039 = $1ec1d06e0a21fdaa$var$Link;
|
|
6761
|
+
|
|
6762
|
+
|
|
6863
6763
|
|
|
6864
6764
|
|
|
6865
6765
|
|
|
@@ -6945,7 +6845,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
6945
6845
|
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6946
6846
|
const highlightMenuRef = (0, $3Sbms$useRef)(null);
|
|
6947
6847
|
const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
|
|
6948
|
-
const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6848
|
+
const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6949
6849
|
const { highlightedTile: highlightedTile , dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
6950
6850
|
const isPresenting = Boolean(highlightedTile?.isGlobal && highlightedTile?.peerId === selfPeerId);
|
|
6951
6851
|
(0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(highlightMenuRef, ()=>setIsHighlightMenuOpen(false));
|
|
@@ -6956,18 +6856,20 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
6956
6856
|
else setIsHighlightMenuOpen((previousValue)=>!previousValue);
|
|
6957
6857
|
};
|
|
6958
6858
|
const onScreenshareClick = async ()=>{
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6859
|
+
if (permissions.find((permission)=>permission === "screen_sharing")) {
|
|
6860
|
+
setIsHighlightMenuOpen(false);
|
|
6861
|
+
try {
|
|
6862
|
+
(0, $3Sbms$hotjarbrowser).event("screenshareClick");
|
|
6863
|
+
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare();
|
|
6864
|
+
(0, $3Sbms$hotjarbrowser).event("enableScreenshare");
|
|
6865
|
+
} catch (screenshareError) {
|
|
6866
|
+
console.warn(screenshareError);
|
|
6867
|
+
(0, $3Sbms$hotjarbrowser).event("screenshareCancel");
|
|
6868
|
+
(0, $3Sbms$reacthottoast)(t("notifications.screensharingError"), {
|
|
6869
|
+
className: "error"
|
|
6870
|
+
});
|
|
6871
|
+
}
|
|
6872
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
6971
6873
|
};
|
|
6972
6874
|
const onYoutubeClick = ()=>{
|
|
6973
6875
|
setIsHighlightMenuOpen(false);
|
|
@@ -6975,9 +6877,11 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
6975
6877
|
(0, $3Sbms$hotjarbrowser).event("youtubeClick");
|
|
6976
6878
|
};
|
|
6977
6879
|
const onLinkshareClick = ()=>{
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6880
|
+
if (permissions.find((permission)=>permission === "share_link")) {
|
|
6881
|
+
setIsHighlightMenuOpen(false);
|
|
6882
|
+
setIsLinksharePopupVisible(true);
|
|
6883
|
+
(0, $3Sbms$hotjarbrowser).event("linkshareClick");
|
|
6884
|
+
} else setBlockedFeaturePopupOpen(true);
|
|
6981
6885
|
};
|
|
6982
6886
|
const menuCategories = [
|
|
6983
6887
|
{
|
|
@@ -7550,6 +7454,16 @@ const $910dd7d7d872a463$var$Checkmark = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg",
|
|
|
7550
7454
|
fill: "#fff"
|
|
7551
7455
|
})
|
|
7552
7456
|
});
|
|
7457
|
+
const $910dd7d7d872a463$export$f8e32eb727ccae99 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
7458
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7459
|
+
width: "17",
|
|
7460
|
+
height: "18",
|
|
7461
|
+
fill: "none",
|
|
7462
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
|
|
7463
|
+
fill: "#fff",
|
|
7464
|
+
d: "M10.767 6.325 7.192 9.908 5.817 8.533a.833.833 0 1 0-1.175 1.175L6.6 11.675a.831.831 0 0 0 .592.241.833.833 0 0 0 .583-.241l4.166-4.167a.833.833 0 1 0-1.175-1.183ZM8.5.667a8.333 8.333 0 1 0 0 16.666A8.333 8.333 0 0 0 8.5.667Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z"
|
|
7465
|
+
})
|
|
7466
|
+
});
|
|
7553
7467
|
var $910dd7d7d872a463$export$2e2bcd8739ae039 = $910dd7d7d872a463$var$Checkmark;
|
|
7554
7468
|
|
|
7555
7469
|
|
|
@@ -8701,6 +8615,20 @@ const $554f3984e3212196$export$5e3f251c730829 = (0, $3Sbms$styledcomponents).div
|
|
|
8701
8615
|
|
|
8702
8616
|
|
|
8703
8617
|
|
|
8618
|
+
|
|
8619
|
+
function $5004d610b358fe2c$export$bc98e171e8c82a3d(title) {
|
|
8620
|
+
(0, $3Sbms$useEffect)(()=>{
|
|
8621
|
+
const prevTitle = document.title;
|
|
8622
|
+
if (title) document.title = title;
|
|
8623
|
+
return ()=>{
|
|
8624
|
+
document.title = prevTitle;
|
|
8625
|
+
};
|
|
8626
|
+
}, [
|
|
8627
|
+
title
|
|
8628
|
+
]);
|
|
8629
|
+
}
|
|
8630
|
+
|
|
8631
|
+
|
|
8704
8632
|
const $98933bbc579a3e66$export$a1eac7fdbc2db4af = "linkshare_sent";
|
|
8705
8633
|
const $98933bbc579a3e66$var$sendLinkNotification = (data, t)=>{
|
|
8706
8634
|
let notificationStatusText = new URL(data.url).hostname;
|
|
@@ -8724,7 +8652,7 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data, t)=>{
|
|
|
8724
8652
|
}
|
|
8725
8653
|
},
|
|
8726
8654
|
ellipsis: true,
|
|
8727
|
-
duration:
|
|
8655
|
+
duration: 15000
|
|
8728
8656
|
});
|
|
8729
8657
|
(0, $f81bfa56534026c2$export$e9785ae652b3a722)({
|
|
8730
8658
|
title: data.title,
|
|
@@ -8766,22 +8694,45 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
8766
8694
|
const themeContext = (0, $3Sbms$useContext)((0, $3Sbms$ThemeContext));
|
|
8767
8695
|
const linksharePopupRef = (0, $3Sbms$useRef)(null);
|
|
8768
8696
|
const linkshareInputRef = (0, $3Sbms$useRef)(null);
|
|
8697
|
+
const [pendingShareLink, setPendingShareLink] = (0, $3Sbms$useState)([]);
|
|
8698
|
+
const [title, setTitle] = (0, $3Sbms$useState)();
|
|
8769
8699
|
const [linkshareInputValue, setLinkshareInputValue] = (0, $3Sbms$useState)("");
|
|
8770
8700
|
const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
|
|
8771
8701
|
const [status, setStatus] = (0, $3Sbms$useState)("waiting");
|
|
8772
8702
|
const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
8773
8703
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
8704
|
+
(0, $5004d610b358fe2c$export$bc98e171e8c82a3d)(title);
|
|
8774
8705
|
const desktop = orientation === "landscape";
|
|
8706
|
+
const onVisibilitychange = (0, $3Sbms$useCallback)(()=>{
|
|
8707
|
+
if (!document.hidden) {
|
|
8708
|
+
pendingShareLink.forEach((data)=>{
|
|
8709
|
+
$98933bbc579a3e66$var$sendLinkNotification(data, t);
|
|
8710
|
+
});
|
|
8711
|
+
setPendingShareLink([]);
|
|
8712
|
+
setTitle(undefined);
|
|
8713
|
+
}
|
|
8714
|
+
}, [
|
|
8715
|
+
pendingShareLink,
|
|
8716
|
+
t
|
|
8717
|
+
]);
|
|
8775
8718
|
const onCustomMessage = (0, $3Sbms$useCallback)((event)=>{
|
|
8776
8719
|
const { type: type , data: data } = event.detail.event;
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8720
|
+
const sender = streams.find((stream)=>stream.id === event.detail?.peerId);
|
|
8721
|
+
if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) {
|
|
8722
|
+
if (!document.hidden) $98933bbc579a3e66$var$sendLinkNotification(data, t);
|
|
8723
|
+
else {
|
|
8724
|
+
const name = sender?.profile.name?.toLowerCase() !== "user" ? sender?.profile.name : undefined;
|
|
8725
|
+
setPendingShareLink([
|
|
8726
|
+
...pendingShareLink,
|
|
8727
|
+
data
|
|
8728
|
+
]);
|
|
8729
|
+
setTitle(`${name || "Someone"} shared a link`);
|
|
8730
|
+
}
|
|
8731
|
+
} else if (type === "paypal_invoice") $98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url, t);
|
|
8782
8732
|
}, [
|
|
8783
8733
|
streams,
|
|
8784
|
-
t
|
|
8734
|
+
t,
|
|
8735
|
+
pendingShareLink
|
|
8785
8736
|
]);
|
|
8786
8737
|
const onShareClick = async (event)=>{
|
|
8787
8738
|
event.preventDefault();
|
|
@@ -8836,12 +8787,15 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
8836
8787
|
};
|
|
8837
8788
|
const onCloseClick = ()=>setIsLinksharePopupVisible(false);
|
|
8838
8789
|
(0, $3Sbms$useEffect)(()=>{
|
|
8790
|
+
window.addEventListener("visibilitychange", onVisibilitychange);
|
|
8839
8791
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
|
|
8840
8792
|
return ()=>{
|
|
8793
|
+
window.removeEventListener("visibilitychange", onVisibilitychange);
|
|
8841
8794
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
|
|
8842
8795
|
};
|
|
8843
8796
|
}, [
|
|
8844
|
-
onCustomMessage
|
|
8797
|
+
onCustomMessage,
|
|
8798
|
+
onVisibilitychange
|
|
8845
8799
|
]);
|
|
8846
8800
|
const onPopupTransitionEnd = ()=>{
|
|
8847
8801
|
if (isLinksharePopupVisible) linkshareInputRef.current?.focus();
|
|
@@ -9235,6 +9189,170 @@ var $d493afe60dcea711$export$2e2bcd8739ae039 = $d493afe60dcea711$var$VirtualBack
|
|
|
9235
9189
|
|
|
9236
9190
|
|
|
9237
9191
|
|
|
9192
|
+
|
|
9193
|
+
|
|
9194
|
+
const $3a1d149ac4596979$var$modalHeight = (desktop)=>desktop ? "225px" : "237px";
|
|
9195
|
+
const $3a1d149ac4596979$export$6e1d6efa4a5a1be4 = (0, $3Sbms$styledcomponents).div`
|
|
9196
|
+
position: absolute;
|
|
9197
|
+
width: 100%;
|
|
9198
|
+
bottom: ${(props)=>props.open ? 0 : `-${$3a1d149ac4596979$var$modalHeight(props.desktop)}`};
|
|
9199
|
+
transition: all 0.4s;
|
|
9200
|
+
|
|
9201
|
+
${(props)=>{
|
|
9202
|
+
if (props.desktop) return (0, $3Sbms$css)`
|
|
9203
|
+
bottom: ${props.open ? 0 : `calc(-${$3a1d149ac4596979$var$modalHeight(props.desktop)} - (100vh / 2))`};
|
|
9204
|
+
height: 100%;
|
|
9205
|
+
display: flex;
|
|
9206
|
+
justify-content: center;
|
|
9207
|
+
align-items: center;
|
|
9208
|
+
`;
|
|
9209
|
+
}}
|
|
9210
|
+
`;
|
|
9211
|
+
const $3a1d149ac4596979$export$ed7a64955cfa5a69 = (0, $3Sbms$styledcomponents).div`
|
|
9212
|
+
display: flex;
|
|
9213
|
+
flex-direction: column;
|
|
9214
|
+
width: ${(props)=>props.desktop ? "375px" : "100%"};
|
|
9215
|
+
height: ${({ desktop: desktop })=>$3a1d149ac4596979$var$modalHeight(desktop)};
|
|
9216
|
+
max-height: 100vh;
|
|
9217
|
+
background-color: ${(props)=>props.theme.popupBackgroundPrimaryColor};
|
|
9218
|
+
color: ${(props)=>props.theme.popupTitleColor};
|
|
9219
|
+
border-radius: ${(props)=>props.desktop ? "20px" : "20px 20px 0 0"};
|
|
9220
|
+
box-sizing: border-box;
|
|
9221
|
+
`;
|
|
9222
|
+
const $3a1d149ac4596979$export$6334857f32bd1136 = (0, $3Sbms$styledcomponents).div`
|
|
9223
|
+
display: flex;
|
|
9224
|
+
justify-content: space-between;
|
|
9225
|
+
align-items: center;
|
|
9226
|
+
border-bottom: 2px solid #f7f7f7;
|
|
9227
|
+
`;
|
|
9228
|
+
const $3a1d149ac4596979$export$a27d59de3a7a8b8e = (0, $3Sbms$styledcomponents).div`
|
|
9229
|
+
display: flex;
|
|
9230
|
+
align-items: center;
|
|
9231
|
+
margin: 16px auto 16px 16px;
|
|
9232
|
+
`;
|
|
9233
|
+
const $3a1d149ac4596979$export$47ef2d2839b7d95a = (0, $3Sbms$styledcomponents).div`
|
|
9234
|
+
font-family: 'Lato';
|
|
9235
|
+
font-style: normal;
|
|
9236
|
+
font-weight: 600;
|
|
9237
|
+
font-size: 18px;
|
|
9238
|
+
line-height: 22px;
|
|
9239
|
+
letter-spacing: -0.02em;
|
|
9240
|
+
`;
|
|
9241
|
+
const $3a1d149ac4596979$export$219c8e53e235e8b7 = (0, $3Sbms$styledcomponents).button`
|
|
9242
|
+
display: flex;
|
|
9243
|
+
justify-content: center;
|
|
9244
|
+
align-items: center;
|
|
9245
|
+
border: none;
|
|
9246
|
+
background-color: ${(props)=>props.theme.popupBackgroundSecondaryColor};
|
|
9247
|
+
border-radius: 50%;
|
|
9248
|
+
height: 30px;
|
|
9249
|
+
width: 30px;
|
|
9250
|
+
padding: 0;
|
|
9251
|
+
margin: 16px 16px 16px auto;
|
|
9252
|
+
|
|
9253
|
+
svg {
|
|
9254
|
+
height: 15px;
|
|
9255
|
+
width: 15px;
|
|
9256
|
+
|
|
9257
|
+
path {
|
|
9258
|
+
fill: #000;
|
|
9259
|
+
}
|
|
9260
|
+
}
|
|
9261
|
+
`;
|
|
9262
|
+
const $3a1d149ac4596979$export$5197cd1b80f9682b = (0, $3Sbms$styledcomponents).div`
|
|
9263
|
+
display: flex;
|
|
9264
|
+
align-items: center;
|
|
9265
|
+
justify-content: center;
|
|
9266
|
+
font-size: 12px;
|
|
9267
|
+
color: #2d2d2d;
|
|
9268
|
+
margin: 16px 32px auto 32px;
|
|
9269
|
+
font-family: 'Lato';
|
|
9270
|
+
font-style: normal;
|
|
9271
|
+
font-weight: 400;
|
|
9272
|
+
font-size: 16px;
|
|
9273
|
+
line-height: 19px;
|
|
9274
|
+
text-align: left;
|
|
9275
|
+
letter-spacing: -0.02em;
|
|
9276
|
+
`;
|
|
9277
|
+
const $3a1d149ac4596979$export$5f79cadb3a637092 = (0, $3Sbms$styledcomponents).button`
|
|
9278
|
+
background-color: ${({ theme: theme })=>theme.primaryColor};
|
|
9279
|
+
padding: 8px 18px;
|
|
9280
|
+
height: 46px;
|
|
9281
|
+
max-width: 100%;
|
|
9282
|
+
border-radius: 15px;
|
|
9283
|
+
margin: 20px 32px 20px 32px;
|
|
9284
|
+
border: none;
|
|
9285
|
+
color: #fff;
|
|
9286
|
+
font-size: 16px;
|
|
9287
|
+
font-weight: 700;
|
|
9288
|
+
line-height: 18px;
|
|
9289
|
+
|
|
9290
|
+
span {
|
|
9291
|
+
display: flex;
|
|
9292
|
+
flex-direction: row;
|
|
9293
|
+
gap: 5px;
|
|
9294
|
+
alig-items: center;
|
|
9295
|
+
justify-content: center;
|
|
9296
|
+
}
|
|
9297
|
+
`;
|
|
9298
|
+
|
|
9299
|
+
|
|
9300
|
+
|
|
9301
|
+
|
|
9302
|
+
|
|
9303
|
+
|
|
9304
|
+
|
|
9305
|
+
const $7d1b559f928daf1f$var$BlockedFeaturePopup = ()=>{
|
|
9306
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
9307
|
+
const { isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , orientation: orientation , isAgent: isAgent } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
9308
|
+
const popupRef = (0, $3Sbms$useRef)(null);
|
|
9309
|
+
const desktop = orientation === "landscape";
|
|
9310
|
+
(0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(popupRef, ()=>{
|
|
9311
|
+
if (isBlockedFeaturePopupOpen) setBlockedFeaturePopupOpen(false);
|
|
9312
|
+
});
|
|
9313
|
+
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$6e1d6efa4a5a1be4), {
|
|
9314
|
+
open: isBlockedFeaturePopupOpen,
|
|
9315
|
+
desktop: desktop,
|
|
9316
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3a1d149ac4596979$export$ed7a64955cfa5a69), {
|
|
9317
|
+
ref: popupRef,
|
|
9318
|
+
desktop: desktop,
|
|
9319
|
+
children: [
|
|
9320
|
+
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3a1d149ac4596979$export$6334857f32bd1136), {
|
|
9321
|
+
children: [
|
|
9322
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$a27d59de3a7a8b8e), {
|
|
9323
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$47ef2d2839b7d95a), {
|
|
9324
|
+
children: isAgent && t("blockedFeature.titleConnected") || t("blockedFeature.titleGuest")
|
|
9325
|
+
})
|
|
9326
|
+
}),
|
|
9327
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$219c8e53e235e8b7), {
|
|
9328
|
+
onClick: ()=>setBlockedFeaturePopupOpen(false),
|
|
9329
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {})
|
|
9330
|
+
})
|
|
9331
|
+
]
|
|
9332
|
+
}),
|
|
9333
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$5197cd1b80f9682b), {
|
|
9334
|
+
children: isAgent && t("blockedFeature.descriptionConnected") || t("blockedFeature.descriptionGuest")
|
|
9335
|
+
}),
|
|
9336
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a1d149ac4596979$export$5f79cadb3a637092), {
|
|
9337
|
+
onClick: ()=>{
|
|
9338
|
+
setBlockedFeaturePopupOpen(false);
|
|
9339
|
+
if (isAgent) window.open(`${"https://app.snapcall.io"}/settings/workspace/plans-invoices`, "_blank");
|
|
9340
|
+
},
|
|
9341
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
|
|
9342
|
+
children: [
|
|
9343
|
+
isAgent && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$f8e32eb727ccae99), {}),
|
|
9344
|
+
isAgent && t("blockedFeature.dismissConnected") || t("blockedFeature.dismissGuest")
|
|
9345
|
+
]
|
|
9346
|
+
})
|
|
9347
|
+
})
|
|
9348
|
+
]
|
|
9349
|
+
})
|
|
9350
|
+
});
|
|
9351
|
+
};
|
|
9352
|
+
var $7d1b559f928daf1f$export$2e2bcd8739ae039 = $7d1b559f928daf1f$var$BlockedFeaturePopup;
|
|
9353
|
+
|
|
9354
|
+
|
|
9355
|
+
|
|
9238
9356
|
const $e1c48a389d8ac959$export$8376625f8bb18347 = (0, $3Sbms$styledcomponents).div`
|
|
9239
9357
|
position: absolute;
|
|
9240
9358
|
width: 100%;
|
|
@@ -9247,8 +9365,8 @@ const $e1c48a389d8ac959$export$8376625f8bb18347 = (0, $3Sbms$styledcomponents).d
|
|
|
9247
9365
|
|
|
9248
9366
|
|
|
9249
9367
|
const $01986a58bfba8001$var$Settings = ()=>{
|
|
9250
|
-
const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
9251
|
-
const open = isQuickConnectPopupVisible || isSettingsMenuVisible || isYoutubePopupVisible || isLinksharePopupVisible || isVirtualBackgroundPopupVisible;
|
|
9368
|
+
const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
9369
|
+
const open = isQuickConnectPopupVisible || isSettingsMenuVisible || isYoutubePopupVisible || isBlockedFeaturePopupOpen || isLinksharePopupVisible || isVirtualBackgroundPopupVisible;
|
|
9252
9370
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $e1c48a389d8ac959$export$8376625f8bb18347), {
|
|
9253
9371
|
open: open,
|
|
9254
9372
|
children: [
|
|
@@ -9256,7 +9374,8 @@ const $01986a58bfba8001$var$Settings = ()=>{
|
|
|
9256
9374
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $c11e4c21ca692a16$export$2e2bcd8739ae039), {}),
|
|
9257
9375
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $49372cd9190da903$export$2e2bcd8739ae039), {}),
|
|
9258
9376
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $98933bbc579a3e66$export$2e2bcd8739ae039), {}),
|
|
9259
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $d493afe60dcea711$export$2e2bcd8739ae039), {})
|
|
9377
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $d493afe60dcea711$export$2e2bcd8739ae039), {}),
|
|
9378
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7d1b559f928daf1f$export$2e2bcd8739ae039), {})
|
|
9260
9379
|
]
|
|
9261
9380
|
});
|
|
9262
9381
|
};
|
|
@@ -9357,10 +9476,12 @@ var $df41bfe6da05853a$export$2e2bcd8739ae039 = $df41bfe6da05853a$var$EndView;
|
|
|
9357
9476
|
|
|
9358
9477
|
|
|
9359
9478
|
|
|
9479
|
+
|
|
9360
9480
|
const $805d92fa41e6e1b0$var$connected = new Audio("https://cdn.snapcall.io/stream/connected.mp3");
|
|
9361
9481
|
const $805d92fa41e6e1b0$var$disconnected = new Audio("https://cdn.snapcall.io/stream/disconnected.mp3");
|
|
9362
9482
|
const $805d92fa41e6e1b0$var$userConnected = new Audio("https://cdn.snapcall.io/stream/user-connected.mp3");
|
|
9363
9483
|
const $805d92fa41e6e1b0$var$userDisconnected = new Audio("https://cdn.snapcall.io/stream/user-disconnected.mp3");
|
|
9484
|
+
const $805d92fa41e6e1b0$var$linkReceived = new Audio("https://cdn.snapcall.io/stream/link-received.mp3");
|
|
9364
9485
|
const $805d92fa41e6e1b0$var$Sounds = ()=>{
|
|
9365
9486
|
const { userInteractionTriggered: userInteractionTriggered } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
9366
9487
|
const onEnterRoom = async ()=>{
|
|
@@ -9393,14 +9514,24 @@ const $805d92fa41e6e1b0$var$Sounds = ()=>{
|
|
|
9393
9514
|
console.warn("Couldn't play disconnected sound");
|
|
9394
9515
|
}
|
|
9395
9516
|
};
|
|
9517
|
+
const onCustomMessage = async (event)=>{
|
|
9518
|
+
const { type: type } = event.detail.event;
|
|
9519
|
+
if (type === (0, $98933bbc579a3e66$export$a1eac7fdbc2db4af)) try {
|
|
9520
|
+
await $805d92fa41e6e1b0$var$linkReceived.play();
|
|
9521
|
+
} catch (disconnectedPlayError) {
|
|
9522
|
+
console.warn("Couldn't play link-received sound");
|
|
9523
|
+
}
|
|
9524
|
+
};
|
|
9396
9525
|
(0, $3Sbms$useEffect)(()=>{
|
|
9397
9526
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newPeer", onNewPeer);
|
|
9398
9527
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerClosed", onPeerClosed);
|
|
9399
9528
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
|
|
9529
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
|
|
9400
9530
|
return ()=>{
|
|
9401
9531
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newPeer", onNewPeer);
|
|
9402
9532
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerClosed", onPeerClosed);
|
|
9403
9533
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
|
|
9534
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
|
|
9404
9535
|
};
|
|
9405
9536
|
}, []);
|
|
9406
9537
|
(0, $3Sbms$useEffect)(()=>{
|
|
@@ -10138,6 +10269,9 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
10138
10269
|
const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
|
|
10139
10270
|
const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(streamUIContainerRef.current);
|
|
10140
10271
|
const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $3Sbms$useState)(false);
|
|
10272
|
+
const [isBlockedFeaturePopupOpen, setBlockedFeaturePopupOpen] = (0, $3Sbms$useState)(false);
|
|
10273
|
+
const [permissions, setPermissions] = (0, $3Sbms$useState)([]);
|
|
10274
|
+
const [plan, setPlan] = (0, $3Sbms$useState)(undefined);
|
|
10141
10275
|
const orientation = (containerWidth || window.screen.width) > (containerHeight || window.screen.height) ? "landscape" : "portrait";
|
|
10142
10276
|
const styledTheme = theme === "dark" ? (0, $52580db2e49cdd90$export$3e936a8db52a10a0) : (0, $52580db2e49cdd90$export$f30cb9bc4f736419);
|
|
10143
10277
|
const onWebcamUpdate = (event)=>{
|
|
@@ -10266,6 +10400,9 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
10266
10400
|
(0, $3Sbms$useEffect)(()=>{
|
|
10267
10401
|
const onEnterRoom = async (event)=>{
|
|
10268
10402
|
const peerId = event.detail.peerId;
|
|
10403
|
+
setPlan(event.detail.plan);
|
|
10404
|
+
setPermissions(event.detail.permissions);
|
|
10405
|
+
console.log(event.detail.permissions);
|
|
10269
10406
|
setSelfPeerId(peerId);
|
|
10270
10407
|
try {
|
|
10271
10408
|
await (0, $15a01b611391c1e7$export$494039379563c94d)(options);
|
|
@@ -10284,6 +10421,8 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
10284
10421
|
]);
|
|
10285
10422
|
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
|
|
10286
10423
|
value: {
|
|
10424
|
+
plan: plan,
|
|
10425
|
+
permissions: permissions,
|
|
10287
10426
|
selfPeerId: selfPeerId,
|
|
10288
10427
|
streamUIContainerRef: streamUIContainerRef,
|
|
10289
10428
|
videosContainerRef: videosContainerRef,
|
|
@@ -10300,6 +10439,8 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
10300
10439
|
setIsLinksharePopupVisible: setIsLinksharePopupVisible,
|
|
10301
10440
|
isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible,
|
|
10302
10441
|
setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible,
|
|
10442
|
+
isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen,
|
|
10443
|
+
setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen,
|
|
10303
10444
|
theme: theme,
|
|
10304
10445
|
setTheme: setTheme,
|
|
10305
10446
|
language: language,
|
|
@@ -10833,7 +10974,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
|
|
|
10833
10974
|
getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
10834
10975
|
setProfile: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
10835
10976
|
/* Should not be documented */ setConfig: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setConfig.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
10836
|
-
setLogLevel: (level)=>(0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039).setLogLevel(level)
|
|
10977
|
+
setLogLevel: (level)=>(0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039).setLogLevel(level),
|
|
10978
|
+
getPermissions: ()=>(0, $c9e496369b59be7a$export$2f377c2162fd02b2).getPermissions()
|
|
10837
10979
|
};
|
|
10838
10980
|
window.streamUI = $24075a5d702d64b3$export$3f94917203ab7078;
|
|
10839
10981
|
// Backward compatibility
|