@snapcall/stream-ui 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stream-ui.esm.js +944 -373
- package/dist/stream-ui.js +943 -372
- package/dist/stream-ui.umd.js +350 -180
- package/dist/types.d.ts +8 -13
- package/package.json +6 -2
package/dist/stream-ui.esm.js
CHANGED
|
@@ -4,12 +4,14 @@ import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster,
|
|
|
4
4
|
import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
|
|
5
5
|
import {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback} from "react";
|
|
6
6
|
import "inobounce";
|
|
7
|
+
import $3Sbms$i18next from "i18next";
|
|
8
|
+
import {initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation} from "react-i18next";
|
|
7
9
|
import {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
|
|
8
10
|
import {v4 as $3Sbms$v4} from "uuid";
|
|
9
11
|
import {WebSocketTransport as $3Sbms$WebSocketTransport, Peer as $3Sbms$Peer} from "protoo-client";
|
|
10
|
-
import {
|
|
11
|
-
import {setTag as $3Sbms$setTag, addBreadcrumb as $3Sbms$addBreadcrumb, captureException as $3Sbms$captureException} from "@sentry/browser";
|
|
12
|
+
import {captureException as $3Sbms$captureException, addBreadcrumb as $3Sbms$addBreadcrumb, setTag as $3Sbms$setTag} from "@sentry/browser";
|
|
12
13
|
import {Producer as $3Sbms$Producer} from "mediasoup-client/lib/Producer";
|
|
14
|
+
import {Device as $3Sbms$Device} from "mediasoup-client";
|
|
13
15
|
import {toCanvas as $3Sbms$toCanvas} from "qrcode";
|
|
14
16
|
|
|
15
17
|
|
|
@@ -304,11 +306,490 @@ const $a5146f9062d7bf28$export$3a57e165650c636f = (message, options = {})=>{
|
|
|
304
306
|
|
|
305
307
|
|
|
306
308
|
|
|
309
|
+
const $a3e657fb86ae23f3$export$604ba5624273df44 = ()=>{
|
|
310
|
+
try {
|
|
311
|
+
const storedTheme = localStorage.getItem("stream_ui_language");
|
|
312
|
+
if (storedTheme) return storedTheme;
|
|
313
|
+
return "en";
|
|
314
|
+
} catch (localStorageError) {
|
|
315
|
+
console.warn(localStorageError);
|
|
316
|
+
return "en";
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
const $18fb8799f38eb407$export$84584c2a98eb6753 = {
|
|
322
|
+
name: "English",
|
|
323
|
+
translation: {
|
|
324
|
+
notifications: {
|
|
325
|
+
screensharingError: "An error occured when trying to toggle screensharing",
|
|
326
|
+
microphoneError: "An error occured when trying to toggle the microphone",
|
|
327
|
+
cameraError: "An error occured when trying to toggle the camera",
|
|
328
|
+
cameraRotateError: "An error occured when trying to rotate the camera",
|
|
329
|
+
noCamera: "No camera available",
|
|
330
|
+
blockedMicrophonePopupTitle: "Camera and microphone are blocked",
|
|
331
|
+
blockedMicrophonePopup: "SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar.",
|
|
332
|
+
reload: "Reload",
|
|
333
|
+
criticalError: "A critical error has occurred (error {{code}}).",
|
|
334
|
+
agentJoinError: "An error occured while trying to join the room as an agent",
|
|
335
|
+
close: "Close",
|
|
336
|
+
connectedTo: "Connected to {{name}}"
|
|
337
|
+
},
|
|
338
|
+
endView: {
|
|
339
|
+
goBack: "Go back to call",
|
|
340
|
+
tooLate: "You arrived too late",
|
|
341
|
+
callIsOver: "The call is over or deleted",
|
|
342
|
+
callEnded: "The call is now ended",
|
|
343
|
+
callLeft: "You left the call"
|
|
344
|
+
},
|
|
345
|
+
menu: {
|
|
346
|
+
title: "Menu",
|
|
347
|
+
new: "NEW",
|
|
348
|
+
openNewTab: "Open new tab",
|
|
349
|
+
quickConnect: "Quick Connect",
|
|
350
|
+
pictureInPicture: "Picture-in-Picture",
|
|
351
|
+
screenSharing: "Screen sharing"
|
|
352
|
+
},
|
|
353
|
+
copyLink: {
|
|
354
|
+
title: "Copy link",
|
|
355
|
+
error: "An error occured when trying to copy to clipboard",
|
|
356
|
+
copied: "Link copied to clipboard"
|
|
357
|
+
},
|
|
358
|
+
quickConnect: {
|
|
359
|
+
title: "Quick Connect",
|
|
360
|
+
scanTitle: "Scan QR Code",
|
|
361
|
+
scan: "Scan this QR code with your phone camera to open the call."
|
|
362
|
+
},
|
|
363
|
+
settings: {
|
|
364
|
+
title: "Settings",
|
|
365
|
+
preferences: "Preferences",
|
|
366
|
+
language: "Language",
|
|
367
|
+
devices: "Devices",
|
|
368
|
+
help: "Help",
|
|
369
|
+
helpCenter: "Go to help center"
|
|
370
|
+
},
|
|
371
|
+
audioMenu: {
|
|
372
|
+
title: "Audio",
|
|
373
|
+
blockedMicrophone: "Microphone is blocked.",
|
|
374
|
+
microphonePermissions: "Please accept microphone sharing before accessing these options."
|
|
375
|
+
},
|
|
376
|
+
videoMenu: {
|
|
377
|
+
title: "Video",
|
|
378
|
+
lowDef: "Low definition (240p)",
|
|
379
|
+
standardDef: "Standard definition (480p)",
|
|
380
|
+
highDef: "High definition (720p)",
|
|
381
|
+
blockedCamera: "Camera is blocked.",
|
|
382
|
+
cameraPermissions: "Please accept camera sharing before accessing these options.",
|
|
383
|
+
sendResolution: "Send Resolution (maximum)"
|
|
384
|
+
},
|
|
385
|
+
shareLink: {
|
|
386
|
+
title: "Share link",
|
|
387
|
+
title2: "Share a link",
|
|
388
|
+
linkUrl: "LINK URL",
|
|
389
|
+
invalid: "Invalid link",
|
|
390
|
+
sentToUsers: "Link sent to users",
|
|
391
|
+
sentToUser: "Link sent to {{user}}",
|
|
392
|
+
failed: "Failed to send link",
|
|
393
|
+
creating: "Link is creating...",
|
|
394
|
+
poweredBy: "Powered by",
|
|
395
|
+
invoice: "{{user}} sent you an invoice.",
|
|
396
|
+
pay: "Pay"
|
|
397
|
+
},
|
|
398
|
+
youtube: {
|
|
399
|
+
title: "Embed YouTube",
|
|
400
|
+
url: "YOUTUBE URL",
|
|
401
|
+
invalid: "Invalid YouTube URL",
|
|
402
|
+
share: "Share video"
|
|
403
|
+
},
|
|
404
|
+
sharedHistory: {
|
|
405
|
+
shared: "Shared with you"
|
|
406
|
+
},
|
|
407
|
+
snapshot: {
|
|
408
|
+
title: "Snapshot",
|
|
409
|
+
shared: "Snapshot shared.",
|
|
410
|
+
sentToUsers: "Snapshot sent to users.",
|
|
411
|
+
sentToUser: "Snapshot sent to {{user}}",
|
|
412
|
+
save: "Save photo",
|
|
413
|
+
error: "An error occured when trying to send the snapshot"
|
|
414
|
+
},
|
|
415
|
+
gdpr: {
|
|
416
|
+
recordedWarning: "To improve the quality of our service, this call will be recorded."
|
|
417
|
+
},
|
|
418
|
+
requestDevice: {
|
|
419
|
+
requestInput: "Request input devices",
|
|
420
|
+
request: "{{user}} would like you to share your {{device}}",
|
|
421
|
+
timedOut: "Your request has timed out.",
|
|
422
|
+
declined: "Your request has been declined.",
|
|
423
|
+
userDeclined: "{{name}} has declined your request."
|
|
424
|
+
},
|
|
425
|
+
leave: {
|
|
426
|
+
title: "Leave",
|
|
427
|
+
leaveCall: "Leave call",
|
|
428
|
+
endCall: "End call for all"
|
|
429
|
+
},
|
|
430
|
+
misc: {
|
|
431
|
+
someone: "Someone",
|
|
432
|
+
camera: "Camera",
|
|
433
|
+
microphone: "Microphone",
|
|
434
|
+
screen: "Screen",
|
|
435
|
+
speaker: "Speaker",
|
|
436
|
+
user: "User",
|
|
437
|
+
open: "Open",
|
|
438
|
+
from: "From",
|
|
439
|
+
accept: "Accept",
|
|
440
|
+
decline: "Decline",
|
|
441
|
+
you: "You"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
448
|
+
name: "Fran\xe7ais",
|
|
449
|
+
translation: {
|
|
450
|
+
notifications: {
|
|
451
|
+
screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
|
|
452
|
+
microphoneError: "Une erreur est survenue pendant l'activation du micro",
|
|
453
|
+
cameraError: "Une erreur est survenue pendant l'activation de la cam\xe9ra",
|
|
454
|
+
cameraRotateError: "Une erreur est survenue pendant la rotation de la cam\xe9ra",
|
|
455
|
+
noCamera: "Aucune cam\xe9ra disponible",
|
|
456
|
+
blockedMicrophonePopupTitle: "Votre cam\xe9ra et micro sont bloqu\xe9s",
|
|
457
|
+
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.",
|
|
458
|
+
reload: "Recharger",
|
|
459
|
+
criticalError: "Une erreur critique est survenue (erreur {{code}}).",
|
|
460
|
+
agentJoinError: "Une erreur est survenue en essayant de rejoindre la salle en tant qu'agent",
|
|
461
|
+
close: "Fermer",
|
|
462
|
+
connectedTo: "Connect\xe9 \xe0 {{name}}"
|
|
463
|
+
},
|
|
464
|
+
endView: {
|
|
465
|
+
goBack: "Retourner dans l'appel",
|
|
466
|
+
tooLate: "Vous \xeates arrivez trop tard",
|
|
467
|
+
callIsOver: "Cet appel est termin\xe9 ou supprim\xe9",
|
|
468
|
+
callEnded: "Cet appel est termin\xe9",
|
|
469
|
+
callLeft: "Vous avez quitt\xe9 l'appel"
|
|
470
|
+
},
|
|
471
|
+
menu: {
|
|
472
|
+
title: "Menu",
|
|
473
|
+
new: "NOUVEAU",
|
|
474
|
+
openNewTab: "Ouvrir un nouvel onglet",
|
|
475
|
+
quickConnect: "Quick Connect",
|
|
476
|
+
pictureInPicture: "Picture-in-Picture",
|
|
477
|
+
screenSharing: "Partage d'\xe9cran"
|
|
478
|
+
},
|
|
479
|
+
copyLink: {
|
|
480
|
+
title: "Copier le lien",
|
|
481
|
+
error: "Une erreur est survenue pendant la copie du lien dans le presse-papier",
|
|
482
|
+
copied: "Lien copi\xe9 dans le presse-papier"
|
|
483
|
+
},
|
|
484
|
+
quickConnect: {
|
|
485
|
+
title: "Quick Connect",
|
|
486
|
+
scanTitle: "Scannez le QR Code",
|
|
487
|
+
scan: "Scannez ce QR code avec votre t\xe9l\xe9phone pour ouvrir l'appel."
|
|
488
|
+
},
|
|
489
|
+
settings: {
|
|
490
|
+
title: "Param\xe8tres",
|
|
491
|
+
preferences: "Pr\xe9f\xe9rences",
|
|
492
|
+
language: "Langage",
|
|
493
|
+
devices: "Appareils",
|
|
494
|
+
help: "Aide",
|
|
495
|
+
helpCenter: "Acc\xe9der au centre d'aide"
|
|
496
|
+
},
|
|
497
|
+
audioMenu: {
|
|
498
|
+
title: "Audio",
|
|
499
|
+
blockedMicrophone: "Votre micro est bloqu\xe9.",
|
|
500
|
+
microphonePermissions: "Please accept microphone sharing before accessing these options."
|
|
501
|
+
},
|
|
502
|
+
videoMenu: {
|
|
503
|
+
title: "Video",
|
|
504
|
+
lowDef: "Basse d\xe9finition (240p)",
|
|
505
|
+
standardDef: "D\xe9finition standard (480p)",
|
|
506
|
+
highDef: "Haute d\xe9finition (720p)",
|
|
507
|
+
blockedCamera: "Votre cam\xe9ra est bloqu\xe9.",
|
|
508
|
+
cameraPermissions: "Please accept camera sharing before accessing these options.",
|
|
509
|
+
sendResolution: "R\xe9solution envoy\xe9e (max)"
|
|
510
|
+
},
|
|
511
|
+
shareLink: {
|
|
512
|
+
title: "Partager un lien",
|
|
513
|
+
title2: "Partager un lien",
|
|
514
|
+
linkUrl: "URL DU LIEN",
|
|
515
|
+
invalid: "Lien invalide",
|
|
516
|
+
sentToUsers: "Lien envoy\xe9 aux participants",
|
|
517
|
+
sentToUser: "Lien envoy\xe9 \xe0 {{user}}",
|
|
518
|
+
failed: "Une erreur est survenue pendant l'envoi du lien",
|
|
519
|
+
creating: "Lien en cours de cr\xe9ation...",
|
|
520
|
+
poweredBy: "Propos\xe9 par",
|
|
521
|
+
invoice: "{{user}} vous a envoy\xe9 une facture.",
|
|
522
|
+
pay: "Payer"
|
|
523
|
+
},
|
|
524
|
+
youtube: {
|
|
525
|
+
title: "YouTube",
|
|
526
|
+
url: "URL YOUTUBE",
|
|
527
|
+
invalid: "URL YouTube invalide",
|
|
528
|
+
share: "Partager la vid\xe9o"
|
|
529
|
+
},
|
|
530
|
+
sharedHistory: {
|
|
531
|
+
shared: "Partag\xe9 avec vous"
|
|
532
|
+
},
|
|
533
|
+
snapshot: {
|
|
534
|
+
title: "Snapshot",
|
|
535
|
+
shared: "Snapshot envoy\xe9.",
|
|
536
|
+
sentToUsers: "Snapshot envoy\xe9 aux participants.",
|
|
537
|
+
sentToUser: "Snapshot envoy\xe9 \xe0 {{user}}",
|
|
538
|
+
save: "Sauvegarder l'image",
|
|
539
|
+
error: "Une erreur est survenue pendant l'envoi du snapshot"
|
|
540
|
+
},
|
|
541
|
+
gdpr: {
|
|
542
|
+
recordedWarning: "Pour am\xe9liorer la qualit\xe9 de notre service, cet appel va \xeatre enregistr\xe9."
|
|
543
|
+
},
|
|
544
|
+
requestDevice: {
|
|
545
|
+
requestInput: "Demander l'activation",
|
|
546
|
+
request: "{{user}} voudrait que vous partagiez votre {{device}}",
|
|
547
|
+
timedOut: "Votre requ\xeate n'a pas eu de r\xe9ponse",
|
|
548
|
+
declined: "Votre requ\xeate a \xe9t\xe9 refus\xe9.",
|
|
549
|
+
userDeclined: "{{name}} a d\xe9clin\xe9 votre requ\xeate."
|
|
550
|
+
},
|
|
551
|
+
leave: {
|
|
552
|
+
title: "Quitter",
|
|
553
|
+
leaveCall: "Quitter l'appel",
|
|
554
|
+
endCall: "Terminer l'appel pour tout le monde"
|
|
555
|
+
},
|
|
556
|
+
misc: {
|
|
557
|
+
someone: "Quelqu'un",
|
|
558
|
+
camera: "Cam\xe9ra",
|
|
559
|
+
microphone: "Micro",
|
|
560
|
+
screen: "\xc9cran",
|
|
561
|
+
speaker: "Haut-parleur",
|
|
562
|
+
user: "Utilisateur",
|
|
563
|
+
open: "Ouvrir",
|
|
564
|
+
from: "Depuis",
|
|
565
|
+
accept: "Accepter",
|
|
566
|
+
decline: "D\xe9cliner",
|
|
567
|
+
you: "Vous"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
|
|
574
|
+
name: "Italiano",
|
|
575
|
+
translation: {
|
|
576
|
+
notifications: {
|
|
577
|
+
screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
|
|
578
|
+
microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
|
|
579
|
+
cameraError: "Si \xe8 verificato un errore durante l'attivazione della fotocamera",
|
|
580
|
+
cameraRotateError: "Si \xe8 verificato un errore durante la rotazione della fotocamera",
|
|
581
|
+
noCamera: "Nessuna fotocamera disponibile",
|
|
582
|
+
blockedMicrophonePopupTitle: "La tua fotocamera e il tuo microfono sono bloccati",
|
|
583
|
+
blockedMicrophonePopup: "SnapCall ha bisogno di accedere alla fotocamera e al microfono. Fare clic sull'icona della fotocamera bloccata nella barra degli indirizzi del browser.",
|
|
584
|
+
reload: "Ricaricare",
|
|
585
|
+
criticalError: "Si \xe8 verificato un errore critico (errore {{code}}).",
|
|
586
|
+
agentJoinError: "Si \xe8 verificato un errore cercando di entrare nella conversazione come agente",
|
|
587
|
+
close: "Chiudere",
|
|
588
|
+
connectedTo: "Connesso a {{name}}"
|
|
589
|
+
},
|
|
590
|
+
endView: {
|
|
591
|
+
goBack: "Torna alla chiamata",
|
|
592
|
+
tooLate: "Sei arrivato troppo tardi",
|
|
593
|
+
callIsOver: "Questa chiamata \xe8 finita o \xe8 stata eliminata",
|
|
594
|
+
callEnded: "Questa chiamata \xe8 finita",
|
|
595
|
+
callLeft: "Hai lasciato la chiamata"
|
|
596
|
+
},
|
|
597
|
+
menu: {
|
|
598
|
+
title: "Men\xf9",
|
|
599
|
+
new: "NUOVO",
|
|
600
|
+
openNewTab: "Apri una nuova scheda",
|
|
601
|
+
quickConnect: "Connessione Rapida",
|
|
602
|
+
pictureInPicture: "Immagine nell'immagine",
|
|
603
|
+
screenSharing: "Condivisione dello schermo"
|
|
604
|
+
},
|
|
605
|
+
copyLink: {
|
|
606
|
+
title: "Copia il link",
|
|
607
|
+
error: "Si \xe8 verificato un errore durante la copia negli Appunti",
|
|
608
|
+
copied: "Link copiato negli Appunti"
|
|
609
|
+
},
|
|
610
|
+
quickConnect: {
|
|
611
|
+
title: "Connessione Rapida",
|
|
612
|
+
scanTitle: "Scansiona il codice QR",
|
|
613
|
+
scan: "Scansiona questo codice QR con il telefono per aprire la chiamata."
|
|
614
|
+
},
|
|
615
|
+
settings: {
|
|
616
|
+
title: "Impostazioni",
|
|
617
|
+
preferences: "Preferenze",
|
|
618
|
+
language: "Linguaggio",
|
|
619
|
+
devices: "Dispositivi",
|
|
620
|
+
help: "Aiuto",
|
|
621
|
+
helpCenter: "Accedi all'Assistenza"
|
|
622
|
+
},
|
|
623
|
+
audioMenu: {
|
|
624
|
+
title: "Audio",
|
|
625
|
+
blockedMicrophone: "Il tuo microfono \xe8 bloccato.",
|
|
626
|
+
microphonePermissions: "Si prega di accettare la condivisione del microfono prima di accedere a queste opzioni."
|
|
627
|
+
},
|
|
628
|
+
videoMenu: {
|
|
629
|
+
title: "Video",
|
|
630
|
+
lowDef: "Definizione bassa (240p)",
|
|
631
|
+
standardDef: "Definizione standard (480p)",
|
|
632
|
+
highDef: "Alta definizione (720p)",
|
|
633
|
+
blockedCamera: "La fotocamera \xe8 bloccata.",
|
|
634
|
+
cameraPermissions: "Si prega di accettare la condivisione della fotocamera prima di accedere a queste opzioni.",
|
|
635
|
+
sendResolution: "Risoluzione inviata (max)"
|
|
636
|
+
},
|
|
637
|
+
shareLink: {
|
|
638
|
+
title: "Condividi un link",
|
|
639
|
+
title2: "Condividi un link",
|
|
640
|
+
linkUrl: "Link URL",
|
|
641
|
+
invalid: "Collegamento non valido",
|
|
642
|
+
sentToUsers: "Link inviato ai partecipanti",
|
|
643
|
+
sentToUser: "Link inviato a {{user}}",
|
|
644
|
+
failed: "Si \xe8 verificato un errore durante l'invio del link",
|
|
645
|
+
creating: "Link che viene creato...",
|
|
646
|
+
poweredBy: "Proposto da",
|
|
647
|
+
invoice: "{{User}} ti ha inviato una fattura.",
|
|
648
|
+
pay: "Paga"
|
|
649
|
+
},
|
|
650
|
+
youtube: {
|
|
651
|
+
title: "YouTube",
|
|
652
|
+
url: "URL YOUTUBE",
|
|
653
|
+
invalid: "URL YouTube non valido",
|
|
654
|
+
share: "Condividi il video"
|
|
655
|
+
},
|
|
656
|
+
sharedHistory: {
|
|
657
|
+
shared: "Condiviso con te"
|
|
658
|
+
},
|
|
659
|
+
snapshot: {
|
|
660
|
+
title: "Schermata",
|
|
661
|
+
shared: "Schermata inviata",
|
|
662
|
+
sentToUsers: "Schermanta inviata ai partecipanti",
|
|
663
|
+
sentToUser: "Schermata inviata a {{user}}",
|
|
664
|
+
save: "Salva l'immagine",
|
|
665
|
+
error: "Si \xe8 verificato un errore durante l'invio della schermata"
|
|
666
|
+
},
|
|
667
|
+
gdpr: {
|
|
668
|
+
recordedWarning: "Per migliorare la qualit\xe0 del nostro servizio, questa chiamata verr\xe0 registrata."
|
|
669
|
+
},
|
|
670
|
+
requestDevice: {
|
|
671
|
+
requestInput: "Richiesta di attivazione",
|
|
672
|
+
request: "{{user}} vorrebbe condividere il tuo {{device}}",
|
|
673
|
+
timedOut: "La tua richiesta non ha ricevuto risposta",
|
|
674
|
+
declined: "La tua richiesta \xe8 stata rifiutata.",
|
|
675
|
+
userDeclined: "{{name}} ha rifiutato la tua richiesta"
|
|
676
|
+
},
|
|
677
|
+
leave: {
|
|
678
|
+
title: "Lasciare",
|
|
679
|
+
leaveCall: "Lascia la chiamata",
|
|
680
|
+
endCall: "Termina la chiamata per tutti"
|
|
681
|
+
},
|
|
682
|
+
misc: {
|
|
683
|
+
someone: "Qualcuno",
|
|
684
|
+
camera: "Telecamera",
|
|
685
|
+
microphone: "Microfono",
|
|
686
|
+
screen: "Schermo",
|
|
687
|
+
speaker: "Altoparlante",
|
|
688
|
+
user: "Utente",
|
|
689
|
+
open: "Aprire",
|
|
690
|
+
from: "Da",
|
|
691
|
+
accept: "Accettare",
|
|
692
|
+
decline: "Declinare",
|
|
693
|
+
you: "Voi"
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
const $384d985bb9605c35$export$150b732325d14d04 = {
|
|
700
|
+
en: $18fb8799f38eb407$export$84584c2a98eb6753,
|
|
701
|
+
fr: $c5472fb74fa04782$export$acb2a88f7d552ebf,
|
|
702
|
+
it: $b7790fb9e48df5c4$export$3486a10f30cf1ee4
|
|
703
|
+
};
|
|
704
|
+
(0, $3Sbms$i18next).use((0, $3Sbms$initReactI18next)).init({
|
|
705
|
+
lng: (0, $a3e657fb86ae23f3$export$604ba5624273df44)(),
|
|
706
|
+
fallbackLng: "en",
|
|
707
|
+
resources: $384d985bb9605c35$export$150b732325d14d04,
|
|
708
|
+
interpolation: {
|
|
709
|
+
escapeValue: false
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
var $384d985bb9605c35$export$2e2bcd8739ae039 = (0, $3Sbms$i18next);
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
307
718
|
|
|
308
719
|
|
|
309
720
|
|
|
310
721
|
|
|
311
722
|
|
|
723
|
+
const $0f65a9eaf4a1e910$var$LogLevel = {
|
|
724
|
+
error: 1,
|
|
725
|
+
warn: 2,
|
|
726
|
+
info: 3,
|
|
727
|
+
log: 4,
|
|
728
|
+
debug: 5
|
|
729
|
+
};
|
|
730
|
+
const $0f65a9eaf4a1e910$var$LevelDescription = {
|
|
731
|
+
1: "error",
|
|
732
|
+
2: "warn",
|
|
733
|
+
3: "info",
|
|
734
|
+
4: "verbose",
|
|
735
|
+
5: "debug"
|
|
736
|
+
};
|
|
737
|
+
let $0f65a9eaf4a1e910$var$logLevel = Number(2);
|
|
738
|
+
const $0f65a9eaf4a1e910$var$dateFormat = new Intl.DateTimeFormat("en-GB", {
|
|
739
|
+
year: "numeric",
|
|
740
|
+
month: "numeric",
|
|
741
|
+
day: "numeric",
|
|
742
|
+
hour: "numeric",
|
|
743
|
+
minute: "numeric",
|
|
744
|
+
second: "numeric",
|
|
745
|
+
timeZone: "GMT"
|
|
746
|
+
});
|
|
747
|
+
class $0f65a9eaf4a1e910$export$2e2bcd8739ae039 {
|
|
748
|
+
constructor(filename, customLogLevel){
|
|
749
|
+
this.filename = filename;
|
|
750
|
+
this.customLogLevel = customLogLevel;
|
|
751
|
+
}
|
|
752
|
+
print(level, logger, scope, ...arg) {
|
|
753
|
+
const head = `[ ${$0f65a9eaf4a1e910$var$dateFormat.format(new Date())} ][ ${$0f65a9eaf4a1e910$var$LevelDescription[level]} ][ ${this.filename} - ${scope} ]`;
|
|
754
|
+
if (level <= (this.customLogLevel || $0f65a9eaf4a1e910$var$logLevel)) logger(head, ...arg);
|
|
755
|
+
else (0, $3Sbms$addBreadcrumb)({
|
|
756
|
+
type: "debug",
|
|
757
|
+
level: $0f65a9eaf4a1e910$var$LevelDescription[level],
|
|
758
|
+
category: "console",
|
|
759
|
+
data: {
|
|
760
|
+
head: head,
|
|
761
|
+
arguments: arg
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
debug(scope, ...arg) {
|
|
766
|
+
this.print($0f65a9eaf4a1e910$var$LogLevel.debug, console.debug, scope, ...arg);
|
|
767
|
+
}
|
|
768
|
+
error(scope, ...arg) {
|
|
769
|
+
this.print($0f65a9eaf4a1e910$var$LogLevel.error, console.error, scope, ...arg);
|
|
770
|
+
}
|
|
771
|
+
info(scope, ...arg) {
|
|
772
|
+
this.print($0f65a9eaf4a1e910$var$LogLevel.info, console.info, scope, ...arg);
|
|
773
|
+
}
|
|
774
|
+
log(scope, ...arg) {
|
|
775
|
+
this.print($0f65a9eaf4a1e910$var$LogLevel.log, console.log, scope, ...arg);
|
|
776
|
+
}
|
|
777
|
+
warn(scope, ...arg) {
|
|
778
|
+
this.print($0f65a9eaf4a1e910$var$LogLevel.warn, console.warn, scope, ...arg);
|
|
779
|
+
}
|
|
780
|
+
deprecated(...arg) {
|
|
781
|
+
console.warn("[ DEPRECATED ]", ...arg);
|
|
782
|
+
}
|
|
783
|
+
static setLogLevel(level) {
|
|
784
|
+
$0f65a9eaf4a1e910$var$logLevel = level;
|
|
785
|
+
}
|
|
786
|
+
setLogLevel(level) {
|
|
787
|
+
this.customLogLevel = level;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
const $67e45b2e30dcc030$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("AudioLevels.ts");
|
|
312
793
|
const $67e45b2e30dcc030$var$audioContextConstructor = window.AudioContext || window.webkitAudioContext;
|
|
313
794
|
const $67e45b2e30dcc030$var$AUDIO_MUTE_DETECTION_TIME = 2000;
|
|
314
795
|
const $67e45b2e30dcc030$var$SPEAK_DETECTION_TIME = 500;
|
|
@@ -406,10 +887,10 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
|
|
|
406
887
|
try {
|
|
407
888
|
this.audioStreamSource.disconnect(this.analyser);
|
|
408
889
|
} catch (err1) {
|
|
409
|
-
|
|
890
|
+
$67e45b2e30dcc030$var$log.error("release", "audioStreamSource failed to disconnect", err1);
|
|
410
891
|
}
|
|
411
892
|
this.audioContext.close().catch((err)=>{
|
|
412
|
-
|
|
893
|
+
$67e45b2e30dcc030$var$log.error("release", "audioContext failed to close", err);
|
|
413
894
|
});
|
|
414
895
|
this.audioLevels = [];
|
|
415
896
|
}
|
|
@@ -419,6 +900,8 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
|
|
|
419
900
|
}
|
|
420
901
|
|
|
421
902
|
|
|
903
|
+
|
|
904
|
+
const $82e31ca38889c079$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("AudioRenderer.ts");
|
|
422
905
|
class $82e31ca38889c079$var$AudioRenderer {
|
|
423
906
|
constructor({ consumerId: consumerId }){
|
|
424
907
|
this.consumerId = consumerId;
|
|
@@ -438,9 +921,12 @@ class $82e31ca38889c079$var$AudioRenderer {
|
|
|
438
921
|
async setSink(sinkId) {
|
|
439
922
|
await this.audio.setSinkId?.(sinkId);
|
|
440
923
|
}
|
|
924
|
+
getSink() {
|
|
925
|
+
return this.audio.sinkId;
|
|
926
|
+
}
|
|
441
927
|
async play() {
|
|
442
928
|
await this.audio.play().catch((err)=>{
|
|
443
|
-
|
|
929
|
+
$82e31ca38889c079$var$log.warn("play", "failed to play");
|
|
444
930
|
setTimeout(()=>{
|
|
445
931
|
this.play();
|
|
446
932
|
}, 1000);
|
|
@@ -511,6 +997,131 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
|
|
|
511
997
|
|
|
512
998
|
|
|
513
999
|
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
const $a2f0e3c29b11c88e$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("StreamerMediasoup");
|
|
1005
|
+
function $a2f0e3c29b11c88e$var$deviceAutoDetection() {
|
|
1006
|
+
try {
|
|
1007
|
+
const ua = navigator.userAgent;
|
|
1008
|
+
const browser = $3Sbms$getParser(ua);
|
|
1009
|
+
$3Sbms$setTag("DeviceDetectionForced", true);
|
|
1010
|
+
$3Sbms$addBreadcrumb({
|
|
1011
|
+
type: "debug",
|
|
1012
|
+
category: "browser",
|
|
1013
|
+
data: browser.getResult()
|
|
1014
|
+
});
|
|
1015
|
+
const browserOs = browser.getOS();
|
|
1016
|
+
if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new (0, $3Sbms$Device)({
|
|
1017
|
+
handlerName: "Safari12"
|
|
1018
|
+
});
|
|
1019
|
+
throw Error("failed to autoDetect browser, falling back to chrome 74");
|
|
1020
|
+
} catch (error) {
|
|
1021
|
+
$a2f0e3c29b11c88e$var$log.error("deviceAutoDetection", error);
|
|
1022
|
+
$3Sbms$captureException(error);
|
|
1023
|
+
}
|
|
1024
|
+
return new (0, $3Sbms$Device)({
|
|
1025
|
+
handlerName: "Chrome74"
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
function $a2f0e3c29b11c88e$var$createDevice() {
|
|
1029
|
+
try {
|
|
1030
|
+
return new (0, $3Sbms$Device)();
|
|
1031
|
+
} catch (error) {
|
|
1032
|
+
$a2f0e3c29b11c88e$var$log.error("failed to detects device from mediasoup, fallback on auto detection", error);
|
|
1033
|
+
return $a2f0e3c29b11c88e$var$deviceAutoDetection();
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
class $a2f0e3c29b11c88e$export$2e2bcd8739ae039 {
|
|
1037
|
+
constructor(device, config){
|
|
1038
|
+
this.mediasoupDevice = device;
|
|
1039
|
+
this.config = config;
|
|
1040
|
+
}
|
|
1041
|
+
static async create(server, config) {
|
|
1042
|
+
const routerRtpCapabilities = await server.request("getRouterRtpCapabilities");
|
|
1043
|
+
routerRtpCapabilities.headerExtensions = routerRtpCapabilities.headerExtensions?.filter((ext)=>{
|
|
1044
|
+
return ext.uri !== "urn:3gpp:video-orientation";
|
|
1045
|
+
});
|
|
1046
|
+
const device = $a2f0e3c29b11c88e$var$createDevice();
|
|
1047
|
+
device.load({
|
|
1048
|
+
routerRtpCapabilities: routerRtpCapabilities
|
|
1049
|
+
});
|
|
1050
|
+
return new $a2f0e3c29b11c88e$export$2e2bcd8739ae039(device, config);
|
|
1051
|
+
}
|
|
1052
|
+
getRtpCapabilities() {
|
|
1053
|
+
return this.mediasoupDevice.rtpCapabilities;
|
|
1054
|
+
}
|
|
1055
|
+
async createTransportConfig(server) {
|
|
1056
|
+
const transportInfo = await server.request("createWebRtcTransport");
|
|
1057
|
+
return {
|
|
1058
|
+
id: transportInfo.id,
|
|
1059
|
+
iceParameters: transportInfo.iceParameters,
|
|
1060
|
+
iceCandidates: transportInfo.iceCandidates,
|
|
1061
|
+
dtlsParameters: {
|
|
1062
|
+
...transportInfo.dtlsParameters,
|
|
1063
|
+
role: "auto"
|
|
1064
|
+
},
|
|
1065
|
+
sctpParameters: transportInfo.sctpParameters,
|
|
1066
|
+
iceServers: this.config.iceServers,
|
|
1067
|
+
proprietaryConstraints: {
|
|
1068
|
+
optional: [
|
|
1069
|
+
{
|
|
1070
|
+
googDscp: true
|
|
1071
|
+
}
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
additionalSettings: {
|
|
1075
|
+
encodedInsertableStreams: false
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
async createSendTransport(server) {
|
|
1080
|
+
const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig(server));
|
|
1081
|
+
sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
1082
|
+
$a2f0e3c29b11c88e$var$log.log("dtlsParameters", sendTransport.id, dtlsParameters);
|
|
1083
|
+
server.request("connectWebRtcTransport", {
|
|
1084
|
+
transportId: sendTransport.id,
|
|
1085
|
+
dtlsParameters: dtlsParameters
|
|
1086
|
+
}).then(callback).catch(errback);
|
|
1087
|
+
});
|
|
1088
|
+
sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
|
|
1089
|
+
try {
|
|
1090
|
+
const { id: id } = await server.request("produce", {
|
|
1091
|
+
transportId: sendTransport.id,
|
|
1092
|
+
kind: kind,
|
|
1093
|
+
rtpParameters: rtpParameters,
|
|
1094
|
+
appData: appData
|
|
1095
|
+
});
|
|
1096
|
+
callback({
|
|
1097
|
+
id: id
|
|
1098
|
+
});
|
|
1099
|
+
$a2f0e3c29b11c88e$var$log.log("producerTransport: ", sendTransport);
|
|
1100
|
+
} catch (error) {
|
|
1101
|
+
errback(error);
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
return sendTransport;
|
|
1105
|
+
}
|
|
1106
|
+
async createRecvTransport(server) {
|
|
1107
|
+
const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig(server));
|
|
1108
|
+
recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
1109
|
+
$a2f0e3c29b11c88e$var$log.log("dtls", recvTransport.id, dtlsParameters);
|
|
1110
|
+
server.request("connectWebRtcTransport", {
|
|
1111
|
+
transportId: recvTransport.id,
|
|
1112
|
+
dtlsParameters: dtlsParameters
|
|
1113
|
+
}).then(callback).catch(errback);
|
|
1114
|
+
});
|
|
1115
|
+
return recvTransport;
|
|
1116
|
+
}
|
|
1117
|
+
async createTransport(server, direction) {
|
|
1118
|
+
if (direction === "send") return await this.createSendTransport(server);
|
|
1119
|
+
else return await this.createRecvTransport(server);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
const $c31e3fb4360572af$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("StreamerClient");
|
|
514
1125
|
const $c31e3fb4360572af$export$818d60b2e626da0c = {
|
|
515
1126
|
WEBRTC_FAILED: "WRTC1",
|
|
516
1127
|
WEBRTC_RECOVER_ERROR: "WRTC2",
|
|
@@ -579,6 +1190,7 @@ class $c31e3fb4360572af$var$SnapcallEvent extends CustomEvent {
|
|
|
579
1190
|
}
|
|
580
1191
|
const $c31e3fb4360572af$var$StreamerEventTargetType = EventTarget;
|
|
581
1192
|
class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$StreamerEventTargetType {
|
|
1193
|
+
mediasoupTransport = {};
|
|
582
1194
|
pendingDeviceRequest = {};
|
|
583
1195
|
joinOptions = {};
|
|
584
1196
|
devicesList = [];
|
|
@@ -733,16 +1345,16 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
733
1345
|
this.joinRoom();
|
|
734
1346
|
});
|
|
735
1347
|
this.protoo.on("failed", ()=>{
|
|
736
|
-
|
|
1348
|
+
$c31e3fb4360572af$var$log.error("protoo.on", "failed");
|
|
737
1349
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
|
|
738
1350
|
});
|
|
739
1351
|
this.protoo.on("disconnected", ()=>{
|
|
740
|
-
|
|
1352
|
+
$c31e3fb4360572af$var$log.error("protoo.on", "disconnected");
|
|
741
1353
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
|
|
742
1354
|
});
|
|
743
|
-
this.protoo.on("close", ()
|
|
1355
|
+
this.protoo.on("close", ()=>$c31e3fb4360572af$var$log.log("protoo.on", "close :("));
|
|
744
1356
|
this.protoo.on("notification", async (notification)=>{
|
|
745
|
-
|
|
1357
|
+
$c31e3fb4360572af$var$log.log("notification", notification);
|
|
746
1358
|
if (notification.method === "newPeer") {
|
|
747
1359
|
const { id: id , profile: profile } = notification.data;
|
|
748
1360
|
this.peers.set(id, {
|
|
@@ -878,158 +1490,59 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
878
1490
|
}
|
|
879
1491
|
});
|
|
880
1492
|
}
|
|
881
|
-
deviceAutoDetection() {
|
|
882
|
-
try {
|
|
883
|
-
const ua = navigator.userAgent;
|
|
884
|
-
const browser = $3Sbms$getParser(ua);
|
|
885
|
-
$3Sbms$setTag("DeviceDetectionForced", true);
|
|
886
|
-
$3Sbms$addBreadcrumb({
|
|
887
|
-
type: "debug",
|
|
888
|
-
category: "browser",
|
|
889
|
-
data: browser.getResult()
|
|
890
|
-
});
|
|
891
|
-
const browserOs = browser.getOS();
|
|
892
|
-
if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new $3Sbms$Device({
|
|
893
|
-
handlerName: "Safari12"
|
|
894
|
-
});
|
|
895
|
-
throw Error("failed to autoDetect browser, falling back to chrome 74");
|
|
896
|
-
} catch (error) {
|
|
897
|
-
console.error(error);
|
|
898
|
-
$3Sbms$captureException(error);
|
|
899
|
-
this.dispatchEvent(new CustomEvent("browserDetectionFailed"));
|
|
900
|
-
}
|
|
901
|
-
return new $3Sbms$Device({
|
|
902
|
-
handlerName: "Chrome74"
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
createDevice() {
|
|
906
|
-
try {
|
|
907
|
-
return new $3Sbms$Device();
|
|
908
|
-
} catch (error) {
|
|
909
|
-
console.error("failed to detects device from mediasoup, fallback on auto detection", error);
|
|
910
|
-
return this.deviceAutoDetection();
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
1493
|
closeWebrtcTransport(transport) {
|
|
914
|
-
transport?.transport
|
|
1494
|
+
transport?.transport?.close();
|
|
915
1495
|
clearTimeout(transport?.disconnectTimeout);
|
|
916
1496
|
}
|
|
917
|
-
async
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
iceParameters: transportInfo.iceParameters,
|
|
922
|
-
iceCandidates: transportInfo.iceCandidates,
|
|
923
|
-
dtlsParameters: {
|
|
924
|
-
...transportInfo.dtlsParameters,
|
|
925
|
-
role: "auto"
|
|
926
|
-
},
|
|
927
|
-
sctpParameters: transportInfo.sctpParameters,
|
|
928
|
-
iceServers: this.config.iceServers,
|
|
929
|
-
proprietaryConstraints: {
|
|
930
|
-
optional: [
|
|
931
|
-
{
|
|
932
|
-
googDscp: true
|
|
933
|
-
}
|
|
934
|
-
]
|
|
935
|
-
},
|
|
936
|
-
additionalSettings: {
|
|
937
|
-
encodedInsertableStreams: false
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
}
|
|
941
|
-
async createSendTransport(kind1) {
|
|
942
|
-
const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig());
|
|
943
|
-
sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
944
|
-
console.log("dtlsParameters", sendTransport.id, dtlsParameters);
|
|
945
|
-
this.protoo.request("connectWebRtcTransport", {
|
|
946
|
-
transportId: sendTransport.id,
|
|
947
|
-
dtlsParameters: dtlsParameters
|
|
948
|
-
}).then(callback).catch(errback);
|
|
949
|
-
});
|
|
950
|
-
sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
|
|
1497
|
+
async getTransport(kind, direction) {
|
|
1498
|
+
if (!this.streamerMediasoup) throw new Error("streamerMediasoup not initialized");
|
|
1499
|
+
let transport = this.mediasoupTransport[`${kind}-${direction}`];
|
|
1500
|
+
if (!transport) {
|
|
951
1501
|
try {
|
|
952
|
-
const
|
|
953
|
-
|
|
1502
|
+
const promise = this.streamerMediasoup.createTransport(this.protoo, direction);
|
|
1503
|
+
transport = {
|
|
1504
|
+
disconnectTimeout: undefined,
|
|
954
1505
|
kind: kind,
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
errback(error);
|
|
1506
|
+
createPromise: promise
|
|
1507
|
+
};
|
|
1508
|
+
this.mediasoupTransport[`${kind}-${direction}`] = transport;
|
|
1509
|
+
transport.transport = await promise;
|
|
1510
|
+
if (transport.transport) this.listenWebRTCTransportStates(transport);
|
|
1511
|
+
} catch (err) {
|
|
1512
|
+
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
|
|
1513
|
+
throw err;
|
|
964
1514
|
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
disconnectTimeout: undefined,
|
|
969
|
-
kind: kind1
|
|
970
|
-
};
|
|
971
|
-
this.listenWebRTCTransportStats(result);
|
|
972
|
-
return result;
|
|
973
|
-
}
|
|
974
|
-
async createRecvTransport(kind) {
|
|
975
|
-
const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig());
|
|
976
|
-
recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
977
|
-
console.log("dtls", recvTransport.id, dtlsParameters);
|
|
978
|
-
this.protoo.request("connectWebRtcTransport", {
|
|
979
|
-
transportId: recvTransport.id,
|
|
980
|
-
dtlsParameters: dtlsParameters
|
|
981
|
-
}).then(callback).catch(errback);
|
|
982
|
-
});
|
|
983
|
-
const result = {
|
|
984
|
-
transport: recvTransport,
|
|
985
|
-
disconnectTimeout: undefined,
|
|
986
|
-
kind: kind
|
|
987
|
-
};
|
|
988
|
-
this.listenWebRTCTransportStats(result);
|
|
989
|
-
return result;
|
|
1515
|
+
return transport.transport;
|
|
1516
|
+
} else if (transport && transport.transport) return transport.transport;
|
|
1517
|
+
else return transport.createPromise;
|
|
990
1518
|
}
|
|
991
|
-
|
|
1519
|
+
listenWebRTCTransportStates(transport) {
|
|
1520
|
+
if (!transport.transport) throw new Error("can not listen states of undefined transport");
|
|
992
1521
|
transport.transport.on("connectionstatechange", (event)=>{
|
|
993
|
-
if (!transport.transport.closed) {
|
|
994
|
-
|
|
1522
|
+
if (transport.transport && !transport.transport.closed) {
|
|
1523
|
+
$c31e3fb4360572af$var$log.log("recv connectionstatechange: ", event);
|
|
995
1524
|
if (event === "disconnected") transport.disconnectTimeout = setTimeout(()=>{
|
|
996
|
-
|
|
997
|
-
this.restartIce(transport.transport);
|
|
1525
|
+
$c31e3fb4360572af$var$log.log("listenWebRTCTransportStats", `trying to restart transport for ${transport.kind}`);
|
|
1526
|
+
if (transport.transport) this.restartIce(transport.transport);
|
|
998
1527
|
}, 5000);
|
|
999
1528
|
else if (event === "connected") clearTimeout(transport.disconnectTimeout);
|
|
1000
1529
|
else if (event === "failed") {
|
|
1001
1530
|
const err = new Error(`webRTC transport state failed for ${transport.kind}`);
|
|
1002
1531
|
$3Sbms$captureException(err, {
|
|
1003
1532
|
extra: {
|
|
1004
|
-
direction: transport.transport
|
|
1005
|
-
id: transport.transport
|
|
1533
|
+
direction: transport.transport?.direction,
|
|
1534
|
+
id: transport.transport?.id,
|
|
1006
1535
|
kind: transport.kind
|
|
1007
1536
|
}
|
|
1008
1537
|
});
|
|
1009
|
-
|
|
1538
|
+
$c31e3fb4360572af$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
|
|
1010
1539
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_FAILED);
|
|
1011
1540
|
}
|
|
1012
1541
|
}
|
|
1013
1542
|
});
|
|
1014
1543
|
}
|
|
1015
1544
|
async joinRoom() {
|
|
1016
|
-
this.
|
|
1017
|
-
this.routerRtpCapabilities = await this.protoo.request("getRouterRtpCapabilities");
|
|
1018
|
-
this.routerRtpCapabilities.headerExtensions = this.routerRtpCapabilities.headerExtensions?.filter((ext)=>{
|
|
1019
|
-
return ext.uri !== "urn:3gpp:video-orientation";
|
|
1020
|
-
});
|
|
1021
|
-
await this.mediasoupDevice.load({
|
|
1022
|
-
routerRtpCapabilities: this.routerRtpCapabilities
|
|
1023
|
-
});
|
|
1024
|
-
try {
|
|
1025
|
-
this.recvAudioTransports = await this.createRecvTransport("audio");
|
|
1026
|
-
this.sendAudioTransports = await this.createSendTransport("audio");
|
|
1027
|
-
this.recvVideoTransports = await this.createRecvTransport("video");
|
|
1028
|
-
this.sendVideoTransports = await this.createSendTransport("video");
|
|
1029
|
-
} catch (err) {
|
|
1030
|
-
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
|
|
1031
|
-
throw err;
|
|
1032
|
-
}
|
|
1545
|
+
this.streamerMediasoup = await (0, $a2f0e3c29b11c88e$export$2e2bcd8739ae039).create(this.protoo, this.config);
|
|
1033
1546
|
// now we join
|
|
1034
1547
|
if (this.joinOptions.apiKey && this.joinOptions.email) try {
|
|
1035
1548
|
const agentInfo = await this.fetchAgentInfo({
|
|
@@ -1043,7 +1556,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1043
1556
|
}
|
|
1044
1557
|
}));
|
|
1045
1558
|
} catch (agentInfoError) {
|
|
1046
|
-
|
|
1559
|
+
$c31e3fb4360572af$var$log.warn("joinRoom", agentInfoError);
|
|
1047
1560
|
this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("agentIdentity", {
|
|
1048
1561
|
detail: {
|
|
1049
1562
|
success: false
|
|
@@ -1074,7 +1587,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1074
1587
|
callId: callId
|
|
1075
1588
|
}
|
|
1076
1589
|
}));
|
|
1077
|
-
|
|
1590
|
+
$c31e3fb4360572af$var$log.log("joinRoom", "peers", peers);
|
|
1078
1591
|
if (this.joinOptions.displayName) await this.setDisplayName(this.joinOptions.displayName);
|
|
1079
1592
|
if (this.joinOptions.profile) await this.setProfile(this.joinOptions.profile);
|
|
1080
1593
|
// Consume Peers
|
|
@@ -1087,12 +1600,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1087
1600
|
}
|
|
1088
1601
|
async switchMicrophone(deviceId) {
|
|
1089
1602
|
try {
|
|
1090
|
-
|
|
1603
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "switching Microphone");
|
|
1091
1604
|
this.audioLevel?.release();
|
|
1092
1605
|
this.audioLevel = undefined;
|
|
1093
1606
|
if (this.micProducer && this.micProducer.track) {
|
|
1094
1607
|
this.micProducer?.track?.stop();
|
|
1095
|
-
|
|
1608
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "stopping previous track");
|
|
1096
1609
|
}
|
|
1097
1610
|
const stream = await this.handleGetUserMediaError("microphone", navigator.mediaDevices.getUserMedia({
|
|
1098
1611
|
audio: {
|
|
@@ -1102,14 +1615,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1102
1615
|
}
|
|
1103
1616
|
}));
|
|
1104
1617
|
this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
|
|
1105
|
-
this.audioLevel.analyse();
|
|
1618
|
+
// this.audioLevel.analyse();
|
|
1106
1619
|
const track = stream.getAudioTracks()[0];
|
|
1107
1620
|
await this.micProducer?.replaceTrack({
|
|
1108
1621
|
track: track
|
|
1109
1622
|
});
|
|
1110
|
-
|
|
1623
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "switched Microphone");
|
|
1111
1624
|
} catch (error) {
|
|
1112
|
-
|
|
1625
|
+
$c31e3fb4360572af$var$log.error("switchMicrophone error", error);
|
|
1113
1626
|
await this.closeMicrophoneProducer();
|
|
1114
1627
|
}
|
|
1115
1628
|
}
|
|
@@ -1126,7 +1639,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1126
1639
|
});
|
|
1127
1640
|
}
|
|
1128
1641
|
async onDeviceChange() {
|
|
1129
|
-
|
|
1642
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "detecting device change");
|
|
1130
1643
|
const deviceListChangeEvent = new $c31e3fb4360572af$var$SnapcallEvent("devicesListChange", {
|
|
1131
1644
|
detail: {}
|
|
1132
1645
|
});
|
|
@@ -1136,7 +1649,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1136
1649
|
const inputs = lists.filter((media)=>media.kind === "audioinput");
|
|
1137
1650
|
// chrome default device
|
|
1138
1651
|
if (inputs.length === 0) {
|
|
1139
|
-
|
|
1652
|
+
$c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input device");
|
|
1140
1653
|
await this.closeMicrophoneProducer();
|
|
1141
1654
|
return;
|
|
1142
1655
|
}
|
|
@@ -1147,21 +1660,21 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1147
1660
|
const change = lists.filter((elements)=>{
|
|
1148
1661
|
return !Boolean(this.devicesList.find((device)=>device.deviceId === elements.deviceId && device.label === elements.label));
|
|
1149
1662
|
});
|
|
1150
|
-
|
|
1663
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", change);
|
|
1151
1664
|
this.devicesList = lists;
|
|
1152
1665
|
const hasAudioInputChange = Boolean(change.find((device)=>device.kind === "audioinput"));
|
|
1153
1666
|
if (change.length !== 0 && hasAudioInputChange === false) {
|
|
1154
|
-
|
|
1667
|
+
$c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input change");
|
|
1155
1668
|
return;
|
|
1156
1669
|
}
|
|
1157
|
-
|
|
1670
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "detecting audio input change");
|
|
1158
1671
|
if (!this.audioInputDefaultDevice || this.audioInputDefaultDevice.label !== defaultDevice.label) {
|
|
1159
1672
|
const event = new $c31e3fb4360572af$var$SnapcallEvent("defaultAudioDeviceChange", {
|
|
1160
1673
|
detail: defaultDevice
|
|
1161
1674
|
});
|
|
1162
1675
|
this.audioInputDefaultDevice = defaultDevice;
|
|
1163
1676
|
this.dispatchEvent(event);
|
|
1164
|
-
|
|
1677
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
|
|
1165
1678
|
}
|
|
1166
1679
|
this.switchMicrophone("default");
|
|
1167
1680
|
}
|
|
@@ -1176,12 +1689,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1176
1689
|
}
|
|
1177
1690
|
}));
|
|
1178
1691
|
this.devicesList = await navigator.mediaDevices.enumerateDevices();
|
|
1179
|
-
|
|
1692
|
+
const transport = await this.getTransport("audio", "send");
|
|
1180
1693
|
this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
|
|
1181
|
-
this.audioLevel.analyse();
|
|
1694
|
+
// this.audioLevel.analyse();
|
|
1182
1695
|
const track = stream.getAudioTracks()[0];
|
|
1183
1696
|
const deviceType = "microphone";
|
|
1184
|
-
const micProducer = await
|
|
1697
|
+
const micProducer = await transport.produce({
|
|
1185
1698
|
track: track,
|
|
1186
1699
|
codecOptions: {
|
|
1187
1700
|
opusStereo: true,
|
|
@@ -1192,13 +1705,13 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1192
1705
|
}
|
|
1193
1706
|
});
|
|
1194
1707
|
micProducer.on("transportclose", ()=>{
|
|
1195
|
-
|
|
1708
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "micproducer transportclose");
|
|
1196
1709
|
});
|
|
1197
1710
|
track.addEventListener("ended", ()=>{
|
|
1198
|
-
|
|
1711
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "track ended!");
|
|
1199
1712
|
});
|
|
1200
1713
|
micProducer.on("trackended", async ()=>{
|
|
1201
|
-
|
|
1714
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "microphone disconnected!");
|
|
1202
1715
|
if (navigator.mediaDevices.ondevicechange === undefined) this.closeMicrophoneProducer();
|
|
1203
1716
|
});
|
|
1204
1717
|
this.micProducer = micProducer;
|
|
@@ -1251,11 +1764,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1251
1764
|
}
|
|
1252
1765
|
}
|
|
1253
1766
|
release() {
|
|
1254
|
-
|
|
1255
|
-
this.closeWebrtcTransport(this.
|
|
1256
|
-
this.closeWebrtcTransport(this.recvAudioTransports);
|
|
1257
|
-
this.closeWebrtcTransport(this.sendVideoTransports);
|
|
1258
|
-
this.closeWebrtcTransport(this.recvVideoTransports);
|
|
1767
|
+
$c31e3fb4360572af$var$log.log("release");
|
|
1768
|
+
for(let key in this.mediasoupTransport)this.closeWebrtcTransport(this.mediasoupTransport[key]);
|
|
1259
1769
|
this.webcamTrack?.stop();
|
|
1260
1770
|
this.webcamTrack = null;
|
|
1261
1771
|
this.protooTransport.close();
|
|
@@ -1327,18 +1837,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1327
1837
|
}
|
|
1328
1838
|
}
|
|
1329
1839
|
async restartIce(transport) {
|
|
1330
|
-
|
|
1840
|
+
$c31e3fb4360572af$var$log.log("restartIce", transport.connectionState, transport.closed);
|
|
1331
1841
|
if (transport.connectionState === "disconnected" && !transport.closed) try {
|
|
1332
1842
|
const iceParameters = await this.protoo.request("restartIce", {
|
|
1333
1843
|
transportId: transport.id
|
|
1334
1844
|
});
|
|
1335
|
-
|
|
1845
|
+
$c31e3fb4360572af$var$log.log("restartIce", iceParameters);
|
|
1336
1846
|
await transport.restartIce({
|
|
1337
1847
|
iceParameters: iceParameters
|
|
1338
1848
|
});
|
|
1339
1849
|
} catch (err) {
|
|
1340
1850
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
|
|
1341
|
-
|
|
1851
|
+
$c31e3fb4360572af$var$log.log("restartIce", "restartIceFailed", err);
|
|
1342
1852
|
$3Sbms$captureException(err, {
|
|
1343
1853
|
extra: {
|
|
1344
1854
|
direction: transport.direction,
|
|
@@ -1352,7 +1862,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1352
1862
|
if (scale === 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["vga"];
|
|
1353
1863
|
else if (scale > 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["qvga"];
|
|
1354
1864
|
if (!this.webcam.resolution || $c31e3fb4360572af$export$d21ffcc5eb136bfa[this.webcam.resolution].qualityIndex >= videoResolution.qualityIndex) {
|
|
1355
|
-
|
|
1865
|
+
$c31e3fb4360572af$var$log.log("scaleVideoMediasConstraintsParameter", `scaling video by ${scale}`, videoResolution);
|
|
1356
1866
|
this.webcamProducer?.track?.applyConstraints(videoResolution);
|
|
1357
1867
|
}
|
|
1358
1868
|
}
|
|
@@ -1374,14 +1884,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1374
1884
|
};
|
|
1375
1885
|
if (!(0, $3Sbms$Producer).prototype.setRtpEncodingParameters) return this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
|
|
1376
1886
|
if (this.webcamProducer && !this.webcamProducer.closed) {
|
|
1377
|
-
|
|
1887
|
+
$c31e3fb4360572af$var$log.log("scaleVideoEncodingsParameter", `scaling video by ${scale.scaleResolutionDownBy}`);
|
|
1378
1888
|
this.webcamProducer?.setRtpEncodingParameters?.(scale).catch((err)=>{
|
|
1379
|
-
|
|
1889
|
+
$c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleResolutionDownBy not supported", err);
|
|
1380
1890
|
this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
|
|
1381
1891
|
});
|
|
1382
1892
|
}
|
|
1383
1893
|
} catch (error) {
|
|
1384
|
-
|
|
1894
|
+
$c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleVideo error", error);
|
|
1385
1895
|
}
|
|
1386
1896
|
}
|
|
1387
1897
|
async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
|
|
@@ -1408,7 +1918,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1408
1918
|
...$c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution]
|
|
1409
1919
|
}
|
|
1410
1920
|
}));
|
|
1411
|
-
|
|
1921
|
+
const transport = await this.getTransport("video", "send");
|
|
1922
|
+
if (!transport) throw new Error("video transport not found, can not switch");
|
|
1412
1923
|
const track = stream.getVideoTracks()[0];
|
|
1413
1924
|
this.webcamTrack = track;
|
|
1414
1925
|
await this.webcamProducer?.replaceTrack?.({
|
|
@@ -1439,7 +1950,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1439
1950
|
...$c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution]
|
|
1440
1951
|
}
|
|
1441
1952
|
}));
|
|
1442
|
-
|
|
1953
|
+
await this.updateWebcams();
|
|
1954
|
+
const transport = await this.getTransport("video", "send");
|
|
1443
1955
|
const track = stream.getVideoTracks()[0];
|
|
1444
1956
|
this.webcamTrack = track;
|
|
1445
1957
|
const capabilities = await track.getCapabilities?.() || navigator.mediaDevices.getSupportedConstraints?.();
|
|
@@ -1453,7 +1965,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1453
1965
|
videoGoogleStartBitrate: 1000
|
|
1454
1966
|
};
|
|
1455
1967
|
const deviceType = "webcam";
|
|
1456
|
-
this.webcamProducer = await
|
|
1968
|
+
this.webcamProducer = await transport.produce({
|
|
1457
1969
|
track: track,
|
|
1458
1970
|
encodings: encodings,
|
|
1459
1971
|
codecOptions: codecOptions,
|
|
@@ -1533,14 +2045,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1533
2045
|
}
|
|
1534
2046
|
}));
|
|
1535
2047
|
if (!stream) return;
|
|
1536
|
-
|
|
2048
|
+
const transport = await this.getTransport("video", "send");
|
|
1537
2049
|
const track = stream.getVideoTracks()[0];
|
|
1538
2050
|
const encodings = undefined;
|
|
1539
2051
|
const codecOptions = {
|
|
1540
2052
|
videoGoogleStartBitrate: 1000
|
|
1541
2053
|
};
|
|
1542
2054
|
let deviceType = "screen";
|
|
1543
|
-
this.screenshareProducer = await
|
|
2055
|
+
this.screenshareProducer = await transport.produce({
|
|
1544
2056
|
track: track,
|
|
1545
2057
|
encodings: encodings,
|
|
1546
2058
|
codecOptions: codecOptions,
|
|
@@ -1600,11 +2112,11 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1600
2112
|
const consumer = this.consumers.get(mediaId);
|
|
1601
2113
|
if (consumer) {
|
|
1602
2114
|
const mediaStream = new MediaStream();
|
|
1603
|
-
mediaStream.onremovetrack = ()
|
|
1604
|
-
consumer.mediaSoupConsumer.track.onended = ()
|
|
2115
|
+
mediaStream.onremovetrack = ()=>$c31e3fb4360572af$var$log.log("requestVideo", "Remove Track");
|
|
2116
|
+
consumer.mediaSoupConsumer.track.onended = ()=>$c31e3fb4360572af$var$log.log("requestVideo", "Track Ended");
|
|
1605
2117
|
mediaStream.addTrack(consumer.mediaSoupConsumer.track);
|
|
1606
2118
|
element.srcObject = mediaStream;
|
|
1607
|
-
} else
|
|
2119
|
+
} else $c31e3fb4360572af$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
|
|
1608
2120
|
}
|
|
1609
2121
|
async captureVideo(videoElement) {
|
|
1610
2122
|
let image;
|
|
@@ -1629,7 +2141,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1629
2141
|
const mediaStream = new MediaStream();
|
|
1630
2142
|
mediaStream.addTrack(this.screenshareProducer.track);
|
|
1631
2143
|
element.srcObject = mediaStream;
|
|
1632
|
-
} else
|
|
2144
|
+
} else $c31e3fb4360572af$var$log.log("requestLocalScreenshare", "screenshare producer not available yet");
|
|
1633
2145
|
}
|
|
1634
2146
|
consumePeer({ peerId: peerId , producersData: producersData }) {
|
|
1635
2147
|
producersData.forEach((producerData)=>{
|
|
@@ -1641,18 +2153,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1641
2153
|
});
|
|
1642
2154
|
});
|
|
1643
2155
|
}
|
|
1644
|
-
getRecvTransport(deviceType) {
|
|
1645
|
-
if (deviceType === "microphone") return this.recvAudioTransports;
|
|
1646
|
-
else return this.recvVideoTransports;
|
|
1647
|
-
}
|
|
1648
2156
|
async consumeProducer({ peerId: peerId , producerId: producerId , deviceType: deviceType , paused: paused }) {
|
|
1649
|
-
const
|
|
1650
|
-
|
|
2157
|
+
const mediaKind = deviceType === "microphone" ? "audio" : "video";
|
|
2158
|
+
const transport = await this.getTransport(mediaKind, "recv");
|
|
1651
2159
|
const data = await this.protoo.request("consume", {
|
|
1652
2160
|
peerId: peerId,
|
|
1653
2161
|
producerId: producerId,
|
|
1654
|
-
transportId: transport.
|
|
1655
|
-
rtpCapabilities: this.
|
|
2162
|
+
transportId: transport.id,
|
|
2163
|
+
rtpCapabilities: this.streamerMediasoup.getRtpCapabilities()
|
|
1656
2164
|
});
|
|
1657
2165
|
const peer = this.peers.get(peerId);
|
|
1658
2166
|
if (peer) peer.producersData.push({
|
|
@@ -1661,9 +2169,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1661
2169
|
paused: paused
|
|
1662
2170
|
});
|
|
1663
2171
|
const { producerId: resolvedProducerId , id: id , kind: kind , rtpParameters: rtpParameters , appData: appData } = data;
|
|
1664
|
-
|
|
2172
|
+
$c31e3fb4360572af$var$log.log("consumeProducer", "Data: ", data);
|
|
1665
2173
|
try {
|
|
1666
|
-
const consumer = await transport.
|
|
2174
|
+
const consumer = await transport.consume({
|
|
1667
2175
|
id: id,
|
|
1668
2176
|
producerId: resolvedProducerId,
|
|
1669
2177
|
kind: kind,
|
|
@@ -1673,8 +2181,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1673
2181
|
peerId: peerId
|
|
1674
2182
|
}
|
|
1675
2183
|
});
|
|
1676
|
-
|
|
1677
|
-
|
|
2184
|
+
$c31e3fb4360572af$var$log.log("transport", transport);
|
|
2185
|
+
$c31e3fb4360572af$var$log.log("consumer", consumer);
|
|
1678
2186
|
this.consumers.set(consumer.id, {
|
|
1679
2187
|
mediaSoupConsumer: consumer,
|
|
1680
2188
|
deviceType: deviceType
|
|
@@ -1701,7 +2209,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1701
2209
|
});
|
|
1702
2210
|
} catch (error) {
|
|
1703
2211
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CONSUME_ERROR);
|
|
1704
|
-
|
|
2212
|
+
$c31e3fb4360572af$var$log.error("consumeProducer", "newConsumer request failed", error);
|
|
1705
2213
|
throw error;
|
|
1706
2214
|
}
|
|
1707
2215
|
}
|
|
@@ -1745,7 +2253,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1745
2253
|
const { callId: callId } = await this.protoo.request("getCallId");
|
|
1746
2254
|
return callId;
|
|
1747
2255
|
} catch (err) {
|
|
1748
|
-
|
|
2256
|
+
$c31e3fb4360572af$var$log.error("getCallId", "Failed to get callId");
|
|
1749
2257
|
throw err;
|
|
1750
2258
|
}
|
|
1751
2259
|
}
|
|
@@ -1819,6 +2327,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1819
2327
|
getCurrentWebcam() {
|
|
1820
2328
|
return this.webcam;
|
|
1821
2329
|
}
|
|
2330
|
+
getCurrentMicrophoneId() {
|
|
2331
|
+
return this.micProducer?.track?.getSettings().deviceId;
|
|
2332
|
+
}
|
|
2333
|
+
getCurrentSpeakerId() {
|
|
2334
|
+
const audioRendererKeys = Object.keys(this.audioRenderers);
|
|
2335
|
+
const firstRenderer = this.audioRenderers[audioRendererKeys[0]];
|
|
2336
|
+
if (firstRenderer) {
|
|
2337
|
+
const sinkId = firstRenderer.getSink();
|
|
2338
|
+
if (sinkId) return sinkId;
|
|
2339
|
+
}
|
|
2340
|
+
return "default";
|
|
2341
|
+
}
|
|
1822
2342
|
async setWebcamResolution(resolution) {
|
|
1823
2343
|
if (this.webcam.device) await this.switchWebcam({
|
|
1824
2344
|
resolution: resolution
|
|
@@ -1848,7 +2368,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1848
2368
|
await this.audioRenderers[consumerId]?.play();
|
|
1849
2369
|
}
|
|
1850
2370
|
async setAudioSink(sinkId) {
|
|
1851
|
-
const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)
|
|
2371
|
+
const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)=>$c31e3fb4360572af$var$log.warn("setAudioSink", "Failed to setSinkId on renderer (consumerId: %s): ", consumerId, err)));
|
|
1852
2372
|
await Promise.allSettled(promises);
|
|
1853
2373
|
}
|
|
1854
2374
|
dispatchEvent(event) {
|
|
@@ -1856,12 +2376,6 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1856
2376
|
window.dispatchEvent(event);
|
|
1857
2377
|
return result;
|
|
1858
2378
|
}
|
|
1859
|
-
async getShareLinkData(url) {
|
|
1860
|
-
const data = await this.protoo.request("shareLink", {
|
|
1861
|
-
url: url
|
|
1862
|
-
});
|
|
1863
|
-
return data;
|
|
1864
|
-
}
|
|
1865
2379
|
async fetchAgentInfo({ apiKey: apiKey , email: email }) {
|
|
1866
2380
|
const apiURL = this.config.apiUrl;
|
|
1867
2381
|
const agent = await fetch(`${apiURL}/agents/${email}`, {
|
|
@@ -2210,6 +2724,7 @@ const $2da9626742e3560b$export$5170987d58ae338d = ()=>/*#__PURE__*/ (0, $3Sbms$j
|
|
|
2210
2724
|
|
|
2211
2725
|
|
|
2212
2726
|
|
|
2727
|
+
|
|
2213
2728
|
const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
|
|
2214
2729
|
(0, $3Sbms$useEffect)(()=>{
|
|
2215
2730
|
const onWindowClick = (event)=>{
|
|
@@ -2230,6 +2745,7 @@ const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
|
|
|
2230
2745
|
|
|
2231
2746
|
|
|
2232
2747
|
|
|
2748
|
+
|
|
2233
2749
|
const $4ee077ee5e6fe3e7$export$d00c23c5e97ada8 = (0, $3Sbms$styledcomponents).div`
|
|
2234
2750
|
display: flex;
|
|
2235
2751
|
flex-direction: column;
|
|
@@ -2293,6 +2809,7 @@ const $4ee077ee5e6fe3e7$export$6755b81a599fadda = (0, $3Sbms$styledcomponents).s
|
|
|
2293
2809
|
|
|
2294
2810
|
|
|
2295
2811
|
const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
|
|
2812
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2296
2813
|
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$b286f91cddfedb5a), {
|
|
2297
2814
|
children: categories.map((category)=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4ee077ee5e6fe3e7$export$d00c23c5e97ada8), {
|
|
2298
2815
|
children: [
|
|
@@ -2314,7 +2831,7 @@ const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
|
|
|
2314
2831
|
}),
|
|
2315
2832
|
item.title,
|
|
2316
2833
|
item.isNew && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$6755b81a599fadda), {
|
|
2317
|
-
children: "
|
|
2834
|
+
children: t("menu.new")
|
|
2318
2835
|
})
|
|
2319
2836
|
]
|
|
2320
2837
|
}, item.id))
|
|
@@ -2406,6 +2923,7 @@ const $ab29487ffcc05855$export$c4e460d5c7d83bc3 = (0, $3Sbms$styledcomponents).d
|
|
|
2406
2923
|
|
|
2407
2924
|
|
|
2408
2925
|
const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories , extraCategories: extraCategories })=>{
|
|
2926
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2409
2927
|
const settingsOptionsContainerRef = (0, $3Sbms$useRef)(null);
|
|
2410
2928
|
const [displaySettingsOptions, setDisplaySettingsOptions] = (0, $3Sbms$useState)(false);
|
|
2411
2929
|
const [menuCategories, setMenuCategories] = (0, $3Sbms$useState)(baseCategories);
|
|
@@ -2498,7 +3016,7 @@ const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories ,
|
|
|
2498
3016
|
children: [
|
|
2499
3017
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$e2457e1974c298c3), {
|
|
2500
3018
|
onClick: onSettingsButtonClick,
|
|
2501
|
-
children: "
|
|
3019
|
+
children: t("menu.title")
|
|
2502
3020
|
}),
|
|
2503
3021
|
displaySettingsOptions && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$c4e460d5c7d83bc3), {
|
|
2504
3022
|
ref: settingsOptionsContainerRef,
|
|
@@ -2515,6 +3033,7 @@ var $ae6e25be45301335$export$2e2bcd8739ae039 = $ae6e25be45301335$var$HeaderSetti
|
|
|
2515
3033
|
|
|
2516
3034
|
|
|
2517
3035
|
|
|
3036
|
+
|
|
2518
3037
|
const $e96d119a19ed0c6c$var$computeLayout = ({ width: width , height: height , tileCount: tileCount })=>{
|
|
2519
3038
|
const tilesPerRow = Math.min(tileCount, 12);
|
|
2520
3039
|
let n = 0;
|
|
@@ -2610,7 +3129,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
|
|
|
2610
3129
|
await this.video.play();
|
|
2611
3130
|
await this.video.requestPictureInPicture();
|
|
2612
3131
|
this.draw();
|
|
2613
|
-
} else (0, $3Sbms$toast)(
|
|
3132
|
+
} else (0, $3Sbms$toast)((0, $384d985bb9605c35$export$2e2bcd8739ae039).t("notifications.noCamera"), {
|
|
2614
3133
|
className: "error"
|
|
2615
3134
|
});
|
|
2616
3135
|
}
|
|
@@ -2692,6 +3211,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
|
|
|
2692
3211
|
const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1ce5e673de)();
|
|
2693
3212
|
const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
|
|
2694
3213
|
const $f235befa4cdc42d6$var$Header = ()=>{
|
|
3214
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2695
3215
|
const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , options: options , muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
2696
3216
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
2697
3217
|
const [extraOptions, setExtraOptions] = (0, $3Sbms$useState)(options.extraSettingsOptions || []);
|
|
@@ -2720,12 +3240,12 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2720
3240
|
const onCopyCallLinkClick = async ()=>{
|
|
2721
3241
|
try {
|
|
2722
3242
|
await (0, $57162bcada7d6f66$export$2e2bcd8739ae039)(options.sharedURL || window.location.href);
|
|
2723
|
-
(0, $3Sbms$reacthottoast)("
|
|
3243
|
+
(0, $3Sbms$reacthottoast)(t("copyLink.copied"), {
|
|
2724
3244
|
duration: 2000
|
|
2725
3245
|
});
|
|
2726
3246
|
} catch (copyError) {
|
|
2727
3247
|
console.warn(copyError);
|
|
2728
|
-
(0, $3Sbms$reacthottoast)("
|
|
3248
|
+
(0, $3Sbms$reacthottoast)(t("copyLink.error"), {
|
|
2729
3249
|
className: "error"
|
|
2730
3250
|
});
|
|
2731
3251
|
}
|
|
@@ -2751,7 +3271,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2751
3271
|
items: [
|
|
2752
3272
|
{
|
|
2753
3273
|
id: "openNewTab",
|
|
2754
|
-
title: "
|
|
3274
|
+
title: t("menu.openNewTab"),
|
|
2755
3275
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6546b255bd3a2004), {}),
|
|
2756
3276
|
action: onOpenInNewTabClick
|
|
2757
3277
|
},
|
|
@@ -2762,13 +3282,13 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2762
3282
|
items: [
|
|
2763
3283
|
{
|
|
2764
3284
|
id: "copyLink",
|
|
2765
|
-
title: "
|
|
3285
|
+
title: t("copyLink.title"),
|
|
2766
3286
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$92ce62e1201c4fc0), {}),
|
|
2767
3287
|
action: onCopyCallLinkClick
|
|
2768
3288
|
},
|
|
2769
3289
|
{
|
|
2770
3290
|
id: "quickConnect",
|
|
2771
|
-
title: "
|
|
3291
|
+
title: t("quickConnect.title"),
|
|
2772
3292
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6470d09a29d34d08), {}),
|
|
2773
3293
|
action: onScanQuickConnectClick
|
|
2774
3294
|
},
|
|
@@ -2779,7 +3299,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2779
3299
|
items: [
|
|
2780
3300
|
{
|
|
2781
3301
|
id: "settings",
|
|
2782
|
-
title: "
|
|
3302
|
+
title: t("settings.title"),
|
|
2783
3303
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$1095c93890fce526), {}),
|
|
2784
3304
|
action: onSettingsMenuClick
|
|
2785
3305
|
},
|
|
@@ -2788,7 +3308,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2788
3308
|
];
|
|
2789
3309
|
if (document.pictureInPictureEnabled && $f235befa4cdc42d6$var$browser.platform.type === "desktop") computedCategories[0].items.push({
|
|
2790
3310
|
id: "pip",
|
|
2791
|
-
title: "
|
|
3311
|
+
title: t("menu.pictureInPicture"),
|
|
2792
3312
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$5170987d58ae338d), {}),
|
|
2793
3313
|
action: onPipClick
|
|
2794
3314
|
});
|
|
@@ -2798,7 +3318,8 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2798
3318
|
streaming,
|
|
2799
3319
|
options.sharedURL,
|
|
2800
3320
|
setIsQuickConnectPopupVisible,
|
|
2801
|
-
setIsSettingsMenuVisible,
|
|
3321
|
+
setIsSettingsMenuVisible,
|
|
3322
|
+
t,
|
|
2802
3323
|
]);
|
|
2803
3324
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab29487ffcc05855$export$1e86fd0e1db89578), {
|
|
2804
3325
|
children: [
|
|
@@ -2856,6 +3377,7 @@ const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
|
|
|
2856
3377
|
|
|
2857
3378
|
|
|
2858
3379
|
|
|
3380
|
+
|
|
2859
3381
|
const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash , status: status , deviceRequest: deviceRequest })=>{
|
|
2860
3382
|
if (slash) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
|
|
2861
3383
|
width: "24",
|
|
@@ -3618,6 +4140,7 @@ const $a53a1c6f62ad0fcc$var$getRequestButtonSize = (containerWidth)=>{
|
|
|
3618
4140
|
return "large";
|
|
3619
4141
|
};
|
|
3620
4142
|
const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 , height: height = 0 })=>{
|
|
4143
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
3621
4144
|
const videoElementRef = (0, $3Sbms$useRef)(null);
|
|
3622
4145
|
const [hover, setHover] = (0, $3Sbms$useState)(false);
|
|
3623
4146
|
const [requestingDevice, setRequestingDevice] = (0, $3Sbms$useState)(null);
|
|
@@ -3661,7 +4184,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3661
4184
|
if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
|
|
3662
4185
|
requestingDeviceTimeoutRef.current = setTimeout(()=>{
|
|
3663
4186
|
setRequestingDevice(null);
|
|
3664
|
-
(0, $3Sbms$reacthottoast)("
|
|
4187
|
+
(0, $3Sbms$reacthottoast)(t("requestDevice.timedOut"), {
|
|
3665
4188
|
className: "error"
|
|
3666
4189
|
});
|
|
3667
4190
|
}, 20000);
|
|
@@ -3670,7 +4193,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3670
4193
|
};
|
|
3671
4194
|
} else setHover(false);
|
|
3672
4195
|
}, [
|
|
3673
|
-
requestingDevice
|
|
4196
|
+
requestingDevice,
|
|
4197
|
+
t
|
|
3674
4198
|
]);
|
|
3675
4199
|
(0, $3Sbms$useEffect)(()=>{
|
|
3676
4200
|
const onRequestDeviceResult = (event)=>{
|
|
@@ -3679,8 +4203,10 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3679
4203
|
if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
|
|
3680
4204
|
setRequestingDevice(null);
|
|
3681
4205
|
if (result !== true) {
|
|
3682
|
-
let message = "
|
|
3683
|
-
if (stream.profile.name) message =
|
|
4206
|
+
let message = t("requestDevice.declined");
|
|
4207
|
+
if (stream.profile.name) message = t("requestDevice.userDeclined", {
|
|
4208
|
+
user: stream.profile.name
|
|
4209
|
+
});
|
|
3684
4210
|
(0, $3Sbms$reacthottoast)(message, {
|
|
3685
4211
|
className: "error"
|
|
3686
4212
|
});
|
|
@@ -3693,7 +4219,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3693
4219
|
};
|
|
3694
4220
|
}, [
|
|
3695
4221
|
stream.id,
|
|
3696
|
-
stream.profile
|
|
4222
|
+
stream.profile,
|
|
4223
|
+
t
|
|
3697
4224
|
]);
|
|
3698
4225
|
(0, $3Sbms$useEffect)(()=>{
|
|
3699
4226
|
const onCustomMessage = async (event)=>{
|
|
@@ -3755,7 +4282,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3755
4282
|
children: [
|
|
3756
4283
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$df42e007689062b0), {
|
|
3757
4284
|
size: requestButtonSize,
|
|
3758
|
-
children: "
|
|
4285
|
+
children: t("requestDevice.requestInput")
|
|
3759
4286
|
}),
|
|
3760
4287
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$81d5557f9199e44d), {
|
|
3761
4288
|
size: requestButtonSize,
|
|
@@ -3804,7 +4331,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3804
4331
|
}) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
|
|
3805
4332
|
}),
|
|
3806
4333
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
|
|
3807
|
-
children: stream.profile.name || "
|
|
4334
|
+
children: stream.profile.name || t("misc.user")
|
|
3808
4335
|
})
|
|
3809
4336
|
]
|
|
3810
4337
|
})
|
|
@@ -3905,6 +4432,7 @@ var $21c8ac858b8a352e$export$2e2bcd8739ae039 = $21c8ac858b8a352e$var$AudioTile;
|
|
|
3905
4432
|
|
|
3906
4433
|
|
|
3907
4434
|
|
|
4435
|
+
|
|
3908
4436
|
const $f260365f66cb6a6f$var$Reduce = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
3909
4437
|
width: "22",
|
|
3910
4438
|
height: "22",
|
|
@@ -4018,11 +4546,7 @@ const $b8e10de7c6dba8c4$export$a6112fefa8de799d = ({ containerWidth: containerWi
|
|
|
4018
4546
|
|
|
4019
4547
|
|
|
4020
4548
|
|
|
4021
|
-
|
|
4022
|
-
microphone: "microphone",
|
|
4023
|
-
webcam: "camera",
|
|
4024
|
-
screen: "screen"
|
|
4025
|
-
};
|
|
4549
|
+
|
|
4026
4550
|
const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
|
|
4027
4551
|
if (device === "microphone") return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
|
|
4028
4552
|
if (device === "webcam") return 0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039;
|
|
@@ -4030,10 +4554,16 @@ const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
|
|
|
4030
4554
|
return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
|
|
4031
4555
|
};
|
|
4032
4556
|
const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: requesterId , setExtended: setExtended , setDeviceRequest: setDeviceRequest })=>{
|
|
4557
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4033
4558
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
4034
4559
|
const [pending, setPending] = (0, $3Sbms$useState)(false);
|
|
4035
4560
|
const requesterStream = streams.find((stream)=>stream.id === requesterId);
|
|
4036
4561
|
const Icon = $7c705c3f08c6d4ca$var$getIcon(device);
|
|
4562
|
+
const deviceNames = {
|
|
4563
|
+
microphone: t("misc.microphone"),
|
|
4564
|
+
webcam: t("misc.camera"),
|
|
4565
|
+
screen: t("misc.screen")
|
|
4566
|
+
};
|
|
4037
4567
|
const onAccept = async ()=>{
|
|
4038
4568
|
setExtended(false);
|
|
4039
4569
|
setPending(true);
|
|
@@ -4068,24 +4598,22 @@ const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: req
|
|
|
4068
4598
|
deviceRequest: true
|
|
4069
4599
|
})
|
|
4070
4600
|
}),
|
|
4071
|
-
/*#__PURE__*/ (0, $3Sbms$
|
|
4072
|
-
children:
|
|
4073
|
-
requesterStream?.profile?.name || "
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
$7c705c3f08c6d4ca$var$deviceNames[device]
|
|
4077
|
-
]
|
|
4601
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$517ec31e58d61d2e), {
|
|
4602
|
+
children: t("requestDevice.request", {
|
|
4603
|
+
user: requesterStream?.profile?.name || t("misc.someone"),
|
|
4604
|
+
device: deviceNames[device]
|
|
4605
|
+
})
|
|
4078
4606
|
}),
|
|
4079
4607
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$dfd6aceefcfce0c9), {
|
|
4080
4608
|
children: [
|
|
4081
4609
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
|
|
4082
4610
|
onClick: onAccept,
|
|
4083
4611
|
active: true,
|
|
4084
|
-
children: "
|
|
4612
|
+
children: t("misc.accept")
|
|
4085
4613
|
}),
|
|
4086
4614
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
|
|
4087
4615
|
onClick: onDecline,
|
|
4088
|
-
children: "
|
|
4616
|
+
children: t("misc.decline")
|
|
4089
4617
|
})
|
|
4090
4618
|
]
|
|
4091
4619
|
})
|
|
@@ -4201,7 +4729,9 @@ const $d02c24b66b4606fd$export$ab7d69e250642927 = ({ element: element })=>{
|
|
|
4201
4729
|
|
|
4202
4730
|
|
|
4203
4731
|
|
|
4732
|
+
|
|
4204
4733
|
const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
4734
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4205
4735
|
const { muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
4206
4736
|
(0, $3Sbms$useEffect)(()=>{
|
|
4207
4737
|
navigator.mediaSession?.setMicrophoneActive?.(!muted);
|
|
@@ -4219,7 +4749,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4219
4749
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
|
|
4220
4750
|
} catch (microphoneToggleError) {
|
|
4221
4751
|
console.warn(microphoneToggleError);
|
|
4222
|
-
(0, $3Sbms$reacthottoast)("
|
|
4752
|
+
(0, $3Sbms$reacthottoast)(`${t("notifications.microphoneError")} (PiP)`, {
|
|
4223
4753
|
className: "error"
|
|
4224
4754
|
});
|
|
4225
4755
|
}
|
|
@@ -4235,7 +4765,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4235
4765
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo();
|
|
4236
4766
|
} catch (cameraError) {
|
|
4237
4767
|
console.warn(cameraError);
|
|
4238
|
-
(0, $3Sbms$reacthottoast)("
|
|
4768
|
+
(0, $3Sbms$reacthottoast)(`${t("notifications.cameraError")} (PiP)`, {
|
|
4239
4769
|
className: "error"
|
|
4240
4770
|
});
|
|
4241
4771
|
}
|
|
@@ -4250,7 +4780,9 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4250
4780
|
} catch (hangupHandlerError) {
|
|
4251
4781
|
console.warn("MediaSession hangup action is not available");
|
|
4252
4782
|
}
|
|
4253
|
-
}, [
|
|
4783
|
+
}, [
|
|
4784
|
+
t
|
|
4785
|
+
]);
|
|
4254
4786
|
return null;
|
|
4255
4787
|
};
|
|
4256
4788
|
var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSession;
|
|
@@ -4262,6 +4794,7 @@ var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSessio
|
|
|
4262
4794
|
const $5939a59dc7c96d41$var$minimumTileWidth = 126;
|
|
4263
4795
|
const $5939a59dc7c96d41$var$maximumTileWidth = 150;
|
|
4264
4796
|
const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePresenting , width: width , height: height })=>{
|
|
4797
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4265
4798
|
const [extended, setExtended] = (0, $3Sbms$useState)(false);
|
|
4266
4799
|
const [zoom, setZoom] = (0, $3Sbms$useState)(false);
|
|
4267
4800
|
const [zoomAvailable, setZoomAvailable] = (0, $3Sbms$useState)(false);
|
|
@@ -4334,8 +4867,13 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4334
4867
|
type: "snapshot",
|
|
4335
4868
|
imageSrc: objectUrl
|
|
4336
4869
|
});
|
|
4337
|
-
let notificationMessage = "
|
|
4338
|
-
if (streams.length === 1)
|
|
4870
|
+
let notificationMessage = t("snapshot.sentToUsers");
|
|
4871
|
+
if (streams.length === 1) {
|
|
4872
|
+
const userName = streams[0].profile.name || t("misc.user");
|
|
4873
|
+
notificationMessage = t("snapshot.sentToUser", {
|
|
4874
|
+
name: userName
|
|
4875
|
+
});
|
|
4876
|
+
}
|
|
4339
4877
|
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(notificationMessage, {
|
|
4340
4878
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$26fe7ec9351ff761), {
|
|
4341
4879
|
src: base64Image
|
|
@@ -4343,7 +4881,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4343
4881
|
duration: 2500
|
|
4344
4882
|
});
|
|
4345
4883
|
} catch (sendMessageError) {
|
|
4346
|
-
(0, $3Sbms$reacthottoast)("
|
|
4884
|
+
(0, $3Sbms$reacthottoast)(t("snapshot.error"), {
|
|
4347
4885
|
className: "error"
|
|
4348
4886
|
});
|
|
4349
4887
|
console.error(sendMessageError);
|
|
@@ -4461,7 +4999,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4461
4999
|
}),
|
|
4462
5000
|
!extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$500c3c5544c37412), {
|
|
4463
5001
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
4464
|
-
children: "
|
|
5002
|
+
children: t("misc.you")
|
|
4465
5003
|
})
|
|
4466
5004
|
}),
|
|
4467
5005
|
extended && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$a7365e2302f8d10a), {
|
|
@@ -4627,6 +5165,7 @@ const $04dc495b2c5350ca$export$2cb99e4be0dc4646 = (url)=>new Promise((resolve, r
|
|
|
4627
5165
|
|
|
4628
5166
|
|
|
4629
5167
|
|
|
5168
|
+
|
|
4630
5169
|
const $6a95863cd4ef501c$export$eb5bbbfc393ab8ac = (0, $3Sbms$styledcomponents).div`
|
|
4631
5170
|
max-width: 100%;
|
|
4632
5171
|
margin-top: 60px;
|
|
@@ -4696,6 +5235,7 @@ const $f81bfa56534026c2$export$e9785ae652b3a722 = (item)=>{
|
|
|
4696
5235
|
} else console.warn("Undefined room ID");
|
|
4697
5236
|
};
|
|
4698
5237
|
const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
|
|
5238
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4699
5239
|
const [history, setHistory] = (0, $3Sbms$useState)([]);
|
|
4700
5240
|
(0, $3Sbms$useEffect)(()=>{
|
|
4701
5241
|
try {
|
|
@@ -4713,7 +5253,7 @@ const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
|
|
|
4713
5253
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6a95863cd4ef501c$export$eb5bbbfc393ab8ac), {
|
|
4714
5254
|
children: [
|
|
4715
5255
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$ebce8992dc3bd82), {
|
|
4716
|
-
children: "
|
|
5256
|
+
children: t("sharedHistory.shared")
|
|
4717
5257
|
}),
|
|
4718
5258
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$e6c0b06d6e2dd9e3), {
|
|
4719
5259
|
children: history.map((item)=>{
|
|
@@ -4913,6 +5453,7 @@ var $5e2ac34f2c3f1b42$export$2e2bcd8739ae039 = $5e2ac34f2c3f1b42$var$YoutubeTile
|
|
|
4913
5453
|
|
|
4914
5454
|
|
|
4915
5455
|
|
|
5456
|
+
|
|
4916
5457
|
const $ab48431cd035ee30$export$e19cf0169f1019bf = (0, $3Sbms$styledcomponents).div`
|
|
4917
5458
|
display: flex;
|
|
4918
5459
|
position: relative;
|
|
@@ -5003,6 +5544,7 @@ const $ab48431cd035ee30$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).di
|
|
|
5003
5544
|
|
|
5004
5545
|
|
|
5005
5546
|
const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
5547
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5006
5548
|
const { dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
5007
5549
|
const snapshotImageRef = (0, $3Sbms$useRef)(null);
|
|
5008
5550
|
const [downloadURL, setDownloadURL] = (0, $3Sbms$useState)(tile.data.url);
|
|
@@ -5070,7 +5612,8 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
|
5070
5612
|
children: [
|
|
5071
5613
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$7c309220fd1fb205), {
|
|
5072
5614
|
children: [
|
|
5073
|
-
"
|
|
5615
|
+
t("snapshot.title"),
|
|
5616
|
+
" \xb7 ",
|
|
5074
5617
|
formattedTime
|
|
5075
5618
|
]
|
|
5076
5619
|
}),
|
|
@@ -5078,7 +5621,7 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
|
5078
5621
|
href: downloadURL,
|
|
5079
5622
|
target: "_blank",
|
|
5080
5623
|
download: filename,
|
|
5081
|
-
children: "
|
|
5624
|
+
children: t("snapshot.save")
|
|
5082
5625
|
})
|
|
5083
5626
|
]
|
|
5084
5627
|
}),
|
|
@@ -5208,7 +5751,9 @@ var $e4ddb9f41b4a5cba$export$2e2bcd8739ae039 = $e4ddb9f41b4a5cba$var$YoutubeEven
|
|
|
5208
5751
|
|
|
5209
5752
|
|
|
5210
5753
|
|
|
5754
|
+
|
|
5211
5755
|
const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
5756
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5212
5757
|
const { dispatch: dispatch , streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
5213
5758
|
(0, $3Sbms$useEffect)(()=>{
|
|
5214
5759
|
const onCustomMessage = async (event)=>{
|
|
@@ -5224,11 +5769,11 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5224
5769
|
});
|
|
5225
5770
|
const createdAtDate = new Date();
|
|
5226
5771
|
const notificationStatus = {
|
|
5227
|
-
text: "
|
|
5228
|
-
boldText: sender.profile.name || "
|
|
5772
|
+
text: t("misc.from"),
|
|
5773
|
+
boldText: sender.profile.name || t("misc.user"),
|
|
5229
5774
|
icon: statusIcon
|
|
5230
5775
|
};
|
|
5231
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)("
|
|
5776
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("snapshot.shared"), {
|
|
5232
5777
|
width: "290px",
|
|
5233
5778
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$26fe7ec9351ff761), {
|
|
5234
5779
|
src: imageSrc,
|
|
@@ -5239,7 +5784,7 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5239
5784
|
fontSize: "16px"
|
|
5240
5785
|
},
|
|
5241
5786
|
button: {
|
|
5242
|
-
text: "
|
|
5787
|
+
text: t("misc.open"),
|
|
5243
5788
|
action: ({ close: close })=>{
|
|
5244
5789
|
dispatch({
|
|
5245
5790
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
|
|
@@ -5264,7 +5809,7 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5264
5809
|
minute: "2-digit"
|
|
5265
5810
|
});
|
|
5266
5811
|
(0, $f81bfa56534026c2$export$e9785ae652b3a722)({
|
|
5267
|
-
title:
|
|
5812
|
+
title: `${t("snapshot.title")} · ${formattedTime}`,
|
|
5268
5813
|
url: imageSrc,
|
|
5269
5814
|
iconUrl: imageSrc,
|
|
5270
5815
|
iconStyle: {
|
|
@@ -5283,7 +5828,8 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5283
5828
|
};
|
|
5284
5829
|
}, [
|
|
5285
5830
|
streams,
|
|
5286
|
-
dispatch
|
|
5831
|
+
dispatch,
|
|
5832
|
+
t
|
|
5287
5833
|
]);
|
|
5288
5834
|
return null;
|
|
5289
5835
|
};
|
|
@@ -5670,6 +6216,7 @@ var $cdab47bb8796991e$export$2e2bcd8739ae039 = $cdab47bb8796991e$var$Video;
|
|
|
5670
6216
|
|
|
5671
6217
|
|
|
5672
6218
|
|
|
6219
|
+
|
|
5673
6220
|
const $f0e90fb231c59fab$var$HangUp = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
5674
6221
|
width: "25",
|
|
5675
6222
|
height: "24",
|
|
@@ -5765,6 +6312,7 @@ var $8b7bd174d29d9a1f$export$2e2bcd8739ae039 = $8b7bd174d29d9a1f$var$Spinner;
|
|
|
5765
6312
|
|
|
5766
6313
|
|
|
5767
6314
|
|
|
6315
|
+
|
|
5768
6316
|
const $a2d206a438475087$var$YoutubeIcon = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
5769
6317
|
width: "24",
|
|
5770
6318
|
height: "25",
|
|
@@ -5878,6 +6426,7 @@ const $ae07ea3548d561ea$export$d5bc2acf69f5bdaf = (0, $3Sbms$styledcomponents).d
|
|
|
5878
6426
|
|
|
5879
6427
|
const $db92fac48417791a$var$isScreenshareSupported = Boolean(navigator.mediaDevices.getDisplayMedia);
|
|
5880
6428
|
const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
6429
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5881
6430
|
const highlightMenuRef = (0, $3Sbms$useRef)(null);
|
|
5882
6431
|
const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
|
|
5883
6432
|
const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
@@ -5896,7 +6445,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5896
6445
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare();
|
|
5897
6446
|
} catch (screenshareError) {
|
|
5898
6447
|
console.warn(screenshareError);
|
|
5899
|
-
(0, $3Sbms$reacthottoast)("
|
|
6448
|
+
(0, $3Sbms$reacthottoast)(t("notifications.screensharingError"), {
|
|
5900
6449
|
className: "error"
|
|
5901
6450
|
});
|
|
5902
6451
|
}
|
|
@@ -5915,7 +6464,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5915
6464
|
items: [
|
|
5916
6465
|
{
|
|
5917
6466
|
id: "linksharing",
|
|
5918
|
-
title: "
|
|
6467
|
+
title: t("shareLink.title"),
|
|
5919
6468
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
|
|
5920
6469
|
action: onLinkshareClick
|
|
5921
6470
|
},
|
|
@@ -5933,7 +6482,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5933
6482
|
items: [
|
|
5934
6483
|
{
|
|
5935
6484
|
id: "screensharing",
|
|
5936
|
-
title: "
|
|
6485
|
+
title: t("menu.screenSharing"),
|
|
5937
6486
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
|
|
5938
6487
|
action: onScreenshareClick
|
|
5939
6488
|
},
|
|
@@ -5965,6 +6514,7 @@ var $db92fac48417791a$export$2e2bcd8739ae039 = $db92fac48417791a$var$HighlightBu
|
|
|
5965
6514
|
|
|
5966
6515
|
|
|
5967
6516
|
const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
6517
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5968
6518
|
const leaveMenuRef = (0, $3Sbms$useRef)(null);
|
|
5969
6519
|
const [webcamCount, setWebcamCount] = (0, $3Sbms$useState)(0);
|
|
5970
6520
|
const [isLeaveMenuOpen, setIsLeaveMenuOpen] = (0, $3Sbms$useState)(false);
|
|
@@ -5978,7 +6528,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5978
6528
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
|
|
5979
6529
|
} catch (muteError) {
|
|
5980
6530
|
console.warn(muteError);
|
|
5981
|
-
(0, $3Sbms$reacthottoast)("
|
|
6531
|
+
(0, $3Sbms$reacthottoast)(t("notifications.microphoneError"), {
|
|
5982
6532
|
className: "error"
|
|
5983
6533
|
});
|
|
5984
6534
|
}
|
|
@@ -5992,7 +6542,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5992
6542
|
}
|
|
5993
6543
|
} catch (cameraError) {
|
|
5994
6544
|
console.warn(cameraError);
|
|
5995
|
-
(0, $3Sbms$reacthottoast)("
|
|
6545
|
+
(0, $3Sbms$reacthottoast)(t("notifications.cameraError"), {
|
|
5996
6546
|
className: "error"
|
|
5997
6547
|
});
|
|
5998
6548
|
} finally{
|
|
@@ -6004,7 +6554,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
6004
6554
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
|
|
6005
6555
|
} catch (rotateError) {
|
|
6006
6556
|
console.warn(rotateError);
|
|
6007
|
-
(0, $3Sbms$reacthottoast)("
|
|
6557
|
+
(0, $3Sbms$reacthottoast)(t("notifications.cameraRotateError"), {
|
|
6008
6558
|
className: "error"
|
|
6009
6559
|
});
|
|
6010
6560
|
}
|
|
@@ -6061,13 +6611,13 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
6061
6611
|
items: [
|
|
6062
6612
|
{
|
|
6063
6613
|
id: "leaveCall",
|
|
6064
|
-
title: "
|
|
6614
|
+
title: t("leave.leaveCall"),
|
|
6065
6615
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$56fe02ef449b2606), {}),
|
|
6066
6616
|
action: leaveCall
|
|
6067
6617
|
},
|
|
6068
6618
|
{
|
|
6069
6619
|
id: "terminateCall",
|
|
6070
|
-
title: "
|
|
6620
|
+
title: t("leave.endCall"),
|
|
6071
6621
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$e57aa6aff2e1f414), {}),
|
|
6072
6622
|
action: terminateCall,
|
|
6073
6623
|
danger: true
|
|
@@ -6083,7 +6633,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
6083
6633
|
children: [
|
|
6084
6634
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f0e90fb231c59fab$export$2e2bcd8739ae039), {}),
|
|
6085
6635
|
/*#__PURE__*/ (0, $3Sbms$jsx)("p", {
|
|
6086
|
-
children: "
|
|
6636
|
+
children: t("leave.title")
|
|
6087
6637
|
})
|
|
6088
6638
|
]
|
|
6089
6639
|
})
|
|
@@ -6106,6 +6656,7 @@ var $69a9c49ece80e773$export$2e2bcd8739ae039 = $69a9c49ece80e773$var$ControlBar;
|
|
|
6106
6656
|
|
|
6107
6657
|
|
|
6108
6658
|
|
|
6659
|
+
|
|
6109
6660
|
const $8d3d0e80c56cde5c$export$9d03e7b857083c37 = (0, $3Sbms$styledcomponents).div`
|
|
6110
6661
|
position: absolute;
|
|
6111
6662
|
width: 100%;
|
|
@@ -6184,6 +6735,7 @@ const $8d3d0e80c56cde5c$export$51760c3b0f5567d2 = (0, $3Sbms$styledcomponents).p
|
|
|
6184
6735
|
|
|
6185
6736
|
|
|
6186
6737
|
const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
6738
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6187
6739
|
const QuickConnectContainerRef = (0, $3Sbms$useRef)(null);
|
|
6188
6740
|
const QuickConnectRef = (0, $3Sbms$useRef)(null);
|
|
6189
6741
|
const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
@@ -6258,7 +6810,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6258
6810
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $8d3d0e80c56cde5c$export$f8e80e2c9abbb7eb), {
|
|
6259
6811
|
children: [
|
|
6260
6812
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
6261
|
-
children: "
|
|
6813
|
+
children: t("quickConnect.scanTitle")
|
|
6262
6814
|
}),
|
|
6263
6815
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$b421c25a8e0ea22e), {
|
|
6264
6816
|
onClick: onQuickConnectPopupCloseClick,
|
|
@@ -6272,7 +6824,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6272
6824
|
})
|
|
6273
6825
|
}),
|
|
6274
6826
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$51760c3b0f5567d2), {
|
|
6275
|
-
children: "
|
|
6827
|
+
children: t("quickConnect.scan")
|
|
6276
6828
|
})
|
|
6277
6829
|
]
|
|
6278
6830
|
})
|
|
@@ -6284,10 +6836,6 @@ var $5b80b81d7b095f89$export$2e2bcd8739ae039 = $5b80b81d7b095f89$var$QuickConnec
|
|
|
6284
6836
|
|
|
6285
6837
|
|
|
6286
6838
|
|
|
6287
|
-
const $b26ed507544ea00c$var$capitalizeFirstLetter = (string)=>{
|
|
6288
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
6289
|
-
};
|
|
6290
|
-
var $b26ed507544ea00c$export$2e2bcd8739ae039 = $b26ed507544ea00c$var$capitalizeFirstLetter;
|
|
6291
6839
|
|
|
6292
6840
|
|
|
6293
6841
|
|
|
@@ -6354,6 +6902,8 @@ var $c45f2504881e174b$export$2e2bcd8739ae039 = $c45f2504881e174b$var$Speaker;
|
|
|
6354
6902
|
|
|
6355
6903
|
|
|
6356
6904
|
|
|
6905
|
+
|
|
6906
|
+
|
|
6357
6907
|
const $910dd7d7d872a463$var$Checkmark = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
6358
6908
|
width: "20",
|
|
6359
6909
|
height: "20",
|
|
@@ -6371,7 +6921,6 @@ var $910dd7d7d872a463$export$2e2bcd8739ae039 = $910dd7d7d872a463$var$Checkmark;
|
|
|
6371
6921
|
|
|
6372
6922
|
|
|
6373
6923
|
|
|
6374
|
-
|
|
6375
6924
|
const $658749b7ab14b607$export$304c350e86a38cee = (0, $3Sbms$styledcomponents).div`
|
|
6376
6925
|
display: flex;
|
|
6377
6926
|
flex-direction: column;
|
|
@@ -6533,27 +7082,16 @@ const $658749b7ab14b607$export$73afb47ae3e10bf1 = (0, $3Sbms$styledcomponents).p
|
|
|
6533
7082
|
`;
|
|
6534
7083
|
|
|
6535
7084
|
|
|
6536
|
-
const $1694791461215de9$var$
|
|
6537
|
-
"english"
|
|
6538
|
-
];
|
|
6539
|
-
const $1694791461215de9$export$604ba5624273df44 = ()=>{
|
|
6540
|
-
try {
|
|
6541
|
-
const storedTheme = localStorage.getItem("stream_ui_language");
|
|
6542
|
-
if (storedTheme) return storedTheme;
|
|
6543
|
-
return "english";
|
|
6544
|
-
} catch (localStorageError) {
|
|
6545
|
-
console.warn(localStorageError);
|
|
6546
|
-
return "english";
|
|
6547
|
-
}
|
|
6548
|
-
};
|
|
7085
|
+
const $1694791461215de9$var$languages = Object.keys((0, $384d985bb9605c35$export$150b732325d14d04));
|
|
6549
7086
|
const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
7087
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6550
7088
|
const { language: language , setLanguage: setLanguage } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6551
7089
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
|
|
6552
7090
|
children: [
|
|
6553
7091
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6554
7092
|
children: [
|
|
6555
7093
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6556
|
-
children: "
|
|
7094
|
+
children: t("settings.language")
|
|
6557
7095
|
}),
|
|
6558
7096
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6559
7097
|
onClick: back,
|
|
@@ -6567,9 +7105,9 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
|
6567
7105
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6568
7106
|
children: [
|
|
6569
7107
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6570
|
-
children: "
|
|
7108
|
+
children: t("settings.language")
|
|
6571
7109
|
}),
|
|
6572
|
-
$1694791461215de9$var$
|
|
7110
|
+
$1694791461215de9$var$languages.map((lang)=>{
|
|
6573
7111
|
const checked = language === lang;
|
|
6574
7112
|
const onLanguageClick = ()=>{
|
|
6575
7113
|
setLanguage(lang);
|
|
@@ -6578,7 +7116,7 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
|
6578
7116
|
onClick: onLanguageClick,
|
|
6579
7117
|
children: [
|
|
6580
7118
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6581
|
-
children: (0, $
|
|
7119
|
+
children: (0, $384d985bb9605c35$export$150b732325d14d04)[lang].name
|
|
6582
7120
|
}),
|
|
6583
7121
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6584
7122
|
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
@@ -6605,10 +7143,12 @@ var $1694791461215de9$export$2e2bcd8739ae039 = $1694791461215de9$var$LanguageSub
|
|
|
6605
7143
|
|
|
6606
7144
|
|
|
6607
7145
|
|
|
7146
|
+
|
|
6608
7147
|
const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
7148
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6609
7149
|
const [audioDevices, setAudioDevices] = (0, $3Sbms$useState)([]);
|
|
6610
|
-
const [
|
|
6611
|
-
const [
|
|
7150
|
+
const [currentMicrophoneId, setCurrentMicrophoneId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentMicrophoneId());
|
|
7151
|
+
const [currentSpeakerId, setCurrentSpeakerId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentSpeakerId());
|
|
6612
7152
|
const microphoneDevices = audioDevices.filter((device)=>device.kind === "audioinput");
|
|
6613
7153
|
const speakerDevices = audioDevices.filter((device)=>device.kind === "audiooutput");
|
|
6614
7154
|
const isMicrophoneAccessBlocked = microphoneDevices.length && audioDevices.every((device)=>device.deviceId === "");
|
|
@@ -6616,16 +7156,14 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6616
7156
|
const listDevices = async ()=>{
|
|
6617
7157
|
const audioDevicesList = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listAudioDevices();
|
|
6618
7158
|
setAudioDevices(audioDevicesList);
|
|
6619
|
-
const speaker = audioDevicesList.find((device)=>device.kind === "audiooutput" && device.deviceId === "default");
|
|
6620
|
-
const mic = audioDevicesList.find((device)=>device.kind === "audioinput" && device.deviceId === "default");
|
|
6621
|
-
setCurrentMic(mic);
|
|
6622
|
-
setCurrentSpeaker(speaker);
|
|
6623
7159
|
};
|
|
6624
7160
|
const onMicClick = async (mic)=>{
|
|
6625
|
-
if (
|
|
7161
|
+
if (currentMicrophoneId === mic.deviceId) return;
|
|
6626
7162
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchMicrophone(mic.deviceId);
|
|
6627
|
-
|
|
6628
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
7163
|
+
setCurrentMicrophoneId(mic.deviceId);
|
|
7164
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7165
|
+
name: mic.label
|
|
7166
|
+
}), {
|
|
6629
7167
|
duration: 3000,
|
|
6630
7168
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
|
|
6631
7169
|
messageStyle: {
|
|
@@ -6634,10 +7172,12 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6634
7172
|
});
|
|
6635
7173
|
};
|
|
6636
7174
|
const onSpeakerClick = (speaker)=>{
|
|
6637
|
-
if (
|
|
7175
|
+
if (currentSpeakerId === speaker.deviceId) return;
|
|
6638
7176
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).setAudioSink(speaker.deviceId);
|
|
6639
|
-
|
|
6640
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
7177
|
+
setCurrentSpeakerId(speaker.deviceId);
|
|
7178
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7179
|
+
name: speaker.label
|
|
7180
|
+
}), {
|
|
6641
7181
|
duration: 3000,
|
|
6642
7182
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {}),
|
|
6643
7183
|
messageStyle: {
|
|
@@ -6655,7 +7195,7 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6655
7195
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6656
7196
|
children: [
|
|
6657
7197
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6658
|
-
children: "
|
|
7198
|
+
children: t("audioMenu.title")
|
|
6659
7199
|
}),
|
|
6660
7200
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6661
7201
|
onClick: back,
|
|
@@ -6670,10 +7210,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6670
7210
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6671
7211
|
children: [
|
|
6672
7212
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
6673
|
-
children: "
|
|
7213
|
+
children: t("audioMenu.blockedMicrophone")
|
|
6674
7214
|
}),
|
|
6675
7215
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
6676
|
-
children: "
|
|
7216
|
+
children: t("audioMenu.microphonePermissions")
|
|
6677
7217
|
})
|
|
6678
7218
|
]
|
|
6679
7219
|
})
|
|
@@ -6682,10 +7222,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6682
7222
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6683
7223
|
children: [
|
|
6684
7224
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6685
|
-
children: "
|
|
7225
|
+
children: t("misc.microphone")
|
|
6686
7226
|
}),
|
|
6687
7227
|
microphoneDevices.map((microphone)=>{
|
|
6688
|
-
const checked = microphone.deviceId ===
|
|
7228
|
+
const checked = microphone.deviceId === currentMicrophoneId;
|
|
6689
7229
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6690
7230
|
onClick: ()=>onMicClick(microphone),
|
|
6691
7231
|
children: [
|
|
@@ -6703,10 +7243,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6703
7243
|
canChangeSpeakers && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6704
7244
|
children: [
|
|
6705
7245
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6706
|
-
children: "
|
|
7246
|
+
children: t("misc.speaker")
|
|
6707
7247
|
}),
|
|
6708
7248
|
speakerDevices.map((speaker)=>{
|
|
6709
|
-
const checked = speaker.deviceId ===
|
|
7249
|
+
const checked = speaker.deviceId === currentSpeakerId;
|
|
6710
7250
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6711
7251
|
onClick: ()=>onSpeakerClick(speaker),
|
|
6712
7252
|
children: [
|
|
@@ -6739,35 +7279,39 @@ var $b7a5d5760b390f40$export$2e2bcd8739ae039 = $b7a5d5760b390f40$var$AudioSubMen
|
|
|
6739
7279
|
|
|
6740
7280
|
|
|
6741
7281
|
|
|
6742
|
-
|
|
6743
|
-
const constraints = (0, $c31e3fb4360572af$export$d21ffcc5eb136bfa);
|
|
6744
|
-
switch(constraints[key].height.ideal){
|
|
6745
|
-
case 240:
|
|
6746
|
-
return {
|
|
6747
|
-
name: "Low definition (240p)",
|
|
6748
|
-
key: key
|
|
6749
|
-
};
|
|
6750
|
-
case 480:
|
|
6751
|
-
return {
|
|
6752
|
-
name: "Standard definition (480p)",
|
|
6753
|
-
key: key
|
|
6754
|
-
};
|
|
6755
|
-
case 720:
|
|
6756
|
-
return {
|
|
6757
|
-
name: "High definition (720p)",
|
|
6758
|
-
key: key
|
|
6759
|
-
};
|
|
6760
|
-
default:
|
|
6761
|
-
return {
|
|
6762
|
-
name: "",
|
|
6763
|
-
key: key
|
|
6764
|
-
};
|
|
6765
|
-
}
|
|
6766
|
-
}).filter((def)=>def.name !== "");
|
|
7282
|
+
|
|
6767
7283
|
const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
7284
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6768
7285
|
const [cameraDevices, setCameraDevices] = (0, $3Sbms$useState)([]);
|
|
6769
7286
|
const [currentCamera, setCurrentCamera] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentWebcam());
|
|
6770
7287
|
const isCameraAccessBlocked = cameraDevices.length && cameraDevices.every((device)=>device.deviceId === "");
|
|
7288
|
+
const resolutions = (0, $3Sbms$useMemo)(()=>Object.keys((0, $c31e3fb4360572af$export$d21ffcc5eb136bfa)).map((key)=>{
|
|
7289
|
+
const constraints = (0, $c31e3fb4360572af$export$d21ffcc5eb136bfa);
|
|
7290
|
+
switch(constraints[key].height.ideal){
|
|
7291
|
+
case 240:
|
|
7292
|
+
return {
|
|
7293
|
+
name: t("videoMenu.lowDef"),
|
|
7294
|
+
key: key
|
|
7295
|
+
};
|
|
7296
|
+
case 480:
|
|
7297
|
+
return {
|
|
7298
|
+
name: t("videoMenu.standardDef"),
|
|
7299
|
+
key: key
|
|
7300
|
+
};
|
|
7301
|
+
case 720:
|
|
7302
|
+
return {
|
|
7303
|
+
name: t("videoMenu.highDef"),
|
|
7304
|
+
key: key
|
|
7305
|
+
};
|
|
7306
|
+
default:
|
|
7307
|
+
return {
|
|
7308
|
+
name: "",
|
|
7309
|
+
key: key
|
|
7310
|
+
};
|
|
7311
|
+
}
|
|
7312
|
+
}).filter((def)=>def.name !== ""), [
|
|
7313
|
+
t
|
|
7314
|
+
]);
|
|
6771
7315
|
const listDevices = async ()=>{
|
|
6772
7316
|
const videoDevices = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listVideoDevices();
|
|
6773
7317
|
setCameraDevices(videoDevices);
|
|
@@ -6781,7 +7325,9 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6781
7325
|
device: camera,
|
|
6782
7326
|
resolution: currentCamera.resolution
|
|
6783
7327
|
});
|
|
6784
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
7328
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7329
|
+
name: camera.label
|
|
7330
|
+
}), {
|
|
6785
7331
|
duration: 3000,
|
|
6786
7332
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {}),
|
|
6787
7333
|
messageStyle: {
|
|
@@ -6817,7 +7363,7 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6817
7363
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6818
7364
|
children: [
|
|
6819
7365
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6820
|
-
children: "
|
|
7366
|
+
children: t("videoMenu.title")
|
|
6821
7367
|
}),
|
|
6822
7368
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6823
7369
|
onClick: back,
|
|
@@ -6832,10 +7378,10 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6832
7378
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6833
7379
|
children: [
|
|
6834
7380
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
6835
|
-
children: "
|
|
7381
|
+
children: t("videoMenu.blockedCamera")
|
|
6836
7382
|
}),
|
|
6837
7383
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
6838
|
-
children: "
|
|
7384
|
+
children: t("videoMenu.cameraPermissions")
|
|
6839
7385
|
})
|
|
6840
7386
|
]
|
|
6841
7387
|
})
|
|
@@ -6844,7 +7390,7 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6844
7390
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6845
7391
|
children: [
|
|
6846
7392
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6847
|
-
children: "
|
|
7393
|
+
children: t("misc.camera")
|
|
6848
7394
|
}),
|
|
6849
7395
|
cameraDevices.map((camera)=>{
|
|
6850
7396
|
const checked = camera.deviceId === currentCamera.device?.deviceId;
|
|
@@ -6865,9 +7411,9 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6865
7411
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6866
7412
|
children: [
|
|
6867
7413
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6868
|
-
children: "
|
|
7414
|
+
children: t("videoMenu.sendResolution")
|
|
6869
7415
|
}),
|
|
6870
|
-
|
|
7416
|
+
resolutions.map((resolution)=>{
|
|
6871
7417
|
const checked = resolution.key === currentCamera.resolution;
|
|
6872
7418
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6873
7419
|
onClick: ()=>onSendResolutionClick(resolution),
|
|
@@ -6894,6 +7440,7 @@ var $57896f163f7e1230$export$2e2bcd8739ae039 = $57896f163f7e1230$var$VideoSubMen
|
|
|
6894
7440
|
|
|
6895
7441
|
|
|
6896
7442
|
const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
7443
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6897
7444
|
const [currentMenu, setCurrentMenu] = (0, $3Sbms$useState)("base");
|
|
6898
7445
|
const menuPopupRef = (0, $3Sbms$useRef)(null);
|
|
6899
7446
|
const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
@@ -6936,7 +7483,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6936
7483
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6937
7484
|
children: [
|
|
6938
7485
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6939
|
-
children: "
|
|
7486
|
+
children: t("settings.title")
|
|
6940
7487
|
}),
|
|
6941
7488
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6942
7489
|
onClick: onCloseClick,
|
|
@@ -6949,17 +7496,17 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6949
7496
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6950
7497
|
children: [
|
|
6951
7498
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6952
|
-
children: "
|
|
7499
|
+
children: t("settings.preferences")
|
|
6953
7500
|
}),
|
|
6954
7501
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6955
7502
|
onClick: onLanguageMenuClick,
|
|
6956
7503
|
children: [
|
|
6957
7504
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6958
|
-
children: "
|
|
7505
|
+
children: t("settings.language")
|
|
6959
7506
|
}),
|
|
6960
7507
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
6961
7508
|
children: [
|
|
6962
|
-
(0, $
|
|
7509
|
+
(0, $384d985bb9605c35$export$150b732325d14d04)[language]?.name,
|
|
6963
7510
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
|
|
6964
7511
|
direction: "right"
|
|
6965
7512
|
})
|
|
@@ -6972,7 +7519,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6972
7519
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6973
7520
|
children: [
|
|
6974
7521
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6975
|
-
children: "
|
|
7522
|
+
children: t("settings.devices")
|
|
6976
7523
|
}),
|
|
6977
7524
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).isListDevicesSupported() && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6978
7525
|
onClick: onAudioClick,
|
|
@@ -6982,7 +7529,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6982
7529
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
|
|
6983
7530
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {})
|
|
6984
7531
|
}),
|
|
6985
|
-
"
|
|
7532
|
+
t("audioMenu.title")
|
|
6986
7533
|
]
|
|
6987
7534
|
}),
|
|
6988
7535
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
@@ -7000,7 +7547,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
7000
7547
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
|
|
7001
7548
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {})
|
|
7002
7549
|
}),
|
|
7003
|
-
"
|
|
7550
|
+
t("videoMenu.title")
|
|
7004
7551
|
]
|
|
7005
7552
|
}),
|
|
7006
7553
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
@@ -7015,13 +7562,13 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
7015
7562
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7016
7563
|
children: [
|
|
7017
7564
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
7018
|
-
children: "
|
|
7565
|
+
children: t("settings.help")
|
|
7019
7566
|
}),
|
|
7020
7567
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
7021
7568
|
onClick: onHelpCenterClick,
|
|
7022
7569
|
children: [
|
|
7023
7570
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7024
|
-
children: "
|
|
7571
|
+
children: t("settings.helpCenter")
|
|
7025
7572
|
}),
|
|
7026
7573
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b93bcb828d5c97d8$export$2e2bcd8739ae039), {})
|
|
7027
7574
|
]
|
|
@@ -7054,6 +7601,7 @@ var $c11e4c21ca692a16$export$2e2bcd8739ae039 = $c11e4c21ca692a16$var$Menu;
|
|
|
7054
7601
|
|
|
7055
7602
|
|
|
7056
7603
|
|
|
7604
|
+
|
|
7057
7605
|
const $d677836e2f373a45$export$b679a9a7caefa4b1 = (0, $3Sbms$styledcomponents).div`
|
|
7058
7606
|
position: absolute;
|
|
7059
7607
|
width: 100%;
|
|
@@ -7179,6 +7727,7 @@ const $d677836e2f373a45$export$3711c5e6a7ba3fdc = (0, $3Sbms$styledcomponents).b
|
|
|
7179
7727
|
|
|
7180
7728
|
const $49372cd9190da903$var$youtubeIDRegExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;
|
|
7181
7729
|
const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
7730
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7182
7731
|
const youtubePopupRef = (0, $3Sbms$useRef)(null);
|
|
7183
7732
|
const [youtubeInputValue, setYoutubeInputValue] = (0, $3Sbms$useState)("");
|
|
7184
7733
|
const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
|
|
@@ -7205,7 +7754,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7205
7754
|
}
|
|
7206
7755
|
});
|
|
7207
7756
|
setIsYoutubePopupVisible(false);
|
|
7208
|
-
} else setErrorMessage("
|
|
7757
|
+
} else setErrorMessage(t("youtube.invalid"));
|
|
7209
7758
|
};
|
|
7210
7759
|
const onCloseClick = ()=>setIsYoutubePopupVisible(false);
|
|
7211
7760
|
(0, $3Sbms$useEffect)(()=>{
|
|
@@ -7227,7 +7776,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7227
7776
|
children: [
|
|
7228
7777
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2d206a438475087$export$2e2bcd8739ae039), {}),
|
|
7229
7778
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
7230
|
-
children: "
|
|
7779
|
+
children: t("youtube.title")
|
|
7231
7780
|
})
|
|
7232
7781
|
]
|
|
7233
7782
|
}),
|
|
@@ -7245,7 +7794,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7245
7794
|
children: [
|
|
7246
7795
|
/*#__PURE__*/ (0, $3Sbms$jsx)("label", {
|
|
7247
7796
|
htmlFor: "youtube-popup-input",
|
|
7248
|
-
children: "
|
|
7797
|
+
children: t("youtube.url")
|
|
7249
7798
|
}),
|
|
7250
7799
|
/*#__PURE__*/ (0, $3Sbms$jsx)("input", {
|
|
7251
7800
|
id: "youtube-popup-input",
|
|
@@ -7263,7 +7812,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7263
7812
|
}),
|
|
7264
7813
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $d677836e2f373a45$export$3711c5e6a7ba3fdc), {
|
|
7265
7814
|
type: "submit",
|
|
7266
|
-
children: "
|
|
7815
|
+
children: t("youtube.share")
|
|
7267
7816
|
})
|
|
7268
7817
|
]
|
|
7269
7818
|
})
|
|
@@ -7283,6 +7832,7 @@ var $49372cd9190da903$export$2e2bcd8739ae039 = $49372cd9190da903$var$YoutubePopu
|
|
|
7283
7832
|
|
|
7284
7833
|
|
|
7285
7834
|
|
|
7835
|
+
|
|
7286
7836
|
const $dc26e7b014ddcf8c$var$PaypalWhite = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
7287
7837
|
width: "24",
|
|
7288
7838
|
height: "24",
|
|
@@ -7476,7 +8026,7 @@ const $554f3984e3212196$export$5e3f251c730829 = (0, $3Sbms$styledcomponents).div
|
|
|
7476
8026
|
|
|
7477
8027
|
|
|
7478
8028
|
const $98933bbc579a3e66$export$a1eac7fdbc2db4af = "linkshare_sent";
|
|
7479
|
-
const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
8029
|
+
const $98933bbc579a3e66$var$sendLinkNotification = (data, t)=>{
|
|
7480
8030
|
let notificationStatusText = new URL(data.url).hostname;
|
|
7481
8031
|
if (notificationStatusText.startsWith("www.")) notificationStatusText = notificationStatusText.slice(4);
|
|
7482
8032
|
const notificationIcon = data.ogImage ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$9e155375d8fb1f67), {
|
|
@@ -7487,11 +8037,11 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
|
7487
8037
|
icon: notificationIcon,
|
|
7488
8038
|
status: {
|
|
7489
8039
|
icon: data.favicon,
|
|
7490
|
-
text: "
|
|
8040
|
+
text: t("misc.from"),
|
|
7491
8041
|
boldText: notificationStatusText
|
|
7492
8042
|
},
|
|
7493
8043
|
button: {
|
|
7494
|
-
text: "
|
|
8044
|
+
text: t("misc.open"),
|
|
7495
8045
|
action: ({ close: close })=>{
|
|
7496
8046
|
window.open(data.url, "_blank");
|
|
7497
8047
|
close();
|
|
@@ -7508,19 +8058,22 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
|
7508
8058
|
statusText: notificationStatusText
|
|
7509
8059
|
});
|
|
7510
8060
|
};
|
|
7511
|
-
const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
|
|
7512
|
-
const
|
|
8061
|
+
const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url, t)=>{
|
|
8062
|
+
const userName = senderName || t("misc.user");
|
|
8063
|
+
const title = t("shareLink.invoice", {
|
|
8064
|
+
name: userName
|
|
8065
|
+
});
|
|
7513
8066
|
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(title, {
|
|
7514
8067
|
button: {
|
|
7515
8068
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {}),
|
|
7516
|
-
text: "
|
|
8069
|
+
text: t("shareLink.pay"),
|
|
7517
8070
|
action: ()=>window.open(url, "_blank")
|
|
7518
8071
|
},
|
|
7519
8072
|
status: {
|
|
7520
8073
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {
|
|
7521
8074
|
colored: true
|
|
7522
8075
|
}),
|
|
7523
|
-
text: "
|
|
8076
|
+
text: t("shareLink.poweredBy"),
|
|
7524
8077
|
boldText: "PayPal"
|
|
7525
8078
|
},
|
|
7526
8079
|
duration: 10000
|
|
@@ -7533,23 +8086,25 @@ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
|
|
|
7533
8086
|
});
|
|
7534
8087
|
};
|
|
7535
8088
|
const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
8089
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7536
8090
|
const linksharePopupRef = (0, $3Sbms$useRef)(null);
|
|
7537
8091
|
const linkshareInputRef = (0, $3Sbms$useRef)(null);
|
|
7538
8092
|
const [linkshareInputValue, setLinkshareInputValue] = (0, $3Sbms$useState)("");
|
|
7539
8093
|
const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
|
|
7540
8094
|
const [isLoading, setIsLoading] = (0, $3Sbms$useState)(false);
|
|
7541
|
-
const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
8095
|
+
const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
7542
8096
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
7543
8097
|
const desktop = orientation === "landscape";
|
|
7544
8098
|
const onCustomMessage = (0, $3Sbms$useCallback)((event)=>{
|
|
7545
8099
|
const { type: type , data: data } = event.detail.event;
|
|
7546
|
-
if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data);
|
|
8100
|
+
if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data, t);
|
|
7547
8101
|
else if (type === "paypal_invoice") {
|
|
7548
8102
|
const sender = streams.find((stream)=>stream.id === event.detail.peerId);
|
|
7549
|
-
$98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url);
|
|
8103
|
+
$98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url, t);
|
|
7550
8104
|
}
|
|
7551
8105
|
}, [
|
|
7552
|
-
streams
|
|
8106
|
+
streams,
|
|
8107
|
+
t
|
|
7553
8108
|
]);
|
|
7554
8109
|
const onShareClick = async (event)=>{
|
|
7555
8110
|
event.preventDefault();
|
|
@@ -7561,7 +8116,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7561
8116
|
url = new URL(linkshareInputValue);
|
|
7562
8117
|
if (url.protocol === "http") url.protocol = "https";
|
|
7563
8118
|
} catch (err) {
|
|
7564
|
-
setErrorMessage("
|
|
8119
|
+
setErrorMessage(t("shareLink.invalid"));
|
|
7565
8120
|
console.error(err);
|
|
7566
8121
|
}
|
|
7567
8122
|
if (url) {
|
|
@@ -7573,18 +8128,27 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7573
8128
|
}
|
|
7574
8129
|
});
|
|
7575
8130
|
else {
|
|
7576
|
-
const data = await (
|
|
8131
|
+
const { linkData: data } = await fetch(`${options.streamApiURL}/shareLink`, {
|
|
8132
|
+
method: "POST",
|
|
8133
|
+
body: JSON.stringify({
|
|
8134
|
+
url: url.href
|
|
8135
|
+
})
|
|
8136
|
+
}).then((rawResponse)=>rawResponse.json());
|
|
7577
8137
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
|
|
7578
8138
|
type: $98933bbc579a3e66$export$a1eac7fdbc2db4af,
|
|
7579
8139
|
data: data
|
|
7580
8140
|
});
|
|
7581
8141
|
}
|
|
7582
|
-
if (streams.length < 2)
|
|
7583
|
-
|
|
8142
|
+
if (streams.length < 2) {
|
|
8143
|
+
const userName = streams[0]?.profile?.name || t("misc.user");
|
|
8144
|
+
(0, $3Sbms$reacthottoast)(t("shareLink.sentToUser", {
|
|
8145
|
+
name: userName
|
|
8146
|
+
}));
|
|
8147
|
+
} else (0, $3Sbms$reacthottoast)(t("shareLink.sentToUsers"));
|
|
7584
8148
|
setIsLinksharePopupVisible(false);
|
|
7585
8149
|
} catch (err) {
|
|
7586
8150
|
console.error(err);
|
|
7587
|
-
(0, $3Sbms$reacthottoast)("
|
|
8151
|
+
(0, $3Sbms$reacthottoast)(t("shareLink.failed"), {
|
|
7588
8152
|
className: "error"
|
|
7589
8153
|
});
|
|
7590
8154
|
}
|
|
@@ -7618,7 +8182,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7618
8182
|
children: [
|
|
7619
8183
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
|
|
7620
8184
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
7621
|
-
children: "
|
|
8185
|
+
children: t("shareLink.title2")
|
|
7622
8186
|
})
|
|
7623
8187
|
]
|
|
7624
8188
|
}),
|
|
@@ -7636,7 +8200,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7636
8200
|
children: [
|
|
7637
8201
|
/*#__PURE__*/ (0, $3Sbms$jsx)("label", {
|
|
7638
8202
|
htmlFor: "linkshare-popup-input",
|
|
7639
|
-
children: "
|
|
8203
|
+
children: t("shareLink.linkUrl")
|
|
7640
8204
|
}),
|
|
7641
8205
|
/*#__PURE__*/ (0, $3Sbms$jsx)("input", {
|
|
7642
8206
|
id: "linkshare-popup-input",
|
|
@@ -7662,10 +8226,10 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7662
8226
|
size: "18px"
|
|
7663
8227
|
}),
|
|
7664
8228
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7665
|
-
children: "
|
|
8229
|
+
children: t("shareLink.creating")
|
|
7666
8230
|
})
|
|
7667
8231
|
]
|
|
7668
|
-
}) : "
|
|
8232
|
+
}) : t("shareLink.title")
|
|
7669
8233
|
})
|
|
7670
8234
|
]
|
|
7671
8235
|
})
|
|
@@ -7710,6 +8274,7 @@ var $01986a58bfba8001$export$2e2bcd8739ae039 = $01986a58bfba8001$var$Settings;
|
|
|
7710
8274
|
|
|
7711
8275
|
|
|
7712
8276
|
|
|
8277
|
+
|
|
7713
8278
|
const $61b9018279e658f9$export$104f28dc79f055f4 = (0, $3Sbms$styledcomponents).div`
|
|
7714
8279
|
display: flex;
|
|
7715
8280
|
flex: 1;
|
|
@@ -7748,6 +8313,7 @@ const $61b9018279e658f9$export$3a4deda42b6182b7 = (0, $3Sbms$styledcomponents).b
|
|
|
7748
8313
|
|
|
7749
8314
|
|
|
7750
8315
|
const $df41bfe6da05853a$var$EndView = ()=>{
|
|
8316
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7751
8317
|
const { streamState: streamState , setStreamState: setStreamState } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
7752
8318
|
const ended = streamState === "ended";
|
|
7753
8319
|
const terminated = streamState === "terminated";
|
|
@@ -7769,17 +8335,17 @@ const $df41bfe6da05853a$var$EndView = ()=>{
|
|
|
7769
8335
|
}),
|
|
7770
8336
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $61b9018279e658f9$export$eebc018855fb0cb6), {
|
|
7771
8337
|
children: [
|
|
7772
|
-
ended && "
|
|
7773
|
-
terminated && "
|
|
7774
|
-
expired && "
|
|
8338
|
+
ended && t("endView.callLeft"),
|
|
8339
|
+
terminated && t("endView.callEnded"),
|
|
8340
|
+
expired && t("endView.tooLate")
|
|
7775
8341
|
]
|
|
7776
8342
|
}),
|
|
7777
8343
|
expired && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$f4e7b895a81715e9), {
|
|
7778
|
-
children: "
|
|
8344
|
+
children: t("endView.callIsOver")
|
|
7779
8345
|
}),
|
|
7780
8346
|
ended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$3a4deda42b6182b7), {
|
|
7781
8347
|
onClick: onGoBackClick,
|
|
7782
|
-
children: "
|
|
8348
|
+
children: t("endView.goBack")
|
|
7783
8349
|
}),
|
|
7784
8350
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f81bfa56534026c2$export$ad5f39c592532e2d), {})
|
|
7785
8351
|
]
|
|
@@ -8138,6 +8704,7 @@ var $d6008ea114507578$export$2e2bcd8739ae039 = $d6008ea114507578$var$SvgDefiniti
|
|
|
8138
8704
|
|
|
8139
8705
|
|
|
8140
8706
|
|
|
8707
|
+
|
|
8141
8708
|
const $fdbe2be8571dfcd7$export$8bac64dfa46a096a = (0, $3Sbms$styledcomponents).div`
|
|
8142
8709
|
display: flex;
|
|
8143
8710
|
justify-content: center;
|
|
@@ -8190,14 +8757,15 @@ const $fdbe2be8571dfcd7$export$d39b0d24481757e7 = (0, $3Sbms$styledcomponents).b
|
|
|
8190
8757
|
|
|
8191
8758
|
|
|
8192
8759
|
const $6aca0f707e80bf63$var$BlockedDevicesPopup = ({ close: close })=>{
|
|
8760
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
8193
8761
|
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$8bac64dfa46a096a), {
|
|
8194
8762
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $fdbe2be8571dfcd7$export$f2f6e48f0181f95d), {
|
|
8195
8763
|
children: [
|
|
8196
8764
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$b834616c6081368f), {
|
|
8197
|
-
children: "
|
|
8765
|
+
children: t("notifications.blockedMicrophonePopupTitle")
|
|
8198
8766
|
}),
|
|
8199
8767
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$12ed2ca69ff6905b), {
|
|
8200
|
-
children: "
|
|
8768
|
+
children: t("notifications.blockedMicrophonePopup")
|
|
8201
8769
|
}),
|
|
8202
8770
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$d39b0d24481757e7), {
|
|
8203
8771
|
onClick: close,
|
|
@@ -8523,7 +9091,7 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
|
|
|
8523
9091
|
|
|
8524
9092
|
|
|
8525
9093
|
const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
|
|
8526
|
-
const $26ed036cbc17809a$var$currentLanguage = (0, $
|
|
9094
|
+
const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
|
|
8527
9095
|
let $26ed036cbc17809a$var$timestampCriticalError = -1;
|
|
8528
9096
|
const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
8529
9097
|
const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
|
|
@@ -8536,7 +9104,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8536
9104
|
const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
|
|
8537
9105
|
const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $3Sbms$useState)(false);
|
|
8538
9106
|
const [theme, setTheme] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentTheme);
|
|
8539
|
-
const [language, setLanguage] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentLanguage);
|
|
9107
|
+
const [language, setLanguage] = (0, $3Sbms$useState)(options.language || $26ed036cbc17809a$var$currentLanguage);
|
|
8540
9108
|
const [profile1, setProfile] = (0, $3Sbms$useState)({});
|
|
8541
9109
|
const [muted, setMuted] = (0, $3Sbms$useState)(true);
|
|
8542
9110
|
const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
|
|
@@ -8634,6 +9202,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8634
9202
|
(0, $3Sbms$useEffect)(()=>{
|
|
8635
9203
|
try {
|
|
8636
9204
|
localStorage.setItem("stream_ui_language", language);
|
|
9205
|
+
(0, $384d985bb9605c35$export$2e2bcd8739ae039).changeLanguage(language);
|
|
8637
9206
|
} catch (localStorageError) {
|
|
8638
9207
|
console.warn(localStorageError);
|
|
8639
9208
|
}
|
|
@@ -8740,6 +9309,7 @@ var $26ed036cbc17809a$export$2e2bcd8739ae039 = $26ed036cbc17809a$var$StreamUI;
|
|
|
8740
9309
|
|
|
8741
9310
|
|
|
8742
9311
|
|
|
9312
|
+
|
|
8743
9313
|
const $24075a5d702d64b3$var$currentURL = new URL(window.location.href);
|
|
8744
9314
|
const $24075a5d702d64b3$var$microphoneEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("microphone-enabled") !== "0";
|
|
8745
9315
|
const $24075a5d702d64b3$var$cameraEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("camera-enabled") === "1";
|
|
@@ -8786,7 +9356,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
|
|
|
8786
9356
|
dispatchEvent: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).dispatchEvent.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8787
9357
|
getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8788
9358
|
setProfile: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8789
|
-
/* Should not be documented */ setConfig: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setConfig.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2))
|
|
9359
|
+
/* Should not be documented */ setConfig: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setConfig.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
9360
|
+
setLogLevel: (level)=>(0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039).setLogLevel(level)
|
|
8790
9361
|
};
|
|
8791
9362
|
window.streamUI = $24075a5d702d64b3$export$3f94917203ab7078;
|
|
8792
9363
|
// Backward compatibility
|