@snapcall/stream-ui 1.4.1 → 1.6.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.js CHANGED
@@ -1,27 +1,31 @@
1
1
  var $jQDcL$reactjsxruntime = require("react/jsx-runtime");
2
2
  var $jQDcL$reactdom = require("react-dom");
3
+ var $jQDcL$hotjarbrowser = require("@hotjar/browser");
3
4
  var $jQDcL$reacthottoast = require("react-hot-toast");
4
5
  var $jQDcL$styledcomponents = require("styled-components");
5
6
  var $jQDcL$react = require("react");
6
7
  require("inobounce");
8
+ var $jQDcL$i18next = require("i18next");
9
+ var $jQDcL$reacti18next = require("react-i18next");
7
10
  var $jQDcL$bowser = require("bowser");
8
11
  var $jQDcL$uuid = require("uuid");
9
12
  var $jQDcL$protooclient = require("protoo-client");
10
- var $jQDcL$mediasoupclient = require("mediasoup-client");
11
13
  var $jQDcL$sentrybrowser = require("@sentry/browser");
12
14
  var $jQDcL$mediasoupclientlibProducer = require("mediasoup-client/lib/Producer");
15
+ var $jQDcL$mediasoupclient = require("mediasoup-client");
13
16
  var $jQDcL$qrcode = require("qrcode");
14
17
 
15
- function $parcel$export(e, n, v, s) {
16
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
17
- }
18
18
  function $parcel$interopDefault(a) {
19
19
  return a && a.__esModule ? a.default : a;
20
20
  }
21
+ function $parcel$export(e, n, v, s) {
22
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
+ }
21
24
 
22
25
  $parcel$export(module.exports, "streamUI", () => $e68207026aca356b$export$3f94917203ab7078);
23
26
 
24
27
 
28
+
25
29
  const $6b4cf4c12c735fdf$var$isObject = (obj)=>{
26
30
  if (typeof obj === "object" && obj !== null) {
27
31
  if (typeof Object.getPrototypeOf === "function") {
@@ -313,10 +317,491 @@ const $84c6cbcbb594d072$export$3a57e165650c636f = (message, options = {})=>{
313
317
 
314
318
 
315
319
 
320
+ const $393bda1b33846dfc$export$604ba5624273df44 = ()=>{
321
+ try {
322
+ const storedTheme = localStorage.getItem("stream_ui_language");
323
+ if (storedTheme) return storedTheme;
324
+ return "en";
325
+ } catch (localStorageError) {
326
+ console.warn(localStorageError);
327
+ return "en";
328
+ }
329
+ };
330
+
331
+
332
+ const $91fcbf58e59aae79$export$84584c2a98eb6753 = {
333
+ name: "English",
334
+ translation: {
335
+ notifications: {
336
+ screensharingError: "An error occured when trying to toggle screensharing",
337
+ microphoneError: "An error occured when trying to toggle the microphone",
338
+ cameraError: "An error occured when trying to toggle the camera",
339
+ cameraRotateError: "An error occured when trying to rotate the camera",
340
+ noCamera: "No camera available",
341
+ blockedMicrophonePopupTitle: "Camera and microphone are blocked",
342
+ blockedMicrophonePopup: "SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar.",
343
+ reload: "Reload",
344
+ criticalError: "A critical error has occurred (error {{code}}).",
345
+ agentJoinError: "An error occured while trying to join the room as an agent",
346
+ close: "Close",
347
+ connectedTo: "Connected to {{name}}"
348
+ },
349
+ endView: {
350
+ goBack: "Go back to call",
351
+ tooLate: "You arrived too late",
352
+ callIsOver: "The call is over or deleted",
353
+ callEnded: "The call is now ended",
354
+ callLeft: "You left the call",
355
+ full: "You can't join this call",
356
+ fullDescription: "The room is full. Please try to join the call later."
357
+ },
358
+ menu: {
359
+ title: "Menu",
360
+ new: "NEW",
361
+ openNewTab: "Open new tab",
362
+ quickConnect: "Quick Connect",
363
+ pictureInPicture: "Picture-in-Picture",
364
+ screenSharing: "Screen sharing"
365
+ },
366
+ copyLink: {
367
+ title: "Copy link",
368
+ error: "An error occured when trying to copy to clipboard",
369
+ copied: "Link copied to clipboard"
370
+ },
371
+ quickConnect: {
372
+ title: "Quick Connect",
373
+ scanTitle: "Scan QR Code",
374
+ scan: "Scan this QR code with your phone camera to open the call."
375
+ },
376
+ settings: {
377
+ title: "Settings",
378
+ preferences: "Preferences",
379
+ language: "Language",
380
+ devices: "Devices",
381
+ help: "Help",
382
+ helpCenter: "Go to help center"
383
+ },
384
+ audioMenu: {
385
+ title: "Audio",
386
+ blockedMicrophone: "Microphone is blocked.",
387
+ microphonePermissions: "Please accept microphone sharing before accessing these options."
388
+ },
389
+ videoMenu: {
390
+ title: "Video",
391
+ lowDef: "Low definition (240p)",
392
+ standardDef: "Standard definition (480p)",
393
+ highDef: "High definition (720p)",
394
+ blockedCamera: "Camera is blocked.",
395
+ cameraPermissions: "Please accept camera sharing before accessing these options.",
396
+ sendResolution: "Send Resolution (maximum)"
397
+ },
398
+ shareLink: {
399
+ title: "Create link",
400
+ title2: "Create a link",
401
+ invalid: "Invalid link",
402
+ sentToUsers: "Link sent to users",
403
+ sentToUser: "Link sent to {{user}}",
404
+ failed: "Failed to send link",
405
+ poweredBy: "Powered by",
406
+ invoice: "{{user}} sent you an invoice.",
407
+ pay: "Pay"
408
+ },
409
+ youtube: {
410
+ title: "Embed YouTube",
411
+ url: "YOUTUBE URL",
412
+ invalid: "Invalid YouTube URL",
413
+ share: "Share video"
414
+ },
415
+ sharedHistory: {
416
+ shared: "Shared with you"
417
+ },
418
+ snapshot: {
419
+ title: "Snapshot",
420
+ shared: "Snapshot shared.",
421
+ sentToUsers: "Snapshot sent to users.",
422
+ sentToUser: "Snapshot sent to {{user}}",
423
+ save: "Save photo",
424
+ error: "An error occured when trying to send the snapshot"
425
+ },
426
+ gdpr: {
427
+ recordedWarning: "To improve the quality of our service, this call will be recorded."
428
+ },
429
+ requestDevice: {
430
+ requestInput: "Request input devices",
431
+ request: "{{user}} would like you to share your {{device}}",
432
+ timedOut: "Your request has timed out.",
433
+ declined: "Your request has been declined.",
434
+ userDeclined: "{{user}} has declined your request."
435
+ },
436
+ leave: {
437
+ title: "Leave",
438
+ leaveCall: "Leave call",
439
+ endCall: "End call for all"
440
+ },
441
+ misc: {
442
+ someone: "Someone",
443
+ camera: "Camera",
444
+ microphone: "Microphone",
445
+ screen: "Screen",
446
+ speaker: "Speaker",
447
+ user: "User",
448
+ open: "Open",
449
+ from: "From",
450
+ accept: "Accept",
451
+ decline: "Decline",
452
+ you: "You"
453
+ }
454
+ }
455
+ };
456
+
457
+
458
+ const $e52ca91c2b296e41$export$acb2a88f7d552ebf = {
459
+ name: "Fran\xe7ais",
460
+ translation: {
461
+ notifications: {
462
+ screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
463
+ microphoneError: "Une erreur est survenue pendant l'activation du micro",
464
+ cameraError: "Une erreur est survenue pendant l'activation de la cam\xe9ra",
465
+ cameraRotateError: "Une erreur est survenue pendant la rotation de la cam\xe9ra",
466
+ noCamera: "Aucune cam\xe9ra disponible",
467
+ blockedMicrophonePopupTitle: "Votre cam\xe9ra et micro sont bloqu\xe9s",
468
+ blockedMicrophonePopup: "SnapCall a besoin d'acc\xe9der \xe0 votre cam\xe9ra et micro. Cliquez sur l'ic\xf4ne de cam\xe9ra bloqu\xe9e dans la barre d'adresse du navigateur.",
469
+ reload: "Recharger",
470
+ criticalError: "Une erreur critique est survenue (erreur {{code}}).",
471
+ agentJoinError: "Une erreur est survenue en essayant de rejoindre la salle en tant qu'agent",
472
+ close: "Fermer",
473
+ connectedTo: "Connect\xe9 \xe0 {{name}}"
474
+ },
475
+ endView: {
476
+ goBack: "Retourner dans l'appel",
477
+ tooLate: "Vous \xeates arrivez trop tard",
478
+ callIsOver: "Cet appel est termin\xe9 ou supprim\xe9",
479
+ callEnded: "Cet appel est termin\xe9",
480
+ callLeft: "Vous avez quitt\xe9 l'appel",
481
+ full: "Impossible de rejoindre l'appel",
482
+ fullDescription: "Limite d'utilisateurs atteinte. Merci de rejoindre l'appel ult\xe9rieurement."
483
+ },
484
+ menu: {
485
+ title: "Menu",
486
+ new: "NOUVEAU",
487
+ openNewTab: "Ouvrir un nouvel onglet",
488
+ quickConnect: "Quick Connect",
489
+ pictureInPicture: "Picture-in-Picture",
490
+ screenSharing: "Partage d'\xe9cran"
491
+ },
492
+ copyLink: {
493
+ title: "Copier le lien",
494
+ error: "Une erreur est survenue pendant la copie du lien dans le presse-papier",
495
+ copied: "Lien copi\xe9 dans le presse-papier"
496
+ },
497
+ quickConnect: {
498
+ title: "Quick Connect",
499
+ scanTitle: "Scannez le QR Code",
500
+ scan: "Scannez ce QR code avec votre t\xe9l\xe9phone pour ouvrir l'appel."
501
+ },
502
+ settings: {
503
+ title: "Param\xe8tres",
504
+ preferences: "Pr\xe9f\xe9rences",
505
+ language: "Langage",
506
+ devices: "Appareils",
507
+ help: "Aide",
508
+ helpCenter: "Acc\xe9der au centre d'aide"
509
+ },
510
+ audioMenu: {
511
+ title: "Audio",
512
+ blockedMicrophone: "Votre micro est bloqu\xe9.",
513
+ microphonePermissions: "Please accept microphone sharing before accessing these options."
514
+ },
515
+ videoMenu: {
516
+ title: "Video",
517
+ lowDef: "Basse d\xe9finition (240p)",
518
+ standardDef: "D\xe9finition standard (480p)",
519
+ highDef: "Haute d\xe9finition (720p)",
520
+ blockedCamera: "Votre cam\xe9ra est bloqu\xe9.",
521
+ cameraPermissions: "Please accept camera sharing before accessing these options.",
522
+ sendResolution: "R\xe9solution envoy\xe9e (max)"
523
+ },
524
+ shareLink: {
525
+ title: "Partager un lien",
526
+ title2: "Partager un lien",
527
+ invalid: "Lien invalide",
528
+ sentToUsers: "Lien envoy\xe9 aux participants",
529
+ sentToUser: "Lien envoy\xe9 \xe0 {{user}}",
530
+ failed: "Une erreur est survenue pendant l'envoi du lien",
531
+ poweredBy: "Propos\xe9 par",
532
+ invoice: "{{user}} vous a envoy\xe9 une facture.",
533
+ pay: "Payer"
534
+ },
535
+ youtube: {
536
+ title: "YouTube",
537
+ url: "URL YOUTUBE",
538
+ invalid: "URL YouTube invalide",
539
+ share: "Partager la vid\xe9o"
540
+ },
541
+ sharedHistory: {
542
+ shared: "Partag\xe9 avec vous"
543
+ },
544
+ snapshot: {
545
+ title: "Snapshot",
546
+ shared: "Snapshot envoy\xe9.",
547
+ sentToUsers: "Snapshot envoy\xe9 aux participants.",
548
+ sentToUser: "Snapshot envoy\xe9 \xe0 {{user}}",
549
+ save: "Sauvegarder l'image",
550
+ error: "Une erreur est survenue pendant l'envoi du snapshot"
551
+ },
552
+ gdpr: {
553
+ recordedWarning: "Pour am\xe9liorer la qualit\xe9 de notre service, cet appel va \xeatre enregistr\xe9."
554
+ },
555
+ requestDevice: {
556
+ requestInput: "Demander l'activation",
557
+ request: "{{user}} voudrait que vous partagiez votre {{device}}",
558
+ timedOut: "Votre requ\xeate n'a pas eu de r\xe9ponse",
559
+ declined: "Votre requ\xeate a \xe9t\xe9 refus\xe9.",
560
+ userDeclined: "{{user}} a d\xe9clin\xe9 votre requ\xeate."
561
+ },
562
+ leave: {
563
+ title: "Quitter",
564
+ leaveCall: "Quitter l'appel",
565
+ endCall: "Terminer l'appel pour tout le monde"
566
+ },
567
+ misc: {
568
+ someone: "Quelqu'un",
569
+ camera: "Cam\xe9ra",
570
+ microphone: "Micro",
571
+ screen: "\xc9cran",
572
+ speaker: "Haut-parleur",
573
+ user: "Utilisateur",
574
+ open: "Ouvrir",
575
+ from: "Depuis",
576
+ accept: "Accepter",
577
+ decline: "D\xe9cliner",
578
+ you: "Vous"
579
+ }
580
+ }
581
+ };
582
+
583
+
584
+ const $e0ae3d23c2381da3$export$3486a10f30cf1ee4 = {
585
+ name: "Italiano",
586
+ translation: {
587
+ notifications: {
588
+ screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
589
+ microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
590
+ cameraError: "Si \xe8 verificato un errore durante l'attivazione della fotocamera",
591
+ cameraRotateError: "Si \xe8 verificato un errore durante la rotazione della fotocamera",
592
+ noCamera: "Nessuna fotocamera disponibile",
593
+ blockedMicrophonePopupTitle: "La tua fotocamera e il tuo microfono sono bloccati",
594
+ blockedMicrophonePopup: "SnapCall ha bisogno di accedere alla fotocamera e al microfono. Fare clic sull'icona della fotocamera bloccata nella barra degli indirizzi del browser.",
595
+ reload: "Ricaricare",
596
+ criticalError: "Si \xe8 verificato un errore critico (errore {{code}}).",
597
+ agentJoinError: "Si \xe8 verificato un errore cercando di entrare nella conversazione come agente",
598
+ close: "Chiudere",
599
+ connectedTo: "Connesso a {{name}}"
600
+ },
601
+ endView: {
602
+ goBack: "Torna alla chiamata",
603
+ tooLate: "Sei arrivato troppo tardi",
604
+ callIsOver: "Questa chiamata \xe8 finita o \xe8 stata eliminata",
605
+ callEnded: "Questa chiamata \xe8 finita",
606
+ callLeft: "Hai lasciato la chiamata",
607
+ full: "Impossibile partecipare alla chiamata",
608
+ fullDescription: "Limite d'uso attenente."
609
+ },
610
+ menu: {
611
+ title: "Men\xf9",
612
+ new: "NUOVO",
613
+ openNewTab: "Apri una nuova scheda",
614
+ quickConnect: "Connessione Rapida",
615
+ pictureInPicture: "Immagine nell'immagine",
616
+ screenSharing: "Condivisione dello schermo"
617
+ },
618
+ copyLink: {
619
+ title: "Copia il link",
620
+ error: "Si \xe8 verificato un errore durante la copia negli Appunti",
621
+ copied: "Link copiato negli Appunti"
622
+ },
623
+ quickConnect: {
624
+ title: "Connessione Rapida",
625
+ scanTitle: "Scansiona il codice QR",
626
+ scan: "Scansiona questo codice QR con il telefono per aprire la chiamata."
627
+ },
628
+ settings: {
629
+ title: "Impostazioni",
630
+ preferences: "Preferenze",
631
+ language: "Linguaggio",
632
+ devices: "Dispositivi",
633
+ help: "Aiuto",
634
+ helpCenter: "Accedi all'Assistenza"
635
+ },
636
+ audioMenu: {
637
+ title: "Audio",
638
+ blockedMicrophone: "Il tuo microfono \xe8 bloccato.",
639
+ microphonePermissions: "Si prega di accettare la condivisione del microfono prima di accedere a queste opzioni."
640
+ },
641
+ videoMenu: {
642
+ title: "Video",
643
+ lowDef: "Definizione bassa (240p)",
644
+ standardDef: "Definizione standard (480p)",
645
+ highDef: "Alta definizione (720p)",
646
+ blockedCamera: "La fotocamera \xe8 bloccata.",
647
+ cameraPermissions: "Si prega di accettare la condivisione della fotocamera prima di accedere a queste opzioni.",
648
+ sendResolution: "Risoluzione inviata (max)"
649
+ },
650
+ shareLink: {
651
+ title: "Condividi un link",
652
+ title2: "Condividi un link",
653
+ invalid: "Collegamento non valido",
654
+ sentToUsers: "Link inviato ai partecipanti",
655
+ sentToUser: "Link inviato a {{user}}",
656
+ failed: "Si \xe8 verificato un errore durante l'invio del link",
657
+ poweredBy: "Proposto da",
658
+ invoice: "{{User}} ti ha inviato una fattura.",
659
+ pay: "Paga"
660
+ },
661
+ youtube: {
662
+ title: "YouTube",
663
+ url: "URL YOUTUBE",
664
+ invalid: "URL YouTube non valido",
665
+ share: "Condividi il video"
666
+ },
667
+ sharedHistory: {
668
+ shared: "Condiviso con te"
669
+ },
670
+ snapshot: {
671
+ title: "Schermata",
672
+ shared: "Schermata inviata",
673
+ sentToUsers: "Schermanta inviata ai partecipanti",
674
+ sentToUser: "Schermata inviata a {{user}}",
675
+ save: "Salva l'immagine",
676
+ error: "Si \xe8 verificato un errore durante l'invio della schermata"
677
+ },
678
+ gdpr: {
679
+ recordedWarning: "Per migliorare la qualit\xe0 del nostro servizio, questa chiamata verr\xe0 registrata."
680
+ },
681
+ requestDevice: {
682
+ requestInput: "Richiesta di attivazione",
683
+ request: "{{user}} vorrebbe condividere il tuo {{device}}",
684
+ timedOut: "La tua richiesta non ha ricevuto risposta",
685
+ declined: "La tua richiesta \xe8 stata rifiutata.",
686
+ userDeclined: "{{user}} ha rifiutato la tua richiesta"
687
+ },
688
+ leave: {
689
+ title: "Lasciare",
690
+ leaveCall: "Lascia la chiamata",
691
+ endCall: "Termina la chiamata per tutti"
692
+ },
693
+ misc: {
694
+ someone: "Qualcuno",
695
+ camera: "Telecamera",
696
+ microphone: "Microfono",
697
+ screen: "Schermo",
698
+ speaker: "Altoparlante",
699
+ user: "Utente",
700
+ open: "Aprire",
701
+ from: "Da",
702
+ accept: "Accettare",
703
+ decline: "Declinare",
704
+ you: "Voi"
705
+ }
706
+ }
707
+ };
708
+
709
+
710
+ const $b45c0bcc142f0b5e$export$150b732325d14d04 = {
711
+ en: $91fcbf58e59aae79$export$84584c2a98eb6753,
712
+ fr: $e52ca91c2b296e41$export$acb2a88f7d552ebf,
713
+ it: $e0ae3d23c2381da3$export$3486a10f30cf1ee4
714
+ };
715
+ (0, ($parcel$interopDefault($jQDcL$i18next))).use((0, $jQDcL$reacti18next.initReactI18next)).init({
716
+ lng: (0, $393bda1b33846dfc$export$604ba5624273df44)(),
717
+ fallbackLng: "en",
718
+ resources: $b45c0bcc142f0b5e$export$150b732325d14d04,
719
+ interpolation: {
720
+ escapeValue: false
721
+ }
722
+ });
723
+ var $b45c0bcc142f0b5e$export$2e2bcd8739ae039 = (0, ($parcel$interopDefault($jQDcL$i18next)));
724
+
725
+
726
+
727
+
728
+
729
+
730
+
316
731
 
317
732
 
318
733
 
319
734
 
735
+ const $d0c6baf97675ab49$var$LogLevel = {
736
+ error: 1,
737
+ warn: 2,
738
+ info: 3,
739
+ log: 4,
740
+ debug: 5
741
+ };
742
+ const $d0c6baf97675ab49$var$LevelDescription = {
743
+ 1: "error",
744
+ 2: "warn",
745
+ 3: "info",
746
+ 4: "verbose",
747
+ 5: "debug"
748
+ };
749
+ let $d0c6baf97675ab49$var$logLevel = Number(2);
750
+ const $d0c6baf97675ab49$var$dateFormat = new Intl.DateTimeFormat("en-GB", {
751
+ year: "numeric",
752
+ month: "numeric",
753
+ day: "numeric",
754
+ hour: "numeric",
755
+ minute: "numeric",
756
+ second: "numeric",
757
+ timeZone: "GMT"
758
+ });
759
+ class $d0c6baf97675ab49$export$2e2bcd8739ae039 {
760
+ constructor(filename, customLogLevel){
761
+ this.filename = filename;
762
+ this.customLogLevel = customLogLevel;
763
+ }
764
+ print(level, logger, scope, ...arg) {
765
+ const head = `[ ${$d0c6baf97675ab49$var$dateFormat.format(new Date())} ][ ${$d0c6baf97675ab49$var$LevelDescription[level]} ][ ${this.filename} - ${scope} ]`;
766
+ if (level <= (this.customLogLevel || $d0c6baf97675ab49$var$logLevel)) logger(head, ...arg);
767
+ else (0, $jQDcL$sentrybrowser.addBreadcrumb)({
768
+ type: "debug",
769
+ level: $d0c6baf97675ab49$var$LevelDescription[level],
770
+ category: "console",
771
+ data: {
772
+ head: head,
773
+ arguments: arg
774
+ }
775
+ });
776
+ }
777
+ debug(scope, ...arg) {
778
+ this.print($d0c6baf97675ab49$var$LogLevel.debug, console.debug, scope, ...arg);
779
+ }
780
+ error(scope, ...arg) {
781
+ this.print($d0c6baf97675ab49$var$LogLevel.error, console.error, scope, ...arg);
782
+ }
783
+ info(scope, ...arg) {
784
+ this.print($d0c6baf97675ab49$var$LogLevel.info, console.info, scope, ...arg);
785
+ }
786
+ log(scope, ...arg) {
787
+ this.print($d0c6baf97675ab49$var$LogLevel.log, console.log, scope, ...arg);
788
+ }
789
+ warn(scope, ...arg) {
790
+ this.print($d0c6baf97675ab49$var$LogLevel.warn, console.warn, scope, ...arg);
791
+ }
792
+ deprecated(...arg) {
793
+ console.warn("[ DEPRECATED ]", ...arg);
794
+ }
795
+ static setLogLevel(level) {
796
+ $d0c6baf97675ab49$var$logLevel = level;
797
+ }
798
+ setLogLevel(level) {
799
+ this.customLogLevel = level;
800
+ }
801
+ }
802
+
803
+
804
+ const $6a90fae7e584afd4$var$log = new (0, $d0c6baf97675ab49$export$2e2bcd8739ae039)("AudioLevels.ts");
320
805
  const $6a90fae7e584afd4$var$audioContextConstructor = window.AudioContext || window.webkitAudioContext;
321
806
  const $6a90fae7e584afd4$var$AUDIO_MUTE_DETECTION_TIME = 2000;
322
807
  const $6a90fae7e584afd4$var$SPEAK_DETECTION_TIME = 500;
@@ -414,10 +899,10 @@ class $6a90fae7e584afd4$export$ea669869acd8f177 {
414
899
  try {
415
900
  this.audioStreamSource.disconnect(this.analyser);
416
901
  } catch (err1) {
417
- console.error("audioStreamSource failed to disconnect", err1);
902
+ $6a90fae7e584afd4$var$log.error("release", "audioStreamSource failed to disconnect", err1);
418
903
  }
419
904
  this.audioContext.close().catch((err)=>{
420
- console.error("audioContext failed to close", err);
905
+ $6a90fae7e584afd4$var$log.error("release", "audioContext failed to close", err);
421
906
  });
422
907
  this.audioLevels = [];
423
908
  }
@@ -427,6 +912,8 @@ class $6a90fae7e584afd4$export$ea669869acd8f177 {
427
912
  }
428
913
 
429
914
 
915
+
916
+ const $1bfa11322d1d6377$var$log = new (0, $d0c6baf97675ab49$export$2e2bcd8739ae039)("AudioRenderer.ts");
430
917
  class $1bfa11322d1d6377$var$AudioRenderer {
431
918
  constructor({ consumerId: consumerId }){
432
919
  this.consumerId = consumerId;
@@ -446,9 +933,12 @@ class $1bfa11322d1d6377$var$AudioRenderer {
446
933
  async setSink(sinkId) {
447
934
  await this.audio.setSinkId?.(sinkId);
448
935
  }
936
+ getSink() {
937
+ return this.audio.sinkId;
938
+ }
449
939
  async play() {
450
940
  await this.audio.play().catch((err)=>{
451
- console.warn("failed to play");
941
+ $1bfa11322d1d6377$var$log.warn("play", "failed to play");
452
942
  setTimeout(()=>{
453
943
  this.play();
454
944
  }, 1000);
@@ -519,12 +1009,138 @@ const $3575c8a563f2a1da$export$4a210166cc9cb64b = async (src)=>{
519
1009
 
520
1010
 
521
1011
 
1012
+
1013
+
1014
+
1015
+
1016
+ const $a62e7f17be5cf3a0$var$log = new (0, $d0c6baf97675ab49$export$2e2bcd8739ae039)("StreamerMediasoup");
1017
+ function $a62e7f17be5cf3a0$var$deviceAutoDetection() {
1018
+ try {
1019
+ const ua = navigator.userAgent;
1020
+ const browser = $jQDcL$bowser.getParser(ua);
1021
+ $jQDcL$sentrybrowser.setTag("DeviceDetectionForced", true);
1022
+ $jQDcL$sentrybrowser.addBreadcrumb({
1023
+ type: "debug",
1024
+ category: "browser",
1025
+ data: browser.getResult()
1026
+ });
1027
+ const browserOs = browser.getOS();
1028
+ if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new (0, $jQDcL$mediasoupclient.Device)({
1029
+ handlerName: "Safari12"
1030
+ });
1031
+ throw Error("failed to autoDetect browser, falling back to chrome 74");
1032
+ } catch (error) {
1033
+ $a62e7f17be5cf3a0$var$log.error("deviceAutoDetection", error);
1034
+ $jQDcL$sentrybrowser.captureException(error);
1035
+ }
1036
+ return new (0, $jQDcL$mediasoupclient.Device)({
1037
+ handlerName: "Chrome74"
1038
+ });
1039
+ }
1040
+ function $a62e7f17be5cf3a0$var$createDevice() {
1041
+ try {
1042
+ return new (0, $jQDcL$mediasoupclient.Device)();
1043
+ } catch (error) {
1044
+ $a62e7f17be5cf3a0$var$log.error("failed to detects device from mediasoup, fallback on auto detection", error);
1045
+ return $a62e7f17be5cf3a0$var$deviceAutoDetection();
1046
+ }
1047
+ }
1048
+ class $a62e7f17be5cf3a0$export$2e2bcd8739ae039 {
1049
+ constructor(device, config){
1050
+ this.mediasoupDevice = device;
1051
+ this.config = config;
1052
+ }
1053
+ static async create(server, config) {
1054
+ const routerRtpCapabilities = await server.request("getRouterRtpCapabilities");
1055
+ routerRtpCapabilities.headerExtensions = routerRtpCapabilities.headerExtensions?.filter((ext)=>{
1056
+ return ext.uri !== "urn:3gpp:video-orientation";
1057
+ });
1058
+ const device = $a62e7f17be5cf3a0$var$createDevice();
1059
+ device.load({
1060
+ routerRtpCapabilities: routerRtpCapabilities
1061
+ });
1062
+ return new $a62e7f17be5cf3a0$export$2e2bcd8739ae039(device, config);
1063
+ }
1064
+ getRtpCapabilities() {
1065
+ return this.mediasoupDevice.rtpCapabilities;
1066
+ }
1067
+ async createTransportConfig(server) {
1068
+ const transportInfo = await server.request("createWebRtcTransport");
1069
+ return {
1070
+ id: transportInfo.id,
1071
+ iceParameters: transportInfo.iceParameters,
1072
+ iceCandidates: transportInfo.iceCandidates,
1073
+ dtlsParameters: {
1074
+ ...transportInfo.dtlsParameters,
1075
+ role: "auto"
1076
+ },
1077
+ sctpParameters: transportInfo.sctpParameters,
1078
+ iceServers: this.config.iceServers,
1079
+ proprietaryConstraints: {
1080
+ optional: [
1081
+ {
1082
+ googDscp: true
1083
+ }
1084
+ ]
1085
+ },
1086
+ additionalSettings: {
1087
+ encodedInsertableStreams: false
1088
+ }
1089
+ };
1090
+ }
1091
+ async createSendTransport(server) {
1092
+ const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig(server));
1093
+ sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
1094
+ $a62e7f17be5cf3a0$var$log.log("dtlsParameters", sendTransport.id, dtlsParameters);
1095
+ server.request("connectWebRtcTransport", {
1096
+ transportId: sendTransport.id,
1097
+ dtlsParameters: dtlsParameters
1098
+ }).then(callback).catch(errback);
1099
+ });
1100
+ sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
1101
+ try {
1102
+ const { id: id } = await server.request("produce", {
1103
+ transportId: sendTransport.id,
1104
+ kind: kind,
1105
+ rtpParameters: rtpParameters,
1106
+ appData: appData
1107
+ });
1108
+ callback({
1109
+ id: id
1110
+ });
1111
+ $a62e7f17be5cf3a0$var$log.log("producerTransport: ", sendTransport);
1112
+ } catch (error) {
1113
+ errback(error);
1114
+ }
1115
+ });
1116
+ return sendTransport;
1117
+ }
1118
+ async createRecvTransport(server) {
1119
+ const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig(server));
1120
+ recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
1121
+ $a62e7f17be5cf3a0$var$log.log("dtls", recvTransport.id, dtlsParameters);
1122
+ server.request("connectWebRtcTransport", {
1123
+ transportId: recvTransport.id,
1124
+ dtlsParameters: dtlsParameters
1125
+ }).then(callback).catch(errback);
1126
+ });
1127
+ return recvTransport;
1128
+ }
1129
+ async createTransport(server, direction) {
1130
+ if (direction === "send") return await this.createSendTransport(server);
1131
+ else return await this.createRecvTransport(server);
1132
+ }
1133
+ }
1134
+
1135
+
1136
+ const $1dedebd5ff3002eb$var$log = new (0, $d0c6baf97675ab49$export$2e2bcd8739ae039)("StreamerClient");
522
1137
  const $1dedebd5ff3002eb$export$818d60b2e626da0c = {
523
1138
  WEBRTC_FAILED: "WRTC1",
524
1139
  WEBRTC_RECOVER_ERROR: "WRTC2",
525
1140
  CREATE_TRANSPORT_FAILED: "TRANS1",
526
1141
  CONSUME_ERROR: "CONS1",
527
- SOCKET_LOST: "SOCK1"
1142
+ SOCKET_LOST: "SOCK1",
1143
+ USER_LIMIT: "USERLIMIT"
528
1144
  };
529
1145
  const $1dedebd5ff3002eb$export$d21ffcc5eb136bfa = {
530
1146
  qvga: {
@@ -587,6 +1203,7 @@ class $1dedebd5ff3002eb$var$SnapcallEvent extends CustomEvent {
587
1203
  }
588
1204
  const $1dedebd5ff3002eb$var$StreamerEventTargetType = EventTarget;
589
1205
  class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$StreamerEventTargetType {
1206
+ mediasoupTransport = {};
590
1207
  pendingDeviceRequest = {};
591
1208
  joinOptions = {};
592
1209
  devicesList = [];
@@ -741,17 +1358,19 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
741
1358
  this.joinRoom();
742
1359
  });
743
1360
  this.protoo.on("failed", ()=>{
744
- console.error("failed");
1361
+ $1dedebd5ff3002eb$var$log.error("protoo.on", "failed");
745
1362
  this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.SOCKET_LOST);
746
1363
  });
747
1364
  this.protoo.on("disconnected", ()=>{
748
- console.error("disconnected");
1365
+ $1dedebd5ff3002eb$var$log.error("protoo.on", "disconnected");
749
1366
  this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.SOCKET_LOST);
750
1367
  });
751
- this.protoo.on("close", ()=>console.log("close :("));
1368
+ this.protoo.on("close", ()=>$1dedebd5ff3002eb$var$log.log("protoo.on", "close :("));
752
1369
  this.protoo.on("notification", async (notification)=>{
753
- console.log("notification", notification);
754
- if (notification.method === "newPeer") {
1370
+ $1dedebd5ff3002eb$var$log.log("notification", notification);
1371
+ if (notification.method === "error") {
1372
+ if (notification.data?.reason === "reached user limit") this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.USER_LIMIT);
1373
+ } else if (notification.method === "newPeer") {
755
1374
  const { id: id , profile: profile } = notification.data;
756
1375
  this.peers.set(id, {
757
1376
  id: id,
@@ -886,158 +1505,63 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
886
1505
  }
887
1506
  });
888
1507
  }
889
- deviceAutoDetection() {
890
- try {
891
- const ua = navigator.userAgent;
892
- const browser = $jQDcL$bowser.getParser(ua);
893
- $jQDcL$sentrybrowser.setTag("DeviceDetectionForced", true);
894
- $jQDcL$sentrybrowser.addBreadcrumb({
895
- type: "debug",
896
- category: "browser",
897
- data: browser.getResult()
898
- });
899
- const browserOs = browser.getOS();
900
- if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new $jQDcL$mediasoupclient.Device({
901
- handlerName: "Safari12"
902
- });
903
- throw Error("failed to autoDetect browser, falling back to chrome 74");
904
- } catch (error) {
905
- console.error(error);
906
- $jQDcL$sentrybrowser.captureException(error);
907
- this.dispatchEvent(new CustomEvent("browserDetectionFailed"));
908
- }
909
- return new $jQDcL$mediasoupclient.Device({
910
- handlerName: "Chrome74"
911
- });
912
- }
913
- createDevice() {
914
- try {
915
- return new $jQDcL$mediasoupclient.Device();
916
- } catch (error) {
917
- console.error("failed to detects device from mediasoup, fallback on auto detection", error);
918
- return this.deviceAutoDetection();
1508
+ closeWebrtcTransport(key) {
1509
+ const transport = this.mediasoupTransport[key];
1510
+ if (transport) {
1511
+ transport?.transport?.close();
1512
+ clearTimeout(transport?.disconnectTimeout);
1513
+ delete this.mediasoupTransport[key];
919
1514
  }
920
1515
  }
921
- closeWebrtcTransport(transport) {
922
- transport?.transport.close();
923
- clearTimeout(transport?.disconnectTimeout);
924
- }
925
- async createTransportConfig() {
926
- const transportInfo = await this.protoo.request("createWebRtcTransport");
927
- return {
928
- id: transportInfo.id,
929
- iceParameters: transportInfo.iceParameters,
930
- iceCandidates: transportInfo.iceCandidates,
931
- dtlsParameters: {
932
- ...transportInfo.dtlsParameters,
933
- role: "auto"
934
- },
935
- sctpParameters: transportInfo.sctpParameters,
936
- iceServers: this.config.iceServers,
937
- proprietaryConstraints: {
938
- optional: [
939
- {
940
- googDscp: true
941
- }
942
- ]
943
- },
944
- additionalSettings: {
945
- encodedInsertableStreams: false
946
- }
947
- };
948
- }
949
- async createSendTransport(kind1) {
950
- const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig());
951
- sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
952
- console.log("dtlsParameters", sendTransport.id, dtlsParameters);
953
- this.protoo.request("connectWebRtcTransport", {
954
- transportId: sendTransport.id,
955
- dtlsParameters: dtlsParameters
956
- }).then(callback).catch(errback);
957
- });
958
- sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
1516
+ async getTransport(kind, direction) {
1517
+ if (!this.streamerMediasoup) throw new Error("streamerMediasoup not initialized");
1518
+ let transport = this.mediasoupTransport[`${kind}-${direction}`];
1519
+ if (!transport) {
959
1520
  try {
960
- const { id: id } = await this.protoo.request("produce", {
961
- transportId: sendTransport.id,
1521
+ const promise = this.streamerMediasoup.createTransport(this.protoo, direction);
1522
+ transport = {
1523
+ disconnectTimeout: undefined,
962
1524
  kind: kind,
963
- rtpParameters: rtpParameters,
964
- appData: appData
965
- });
966
- callback({
967
- id: id
968
- });
969
- console.log("producerTransport: ", sendTransport);
970
- } catch (error) {
971
- errback(error);
1525
+ createPromise: promise
1526
+ };
1527
+ this.mediasoupTransport[`${kind}-${direction}`] = transport;
1528
+ transport.transport = await promise;
1529
+ if (transport.transport) this.listenWebRTCTransportStates(transport);
1530
+ } catch (err) {
1531
+ this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1532
+ throw err;
972
1533
  }
973
- });
974
- const result = {
975
- transport: sendTransport,
976
- disconnectTimeout: undefined,
977
- kind: kind1
978
- };
979
- this.listenWebRTCTransportStats(result);
980
- return result;
981
- }
982
- async createRecvTransport(kind) {
983
- const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig());
984
- recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
985
- console.log("dtls", recvTransport.id, dtlsParameters);
986
- this.protoo.request("connectWebRtcTransport", {
987
- transportId: recvTransport.id,
988
- dtlsParameters: dtlsParameters
989
- }).then(callback).catch(errback);
990
- });
991
- const result = {
992
- transport: recvTransport,
993
- disconnectTimeout: undefined,
994
- kind: kind
995
- };
996
- this.listenWebRTCTransportStats(result);
997
- return result;
1534
+ return transport.transport;
1535
+ } else if (transport && transport.transport) return transport.transport;
1536
+ else return transport.createPromise;
998
1537
  }
999
- listenWebRTCTransportStats(transport) {
1538
+ listenWebRTCTransportStates(transport) {
1539
+ if (!transport.transport) throw new Error("can not listen states of undefined transport");
1000
1540
  transport.transport.on("connectionstatechange", (event)=>{
1001
- if (!transport.transport.closed) {
1002
- console.log("recv connectionstatechange: ", event);
1541
+ if (transport.transport && !transport.transport.closed) {
1542
+ $1dedebd5ff3002eb$var$log.log("recv connectionstatechange: ", event);
1003
1543
  if (event === "disconnected") transport.disconnectTimeout = setTimeout(()=>{
1004
- console.log(`trying to restart transport for ${transport.kind}`);
1005
- this.restartIce(transport.transport);
1544
+ $1dedebd5ff3002eb$var$log.log("listenWebRTCTransportStats", `trying to restart transport for ${transport.kind}`);
1545
+ if (transport.transport) this.restartIce(transport.transport);
1006
1546
  }, 5000);
1007
1547
  else if (event === "connected") clearTimeout(transport.disconnectTimeout);
1008
1548
  else if (event === "failed") {
1009
1549
  const err = new Error(`webRTC transport state failed for ${transport.kind}`);
1010
1550
  $jQDcL$sentrybrowser.captureException(err, {
1011
1551
  extra: {
1012
- direction: transport.transport.direction,
1013
- id: transport.transport.id,
1552
+ direction: transport.transport?.direction,
1553
+ id: transport.transport?.id,
1014
1554
  kind: transport.kind
1015
1555
  }
1016
1556
  });
1017
- console.error("webrtc stat failed", err);
1557
+ $1dedebd5ff3002eb$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
1018
1558
  this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.WEBRTC_FAILED);
1019
1559
  }
1020
1560
  }
1021
1561
  });
1022
1562
  }
1023
1563
  async joinRoom() {
1024
- this.mediasoupDevice = this.createDevice();
1025
- this.routerRtpCapabilities = await this.protoo.request("getRouterRtpCapabilities");
1026
- this.routerRtpCapabilities.headerExtensions = this.routerRtpCapabilities.headerExtensions?.filter((ext)=>{
1027
- return ext.uri !== "urn:3gpp:video-orientation";
1028
- });
1029
- await this.mediasoupDevice.load({
1030
- routerRtpCapabilities: this.routerRtpCapabilities
1031
- });
1032
- try {
1033
- this.recvAudioTransports = await this.createRecvTransport("audio");
1034
- this.sendAudioTransports = await this.createSendTransport("audio");
1035
- this.recvVideoTransports = await this.createRecvTransport("video");
1036
- this.sendVideoTransports = await this.createSendTransport("video");
1037
- } catch (err) {
1038
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1039
- throw err;
1040
- }
1564
+ this.streamerMediasoup = await (0, $a62e7f17be5cf3a0$export$2e2bcd8739ae039).create(this.protoo, this.config);
1041
1565
  // now we join
1042
1566
  if (this.joinOptions.apiKey && this.joinOptions.email) try {
1043
1567
  const agentInfo = await this.fetchAgentInfo({
@@ -1051,7 +1575,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1051
1575
  }
1052
1576
  }));
1053
1577
  } catch (agentInfoError) {
1054
- console.warn(agentInfoError);
1578
+ $1dedebd5ff3002eb$var$log.warn("joinRoom", agentInfoError);
1055
1579
  this.dispatchEvent(new $1dedebd5ff3002eb$var$SnapcallEvent("agentIdentity", {
1056
1580
  detail: {
1057
1581
  success: false
@@ -1082,7 +1606,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1082
1606
  callId: callId
1083
1607
  }
1084
1608
  }));
1085
- console.log("peers", peers);
1609
+ $1dedebd5ff3002eb$var$log.log("joinRoom", "peers", peers);
1086
1610
  if (this.joinOptions.displayName) await this.setDisplayName(this.joinOptions.displayName);
1087
1611
  if (this.joinOptions.profile) await this.setProfile(this.joinOptions.profile);
1088
1612
  // Consume Peers
@@ -1095,12 +1619,12 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1095
1619
  }
1096
1620
  async switchMicrophone(deviceId) {
1097
1621
  try {
1098
- console.log("switchMicrophone", "switching Microphone");
1622
+ $1dedebd5ff3002eb$var$log.log("switchMicrophone", "switching Microphone");
1099
1623
  this.audioLevel?.release();
1100
1624
  this.audioLevel = undefined;
1101
1625
  if (this.micProducer && this.micProducer.track) {
1102
1626
  this.micProducer?.track?.stop();
1103
- console.log("switchMicrophone", "stopping previous track");
1627
+ $1dedebd5ff3002eb$var$log.log("switchMicrophone", "stopping previous track");
1104
1628
  }
1105
1629
  const stream = await this.handleGetUserMediaError("microphone", navigator.mediaDevices.getUserMedia({
1106
1630
  audio: {
@@ -1110,14 +1634,14 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1110
1634
  }
1111
1635
  }));
1112
1636
  this.audioLevel = new (0, $6a90fae7e584afd4$export$ea669869acd8f177)(stream, this);
1113
- this.audioLevel.analyse();
1637
+ // this.audioLevel.analyse();
1114
1638
  const track = stream.getAudioTracks()[0];
1115
1639
  await this.micProducer?.replaceTrack({
1116
1640
  track: track
1117
1641
  });
1118
- console.log("switchMicrophone", "switched Microphone");
1642
+ $1dedebd5ff3002eb$var$log.log("switchMicrophone", "switched Microphone");
1119
1643
  } catch (error) {
1120
- console.error("switchMicrophone error", error);
1644
+ $1dedebd5ff3002eb$var$log.error("switchMicrophone error", error);
1121
1645
  await this.closeMicrophoneProducer();
1122
1646
  }
1123
1647
  }
@@ -1134,7 +1658,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1134
1658
  });
1135
1659
  }
1136
1660
  async onDeviceChange() {
1137
- console.log("detecting device change");
1661
+ $1dedebd5ff3002eb$var$log.log("onDeviceChange", "detecting device change");
1138
1662
  const deviceListChangeEvent = new $1dedebd5ff3002eb$var$SnapcallEvent("devicesListChange", {
1139
1663
  detail: {}
1140
1664
  });
@@ -1144,7 +1668,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1144
1668
  const inputs = lists.filter((media)=>media.kind === "audioinput");
1145
1669
  // chrome default device
1146
1670
  if (inputs.length === 0) {
1147
- console.warn("no audio input device");
1671
+ $1dedebd5ff3002eb$var$log.warn("onDeviceChange", "no audio input device");
1148
1672
  await this.closeMicrophoneProducer();
1149
1673
  return;
1150
1674
  }
@@ -1155,21 +1679,21 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1155
1679
  const change = lists.filter((elements)=>{
1156
1680
  return !Boolean(this.devicesList.find((device)=>device.deviceId === elements.deviceId && device.label === elements.label));
1157
1681
  });
1158
- console.log(change);
1682
+ $1dedebd5ff3002eb$var$log.log("onDeviceChange", change);
1159
1683
  this.devicesList = lists;
1160
1684
  const hasAudioInputChange = Boolean(change.find((device)=>device.kind === "audioinput"));
1161
1685
  if (change.length !== 0 && hasAudioInputChange === false) {
1162
- console.log("no audio input change");
1686
+ $1dedebd5ff3002eb$var$log.warn("onDeviceChange", "no audio input change");
1163
1687
  return;
1164
1688
  }
1165
- console.log("detecting audio input change");
1689
+ $1dedebd5ff3002eb$var$log.log("onDeviceChange", "detecting audio input change");
1166
1690
  if (!this.audioInputDefaultDevice || this.audioInputDefaultDevice.label !== defaultDevice.label) {
1167
1691
  const event = new $1dedebd5ff3002eb$var$SnapcallEvent("defaultAudioDeviceChange", {
1168
1692
  detail: defaultDevice
1169
1693
  });
1170
1694
  this.audioInputDefaultDevice = defaultDevice;
1171
1695
  this.dispatchEvent(event);
1172
- console.log("new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
1696
+ $1dedebd5ff3002eb$var$log.log("onDeviceChange", "new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
1173
1697
  }
1174
1698
  this.switchMicrophone("default");
1175
1699
  }
@@ -1184,12 +1708,12 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1184
1708
  }
1185
1709
  }));
1186
1710
  this.devicesList = await navigator.mediaDevices.enumerateDevices();
1187
- if (!this.sendAudioTransports) throw new Error("audio transport not found");
1711
+ const transport = await this.getTransport("audio", "send");
1188
1712
  this.audioLevel = new (0, $6a90fae7e584afd4$export$ea669869acd8f177)(stream, this);
1189
- this.audioLevel.analyse();
1713
+ // this.audioLevel.analyse();
1190
1714
  const track = stream.getAudioTracks()[0];
1191
1715
  const deviceType = "microphone";
1192
- const micProducer = await this.sendAudioTransports?.transport.produce({
1716
+ const micProducer = await transport.produce({
1193
1717
  track: track,
1194
1718
  codecOptions: {
1195
1719
  opusStereo: true,
@@ -1200,13 +1724,13 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1200
1724
  }
1201
1725
  });
1202
1726
  micProducer.on("transportclose", ()=>{
1203
- console.log("micproducer transportclose");
1727
+ $1dedebd5ff3002eb$var$log.log("enableMicrophone", "micproducer transportclose");
1204
1728
  });
1205
1729
  track.addEventListener("ended", ()=>{
1206
- console.log("track ended!");
1730
+ $1dedebd5ff3002eb$var$log.log("enableMicrophone", "track ended!");
1207
1731
  });
1208
1732
  micProducer.on("trackended", async ()=>{
1209
- console.log("microphone disconnected!");
1733
+ $1dedebd5ff3002eb$var$log.log("enableMicrophone", "microphone disconnected!");
1210
1734
  if (navigator.mediaDevices.ondevicechange === undefined) this.closeMicrophoneProducer();
1211
1735
  });
1212
1736
  this.micProducer = micProducer;
@@ -1259,11 +1783,8 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1259
1783
  }
1260
1784
  }
1261
1785
  release() {
1262
- console.log("release");
1263
- this.closeWebrtcTransport(this.sendAudioTransports);
1264
- this.closeWebrtcTransport(this.recvAudioTransports);
1265
- this.closeWebrtcTransport(this.sendVideoTransports);
1266
- this.closeWebrtcTransport(this.recvVideoTransports);
1786
+ $1dedebd5ff3002eb$var$log.log("release");
1787
+ for(let key in this.mediasoupTransport)this.closeWebrtcTransport(key);
1267
1788
  this.webcamTrack?.stop();
1268
1789
  this.webcamTrack = null;
1269
1790
  this.protooTransport.close();
@@ -1335,18 +1856,18 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1335
1856
  }
1336
1857
  }
1337
1858
  async restartIce(transport) {
1338
- console.log("restartIce", transport.connectionState, transport.closed);
1859
+ $1dedebd5ff3002eb$var$log.log("restartIce", transport.connectionState, transport.closed);
1339
1860
  if (transport.connectionState === "disconnected" && !transport.closed) try {
1340
1861
  const iceParameters = await this.protoo.request("restartIce", {
1341
1862
  transportId: transport.id
1342
1863
  });
1343
- console.log(iceParameters);
1864
+ $1dedebd5ff3002eb$var$log.log("restartIce", iceParameters);
1344
1865
  await transport.restartIce({
1345
1866
  iceParameters: iceParameters
1346
1867
  });
1347
1868
  } catch (err) {
1348
1869
  this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
1349
- console.log("restartIceFailed", err);
1870
+ $1dedebd5ff3002eb$var$log.log("restartIce", "restartIceFailed", err);
1350
1871
  $jQDcL$sentrybrowser.captureException(err, {
1351
1872
  extra: {
1352
1873
  direction: transport.direction,
@@ -1360,7 +1881,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1360
1881
  if (scale === 2) videoResolution = $1dedebd5ff3002eb$export$d21ffcc5eb136bfa["vga"];
1361
1882
  else if (scale > 2) videoResolution = $1dedebd5ff3002eb$export$d21ffcc5eb136bfa["qvga"];
1362
1883
  if (!this.webcam.resolution || $1dedebd5ff3002eb$export$d21ffcc5eb136bfa[this.webcam.resolution].qualityIndex >= videoResolution.qualityIndex) {
1363
- console.log(`scaling video by ${scale}`, videoResolution);
1884
+ $1dedebd5ff3002eb$var$log.log("scaleVideoMediasConstraintsParameter", `scaling video by ${scale}`, videoResolution);
1364
1885
  this.webcamProducer?.track?.applyConstraints(videoResolution);
1365
1886
  }
1366
1887
  }
@@ -1382,14 +1903,14 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1382
1903
  };
1383
1904
  if (!(0, $jQDcL$mediasoupclientlibProducer.Producer).prototype.setRtpEncodingParameters) return this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
1384
1905
  if (this.webcamProducer && !this.webcamProducer.closed) {
1385
- console.log(`scaling video by ${scale.scaleResolutionDownBy}`);
1906
+ $1dedebd5ff3002eb$var$log.log("scaleVideoEncodingsParameter", `scaling video by ${scale.scaleResolutionDownBy}`);
1386
1907
  this.webcamProducer?.setRtpEncodingParameters?.(scale).catch((err)=>{
1387
- console.error("scaleResolutionDownBy not supported", err);
1908
+ $1dedebd5ff3002eb$var$log.error("scaleVideoEncodingsParameter", "scaleResolutionDownBy not supported", err);
1388
1909
  this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
1389
1910
  });
1390
1911
  }
1391
1912
  } catch (error) {
1392
- console.error("scaleVideo error", error);
1913
+ $1dedebd5ff3002eb$var$log.error("scaleVideoEncodingsParameter", "scaleVideo error", error);
1393
1914
  }
1394
1915
  }
1395
1916
  async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
@@ -1416,7 +1937,8 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1416
1937
  ...$1dedebd5ff3002eb$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution]
1417
1938
  }
1418
1939
  }));
1419
- if (!this.sendVideoTransports) throw new Error("video transport not found");
1940
+ const transport = await this.getTransport("video", "send");
1941
+ if (!transport) throw new Error("video transport not found, can not switch");
1420
1942
  const track = stream.getVideoTracks()[0];
1421
1943
  this.webcamTrack = track;
1422
1944
  await this.webcamProducer?.replaceTrack?.({
@@ -1447,7 +1969,8 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1447
1969
  ...$1dedebd5ff3002eb$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution]
1448
1970
  }
1449
1971
  }));
1450
- if (!this.sendVideoTransports) throw new Error("video transport not found");
1972
+ await this.updateWebcams();
1973
+ const transport = await this.getTransport("video", "send");
1451
1974
  const track = stream.getVideoTracks()[0];
1452
1975
  this.webcamTrack = track;
1453
1976
  const capabilities = await track.getCapabilities?.() || navigator.mediaDevices.getSupportedConstraints?.();
@@ -1461,7 +1984,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1461
1984
  videoGoogleStartBitrate: 1000
1462
1985
  };
1463
1986
  const deviceType = "webcam";
1464
- this.webcamProducer = await this.sendVideoTransports.transport.produce({
1987
+ this.webcamProducer = await transport.produce({
1465
1988
  track: track,
1466
1989
  encodings: encodings,
1467
1990
  codecOptions: codecOptions,
@@ -1541,14 +2064,14 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1541
2064
  }
1542
2065
  }));
1543
2066
  if (!stream) return;
1544
- if (!this.sendVideoTransports) throw new Error("video screen transport not found");
2067
+ const transport = await this.getTransport("video", "send");
1545
2068
  const track = stream.getVideoTracks()[0];
1546
2069
  const encodings = undefined;
1547
2070
  const codecOptions = {
1548
2071
  videoGoogleStartBitrate: 1000
1549
2072
  };
1550
2073
  let deviceType = "screen";
1551
- this.screenshareProducer = await this.sendVideoTransports.transport.produce({
2074
+ this.screenshareProducer = await transport.produce({
1552
2075
  track: track,
1553
2076
  encodings: encodings,
1554
2077
  codecOptions: codecOptions,
@@ -1608,11 +2131,11 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1608
2131
  const consumer = this.consumers.get(mediaId);
1609
2132
  if (consumer) {
1610
2133
  const mediaStream = new MediaStream();
1611
- mediaStream.onremovetrack = ()=>console.log("Remove Track");
1612
- consumer.mediaSoupConsumer.track.onended = ()=>console.log("Track Ended");
2134
+ mediaStream.onremovetrack = ()=>$1dedebd5ff3002eb$var$log.log("requestVideo", "Remove Track");
2135
+ consumer.mediaSoupConsumer.track.onended = ()=>$1dedebd5ff3002eb$var$log.log("requestVideo", "Track Ended");
1613
2136
  mediaStream.addTrack(consumer.mediaSoupConsumer.track);
1614
2137
  element.srcObject = mediaStream;
1615
- } else console.error(`Video consumer ${consumer} not found`);
2138
+ } else $1dedebd5ff3002eb$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
1616
2139
  }
1617
2140
  async captureVideo(videoElement) {
1618
2141
  let image;
@@ -1637,7 +2160,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1637
2160
  const mediaStream = new MediaStream();
1638
2161
  mediaStream.addTrack(this.screenshareProducer.track);
1639
2162
  element.srcObject = mediaStream;
1640
- } else console.log("screenshare producer not available yet");
2163
+ } else $1dedebd5ff3002eb$var$log.log("requestLocalScreenshare", "screenshare producer not available yet");
1641
2164
  }
1642
2165
  consumePeer({ peerId: peerId , producersData: producersData }) {
1643
2166
  producersData.forEach((producerData)=>{
@@ -1649,18 +2172,14 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1649
2172
  });
1650
2173
  });
1651
2174
  }
1652
- getRecvTransport(deviceType) {
1653
- if (deviceType === "microphone") return this.recvAudioTransports;
1654
- else return this.recvVideoTransports;
1655
- }
1656
2175
  async consumeProducer({ peerId: peerId , producerId: producerId , deviceType: deviceType , paused: paused }) {
1657
- const transport = this.getRecvTransport(deviceType);
1658
- if (!transport) throw new Error(`transport for ${deviceType} not found`);
2176
+ const mediaKind = deviceType === "microphone" ? "audio" : "video";
2177
+ const transport = await this.getTransport(mediaKind, "recv");
1659
2178
  const data = await this.protoo.request("consume", {
1660
2179
  peerId: peerId,
1661
2180
  producerId: producerId,
1662
- transportId: transport.transport.id,
1663
- rtpCapabilities: this.mediasoupDevice.rtpCapabilities
2181
+ transportId: transport.id,
2182
+ rtpCapabilities: this.streamerMediasoup.getRtpCapabilities()
1664
2183
  });
1665
2184
  const peer = this.peers.get(peerId);
1666
2185
  if (peer) peer.producersData.push({
@@ -1669,9 +2188,9 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1669
2188
  paused: paused
1670
2189
  });
1671
2190
  const { producerId: resolvedProducerId , id: id , kind: kind , rtpParameters: rtpParameters , appData: appData } = data;
1672
- console.log("Data: ", data);
2191
+ $1dedebd5ff3002eb$var$log.log("consumeProducer", "Data: ", data);
1673
2192
  try {
1674
- const consumer = await transport.transport.consume({
2193
+ const consumer = await transport.consume({
1675
2194
  id: id,
1676
2195
  producerId: resolvedProducerId,
1677
2196
  kind: kind,
@@ -1681,8 +2200,8 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1681
2200
  peerId: peerId
1682
2201
  }
1683
2202
  });
1684
- console.log("transport", transport.transport);
1685
- console.log("consumer", consumer);
2203
+ $1dedebd5ff3002eb$var$log.log("transport", transport);
2204
+ $1dedebd5ff3002eb$var$log.log("consumer", consumer);
1686
2205
  this.consumers.set(consumer.id, {
1687
2206
  mediaSoupConsumer: consumer,
1688
2207
  deviceType: deviceType
@@ -1709,7 +2228,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1709
2228
  });
1710
2229
  } catch (error) {
1711
2230
  this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.CONSUME_ERROR);
1712
- console.error("newConsumer request failed", error);
2231
+ $1dedebd5ff3002eb$var$log.error("consumeProducer", "newConsumer request failed", error);
1713
2232
  throw error;
1714
2233
  }
1715
2234
  }
@@ -1753,7 +2272,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1753
2272
  const { callId: callId } = await this.protoo.request("getCallId");
1754
2273
  return callId;
1755
2274
  } catch (err) {
1756
- console.error("Failed to get callId");
2275
+ $1dedebd5ff3002eb$var$log.error("getCallId", "Failed to get callId");
1757
2276
  throw err;
1758
2277
  }
1759
2278
  }
@@ -1827,6 +2346,18 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1827
2346
  getCurrentWebcam() {
1828
2347
  return this.webcam;
1829
2348
  }
2349
+ getCurrentMicrophoneId() {
2350
+ return this.micProducer?.track?.getSettings().deviceId;
2351
+ }
2352
+ getCurrentSpeakerId() {
2353
+ const audioRendererKeys = Object.keys(this.audioRenderers);
2354
+ const firstRenderer = this.audioRenderers[audioRendererKeys[0]];
2355
+ if (firstRenderer) {
2356
+ const sinkId = firstRenderer.getSink();
2357
+ if (sinkId) return sinkId;
2358
+ }
2359
+ return "default";
2360
+ }
1830
2361
  async setWebcamResolution(resolution) {
1831
2362
  if (this.webcam.device) await this.switchWebcam({
1832
2363
  resolution: resolution
@@ -1856,7 +2387,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1856
2387
  await this.audioRenderers[consumerId]?.play();
1857
2388
  }
1858
2389
  async setAudioSink(sinkId) {
1859
- 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)));
2390
+ const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)=>$1dedebd5ff3002eb$var$log.warn("setAudioSink", "Failed to setSinkId on renderer (consumerId: %s): ", consumerId, err)));
1860
2391
  await Promise.allSettled(promises);
1861
2392
  }
1862
2393
  dispatchEvent(event) {
@@ -1864,12 +2395,6 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1864
2395
  window.dispatchEvent(event);
1865
2396
  return result;
1866
2397
  }
1867
- async getShareLinkData(url) {
1868
- const data = await this.protoo.request("shareLink", {
1869
- url: url
1870
- });
1871
- return data;
1872
- }
1873
2398
  async fetchAgentInfo({ apiKey: apiKey , email: email }) {
1874
2399
  const apiURL = this.config.apiUrl;
1875
2400
  const agent = await fetch(`${apiURL}/agents/${email}`, {
@@ -2218,6 +2743,7 @@ const $cce7f1c9e9c29503$export$5170987d58ae338d = ()=>/*#__PURE__*/ (0, $jQDcL$r
2218
2743
 
2219
2744
 
2220
2745
 
2746
+
2221
2747
  const $326cea7dbbcb019a$export$71b2224f1ce5e08e = (ref, action)=>{
2222
2748
  (0, $jQDcL$react.useEffect)(()=>{
2223
2749
  const onWindowClick = (event)=>{
@@ -2238,6 +2764,7 @@ const $326cea7dbbcb019a$export$71b2224f1ce5e08e = (ref, action)=>{
2238
2764
 
2239
2765
 
2240
2766
 
2767
+
2241
2768
  const $4890069d0b6c2ba3$export$d00c23c5e97ada8 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
2242
2769
  display: flex;
2243
2770
  flex-direction: column;
@@ -2301,6 +2828,7 @@ const $4890069d0b6c2ba3$export$6755b81a599fadda = (0, ($parcel$interopDefault($j
2301
2828
 
2302
2829
 
2303
2830
  const $82c4f35718e0facf$var$Menu = ({ categories: categories })=>{
2831
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
2304
2832
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $4890069d0b6c2ba3$export$b286f91cddfedb5a), {
2305
2833
  children: categories.map((category)=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $4890069d0b6c2ba3$export$d00c23c5e97ada8), {
2306
2834
  children: [
@@ -2322,7 +2850,7 @@ const $82c4f35718e0facf$var$Menu = ({ categories: categories })=>{
2322
2850
  }),
2323
2851
  item.title,
2324
2852
  item.isNew && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $4890069d0b6c2ba3$export$6755b81a599fadda), {
2325
- children: "NEW"
2853
+ children: t("menu.new")
2326
2854
  })
2327
2855
  ]
2328
2856
  }, item.id))
@@ -2414,6 +2942,7 @@ const $1949f8f101c8cf77$export$c4e460d5c7d83bc3 = (0, ($parcel$interopDefault($j
2414
2942
 
2415
2943
 
2416
2944
  const $7eae5c8ece2c75ff$var$HeaderSettings = ({ baseCategories: baseCategories , extraCategories: extraCategories })=>{
2945
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
2417
2946
  const settingsOptionsContainerRef = (0, $jQDcL$react.useRef)(null);
2418
2947
  const [displaySettingsOptions, setDisplaySettingsOptions] = (0, $jQDcL$react.useState)(false);
2419
2948
  const [menuCategories, setMenuCategories] = (0, $jQDcL$react.useState)(baseCategories);
@@ -2506,7 +3035,7 @@ const $7eae5c8ece2c75ff$var$HeaderSettings = ({ baseCategories: baseCategories ,
2506
3035
  children: [
2507
3036
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $1949f8f101c8cf77$export$e2457e1974c298c3), {
2508
3037
  onClick: onSettingsButtonClick,
2509
- children: "Menu"
3038
+ children: t("menu.title")
2510
3039
  }),
2511
3040
  displaySettingsOptions && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $1949f8f101c8cf77$export$c4e460d5c7d83bc3), {
2512
3041
  ref: settingsOptionsContainerRef,
@@ -2523,6 +3052,7 @@ var $7eae5c8ece2c75ff$export$2e2bcd8739ae039 = $7eae5c8ece2c75ff$var$HeaderSetti
2523
3052
 
2524
3053
 
2525
3054
 
3055
+
2526
3056
  const $21395e477f83709c$var$computeLayout = ({ width: width , height: height , tileCount: tileCount })=>{
2527
3057
  const tilesPerRow = Math.min(tileCount, 12);
2528
3058
  let n = 0;
@@ -2618,7 +3148,7 @@ class $21395e477f83709c$export$45fabd1ce5e673de {
2618
3148
  await this.video.play();
2619
3149
  await this.video.requestPictureInPicture();
2620
3150
  this.draw();
2621
- } else (0, $jQDcL$reacthottoast.toast)("No camera available", {
3151
+ } else (0, $jQDcL$reacthottoast.toast)((0, $b45c0bcc142f0b5e$export$2e2bcd8739ae039).t("notifications.noCamera"), {
2622
3152
  className: "error"
2623
3153
  });
2624
3154
  }
@@ -2700,6 +3230,7 @@ class $21395e477f83709c$export$45fabd1ce5e673de {
2700
3230
  const $e1930b467e7d8845$var$multiPiP = new (0, $21395e477f83709c$export$45fabd1ce5e673de)();
2701
3231
  const $e1930b467e7d8845$var$browser = $jQDcL$bowser.parse(window.navigator.userAgent);
2702
3232
  const $e1930b467e7d8845$var$Header = ()=>{
3233
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
2703
3234
  const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , options: options , muted: muted , streaming: streaming } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
2704
3235
  const { streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
2705
3236
  const [extraOptions, setExtraOptions] = (0, $jQDcL$react.useState)(options.extraSettingsOptions || []);
@@ -2728,12 +3259,12 @@ const $e1930b467e7d8845$var$Header = ()=>{
2728
3259
  const onCopyCallLinkClick = async ()=>{
2729
3260
  try {
2730
3261
  await (0, $0bea101d3ef852fb$export$2e2bcd8739ae039)(options.sharedURL || window.location.href);
2731
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("Link copied to clipboard", {
3262
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("copyLink.copied"), {
2732
3263
  duration: 2000
2733
3264
  });
2734
3265
  } catch (copyError) {
2735
3266
  console.warn(copyError);
2736
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to copy to clipboard", {
3267
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("copyLink.error"), {
2737
3268
  className: "error"
2738
3269
  });
2739
3270
  }
@@ -2749,6 +3280,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
2749
3280
  };
2750
3281
  const onScanQuickConnectClick = ()=>{
2751
3282
  setIsQuickConnectPopupVisible(true);
3283
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("quickConnectClick");
2752
3284
  };
2753
3285
  const onSettingsMenuClick = ()=>{
2754
3286
  setIsSettingsMenuVisible(true);
@@ -2759,7 +3291,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
2759
3291
  items: [
2760
3292
  {
2761
3293
  id: "openNewTab",
2762
- title: "Open new tab",
3294
+ title: t("menu.openNewTab"),
2763
3295
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$6546b255bd3a2004), {}),
2764
3296
  action: onOpenInNewTabClick
2765
3297
  },
@@ -2770,13 +3302,13 @@ const $e1930b467e7d8845$var$Header = ()=>{
2770
3302
  items: [
2771
3303
  {
2772
3304
  id: "copyLink",
2773
- title: "Copy link",
3305
+ title: t("copyLink.title"),
2774
3306
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$92ce62e1201c4fc0), {}),
2775
3307
  action: onCopyCallLinkClick
2776
3308
  },
2777
3309
  {
2778
3310
  id: "quickConnect",
2779
- title: "Quick Connect",
3311
+ title: t("quickConnect.title"),
2780
3312
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$6470d09a29d34d08), {}),
2781
3313
  action: onScanQuickConnectClick
2782
3314
  },
@@ -2787,7 +3319,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
2787
3319
  items: [
2788
3320
  {
2789
3321
  id: "settings",
2790
- title: "Settings",
3322
+ title: t("settings.title"),
2791
3323
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$1095c93890fce526), {}),
2792
3324
  action: onSettingsMenuClick
2793
3325
  },
@@ -2796,7 +3328,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
2796
3328
  ];
2797
3329
  if (document.pictureInPictureEnabled && $e1930b467e7d8845$var$browser.platform.type === "desktop") computedCategories[0].items.push({
2798
3330
  id: "pip",
2799
- title: "Picture-in-Picture",
3331
+ title: t("menu.pictureInPicture"),
2800
3332
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$5170987d58ae338d), {}),
2801
3333
  action: onPipClick
2802
3334
  });
@@ -2806,7 +3338,8 @@ const $e1930b467e7d8845$var$Header = ()=>{
2806
3338
  streaming,
2807
3339
  options.sharedURL,
2808
3340
  setIsQuickConnectPopupVisible,
2809
- setIsSettingsMenuVisible,
3341
+ setIsSettingsMenuVisible,
3342
+ t,
2810
3343
  ]);
2811
3344
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $1949f8f101c8cf77$export$1e86fd0e1db89578), {
2812
3345
  children: [
@@ -2864,6 +3397,7 @@ const $56e1e7a85d8bf4bb$export$2b86bedf890eab8 = (element)=>{
2864
3397
 
2865
3398
 
2866
3399
 
3400
+
2867
3401
  const $0ac48791ff0bcc8e$var$Microphone = ({ slash: slash , redSlash: redSlash , status: status , deviceRequest: deviceRequest })=>{
2868
3402
  if (slash) return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("svg", {
2869
3403
  width: "24",
@@ -3626,6 +4160,7 @@ const $07e749066c746c7c$var$getRequestButtonSize = (containerWidth)=>{
3626
4160
  return "large";
3627
4161
  };
3628
4162
  const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 , height: height = 0 })=>{
4163
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
3629
4164
  const videoElementRef = (0, $jQDcL$react.useRef)(null);
3630
4165
  const [hover, setHover] = (0, $jQDcL$react.useState)(false);
3631
4166
  const [requestingDevice, setRequestingDevice] = (0, $jQDcL$react.useState)(null);
@@ -3669,7 +4204,7 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3669
4204
  if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
3670
4205
  requestingDeviceTimeoutRef.current = setTimeout(()=>{
3671
4206
  setRequestingDevice(null);
3672
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("Your request has timed out.", {
4207
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("requestDevice.timedOut"), {
3673
4208
  className: "error"
3674
4209
  });
3675
4210
  }, 20000);
@@ -3678,7 +4213,8 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3678
4213
  };
3679
4214
  } else setHover(false);
3680
4215
  }, [
3681
- requestingDevice
4216
+ requestingDevice,
4217
+ t
3682
4218
  ]);
3683
4219
  (0, $jQDcL$react.useEffect)(()=>{
3684
4220
  const onRequestDeviceResult = (event)=>{
@@ -3687,8 +4223,10 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3687
4223
  if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
3688
4224
  setRequestingDevice(null);
3689
4225
  if (result !== true) {
3690
- let message = "Your request has been declined.";
3691
- if (stream.profile.name) message = `${stream.profile.name} has declined your request.`;
4226
+ let message = t("requestDevice.declined");
4227
+ if (stream.profile.name) message = t("requestDevice.userDeclined", {
4228
+ user: stream.profile.name
4229
+ });
3692
4230
  (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(message, {
3693
4231
  className: "error"
3694
4232
  });
@@ -3701,7 +4239,8 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3701
4239
  };
3702
4240
  }, [
3703
4241
  stream.id,
3704
- stream.profile
4242
+ stream.profile,
4243
+ t
3705
4244
  ]);
3706
4245
  (0, $jQDcL$react.useEffect)(()=>{
3707
4246
  const onCustomMessage = async (event)=>{
@@ -3763,7 +4302,7 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3763
4302
  children: [
3764
4303
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $66c45b20958474ec$export$df42e007689062b0), {
3765
4304
  size: requestButtonSize,
3766
- children: "Request input devices"
4305
+ children: t("requestDevice.requestInput")
3767
4306
  }),
3768
4307
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $66c45b20958474ec$export$81d5557f9199e44d), {
3769
4308
  size: requestButtonSize,
@@ -3812,7 +4351,7 @@ const $07e749066c746c7c$var$StreamTile = ({ stream: stream , width: width = 0 ,
3812
4351
  }) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $0319693440f03062$export$2e2bcd8739ae039), {})
3813
4352
  }),
3814
4353
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $66c45b20958474ec$export$b430fec6b171ceb5), {
3815
- children: stream.profile.name || "User"
4354
+ children: stream.profile.name || t("misc.user")
3816
4355
  })
3817
4356
  ]
3818
4357
  })
@@ -3913,6 +4452,7 @@ var $dc81c0e96fbbb967$export$2e2bcd8739ae039 = $dc81c0e96fbbb967$var$AudioTile;
3913
4452
 
3914
4453
 
3915
4454
 
4455
+
3916
4456
  const $c19f00532fd0c23c$var$Reduce = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
3917
4457
  width: "22",
3918
4458
  height: "22",
@@ -4026,11 +4566,7 @@ const $7de6ded9bdec6f42$export$a6112fefa8de799d = ({ containerWidth: containerWi
4026
4566
 
4027
4567
 
4028
4568
 
4029
- const $379218382afed0e6$var$deviceNames = {
4030
- microphone: "microphone",
4031
- webcam: "camera",
4032
- screen: "screen"
4033
- };
4569
+
4034
4570
  const $379218382afed0e6$var$getIcon = (device)=>{
4035
4571
  if (device === "microphone") return 0, $0ac48791ff0bcc8e$export$2e2bcd8739ae039;
4036
4572
  if (device === "webcam") return 0, $ab00aedf8a706bfe$export$2e2bcd8739ae039;
@@ -4038,10 +4574,16 @@ const $379218382afed0e6$var$getIcon = (device)=>{
4038
4574
  return 0, $0ac48791ff0bcc8e$export$2e2bcd8739ae039;
4039
4575
  };
4040
4576
  const $379218382afed0e6$var$DeviceRequest = ({ device: device , requesterId: requesterId , setExtended: setExtended , setDeviceRequest: setDeviceRequest })=>{
4577
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
4041
4578
  const { streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
4042
4579
  const [pending, setPending] = (0, $jQDcL$react.useState)(false);
4043
4580
  const requesterStream = streams.find((stream)=>stream.id === requesterId);
4044
4581
  const Icon = $379218382afed0e6$var$getIcon(device);
4582
+ const deviceNames = {
4583
+ microphone: t("misc.microphone"),
4584
+ webcam: t("misc.camera"),
4585
+ screen: t("misc.screen")
4586
+ };
4045
4587
  const onAccept = async ()=>{
4046
4588
  setExtended(false);
4047
4589
  setPending(true);
@@ -4076,24 +4618,22 @@ const $379218382afed0e6$var$DeviceRequest = ({ device: device , requesterId: req
4076
4618
  deviceRequest: true
4077
4619
  })
4078
4620
  }),
4079
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2c45d365ee8aa1ab$export$517ec31e58d61d2e), {
4080
- children: [
4081
- requesterStream?.profile?.name || "Someone",
4082
- " would like you to share your",
4083
- " ",
4084
- $379218382afed0e6$var$deviceNames[device]
4085
- ]
4621
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$517ec31e58d61d2e), {
4622
+ children: t("requestDevice.request", {
4623
+ user: requesterStream?.profile?.name || t("misc.someone"),
4624
+ device: deviceNames[device]
4625
+ })
4086
4626
  }),
4087
4627
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2c45d365ee8aa1ab$export$dfd6aceefcfce0c9), {
4088
4628
  children: [
4089
4629
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$a85169f132f25a9d), {
4090
4630
  onClick: onAccept,
4091
4631
  active: true,
4092
- children: "Accept"
4632
+ children: t("misc.accept")
4093
4633
  }),
4094
4634
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$a85169f132f25a9d), {
4095
4635
  onClick: onDecline,
4096
- children: "Decline"
4636
+ children: t("misc.decline")
4097
4637
  })
4098
4638
  ]
4099
4639
  })
@@ -4209,7 +4749,9 @@ const $4ee7c4b0b3646a08$export$ab7d69e250642927 = ({ element: element })=>{
4209
4749
 
4210
4750
 
4211
4751
 
4752
+
4212
4753
  const $fdb92de69267f341$var$MediaSession = ()=>{
4754
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
4213
4755
  const { muted: muted , streaming: streaming } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
4214
4756
  (0, $jQDcL$react.useEffect)(()=>{
4215
4757
  navigator.mediaSession?.setMicrophoneActive?.(!muted);
@@ -4227,7 +4769,7 @@ const $fdb92de69267f341$var$MediaSession = ()=>{
4227
4769
  else await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableMicrophone();
4228
4770
  } catch (microphoneToggleError) {
4229
4771
  console.warn(microphoneToggleError);
4230
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to toggle the microphone (PiP)", {
4772
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(`${t("notifications.microphoneError")} (PiP)`, {
4231
4773
  className: "error"
4232
4774
  });
4233
4775
  }
@@ -4243,7 +4785,7 @@ const $fdb92de69267f341$var$MediaSession = ()=>{
4243
4785
  else await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableVideo();
4244
4786
  } catch (cameraError) {
4245
4787
  console.warn(cameraError);
4246
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to toggle the camera (PiP)", {
4788
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(`${t("notifications.cameraError")} (PiP)`, {
4247
4789
  className: "error"
4248
4790
  });
4249
4791
  }
@@ -4258,7 +4800,9 @@ const $fdb92de69267f341$var$MediaSession = ()=>{
4258
4800
  } catch (hangupHandlerError) {
4259
4801
  console.warn("MediaSession hangup action is not available");
4260
4802
  }
4261
- }, []);
4803
+ }, [
4804
+ t
4805
+ ]);
4262
4806
  return null;
4263
4807
  };
4264
4808
  var $fdb92de69267f341$export$2e2bcd8739ae039 = $fdb92de69267f341$var$MediaSession;
@@ -4270,6 +4814,7 @@ var $fdb92de69267f341$export$2e2bcd8739ae039 = $fdb92de69267f341$var$MediaSessio
4270
4814
  const $8393b5c887e16c8c$var$minimumTileWidth = 126;
4271
4815
  const $8393b5c887e16c8c$var$maximumTileWidth = 150;
4272
4816
  const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePresenting , width: width , height: height })=>{
4817
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
4273
4818
  const [extended, setExtended] = (0, $jQDcL$react.useState)(false);
4274
4819
  const [zoom, setZoom] = (0, $jQDcL$react.useState)(false);
4275
4820
  const [zoomAvailable, setZoomAvailable] = (0, $jQDcL$react.useState)(false);
@@ -4342,8 +4887,13 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4342
4887
  type: "snapshot",
4343
4888
  imageSrc: objectUrl
4344
4889
  });
4345
- let notificationMessage = "Snapshot sent to users.";
4346
- if (streams.length === 1) notificationMessage = `Snapshot sent to ${streams[0].profile.name || "user"}.`;
4890
+ let notificationMessage = t("snapshot.sentToUsers");
4891
+ if (streams.length === 1) {
4892
+ const userName = streams[0].profile.name || t("misc.user");
4893
+ notificationMessage = t("snapshot.sentToUser", {
4894
+ user: userName
4895
+ });
4896
+ }
4347
4897
  (0, $84c6cbcbb594d072$export$3a57e165650c636f)(notificationMessage, {
4348
4898
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$26fe7ec9351ff761), {
4349
4899
  src: base64Image
@@ -4351,7 +4901,7 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4351
4901
  duration: 2500
4352
4902
  });
4353
4903
  } catch (sendMessageError) {
4354
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to send the snapshot", {
4904
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("snapshot.error"), {
4355
4905
  className: "error"
4356
4906
  });
4357
4907
  console.error(sendMessageError);
@@ -4469,7 +5019,7 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4469
5019
  }),
4470
5020
  !extended && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$500c3c5544c37412), {
4471
5021
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
4472
- children: "You"
5022
+ children: t("misc.you")
4473
5023
  })
4474
5024
  }),
4475
5025
  extended && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2c45d365ee8aa1ab$export$a7365e2302f8d10a), {
@@ -4635,6 +5185,7 @@ const $81369fe5a359bb1e$export$2cb99e4be0dc4646 = (url)=>new Promise((resolve, r
4635
5185
 
4636
5186
 
4637
5187
 
5188
+
4638
5189
  const $d98095a4855ffc64$export$eb5bbbfc393ab8ac = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
4639
5190
  max-width: 100%;
4640
5191
  margin-top: 60px;
@@ -4704,6 +5255,7 @@ const $65bf10a117819168$export$e9785ae652b3a722 = (item)=>{
4704
5255
  } else console.warn("Undefined room ID");
4705
5256
  };
4706
5257
  const $65bf10a117819168$export$ad5f39c592532e2d = ()=>{
5258
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
4707
5259
  const [history, setHistory] = (0, $jQDcL$react.useState)([]);
4708
5260
  (0, $jQDcL$react.useEffect)(()=>{
4709
5261
  try {
@@ -4721,7 +5273,7 @@ const $65bf10a117819168$export$ad5f39c592532e2d = ()=>{
4721
5273
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $d98095a4855ffc64$export$eb5bbbfc393ab8ac), {
4722
5274
  children: [
4723
5275
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $d98095a4855ffc64$export$ebce8992dc3bd82), {
4724
- children: "Shared with you"
5276
+ children: t("sharedHistory.shared")
4725
5277
  }),
4726
5278
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $d98095a4855ffc64$export$e6c0b06d6e2dd9e3), {
4727
5279
  children: history.map((item)=>{
@@ -4921,6 +5473,7 @@ var $c378a92744dc7f32$export$2e2bcd8739ae039 = $c378a92744dc7f32$var$YoutubeTile
4921
5473
 
4922
5474
 
4923
5475
 
5476
+
4924
5477
  const $65992ea9297d23d9$export$e19cf0169f1019bf = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
4925
5478
  display: flex;
4926
5479
  position: relative;
@@ -5011,6 +5564,7 @@ const $65992ea9297d23d9$export$49ac927a2aaad85 = (0, ($parcel$interopDefault($jQ
5011
5564
 
5012
5565
 
5013
5566
  const $ee98e2bef25871e5$var$SnapshotTile = (tile)=>{
5567
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
5014
5568
  const { dispatch: dispatch } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
5015
5569
  const snapshotImageRef = (0, $jQDcL$react.useRef)(null);
5016
5570
  const [downloadURL, setDownloadURL] = (0, $jQDcL$react.useState)(tile.data.url);
@@ -5078,7 +5632,8 @@ const $ee98e2bef25871e5$var$SnapshotTile = (tile)=>{
5078
5632
  children: [
5079
5633
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $65992ea9297d23d9$export$7c309220fd1fb205), {
5080
5634
  children: [
5081
- "Snapshot \xb7 ",
5635
+ t("snapshot.title"),
5636
+ " \xb7 ",
5082
5637
  formattedTime
5083
5638
  ]
5084
5639
  }),
@@ -5086,7 +5641,7 @@ const $ee98e2bef25871e5$var$SnapshotTile = (tile)=>{
5086
5641
  href: downloadURL,
5087
5642
  target: "_blank",
5088
5643
  download: filename,
5089
- children: "Save photo"
5644
+ children: t("snapshot.save")
5090
5645
  })
5091
5646
  ]
5092
5647
  }),
@@ -5216,7 +5771,9 @@ var $45826eb519d8bd73$export$2e2bcd8739ae039 = $45826eb519d8bd73$var$YoutubeEven
5216
5771
 
5217
5772
 
5218
5773
 
5774
+
5219
5775
  const $e447bd93acbe2b63$var$SnapshotEvents = ()=>{
5776
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
5220
5777
  const { dispatch: dispatch , streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
5221
5778
  (0, $jQDcL$react.useEffect)(()=>{
5222
5779
  const onCustomMessage = async (event)=>{
@@ -5232,11 +5789,11 @@ const $e447bd93acbe2b63$var$SnapshotEvents = ()=>{
5232
5789
  });
5233
5790
  const createdAtDate = new Date();
5234
5791
  const notificationStatus = {
5235
- text: "From",
5236
- boldText: sender.profile.name || "User",
5792
+ text: t("misc.from"),
5793
+ boldText: sender.profile.name || t("misc.user"),
5237
5794
  icon: statusIcon
5238
5795
  };
5239
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)("Snapshot shared.", {
5796
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(t("snapshot.shared"), {
5240
5797
  width: "290px",
5241
5798
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $65992ea9297d23d9$export$26fe7ec9351ff761), {
5242
5799
  src: imageSrc,
@@ -5247,7 +5804,7 @@ const $e447bd93acbe2b63$var$SnapshotEvents = ()=>{
5247
5804
  fontSize: "16px"
5248
5805
  },
5249
5806
  button: {
5250
- text: "Open",
5807
+ text: t("misc.open"),
5251
5808
  action: ({ close: close })=>{
5252
5809
  dispatch({
5253
5810
  type: (0, $a4027a5418fcd07a$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
@@ -5272,7 +5829,7 @@ const $e447bd93acbe2b63$var$SnapshotEvents = ()=>{
5272
5829
  minute: "2-digit"
5273
5830
  });
5274
5831
  (0, $65bf10a117819168$export$e9785ae652b3a722)({
5275
- title: `Snapshot · ${formattedTime}`,
5832
+ title: `${t("snapshot.title")} · ${formattedTime}`,
5276
5833
  url: imageSrc,
5277
5834
  iconUrl: imageSrc,
5278
5835
  iconStyle: {
@@ -5291,7 +5848,8 @@ const $e447bd93acbe2b63$var$SnapshotEvents = ()=>{
5291
5848
  };
5292
5849
  }, [
5293
5850
  streams,
5294
- dispatch
5851
+ dispatch,
5852
+ t
5295
5853
  ]);
5296
5854
  return null;
5297
5855
  };
@@ -5678,6 +6236,8 @@ var $88b23a8428e67b66$export$2e2bcd8739ae039 = $88b23a8428e67b66$var$Video;
5678
6236
 
5679
6237
 
5680
6238
 
6239
+
6240
+
5681
6241
  const $f09948cc22419e6e$var$HangUp = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
5682
6242
  width: "25",
5683
6243
  height: "24",
@@ -5773,6 +6333,8 @@ var $39ceb925b3865754$export$2e2bcd8739ae039 = $39ceb925b3865754$var$Spinner;
5773
6333
 
5774
6334
 
5775
6335
 
6336
+
6337
+
5776
6338
  const $3b6953f72db3bb17$var$YoutubeIcon = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
5777
6339
  width: "24",
5778
6340
  height: "25",
@@ -5788,7 +6350,7 @@ var $3b6953f72db3bb17$export$2e2bcd8739ae039 = $3b6953f72db3bb17$var$YoutubeIcon
5788
6350
 
5789
6351
 
5790
6352
 
5791
- const $daca1602b495441e$var$Link = ()=>{
6353
+ const $daca1602b495441e$var$Link = ({ color: color })=>{
5792
6354
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
5793
6355
  width: "24",
5794
6356
  height: "24",
@@ -5797,7 +6359,7 @@ const $daca1602b495441e$var$Link = ()=>{
5797
6359
  xmlns: "http://www.w3.org/2000/svg",
5798
6360
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
5799
6361
  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",
5800
- fill: "#fff"
6362
+ fill: color || "#fff"
5801
6363
  })
5802
6364
  });
5803
6365
  };
@@ -5886,6 +6448,7 @@ const $06daeb2618dcfb56$export$d5bc2acf69f5bdaf = (0, ($parcel$interopDefault($j
5886
6448
 
5887
6449
  const $9dfd9e2286cffa66$var$isScreenshareSupported = Boolean(navigator.mediaDevices.getDisplayMedia);
5888
6450
  const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
6451
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
5889
6452
  const highlightMenuRef = (0, $jQDcL$react.useRef)(null);
5890
6453
  const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $jQDcL$react.useState)(false);
5891
6454
  const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
@@ -5901,10 +6464,13 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
5901
6464
  const onScreenshareClick = async ()=>{
5902
6465
  setIsHighlightMenuOpen(false);
5903
6466
  try {
6467
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("screenshareClick");
5904
6468
  await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableScreenshare();
6469
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("enableScreenshare");
5905
6470
  } catch (screenshareError) {
5906
6471
  console.warn(screenshareError);
5907
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to toggle screensharing", {
6472
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("screenshareCancel");
6473
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("notifications.screensharingError"), {
5908
6474
  className: "error"
5909
6475
  });
5910
6476
  }
@@ -5912,10 +6478,12 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
5912
6478
  const onYoutubeClick = ()=>{
5913
6479
  setIsHighlightMenuOpen(false);
5914
6480
  setIsYoutubePopupVisible(true);
6481
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("youtubeClick");
5915
6482
  };
5916
6483
  const onLinkshareClick = ()=>{
5917
6484
  setIsHighlightMenuOpen(false);
5918
6485
  setIsLinksharePopupVisible(true);
6486
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("linkshareClick");
5919
6487
  };
5920
6488
  const menuCategories = [
5921
6489
  {
@@ -5923,7 +6491,7 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
5923
6491
  items: [
5924
6492
  {
5925
6493
  id: "linksharing",
5926
- title: "Share Link",
6494
+ title: t("shareLink.title"),
5927
6495
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $daca1602b495441e$export$2e2bcd8739ae039), {}),
5928
6496
  action: onLinkshareClick
5929
6497
  },
@@ -5941,7 +6509,7 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
5941
6509
  items: [
5942
6510
  {
5943
6511
  id: "screensharing",
5944
- title: "Screen Sharing",
6512
+ title: t("menu.screenSharing"),
5945
6513
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f2ca2ee422d05e6e$export$2e2bcd8739ae039), {}),
5946
6514
  action: onScreenshareClick
5947
6515
  },
@@ -5973,6 +6541,7 @@ var $9dfd9e2286cffa66$export$2e2bcd8739ae039 = $9dfd9e2286cffa66$var$HighlightBu
5973
6541
 
5974
6542
 
5975
6543
  const $a21b2aa064cb6c32$var$ControlBar = ()=>{
6544
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
5976
6545
  const leaveMenuRef = (0, $jQDcL$react.useRef)(null);
5977
6546
  const [webcamCount, setWebcamCount] = (0, $jQDcL$react.useState)(0);
5978
6547
  const [isLeaveMenuOpen, setIsLeaveMenuOpen] = (0, $jQDcL$react.useState)(false);
@@ -5982,25 +6551,33 @@ const $a21b2aa064cb6c32$var$ControlBar = ()=>{
5982
6551
  const onMicrophoneClick = async ()=>{
5983
6552
  try {
5984
6553
  const devicesState = (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getDevicesState();
5985
- if (devicesState.microphone.enabled) await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).toggleMute();
5986
- else await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableMicrophone();
6554
+ if (devicesState.microphone.enabled) {
6555
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("toggleMicrophone");
6556
+ await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).toggleMute();
6557
+ } else {
6558
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("enableMicrophone");
6559
+ await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableMicrophone();
6560
+ }
5987
6561
  } catch (muteError) {
5988
6562
  console.warn(muteError);
5989
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to toggle the microphone", {
6563
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("notifications.microphoneError"), {
5990
6564
  className: "error"
5991
6565
  });
5992
6566
  }
5993
6567
  };
5994
6568
  const onCameraClick = async ()=>{
5995
6569
  try {
5996
- if (streaming) await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).disableVideo();
5997
- else {
6570
+ if (streaming) {
6571
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("disableCamera");
6572
+ await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).disableVideo();
6573
+ } else {
5998
6574
  setIsCameraLoading(true);
6575
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("enableCamera");
5999
6576
  await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableVideo();
6000
6577
  }
6001
6578
  } catch (cameraError) {
6002
6579
  console.warn(cameraError);
6003
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to toggle the camera", {
6580
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("notifications.cameraError"), {
6004
6581
  className: "error"
6005
6582
  });
6006
6583
  } finally{
@@ -6009,10 +6586,11 @@ const $a21b2aa064cb6c32$var$ControlBar = ()=>{
6009
6586
  };
6010
6587
  const onRotateClick = async ()=>{
6011
6588
  try {
6589
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("rotateCamera");
6012
6590
  await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).rotateVideo();
6013
6591
  } catch (rotateError) {
6014
6592
  console.warn(rotateError);
6015
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured when trying to rotate the camera", {
6593
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("notifications.cameraRotateError"), {
6016
6594
  className: "error"
6017
6595
  });
6018
6596
  }
@@ -6069,13 +6647,13 @@ const $a21b2aa064cb6c32$var$ControlBar = ()=>{
6069
6647
  items: [
6070
6648
  {
6071
6649
  id: "leaveCall",
6072
- title: "Leave call",
6650
+ title: t("leave.leaveCall"),
6073
6651
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$56fe02ef449b2606), {}),
6074
6652
  action: leaveCall
6075
6653
  },
6076
6654
  {
6077
6655
  id: "terminateCall",
6078
- title: "End call for all",
6656
+ title: t("leave.endCall"),
6079
6657
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$e57aa6aff2e1f414), {}),
6080
6658
  action: terminateCall,
6081
6659
  danger: true
@@ -6091,7 +6669,7 @@ const $a21b2aa064cb6c32$var$ControlBar = ()=>{
6091
6669
  children: [
6092
6670
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f09948cc22419e6e$export$2e2bcd8739ae039), {}),
6093
6671
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("p", {
6094
- children: "Leave"
6672
+ children: t("leave.title")
6095
6673
  })
6096
6674
  ]
6097
6675
  })
@@ -6114,6 +6692,7 @@ var $a21b2aa064cb6c32$export$2e2bcd8739ae039 = $a21b2aa064cb6c32$var$ControlBar;
6114
6692
 
6115
6693
 
6116
6694
 
6695
+
6117
6696
  const $b387679730856fb1$export$9d03e7b857083c37 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
6118
6697
  position: absolute;
6119
6698
  width: 100%;
@@ -6192,6 +6771,7 @@ const $b387679730856fb1$export$51760c3b0f5567d2 = (0, ($parcel$interopDefault($j
6192
6771
 
6193
6772
 
6194
6773
  const $681806ce8015ae4d$var$QuickConnect = ()=>{
6774
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6195
6775
  const QuickConnectContainerRef = (0, $jQDcL$react.useRef)(null);
6196
6776
  const QuickConnectRef = (0, $jQDcL$react.useRef)(null);
6197
6777
  const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
@@ -6266,7 +6846,7 @@ const $681806ce8015ae4d$var$QuickConnect = ()=>{
6266
6846
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $b387679730856fb1$export$f8e80e2c9abbb7eb), {
6267
6847
  children: [
6268
6848
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("h4", {
6269
- children: "Scan QR Code"
6849
+ children: t("quickConnect.scanTitle")
6270
6850
  }),
6271
6851
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b387679730856fb1$export$b421c25a8e0ea22e), {
6272
6852
  onClick: onQuickConnectPopupCloseClick,
@@ -6280,7 +6860,7 @@ const $681806ce8015ae4d$var$QuickConnect = ()=>{
6280
6860
  })
6281
6861
  }),
6282
6862
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b387679730856fb1$export$51760c3b0f5567d2), {
6283
- children: "Scan this QR code with your phone camera to open the call."
6863
+ children: t("quickConnect.scan")
6284
6864
  })
6285
6865
  ]
6286
6866
  })
@@ -6292,10 +6872,6 @@ var $681806ce8015ae4d$export$2e2bcd8739ae039 = $681806ce8015ae4d$var$QuickConnec
6292
6872
 
6293
6873
 
6294
6874
 
6295
- const $660dc8b06ec61ae0$var$capitalizeFirstLetter = (string)=>{
6296
- return string.charAt(0).toUpperCase() + string.slice(1);
6297
- };
6298
- var $660dc8b06ec61ae0$export$2e2bcd8739ae039 = $660dc8b06ec61ae0$var$capitalizeFirstLetter;
6299
6875
 
6300
6876
 
6301
6877
 
@@ -6362,6 +6938,8 @@ var $802dd6755664a000$export$2e2bcd8739ae039 = $802dd6755664a000$var$Speaker;
6362
6938
 
6363
6939
 
6364
6940
 
6941
+
6942
+
6365
6943
  const $41e530447f5fd995$var$Checkmark = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
6366
6944
  width: "20",
6367
6945
  height: "20",
@@ -6379,7 +6957,6 @@ var $41e530447f5fd995$export$2e2bcd8739ae039 = $41e530447f5fd995$var$Checkmark;
6379
6957
 
6380
6958
 
6381
6959
 
6382
-
6383
6960
  const $5f1594faf2dff407$export$304c350e86a38cee = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
6384
6961
  display: flex;
6385
6962
  flex-direction: column;
@@ -6541,27 +7118,16 @@ const $5f1594faf2dff407$export$73afb47ae3e10bf1 = (0, ($parcel$interopDefault($j
6541
7118
  `;
6542
7119
 
6543
7120
 
6544
- const $54c346ed2df7d69f$var$languagesList = [
6545
- "english"
6546
- ];
6547
- const $54c346ed2df7d69f$export$604ba5624273df44 = ()=>{
6548
- try {
6549
- const storedTheme = localStorage.getItem("stream_ui_language");
6550
- if (storedTheme) return storedTheme;
6551
- return "english";
6552
- } catch (localStorageError) {
6553
- console.warn(localStorageError);
6554
- return "english";
6555
- }
6556
- };
7121
+ const $54c346ed2df7d69f$var$languages = Object.keys((0, $b45c0bcc142f0b5e$export$150b732325d14d04));
6557
7122
  const $54c346ed2df7d69f$var$LanguageSubMenu = ({ back: back })=>{
7123
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6558
7124
  const { language: language , setLanguage: setLanguage } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
6559
7125
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
6560
7126
  children: [
6561
7127
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$ba6f0acf5af923bd), {
6562
7128
  children: [
6563
7129
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$edb76fdb8665f52), {
6564
- children: "Languages"
7130
+ children: t("settings.language")
6565
7131
  }),
6566
7132
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$b16d2ed9d0485f06), {
6567
7133
  onClick: back,
@@ -6575,9 +7141,9 @@ const $54c346ed2df7d69f$var$LanguageSubMenu = ({ back: back })=>{
6575
7141
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6576
7142
  children: [
6577
7143
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6578
- children: "Language"
7144
+ children: t("settings.language")
6579
7145
  }),
6580
- $54c346ed2df7d69f$var$languagesList.map((lang)=>{
7146
+ $54c346ed2df7d69f$var$languages.map((lang)=>{
6581
7147
  const checked = language === lang;
6582
7148
  const onLanguageClick = ()=>{
6583
7149
  setLanguage(lang);
@@ -6586,7 +7152,7 @@ const $54c346ed2df7d69f$var$LanguageSubMenu = ({ back: back })=>{
6586
7152
  onClick: onLanguageClick,
6587
7153
  children: [
6588
7154
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$f132d77f01dce0a3), {
6589
- children: (0, $660dc8b06ec61ae0$export$2e2bcd8739ae039)(lang)
7155
+ children: (0, $b45c0bcc142f0b5e$export$150b732325d14d04)[lang].name
6590
7156
  }),
6591
7157
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
6592
7158
  children: checked && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $41e530447f5fd995$export$2e2bcd8739ae039), {})
@@ -6613,10 +7179,12 @@ var $54c346ed2df7d69f$export$2e2bcd8739ae039 = $54c346ed2df7d69f$var$LanguageSub
6613
7179
 
6614
7180
 
6615
7181
 
7182
+
6616
7183
  const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
7184
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6617
7185
  const [audioDevices, setAudioDevices] = (0, $jQDcL$react.useState)([]);
6618
- const [currentMic, setCurrentMic] = (0, $jQDcL$react.useState)();
6619
- const [currentSpeaker, setCurrentSpeaker] = (0, $jQDcL$react.useState)();
7186
+ const [currentMicrophoneId, setCurrentMicrophoneId] = (0, $jQDcL$react.useState)((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getCurrentMicrophoneId());
7187
+ const [currentSpeakerId, setCurrentSpeakerId] = (0, $jQDcL$react.useState)((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getCurrentSpeakerId());
6620
7188
  const microphoneDevices = audioDevices.filter((device)=>device.kind === "audioinput");
6621
7189
  const speakerDevices = audioDevices.filter((device)=>device.kind === "audiooutput");
6622
7190
  const isMicrophoneAccessBlocked = microphoneDevices.length && audioDevices.every((device)=>device.deviceId === "");
@@ -6624,16 +7192,14 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6624
7192
  const listDevices = async ()=>{
6625
7193
  const audioDevicesList = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).listAudioDevices();
6626
7194
  setAudioDevices(audioDevicesList);
6627
- const speaker = audioDevicesList.find((device)=>device.kind === "audiooutput" && device.deviceId === "default");
6628
- const mic = audioDevicesList.find((device)=>device.kind === "audioinput" && device.deviceId === "default");
6629
- setCurrentMic(mic);
6630
- setCurrentSpeaker(speaker);
6631
7195
  };
6632
7196
  const onMicClick = async (mic)=>{
6633
- if (currentMic?.deviceId === mic.deviceId) return;
7197
+ if (currentMicrophoneId === mic.deviceId) return;
6634
7198
  await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).switchMicrophone(mic.deviceId);
6635
- setCurrentMic(mic);
6636
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`Connected to ${mic.label}`, {
7199
+ setCurrentMicrophoneId(mic.deviceId);
7200
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(t("notifications.connectedTo", {
7201
+ name: mic.label
7202
+ }), {
6637
7203
  duration: 3000,
6638
7204
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $0ac48791ff0bcc8e$export$2e2bcd8739ae039), {}),
6639
7205
  messageStyle: {
@@ -6642,10 +7208,12 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6642
7208
  });
6643
7209
  };
6644
7210
  const onSpeakerClick = (speaker)=>{
6645
- if (currentSpeaker?.deviceId === speaker.deviceId) return;
7211
+ if (currentSpeakerId === speaker.deviceId) return;
6646
7212
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).setAudioSink(speaker.deviceId);
6647
- setCurrentSpeaker(speaker);
6648
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`Connected to ${speaker.label}`, {
7213
+ setCurrentSpeakerId(speaker.deviceId);
7214
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(t("notifications.connectedTo", {
7215
+ name: speaker.label
7216
+ }), {
6649
7217
  duration: 3000,
6650
7218
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $802dd6755664a000$export$2e2bcd8739ae039), {}),
6651
7219
  messageStyle: {
@@ -6663,7 +7231,7 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6663
7231
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$ba6f0acf5af923bd), {
6664
7232
  children: [
6665
7233
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$edb76fdb8665f52), {
6666
- children: "Audio"
7234
+ children: t("audioMenu.title")
6667
7235
  }),
6668
7236
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$b16d2ed9d0485f06), {
6669
7237
  onClick: back,
@@ -6678,10 +7246,10 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6678
7246
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$87d6be27a51dc3c4), {
6679
7247
  children: [
6680
7248
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$30ccd51431e4a7b0), {
6681
- children: "Microphone is blocked."
7249
+ children: t("audioMenu.blockedMicrophone")
6682
7250
  }),
6683
7251
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$73afb47ae3e10bf1), {
6684
- children: "Please accept microphone sharing before accessing these options."
7252
+ children: t("audioMenu.microphonePermissions")
6685
7253
  })
6686
7254
  ]
6687
7255
  })
@@ -6690,10 +7258,10 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6690
7258
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6691
7259
  children: [
6692
7260
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6693
- children: "Microphone"
7261
+ children: t("misc.microphone")
6694
7262
  }),
6695
7263
  microphoneDevices.map((microphone)=>{
6696
- const checked = microphone.deviceId === currentMic?.deviceId;
7264
+ const checked = microphone.deviceId === currentMicrophoneId;
6697
7265
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
6698
7266
  onClick: ()=>onMicClick(microphone),
6699
7267
  children: [
@@ -6711,10 +7279,10 @@ const $96bb6d4b0a403c60$var$AudioSubMenu = ({ back: back })=>{
6711
7279
  canChangeSpeakers && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6712
7280
  children: [
6713
7281
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6714
- children: "Speakers"
7282
+ children: t("misc.speaker")
6715
7283
  }),
6716
7284
  speakerDevices.map((speaker)=>{
6717
- const checked = speaker.deviceId === currentSpeaker?.deviceId;
7285
+ const checked = speaker.deviceId === currentSpeakerId;
6718
7286
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
6719
7287
  onClick: ()=>onSpeakerClick(speaker),
6720
7288
  children: [
@@ -6747,35 +7315,39 @@ var $96bb6d4b0a403c60$export$2e2bcd8739ae039 = $96bb6d4b0a403c60$var$AudioSubMen
6747
7315
 
6748
7316
 
6749
7317
 
6750
- const $097072919b56b62a$var$resolutions = Object.keys((0, $1dedebd5ff3002eb$export$d21ffcc5eb136bfa)).map((key)=>{
6751
- const constraints = (0, $1dedebd5ff3002eb$export$d21ffcc5eb136bfa);
6752
- switch(constraints[key].height.ideal){
6753
- case 240:
6754
- return {
6755
- name: "Low definition (240p)",
6756
- key: key
6757
- };
6758
- case 480:
6759
- return {
6760
- name: "Standard definition (480p)",
6761
- key: key
6762
- };
6763
- case 720:
6764
- return {
6765
- name: "High definition (720p)",
6766
- key: key
6767
- };
6768
- default:
6769
- return {
6770
- name: "",
6771
- key: key
6772
- };
6773
- }
6774
- }).filter((def)=>def.name !== "");
7318
+
6775
7319
  const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
7320
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6776
7321
  const [cameraDevices, setCameraDevices] = (0, $jQDcL$react.useState)([]);
6777
7322
  const [currentCamera, setCurrentCamera] = (0, $jQDcL$react.useState)((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getCurrentWebcam());
6778
7323
  const isCameraAccessBlocked = cameraDevices.length && cameraDevices.every((device)=>device.deviceId === "");
7324
+ const resolutions = (0, $jQDcL$react.useMemo)(()=>Object.keys((0, $1dedebd5ff3002eb$export$d21ffcc5eb136bfa)).map((key)=>{
7325
+ const constraints = (0, $1dedebd5ff3002eb$export$d21ffcc5eb136bfa);
7326
+ switch(constraints[key].height.ideal){
7327
+ case 240:
7328
+ return {
7329
+ name: t("videoMenu.lowDef"),
7330
+ key: key
7331
+ };
7332
+ case 480:
7333
+ return {
7334
+ name: t("videoMenu.standardDef"),
7335
+ key: key
7336
+ };
7337
+ case 720:
7338
+ return {
7339
+ name: t("videoMenu.highDef"),
7340
+ key: key
7341
+ };
7342
+ default:
7343
+ return {
7344
+ name: "",
7345
+ key: key
7346
+ };
7347
+ }
7348
+ }).filter((def)=>def.name !== ""), [
7349
+ t
7350
+ ]);
6779
7351
  const listDevices = async ()=>{
6780
7352
  const videoDevices = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).listVideoDevices();
6781
7353
  setCameraDevices(videoDevices);
@@ -6789,7 +7361,9 @@ const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
6789
7361
  device: camera,
6790
7362
  resolution: currentCamera.resolution
6791
7363
  });
6792
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`Connected to ${camera.label}`, {
7364
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(t("notifications.connectedTo", {
7365
+ name: camera.label
7366
+ }), {
6793
7367
  duration: 3000,
6794
7368
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ab00aedf8a706bfe$export$2e2bcd8739ae039), {}),
6795
7369
  messageStyle: {
@@ -6825,7 +7399,7 @@ const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
6825
7399
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$ba6f0acf5af923bd), {
6826
7400
  children: [
6827
7401
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$edb76fdb8665f52), {
6828
- children: "Video"
7402
+ children: t("videoMenu.title")
6829
7403
  }),
6830
7404
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$b16d2ed9d0485f06), {
6831
7405
  onClick: back,
@@ -6840,10 +7414,10 @@ const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
6840
7414
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$87d6be27a51dc3c4), {
6841
7415
  children: [
6842
7416
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$30ccd51431e4a7b0), {
6843
- children: "Camera is blocked."
7417
+ children: t("videoMenu.blockedCamera")
6844
7418
  }),
6845
7419
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$73afb47ae3e10bf1), {
6846
- children: "Please accept camera sharing before accessing these options."
7420
+ children: t("videoMenu.cameraPermissions")
6847
7421
  })
6848
7422
  ]
6849
7423
  })
@@ -6852,7 +7426,7 @@ const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
6852
7426
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6853
7427
  children: [
6854
7428
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6855
- children: "Camera"
7429
+ children: t("misc.camera")
6856
7430
  }),
6857
7431
  cameraDevices.map((camera)=>{
6858
7432
  const checked = camera.deviceId === currentCamera.device?.deviceId;
@@ -6873,9 +7447,9 @@ const $097072919b56b62a$var$VideoSubMenu = ({ back: back })=>{
6873
7447
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6874
7448
  children: [
6875
7449
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6876
- children: "Send Resolution (maximum)"
7450
+ children: t("videoMenu.sendResolution")
6877
7451
  }),
6878
- $097072919b56b62a$var$resolutions.map((resolution)=>{
7452
+ resolutions.map((resolution)=>{
6879
7453
  const checked = resolution.key === currentCamera.resolution;
6880
7454
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
6881
7455
  onClick: ()=>onSendResolutionClick(resolution),
@@ -6902,6 +7476,7 @@ var $097072919b56b62a$export$2e2bcd8739ae039 = $097072919b56b62a$var$VideoSubMen
6902
7476
 
6903
7477
 
6904
7478
  const $7d4fa7ceb4c29739$var$Menu = ()=>{
7479
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6905
7480
  const [currentMenu, setCurrentMenu] = (0, $jQDcL$react.useState)("base");
6906
7481
  const menuPopupRef = (0, $jQDcL$react.useRef)(null);
6907
7482
  const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language , options: options } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
@@ -6944,7 +7519,7 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
6944
7519
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$ba6f0acf5af923bd), {
6945
7520
  children: [
6946
7521
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$edb76fdb8665f52), {
6947
- children: "Settings"
7522
+ children: t("settings.title")
6948
7523
  }),
6949
7524
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$b16d2ed9d0485f06), {
6950
7525
  onClick: onCloseClick,
@@ -6957,17 +7532,17 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
6957
7532
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6958
7533
  children: [
6959
7534
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6960
- children: "Preferences"
7535
+ children: t("settings.preferences")
6961
7536
  }),
6962
7537
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
6963
7538
  onClick: onLanguageMenuClick,
6964
7539
  children: [
6965
7540
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
6966
- children: "Language"
7541
+ children: t("settings.language")
6967
7542
  }),
6968
7543
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$4f015f15aa624b3d), {
6969
7544
  children: [
6970
- (0, $660dc8b06ec61ae0$export$2e2bcd8739ae039)(language),
7545
+ (0, $b45c0bcc142f0b5e$export$150b732325d14d04)[language]?.name,
6971
7546
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bcd348753bc3b8f8$export$2e2bcd8739ae039), {
6972
7547
  direction: "right"
6973
7548
  })
@@ -6980,7 +7555,7 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
6980
7555
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
6981
7556
  children: [
6982
7557
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
6983
- children: "Devices"
7558
+ children: t("settings.devices")
6984
7559
  }),
6985
7560
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).isListDevicesSupported() && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
6986
7561
  onClick: onAudioClick,
@@ -6990,7 +7565,7 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
6990
7565
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$bb67e2c42c95a3ae), {
6991
7566
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $802dd6755664a000$export$2e2bcd8739ae039), {})
6992
7567
  }),
6993
- "Audio"
7568
+ t("audioMenu.title")
6994
7569
  ]
6995
7570
  }),
6996
7571
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$4f015f15aa624b3d), {
@@ -7008,7 +7583,7 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
7008
7583
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$bb67e2c42c95a3ae), {
7009
7584
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ab00aedf8a706bfe$export$2e2bcd8739ae039), {})
7010
7585
  }),
7011
- "Video"
7586
+ t("videoMenu.title")
7012
7587
  ]
7013
7588
  }),
7014
7589
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$4f015f15aa624b3d), {
@@ -7023,13 +7598,13 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
7023
7598
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$38050e761cbb2b1d), {
7024
7599
  children: [
7025
7600
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5f1594faf2dff407$export$5caf84ac7a22e7b5), {
7026
- children: "Help"
7601
+ children: t("settings.help")
7027
7602
  }),
7028
7603
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5f1594faf2dff407$export$db1aade9877208c7), {
7029
7604
  onClick: onHelpCenterClick,
7030
7605
  children: [
7031
7606
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
7032
- children: "Go to help center"
7607
+ children: t("settings.helpCenter")
7033
7608
  }),
7034
7609
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f5af46abb3b35e58$export$2e2bcd8739ae039), {})
7035
7610
  ]
@@ -7062,6 +7637,8 @@ var $7d4fa7ceb4c29739$export$2e2bcd8739ae039 = $7d4fa7ceb4c29739$var$Menu;
7062
7637
 
7063
7638
 
7064
7639
 
7640
+
7641
+
7065
7642
  const $219bb3131afe1272$export$b679a9a7caefa4b1 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
7066
7643
  position: absolute;
7067
7644
  width: 100%;
@@ -7187,6 +7764,7 @@ const $219bb3131afe1272$export$3711c5e6a7ba3fdc = (0, ($parcel$interopDefault($j
7187
7764
 
7188
7765
  const $696ded7a5399bcd4$var$youtubeIDRegExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;
7189
7766
  const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7767
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
7190
7768
  const youtubePopupRef = (0, $jQDcL$react.useRef)(null);
7191
7769
  const [youtubeInputValue, setYoutubeInputValue] = (0, $jQDcL$react.useState)("");
7192
7770
  const [errorMessage, setErrorMessage] = (0, $jQDcL$react.useState)(null);
@@ -7199,6 +7777,7 @@ const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7199
7777
  const onShareClick = (event)=>{
7200
7778
  event.preventDefault();
7201
7779
  setErrorMessage(null);
7780
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("youtubeShare");
7202
7781
  const [, videoId] = youtubeInputValue.match($696ded7a5399bcd4$var$youtubeIDRegExp) || [];
7203
7782
  if (videoId) {
7204
7783
  dispatch({
@@ -7213,7 +7792,7 @@ const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7213
7792
  }
7214
7793
  });
7215
7794
  setIsYoutubePopupVisible(false);
7216
- } else setErrorMessage("Invalid YouTube URL");
7795
+ } else setErrorMessage(t("youtube.invalid"));
7217
7796
  };
7218
7797
  const onCloseClick = ()=>setIsYoutubePopupVisible(false);
7219
7798
  (0, $jQDcL$react.useEffect)(()=>{
@@ -7235,7 +7814,7 @@ const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7235
7814
  children: [
7236
7815
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $3b6953f72db3bb17$export$2e2bcd8739ae039), {}),
7237
7816
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("h4", {
7238
- children: "Embed YouTube"
7817
+ children: t("youtube.title")
7239
7818
  })
7240
7819
  ]
7241
7820
  }),
@@ -7253,7 +7832,7 @@ const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7253
7832
  children: [
7254
7833
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("label", {
7255
7834
  htmlFor: "youtube-popup-input",
7256
- children: "YOUTUBE URL"
7835
+ children: t("youtube.url")
7257
7836
  }),
7258
7837
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("input", {
7259
7838
  id: "youtube-popup-input",
@@ -7271,7 +7850,7 @@ const $696ded7a5399bcd4$var$YoutubePopup = ()=>{
7271
7850
  }),
7272
7851
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $219bb3131afe1272$export$3711c5e6a7ba3fdc), {
7273
7852
  type: "submit",
7274
- children: "Share video"
7853
+ children: t("youtube.share")
7275
7854
  })
7276
7855
  ]
7277
7856
  })
@@ -7291,6 +7870,24 @@ var $696ded7a5399bcd4$export$2e2bcd8739ae039 = $696ded7a5399bcd4$var$YoutubePopu
7291
7870
 
7292
7871
 
7293
7872
 
7873
+ const $57a90aad512ef25e$var$CircledTopArrow = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
7874
+ width: "21",
7875
+ height: "20",
7876
+ viewBox: "0 0 21 20",
7877
+ fill: "none",
7878
+ xmlns: "http://www.w3.org/2000/svg",
7879
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
7880
+ d: "M11.091 6.908a.833.833 0 0 0-.275-.175.833.833 0 0 0-.633 0 .833.833 0 0 0-.275.175l-2.5 2.5a.837.837 0 1 0 1.183 1.184l1.075-1.084V12.5a.833.833 0 1 0 1.667 0V9.508l1.075 1.084a.833.833 0 0 0 1.183 0 .833.833 0 0 0 0-1.184l-2.5-2.5Zm-.592-5.242a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.334Z",
7881
+ fill: "#fff"
7882
+ })
7883
+ });
7884
+ var $57a90aad512ef25e$export$2e2bcd8739ae039 = $57a90aad512ef25e$var$CircledTopArrow;
7885
+
7886
+
7887
+
7888
+
7889
+
7890
+
7294
7891
  const $769aee0d2f01a70c$var$PaypalWhite = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
7295
7892
  width: "24",
7296
7893
  height: "24",
@@ -7350,15 +7947,16 @@ var $769aee0d2f01a70c$export$2e2bcd8739ae039 = $769aee0d2f01a70c$var$Paypal;
7350
7947
 
7351
7948
 
7352
7949
 
7950
+ const $2d8fe9775ff247d9$var$modalHeight = (desktop)=>desktop ? "215px" : "227px";
7353
7951
  const $2d8fe9775ff247d9$export$ed0d510542cc4e55 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
7354
7952
  position: absolute;
7355
7953
  width: 100%;
7356
- bottom: ${(props)=>props.open ? 0 : "-220px"};
7954
+ bottom: ${(props)=>props.open ? 0 : `-${$2d8fe9775ff247d9$var$modalHeight(props.desktop)}`};
7357
7955
  transition: all 0.4s;
7358
7956
 
7359
7957
  ${(props)=>{
7360
7958
  if (props.desktop) return (0, $jQDcL$styledcomponents.css)`
7361
- bottom: ${props.open ? 0 : "calc(-220px - (100vh / 2))"};
7959
+ bottom: ${props.open ? 0 : `calc(-${$2d8fe9775ff247d9$var$modalHeight(props.desktop)} - (100vh / 2))`};
7362
7960
  height: 100%;
7363
7961
  display: flex;
7364
7962
  justify-content: center;
@@ -7370,12 +7968,12 @@ const $2d8fe9775ff247d9$export$93c2cc854b34757d = (0, ($parcel$interopDefault($j
7370
7968
  display: flex;
7371
7969
  flex-direction: column;
7372
7970
  width: ${(props)=>props.desktop ? "375px" : "100%"};
7373
- height: 220px;
7971
+ height: ${({ desktop: desktop })=>$2d8fe9775ff247d9$var$modalHeight(desktop)};
7374
7972
  max-height: 100vh;
7375
- background-color: ${(props)=>props.theme.settingsBackgroundColor};
7376
- color: ${(props)=>props.theme.settingsTextColor};
7973
+ background-color: ${(props)=>props.theme.popupBackgroundPrimaryColor};
7974
+ color: ${(props)=>props.theme.popupTitleColor};
7377
7975
  border-radius: ${(props)=>props.desktop ? "20px" : "20px 20px 0 0"};
7378
- padding: 12px 14px 30px;
7976
+ padding: ${({ desktop: desktop })=>desktop ? "16px 14px" : "16px 14px 28px"};
7379
7977
  box-sizing: border-box;
7380
7978
  `;
7381
7979
  const $2d8fe9775ff247d9$export$f0162ebc287dd01 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
@@ -7404,7 +8002,7 @@ const $2d8fe9775ff247d9$export$fcade06574a60ff0 = (0, ($parcel$interopDefault($j
7404
8002
  justify-content: center;
7405
8003
  align-items: center;
7406
8004
  border: none;
7407
- background-color: ${(props)=>props.theme.settingsCloseBackgroundColor};
8005
+ background-color: ${(props)=>props.theme.popupBackgroundSecondaryColor};
7408
8006
  border-radius: 50%;
7409
8007
  height: 24px;
7410
8008
  width: 24px;
@@ -7428,20 +8026,12 @@ const $2d8fe9775ff247d9$export$dcb32b2b413109d8 = (0, ($parcel$interopDefault($j
7428
8026
  flex-direction: column;
7429
8027
  position: relative;
7430
8028
 
7431
- label {
7432
- font-size: 10px;
7433
- font-weight: 700;
7434
- line-height: 10px;
7435
- color: #fff;
7436
- margin-bottom: 10px;
7437
- }
7438
-
7439
8029
  input {
7440
8030
  padding: 16px 10px 16px 20px;
7441
8031
  border-radius: 15px;
7442
- background-color: #4e4e4e;
7443
- border: 1px solid ${(props)=>props.errored ? "#d84949" : "transparent"};
7444
- color: #fff;
8032
+ background-color: ${({ theme: theme })=>theme.popupBackgroundSecondaryColor};
8033
+ border: 1px solid ${(props)=>props.errored ? "#d84949" : props.theme.popupBorderColor};
8034
+ color: #878787;
7445
8035
 
7446
8036
  &:focus {
7447
8037
  outline: none;
@@ -7461,14 +8051,25 @@ const $2d8fe9775ff247d9$export$711a92c06f80c3bd = (0, ($parcel$interopDefault($j
7461
8051
  `;
7462
8052
  const $2d8fe9775ff247d9$export$aec21c9a4da7a1b7 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).button`
7463
8053
  background-color: ${({ theme: theme })=>theme.primaryColor};
7464
- padding: 8px 18px;
7465
- border-radius: 50px;
8054
+ padding: ${({ status: status })=>status !== "waiting" ? "auto" : "8px 18px"};
8055
+ width: ${({ status: status })=>status !== "waiting" ? "46px" : "100%"};
8056
+ height: 46px;
8057
+ border-radius: ${({ status: status })=>status !== "waiting" ? "50%" : "15px"};
7466
8058
  margin: 30px auto 0;
7467
8059
  border: none;
7468
8060
  color: #fff;
7469
8061
  font-size: 16px;
7470
8062
  font-weight: 700;
7471
8063
  line-height: 18px;
8064
+ transition: border-radius 0.3s ease-in, width 0.3s;
8065
+
8066
+ span {
8067
+ display: flex;
8068
+ flex-direction: row;
8069
+ gap: 5px;
8070
+ align-items: center;
8071
+ justify-content: center;
8072
+ }
7472
8073
  `;
7473
8074
  const $2d8fe9775ff247d9$export$9e155375d8fb1f67 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).img`
7474
8075
  width: 36px;
@@ -7477,14 +8078,15 @@ const $2d8fe9775ff247d9$export$9e155375d8fb1f67 = (0, ($parcel$interopDefault($j
7477
8078
  `;
7478
8079
  const $2d8fe9775ff247d9$export$5e3f251c730829 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
7479
8080
  display: flex;
7480
- gap: 5px;
8081
+ align-items: center;
8082
+ justify-content: center;
7481
8083
  `;
7482
8084
 
7483
8085
 
7484
8086
 
7485
8087
 
7486
8088
  const $e38290b50aaba0e3$export$a1eac7fdbc2db4af = "linkshare_sent";
7487
- const $e38290b50aaba0e3$var$sendLinkNotification = (data)=>{
8089
+ const $e38290b50aaba0e3$var$sendLinkNotification = (data, t)=>{
7488
8090
  let notificationStatusText = new URL(data.url).hostname;
7489
8091
  if (notificationStatusText.startsWith("www.")) notificationStatusText = notificationStatusText.slice(4);
7490
8092
  const notificationIcon = data.ogImage ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2d8fe9775ff247d9$export$9e155375d8fb1f67), {
@@ -7495,11 +8097,11 @@ const $e38290b50aaba0e3$var$sendLinkNotification = (data)=>{
7495
8097
  icon: notificationIcon,
7496
8098
  status: {
7497
8099
  icon: data.favicon,
7498
- text: "From",
8100
+ text: t("misc.from"),
7499
8101
  boldText: notificationStatusText
7500
8102
  },
7501
8103
  button: {
7502
- text: "Open",
8104
+ text: t("misc.open"),
7503
8105
  action: ({ close: close })=>{
7504
8106
  window.open(data.url, "_blank");
7505
8107
  close();
@@ -7516,19 +8118,22 @@ const $e38290b50aaba0e3$var$sendLinkNotification = (data)=>{
7516
8118
  statusText: notificationStatusText
7517
8119
  });
7518
8120
  };
7519
- const $e38290b50aaba0e3$var$sendPaypalInvoiceNotification = (senderName, url)=>{
7520
- const title = `${senderName || "User"} sent you an invoice.`;
8121
+ const $e38290b50aaba0e3$var$sendPaypalInvoiceNotification = (senderName, url, t)=>{
8122
+ const userName = senderName || t("misc.user");
8123
+ const title = t("shareLink.invoice", {
8124
+ user: userName
8125
+ });
7521
8126
  (0, $84c6cbcbb594d072$export$3a57e165650c636f)(title, {
7522
8127
  button: {
7523
8128
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $769aee0d2f01a70c$export$2e2bcd8739ae039), {}),
7524
- text: "Pay",
8129
+ text: t("shareLink.pay"),
7525
8130
  action: ()=>window.open(url, "_blank")
7526
8131
  },
7527
8132
  status: {
7528
8133
  icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $769aee0d2f01a70c$export$2e2bcd8739ae039), {
7529
8134
  colored: true
7530
8135
  }),
7531
- text: "Powered by",
8136
+ text: t("shareLink.poweredBy"),
7532
8137
  boldText: "PayPal"
7533
8138
  },
7534
8139
  duration: 10000
@@ -7541,35 +8146,39 @@ const $e38290b50aaba0e3$var$sendPaypalInvoiceNotification = (senderName, url)=>{
7541
8146
  });
7542
8147
  };
7543
8148
  const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
8149
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
8150
+ const themeContext = (0, $jQDcL$react.useContext)((0, $jQDcL$styledcomponents.ThemeContext));
7544
8151
  const linksharePopupRef = (0, $jQDcL$react.useRef)(null);
7545
8152
  const linkshareInputRef = (0, $jQDcL$react.useRef)(null);
7546
8153
  const [linkshareInputValue, setLinkshareInputValue] = (0, $jQDcL$react.useState)("");
7547
8154
  const [errorMessage, setErrorMessage] = (0, $jQDcL$react.useState)(null);
7548
- const [isLoading, setIsLoading] = (0, $jQDcL$react.useState)(false);
7549
- const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
8155
+ const [status, setStatus] = (0, $jQDcL$react.useState)("waiting");
8156
+ const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation , options: options } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
7550
8157
  const { streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
7551
8158
  const desktop = orientation === "landscape";
7552
8159
  const onCustomMessage = (0, $jQDcL$react.useCallback)((event)=>{
7553
8160
  const { type: type , data: data } = event.detail.event;
7554
- if (type === $e38290b50aaba0e3$export$a1eac7fdbc2db4af) $e38290b50aaba0e3$var$sendLinkNotification(data);
8161
+ if (type === $e38290b50aaba0e3$export$a1eac7fdbc2db4af) $e38290b50aaba0e3$var$sendLinkNotification(data, t);
7555
8162
  else if (type === "paypal_invoice") {
7556
8163
  const sender = streams.find((stream)=>stream.id === event.detail.peerId);
7557
- $e38290b50aaba0e3$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url);
8164
+ $e38290b50aaba0e3$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url, t);
7558
8165
  }
7559
8166
  }, [
7560
- streams
8167
+ streams,
8168
+ t
7561
8169
  ]);
7562
8170
  const onShareClick = async (event)=>{
7563
8171
  event.preventDefault();
7564
8172
  if (!linkshareInputValue) return;
7565
8173
  setErrorMessage(null);
7566
- setIsLoading(true);
8174
+ setStatus("loading");
8175
+ (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).event("linkshareShare");
7567
8176
  let url;
7568
8177
  try {
7569
8178
  url = new URL(linkshareInputValue);
7570
8179
  if (url.protocol === "http") url.protocol = "https";
7571
8180
  } catch (err) {
7572
- setErrorMessage("Invalid link");
8181
+ setErrorMessage(t("shareLink.invalid"));
7573
8182
  console.error(err);
7574
8183
  }
7575
8184
  if (url) {
@@ -7581,24 +8190,33 @@ const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
7581
8190
  }
7582
8191
  });
7583
8192
  else {
7584
- const data = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getShareLinkData(url.href);
8193
+ const { linkData: data } = await fetch(`${options.streamApiURL}/shareLink`, {
8194
+ method: "POST",
8195
+ body: JSON.stringify({
8196
+ url: url.href
8197
+ })
8198
+ }).then((rawResponse)=>rawResponse.json());
7585
8199
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).sendCustomMessageToAll({
7586
8200
  type: $e38290b50aaba0e3$export$a1eac7fdbc2db4af,
7587
8201
  data: data
7588
8202
  });
7589
8203
  }
7590
- if (streams.length < 2) (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(`Link sent to ${streams[0]?.profile?.name || "User"}`);
7591
- else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("Link sent to users");
8204
+ if (streams.length < 2) {
8205
+ const userName = streams[0]?.profile?.name || t("misc.user");
8206
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("shareLink.sentToUser", {
8207
+ user: userName
8208
+ }));
8209
+ } else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("shareLink.sentToUsers"));
7592
8210
  setIsLinksharePopupVisible(false);
7593
8211
  } catch (err) {
7594
8212
  console.error(err);
7595
- (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("Failed to send link", {
8213
+ (0, ($parcel$interopDefault($jQDcL$reacthottoast)))(t("shareLink.failed"), {
7596
8214
  className: "error"
7597
8215
  });
7598
8216
  }
7599
8217
  setLinkshareInputValue("");
7600
8218
  }
7601
- setIsLoading(false);
8219
+ setStatus("done");
7602
8220
  };
7603
8221
  const onCloseClick = ()=>setIsLinksharePopupVisible(false);
7604
8222
  (0, $jQDcL$react.useEffect)(()=>{
@@ -7611,6 +8229,7 @@ const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
7611
8229
  ]);
7612
8230
  const onPopupTransitionEnd = ()=>{
7613
8231
  if (isLinksharePopupVisible) linkshareInputRef.current?.focus();
8232
+ if (status === "done") setStatus("waiting");
7614
8233
  };
7615
8234
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2d8fe9775ff247d9$export$ed0d510542cc4e55), {
7616
8235
  open: isLinksharePopupVisible,
@@ -7624,9 +8243,11 @@ const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
7624
8243
  children: [
7625
8244
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2d8fe9775ff247d9$export$7563f0d47f114601), {
7626
8245
  children: [
7627
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $daca1602b495441e$export$2e2bcd8739ae039), {}),
8246
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $daca1602b495441e$export$2e2bcd8739ae039), {
8247
+ color: themeContext.popupTitleColor
8248
+ }),
7628
8249
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("h4", {
7629
- children: "Share a link"
8250
+ children: t("shareLink.title2")
7630
8251
  })
7631
8252
  ]
7632
8253
  }),
@@ -7642,10 +8263,6 @@ const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
7642
8263
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2d8fe9775ff247d9$export$dcb32b2b413109d8), {
7643
8264
  errored: Boolean(errorMessage),
7644
8265
  children: [
7645
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("label", {
7646
- htmlFor: "linkshare-popup-input",
7647
- children: "LINK URL"
7648
- }),
7649
8266
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("input", {
7650
8267
  id: "linkshare-popup-input",
7651
8268
  ref: linkshareInputRef,
@@ -7663,17 +8280,18 @@ const $e38290b50aaba0e3$var$LinksharePopup = ()=>{
7663
8280
  }),
7664
8281
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2d8fe9775ff247d9$export$aec21c9a4da7a1b7), {
7665
8282
  type: "submit",
7666
- disabled: isLoading,
7667
- children: isLoading ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2d8fe9775ff247d9$export$5e3f251c730829), {
8283
+ disabled: status !== "waiting",
8284
+ status: status,
8285
+ children: status !== "waiting" ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2d8fe9775ff247d9$export$5e3f251c730829), {
8286
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $39ceb925b3865754$export$2e2bcd8739ae039), {
8287
+ size: "18px"
8288
+ })
8289
+ }) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("span", {
7668
8290
  children: [
7669
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $39ceb925b3865754$export$2e2bcd8739ae039), {
7670
- size: "18px"
7671
- }),
7672
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
7673
- children: "Link is creating..."
7674
- })
8291
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $57a90aad512ef25e$export$2e2bcd8739ae039), {}),
8292
+ t("shareLink.title")
7675
8293
  ]
7676
- }) : "Share Link"
8294
+ })
7677
8295
  })
7678
8296
  ]
7679
8297
  })
@@ -7718,6 +8336,7 @@ var $5f509eaff0d9c05a$export$2e2bcd8739ae039 = $5f509eaff0d9c05a$var$Settings;
7718
8336
 
7719
8337
 
7720
8338
 
8339
+
7721
8340
  const $bbe4b943c376008e$export$104f28dc79f055f4 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
7722
8341
  display: flex;
7723
8342
  flex: 1;
@@ -7756,10 +8375,12 @@ const $bbe4b943c376008e$export$3a4deda42b6182b7 = (0, ($parcel$interopDefault($j
7756
8375
 
7757
8376
 
7758
8377
  const $3d1bfd8f074b99b1$var$EndView = ()=>{
8378
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
7759
8379
  const { streamState: streamState , setStreamState: setStreamState } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
7760
8380
  const ended = streamState === "ended";
7761
8381
  const terminated = streamState === "terminated";
7762
8382
  const expired = streamState === "expired";
8383
+ const full = streamState === "full";
7763
8384
  const onGoBackClick = ()=>{
7764
8385
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).init();
7765
8386
  setStreamState("streaming");
@@ -7772,24 +8393,28 @@ const $3d1bfd8f074b99b1$var$EndView = ()=>{
7772
8393
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $bbe4b943c376008e$export$51071a7ce784448), {
7773
8394
  children: [
7774
8395
  (ended || terminated) && "\uD83D\uDC4B",
7775
- expired && "\uD83E\uDD7A"
8396
+ (expired || full) && "\uD83E\uDD7A"
7776
8397
  ]
7777
8398
  }),
7778
8399
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $bbe4b943c376008e$export$eebc018855fb0cb6), {
7779
8400
  children: [
7780
- ended && "You left the call",
7781
- terminated && "The call is now ended",
7782
- expired && "You arrived too late"
8401
+ ended && t("endView.callLeft"),
8402
+ terminated && t("endView.callEnded"),
8403
+ expired && t("endView.tooLate"),
8404
+ full && t("endView.full")
7783
8405
  ]
7784
8406
  }),
7785
8407
  expired && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bbe4b943c376008e$export$f4e7b895a81715e9), {
7786
- children: "The call is over or deleted"
8408
+ children: t("endView.callIsOver")
7787
8409
  }),
7788
- ended && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bbe4b943c376008e$export$3a4deda42b6182b7), {
8410
+ full && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bbe4b943c376008e$export$f4e7b895a81715e9), {
8411
+ children: t("endView.fullDescription")
8412
+ }),
8413
+ (ended || full) && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bbe4b943c376008e$export$3a4deda42b6182b7), {
7789
8414
  onClick: onGoBackClick,
7790
- children: "Go back to call"
8415
+ children: t("endView.goBack")
7791
8416
  }),
7792
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $65bf10a117819168$export$ad5f39c592532e2d), {})
8417
+ !full && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $65bf10a117819168$export$ad5f39c592532e2d), {})
7793
8418
  ]
7794
8419
  });
7795
8420
  };
@@ -7974,7 +8599,11 @@ const $9295e87e6b93e693$export$f30cb9bc4f736419 = {
7974
8599
  settingsBackgroundColor: "#fff",
7975
8600
  settingsHeaderTextColor: "#000",
7976
8601
  settingsTextColor: "#000",
7977
- settingsCloseBackgroundColor: "#eaebec"
8602
+ settingsCloseBackgroundColor: "#eaebec",
8603
+ popupBackgroundPrimaryColor: "#fff",
8604
+ popupBackgroundSecondaryColor: "#f3f3f3",
8605
+ popupBorderColor: "#d4d4d4",
8606
+ popupTitleColor: "#2d2d2d"
7978
8607
  };
7979
8608
  const $9295e87e6b93e693$export$3e936a8db52a10a0 = {
7980
8609
  primaryColor: "#268AFA",
@@ -7990,7 +8619,11 @@ const $9295e87e6b93e693$export$3e936a8db52a10a0 = {
7990
8619
  settingsBackgroundColor: "#242324",
7991
8620
  settingsHeaderTextColor: "#f9f9f9",
7992
8621
  settingsTextColor: "#fff",
7993
- settingsCloseBackgroundColor: "#7b7c7e"
8622
+ settingsCloseBackgroundColor: "#7b7c7e",
8623
+ popupBackgroundPrimaryColor: "#fff",
8624
+ popupBackgroundSecondaryColor: "#f3f3f3",
8625
+ popupBorderColor: "#d4d4d4",
8626
+ popupTitleColor: "#2d2d2d"
7994
8627
  };
7995
8628
 
7996
8629
 
@@ -8146,6 +8779,7 @@ var $e41262de25602ed2$export$2e2bcd8739ae039 = $e41262de25602ed2$var$SvgDefiniti
8146
8779
 
8147
8780
 
8148
8781
 
8782
+
8149
8783
  const $71b731057ba65bc2$export$8bac64dfa46a096a = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
8150
8784
  display: flex;
8151
8785
  justify-content: center;
@@ -8198,14 +8832,15 @@ const $71b731057ba65bc2$export$d39b0d24481757e7 = (0, ($parcel$interopDefault($j
8198
8832
 
8199
8833
 
8200
8834
  const $77862aeb490f36a3$var$BlockedDevicesPopup = ({ close: close })=>{
8835
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
8201
8836
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $71b731057ba65bc2$export$8bac64dfa46a096a), {
8202
8837
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $71b731057ba65bc2$export$f2f6e48f0181f95d), {
8203
8838
  children: [
8204
8839
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $71b731057ba65bc2$export$b834616c6081368f), {
8205
- children: "Camera and microphone are blocked"
8840
+ children: t("notifications.blockedMicrophonePopupTitle")
8206
8841
  }),
8207
8842
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $71b731057ba65bc2$export$12ed2ca69ff6905b), {
8208
- children: "SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar."
8843
+ children: t("notifications.blockedMicrophonePopup")
8209
8844
  }),
8210
8845
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $71b731057ba65bc2$export$d39b0d24481757e7), {
8211
8846
  onClick: close,
@@ -8531,7 +9166,7 @@ const $e3bb2c5d0e5b45b5$export$914ddf2021ea8ee6 = (0, ($parcel$interopDefault($j
8531
9166
 
8532
9167
 
8533
9168
  const $ee8cb448c2c74888$var$currentTheme = (0, $9295e87e6b93e693$export$3bfd0d5209a8006a)();
8534
- const $ee8cb448c2c74888$var$currentLanguage = (0, $54c346ed2df7d69f$export$604ba5624273df44)();
9169
+ const $ee8cb448c2c74888$var$currentLanguage = (0, $393bda1b33846dfc$export$604ba5624273df44)();
8535
9170
  let $ee8cb448c2c74888$var$timestampCriticalError = -1;
8536
9171
  const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
8537
9172
  const [selfPeerId, setSelfPeerId] = (0, $jQDcL$react.useState)(undefined);
@@ -8544,7 +9179,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
8544
9179
  const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $jQDcL$react.useState)(false);
8545
9180
  const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $jQDcL$react.useState)(false);
8546
9181
  const [theme, setTheme] = (0, $jQDcL$react.useState)($ee8cb448c2c74888$var$currentTheme);
8547
- const [language, setLanguage] = (0, $jQDcL$react.useState)($ee8cb448c2c74888$var$currentLanguage);
9182
+ const [language, setLanguage] = (0, $jQDcL$react.useState)(options.language || $ee8cb448c2c74888$var$currentLanguage);
8548
9183
  const [profile1, setProfile] = (0, $jQDcL$react.useState)({});
8549
9184
  const [muted, setMuted] = (0, $jQDcL$react.useState)(true);
8550
9185
  const [streaming, setStreaming] = (0, $jQDcL$react.useState)(false);
@@ -8608,15 +9243,23 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
8608
9243
  setStreamState("expired");
8609
9244
  };
8610
9245
  const onAgentIdentity = (event)=>{
8611
- const { success: success } = event.detail;
8612
- if (success) setIsAgent(true);
8613
- else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured while trying to join the room as an agent", {
9246
+ const { success: success , email: email } = event.detail;
9247
+ if (success) {
9248
+ setIsAgent(true);
9249
+ if (email) (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).identify(null, {
9250
+ email: email
9251
+ });
9252
+ } else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured while trying to join the room as an agent", {
8614
9253
  className: "error"
8615
9254
  });
8616
9255
  };
8617
9256
  const onCriticalError = (event)=>{
8618
9257
  const duration = 20000;
8619
9258
  const now = Date.now();
9259
+ if (event.detail.code === "USERLIMIT") {
9260
+ setStreamState("full");
9261
+ return;
9262
+ }
8620
9263
  if ($ee8cb448c2c74888$var$timestampCriticalError !== -1 && $ee8cb448c2c74888$var$timestampCriticalError + duration > now) return;
8621
9264
  $ee8cb448c2c74888$var$timestampCriticalError = now;
8622
9265
  (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
@@ -8642,6 +9285,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
8642
9285
  (0, $jQDcL$react.useEffect)(()=>{
8643
9286
  try {
8644
9287
  localStorage.setItem("stream_ui_language", language);
9288
+ (0, $b45c0bcc142f0b5e$export$2e2bcd8739ae039).changeLanguage(language);
8645
9289
  } catch (localStorageError) {
8646
9290
  console.warn(localStorageError);
8647
9291
  }
@@ -8737,7 +9381,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
8737
9381
  ]
8738
9382
  })
8739
9383
  }),
8740
- (streamState === "ended" || streamState === "terminated" || streamState === "expired") && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $3d1bfd8f074b99b1$export$2e2bcd8739ae039), {})
9384
+ (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $3d1bfd8f074b99b1$export$2e2bcd8739ae039), {})
8741
9385
  ]
8742
9386
  })
8743
9387
  ]
@@ -8748,6 +9392,15 @@ var $ee8cb448c2c74888$export$2e2bcd8739ae039 = $ee8cb448c2c74888$var$StreamUI;
8748
9392
 
8749
9393
 
8750
9394
 
9395
+ // https://help.hotjar.com/hc/en-us/articles/360033640653-Identify-API-Reference#01G2A279ZXW4JT60NKXKX69G49
9396
+ // prettier-ignore
9397
+ // @ts-ignore
9398
+ window.hj = window.hj || function() {
9399
+ (hj.q = hj.q || []).push(arguments);
9400
+ };
9401
+
9402
+
9403
+
8751
9404
  const $e68207026aca356b$var$currentURL = new URL(window.location.href);
8752
9405
  const $e68207026aca356b$var$microphoneEnabled = $e68207026aca356b$var$currentURL.searchParams.get("microphone-enabled") !== "0";
8753
9406
  const $e68207026aca356b$var$cameraEnabled = $e68207026aca356b$var$currentURL.searchParams.get("camera-enabled") === "1";
@@ -8767,7 +9420,8 @@ const $e68207026aca356b$var$defaultOptions = {
8767
9420
  available: true
8768
9421
  }
8769
9422
  },
8770
- streamApiURL: String("https://apistream.snapcall.io")
9423
+ streamApiURL: String("https://apistream.snapcall.io"),
9424
+ tracking: false
8771
9425
  };
8772
9426
  const $e68207026aca356b$export$3f94917203ab7078 = {
8773
9427
  init: ({ element: element , ...options })=>{
@@ -8776,6 +9430,7 @@ const $e68207026aca356b$export$3f94917203ab7078 = {
8776
9430
  (0, $jQDcL$reactdom.render)(/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ee8cb448c2c74888$export$2e2bcd8739ae039), {
8777
9431
  options: mergedOptions
8778
9432
  }), element);
9433
+ if (mergedOptions.tracking) (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).init(3111933, 6);
8779
9434
  },
8780
9435
  setExtraSettingsOptions: (extraOptions)=>{
8781
9436
  const event = new CustomEvent("streamUISetExtraSettingsOptions", {
@@ -8794,7 +9449,8 @@ const $e68207026aca356b$export$3f94917203ab7078 = {
8794
9449
  dispatchEvent: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).dispatchEvent.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
8795
9450
  getState: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).getState.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
8796
9451
  setProfile: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).setProfile.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
8797
- /* Should not be documented */ setConfig: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).setConfig.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2))
9452
+ /* Should not be documented */ setConfig: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).setConfig.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
9453
+ setLogLevel: (level)=>(0, $d0c6baf97675ab49$export$2e2bcd8739ae039).setLogLevel(level)
8798
9454
  };
8799
9455
  window.streamUI = $e68207026aca356b$export$3f94917203ab7078;
8800
9456
  // Backward compatibility