@snapcall/stream-ui 1.3.0 → 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 +1482 -679
- package/dist/stream-ui.js +1482 -679
- package/dist/stream-ui.umd.js +426 -185
- package/dist/types.d.ts +89 -61
- package/package.json +6 -2
package/dist/stream-ui.esm.js
CHANGED
|
@@ -4,11 +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";
|
|
12
|
+
import {captureException as $3Sbms$captureException, addBreadcrumb as $3Sbms$addBreadcrumb, setTag as $3Sbms$setTag} from "@sentry/browser";
|
|
13
|
+
import {Producer as $3Sbms$Producer} from "mediasoup-client/lib/Producer";
|
|
10
14
|
import {Device as $3Sbms$Device} from "mediasoup-client";
|
|
11
|
-
import {setTag as $3Sbms$setTag, addBreadcrumb as $3Sbms$addBreadcrumb, captureException as $3Sbms$captureException} from "@sentry/browser";
|
|
12
15
|
import {toCanvas as $3Sbms$toCanvas} from "qrcode";
|
|
13
16
|
|
|
14
17
|
|
|
@@ -303,11 +306,490 @@ const $a5146f9062d7bf28$export$3a57e165650c636f = (message, options = {})=>{
|
|
|
303
306
|
|
|
304
307
|
|
|
305
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
|
+
|
|
306
716
|
|
|
307
717
|
|
|
308
718
|
|
|
309
719
|
|
|
310
720
|
|
|
721
|
+
|
|
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");
|
|
311
793
|
const $67e45b2e30dcc030$var$audioContextConstructor = window.AudioContext || window.webkitAudioContext;
|
|
312
794
|
const $67e45b2e30dcc030$var$AUDIO_MUTE_DETECTION_TIME = 2000;
|
|
313
795
|
const $67e45b2e30dcc030$var$SPEAK_DETECTION_TIME = 500;
|
|
@@ -405,10 +887,10 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
|
|
|
405
887
|
try {
|
|
406
888
|
this.audioStreamSource.disconnect(this.analyser);
|
|
407
889
|
} catch (err1) {
|
|
408
|
-
|
|
890
|
+
$67e45b2e30dcc030$var$log.error("release", "audioStreamSource failed to disconnect", err1);
|
|
409
891
|
}
|
|
410
892
|
this.audioContext.close().catch((err)=>{
|
|
411
|
-
|
|
893
|
+
$67e45b2e30dcc030$var$log.error("release", "audioContext failed to close", err);
|
|
412
894
|
});
|
|
413
895
|
this.audioLevels = [];
|
|
414
896
|
}
|
|
@@ -418,6 +900,8 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
|
|
|
418
900
|
}
|
|
419
901
|
|
|
420
902
|
|
|
903
|
+
|
|
904
|
+
const $82e31ca38889c079$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("AudioRenderer.ts");
|
|
421
905
|
class $82e31ca38889c079$var$AudioRenderer {
|
|
422
906
|
constructor({ consumerId: consumerId }){
|
|
423
907
|
this.consumerId = consumerId;
|
|
@@ -437,9 +921,12 @@ class $82e31ca38889c079$var$AudioRenderer {
|
|
|
437
921
|
async setSink(sinkId) {
|
|
438
922
|
await this.audio.setSinkId?.(sinkId);
|
|
439
923
|
}
|
|
924
|
+
getSink() {
|
|
925
|
+
return this.audio.sinkId;
|
|
926
|
+
}
|
|
440
927
|
async play() {
|
|
441
928
|
await this.audio.play().catch((err)=>{
|
|
442
|
-
|
|
929
|
+
$82e31ca38889c079$var$log.warn("play", "failed to play");
|
|
443
930
|
setTimeout(()=>{
|
|
444
931
|
this.play();
|
|
445
932
|
}, 1000);
|
|
@@ -509,6 +996,132 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
|
|
|
509
996
|
|
|
510
997
|
|
|
511
998
|
|
|
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");
|
|
512
1125
|
const $c31e3fb4360572af$export$818d60b2e626da0c = {
|
|
513
1126
|
WEBRTC_FAILED: "WRTC1",
|
|
514
1127
|
WEBRTC_RECOVER_ERROR: "WRTC2",
|
|
@@ -523,7 +1136,8 @@ const $c31e3fb4360572af$export$d21ffcc5eb136bfa = {
|
|
|
523
1136
|
},
|
|
524
1137
|
height: {
|
|
525
1138
|
ideal: 240
|
|
526
|
-
}
|
|
1139
|
+
},
|
|
1140
|
+
qualityIndex: 3
|
|
527
1141
|
},
|
|
528
1142
|
vga: {
|
|
529
1143
|
width: {
|
|
@@ -531,7 +1145,8 @@ const $c31e3fb4360572af$export$d21ffcc5eb136bfa = {
|
|
|
531
1145
|
},
|
|
532
1146
|
height: {
|
|
533
1147
|
ideal: 480
|
|
534
|
-
}
|
|
1148
|
+
},
|
|
1149
|
+
qualityIndex: 2
|
|
535
1150
|
},
|
|
536
1151
|
hd: {
|
|
537
1152
|
width: {
|
|
@@ -539,7 +1154,8 @@ const $c31e3fb4360572af$export$d21ffcc5eb136bfa = {
|
|
|
539
1154
|
},
|
|
540
1155
|
height: {
|
|
541
1156
|
ideal: 720
|
|
542
|
-
}
|
|
1157
|
+
},
|
|
1158
|
+
qualityIndex: 1
|
|
543
1159
|
}
|
|
544
1160
|
};
|
|
545
1161
|
const $c31e3fb4360572af$var$WEBCAM_SIMULCAST_ENCODINGS = [
|
|
@@ -566,35 +1182,34 @@ const $c31e3fb4360572af$var$SCREEN_SHARING_SIMULCAST_ENCODINGS = [
|
|
|
566
1182
|
maxBitrate: 6000000
|
|
567
1183
|
},
|
|
568
1184
|
];
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
}).then((response)=>{
|
|
577
|
-
if (response.ok) return response.json();
|
|
578
|
-
throw new Error("Invalid agent info");
|
|
579
|
-
});
|
|
580
|
-
return agent;
|
|
581
|
-
};
|
|
1185
|
+
class $c31e3fb4360572af$var$SnapcallEvent extends CustomEvent {
|
|
1186
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
1187
|
+
constructor(name, data){
|
|
1188
|
+
super(name, data);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
582
1191
|
const $c31e3fb4360572af$var$StreamerEventTargetType = EventTarget;
|
|
583
1192
|
class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$StreamerEventTargetType {
|
|
1193
|
+
mediasoupTransport = {};
|
|
584
1194
|
pendingDeviceRequest = {};
|
|
585
1195
|
joinOptions = {};
|
|
586
1196
|
devicesList = [];
|
|
587
1197
|
constructor(){
|
|
588
1198
|
super();
|
|
589
1199
|
navigator.mediaDevices.addEventListener("devicechange", ()=>this.onDeviceChange());
|
|
590
|
-
this.
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
1200
|
+
this.config = {
|
|
1201
|
+
apiUrl: String("https://api.snapcall.io/v2"),
|
|
1202
|
+
streamerServer: String("wss://g.snapcall.io/stream"),
|
|
1203
|
+
streamerApi: String("https://g.snapcall.io/stream"),
|
|
1204
|
+
iceServers: [
|
|
1205
|
+
{
|
|
1206
|
+
urls: "turns:t.snapcall.io:443?transport=tcp,turns:t2.snapcall.io:443?transport=tcp,turn:t.snapcall.io:80?transport=tcp,turn:t2.snapcall.io:80?transport=tcp,turn:t.snapcall.io:80?transport=udp,turn:t2.snapcall.io:80?transport=udp"?.split(",") || [],
|
|
1207
|
+
username: "test",
|
|
1208
|
+
credential: "test",
|
|
1209
|
+
credentialType: "password"
|
|
1210
|
+
},
|
|
1211
|
+
]
|
|
1212
|
+
};
|
|
598
1213
|
this.peers = new Map();
|
|
599
1214
|
this.consumers = new Map();
|
|
600
1215
|
this.webcams = new Map();
|
|
@@ -615,6 +1230,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
615
1230
|
this.screenshareProducer = null;
|
|
616
1231
|
this.customMessages = new Map();
|
|
617
1232
|
this.audioRenderers = {};
|
|
1233
|
+
this.profile = {};
|
|
618
1234
|
}
|
|
619
1235
|
getState() {
|
|
620
1236
|
const peers = [];
|
|
@@ -640,14 +1256,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
640
1256
|
});
|
|
641
1257
|
peers.push({
|
|
642
1258
|
peerId: key,
|
|
643
|
-
|
|
1259
|
+
profile: peer.profile,
|
|
644
1260
|
deviceState: deviceState
|
|
645
1261
|
});
|
|
646
1262
|
});
|
|
647
1263
|
return {
|
|
648
1264
|
roomId: this.roomId,
|
|
649
1265
|
peerId: this.peerId,
|
|
650
|
-
|
|
1266
|
+
profile: this.profile,
|
|
651
1267
|
callId: undefined,
|
|
652
1268
|
deviceState: this.getDevicesState(),
|
|
653
1269
|
peers: peers
|
|
@@ -655,9 +1271,10 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
655
1271
|
}
|
|
656
1272
|
onStartSpeak() {
|
|
657
1273
|
if (this.micProducer && !this.micProducer.paused) {
|
|
658
|
-
const event = new
|
|
1274
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("localStartSpeak", {
|
|
659
1275
|
cancelable: true,
|
|
660
|
-
bubbles: true
|
|
1276
|
+
bubbles: true,
|
|
1277
|
+
detail: {}
|
|
661
1278
|
});
|
|
662
1279
|
this.dispatchEvent(event);
|
|
663
1280
|
this.protoo.notify("startSpeak");
|
|
@@ -665,13 +1282,15 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
665
1282
|
}
|
|
666
1283
|
onStopSpeak() {
|
|
667
1284
|
if (this.micProducer && !this.micProducer.paused) {
|
|
668
|
-
const event = new
|
|
1285
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("localStopSpeak", {
|
|
1286
|
+
detail: {}
|
|
1287
|
+
});
|
|
669
1288
|
this.dispatchEvent(event);
|
|
670
1289
|
this.protoo.notify("stopSpeak");
|
|
671
1290
|
}
|
|
672
1291
|
}
|
|
673
1292
|
onCriticalError(code) {
|
|
674
|
-
const event = new
|
|
1293
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("criticalError", {
|
|
675
1294
|
detail: {
|
|
676
1295
|
code: code
|
|
677
1296
|
}
|
|
@@ -679,7 +1298,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
679
1298
|
this.dispatchEvent(event);
|
|
680
1299
|
}
|
|
681
1300
|
async generateToken(bid) {
|
|
682
|
-
const url =
|
|
1301
|
+
const url = this.config.streamerApi;
|
|
683
1302
|
const { token: token } = await fetch(`${url}/stream`, {
|
|
684
1303
|
method: "post",
|
|
685
1304
|
headers: {
|
|
@@ -698,7 +1317,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
698
1317
|
if (!this.peerId) this.peerId = (0, $3Sbms$v4)();
|
|
699
1318
|
let url;
|
|
700
1319
|
try {
|
|
701
|
-
const { instanceId: instanceId } = await fetch(`${
|
|
1320
|
+
const { instanceId: instanceId } = await fetch(`${this.config.streamerApi}/instance/${this.roomId}`, {
|
|
702
1321
|
method: "get",
|
|
703
1322
|
headers: {
|
|
704
1323
|
"Content-Type": "application/json"
|
|
@@ -707,9 +1326,11 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
707
1326
|
if (response.ok) return response.json();
|
|
708
1327
|
throw new Error("Invalid room ID");
|
|
709
1328
|
});
|
|
710
|
-
url = `${
|
|
1329
|
+
url = `${this.config.streamerServer}/${instanceId}/?roomId=${room}&peerId=${this.peerId}`;
|
|
711
1330
|
} catch (roomError) {
|
|
712
|
-
const event = new
|
|
1331
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("invalidRoom", {
|
|
1332
|
+
detail: {}
|
|
1333
|
+
});
|
|
713
1334
|
this.dispatchEvent(event);
|
|
714
1335
|
}
|
|
715
1336
|
if (!url) throw new Error("Invalid socket URL");
|
|
@@ -724,28 +1345,29 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
724
1345
|
this.joinRoom();
|
|
725
1346
|
});
|
|
726
1347
|
this.protoo.on("failed", ()=>{
|
|
727
|
-
|
|
1348
|
+
$c31e3fb4360572af$var$log.error("protoo.on", "failed");
|
|
728
1349
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
|
|
729
1350
|
});
|
|
730
1351
|
this.protoo.on("disconnected", ()=>{
|
|
731
|
-
|
|
1352
|
+
$c31e3fb4360572af$var$log.error("protoo.on", "disconnected");
|
|
732
1353
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
|
|
733
1354
|
});
|
|
734
|
-
this.protoo.on("close", ()
|
|
1355
|
+
this.protoo.on("close", ()=>$c31e3fb4360572af$var$log.log("protoo.on", "close :("));
|
|
735
1356
|
this.protoo.on("notification", async (notification)=>{
|
|
736
|
-
|
|
1357
|
+
$c31e3fb4360572af$var$log.log("notification", notification);
|
|
737
1358
|
if (notification.method === "newPeer") {
|
|
738
|
-
const { id: id ,
|
|
1359
|
+
const { id: id , profile: profile } = notification.data;
|
|
739
1360
|
this.peers.set(id, {
|
|
740
1361
|
id: id,
|
|
741
1362
|
peerId: id,
|
|
742
|
-
|
|
1363
|
+
profile: profile,
|
|
743
1364
|
producersData: []
|
|
744
1365
|
});
|
|
745
|
-
const event = new
|
|
1366
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("newPeer", {
|
|
746
1367
|
detail: {
|
|
747
1368
|
peerId: id,
|
|
748
|
-
displayName:
|
|
1369
|
+
displayName: profile.name,
|
|
1370
|
+
profile: profile
|
|
749
1371
|
}
|
|
750
1372
|
});
|
|
751
1373
|
this.dispatchEvent(event);
|
|
@@ -765,7 +1387,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
765
1387
|
consumerId: consumer.id
|
|
766
1388
|
});
|
|
767
1389
|
});
|
|
768
|
-
const event = new
|
|
1390
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("peerClosed", {
|
|
769
1391
|
detail: {
|
|
770
1392
|
peerId: peerId
|
|
771
1393
|
}
|
|
@@ -778,39 +1400,60 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
778
1400
|
});
|
|
779
1401
|
} else if (notification.method === "displayName") {
|
|
780
1402
|
const { peerId: peerId , displayName: displayName } = notification.data;
|
|
781
|
-
const event = new
|
|
1403
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("displayName", {
|
|
1404
|
+
detail: {
|
|
1405
|
+
peerId: peerId,
|
|
1406
|
+
displayName: displayName,
|
|
1407
|
+
profile: {}
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
this.dispatchEvent(event);
|
|
1411
|
+
} else if (notification.method === "profile") {
|
|
1412
|
+
const { peerId: peerId , profile: profile } = notification.data;
|
|
1413
|
+
const event = new CustomEvent("profileUpdate", {
|
|
782
1414
|
detail: {
|
|
783
1415
|
peerId: peerId,
|
|
784
|
-
|
|
1416
|
+
profile: profile
|
|
785
1417
|
}
|
|
786
1418
|
});
|
|
787
1419
|
this.dispatchEvent(event);
|
|
788
1420
|
} else if (notification.method === "requestDevice") {
|
|
789
1421
|
this.pendingDeviceRequest[notification.data.requestId] = notification.data;
|
|
790
|
-
const event = new
|
|
1422
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("requestDevice", {
|
|
791
1423
|
detail: notification.data
|
|
792
1424
|
});
|
|
793
1425
|
this.dispatchEvent(event);
|
|
794
1426
|
} else if (notification.method === "startSpeak") ;
|
|
795
1427
|
else if (notification.method === "stopSpeak") ;
|
|
796
1428
|
else if (notification.method === "producerPaused" || notification.method === "producerResumed") {
|
|
1429
|
+
const { peerId: peerId , producerId: producerId , deviceType: deviceType } = notification.data;
|
|
797
1430
|
if (notification.data?.deviceType === "microphone") {
|
|
798
|
-
const { peerId: peerId , producerId: producerId } = notification.data;
|
|
799
1431
|
const microphoneData = this.peers.get(peerId)?.producersData.find((ele)=>producerId === ele.producerId);
|
|
800
1432
|
if (microphoneData) microphoneData.paused = notification.method === "producerPaused" ? true : false;
|
|
801
1433
|
}
|
|
802
|
-
|
|
803
|
-
|
|
1434
|
+
let id = producerId;
|
|
1435
|
+
for (let [, value] of Array.from(this.consumers.entries()))if (value.mediaSoupConsumer.producerId === producerId) {
|
|
1436
|
+
id = value.mediaSoupConsumer.id;
|
|
1437
|
+
break;
|
|
1438
|
+
}
|
|
1439
|
+
const eventName = notification.method === "producerPaused" ? "mediaPause" : "mediaResume";
|
|
1440
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent(eventName, {
|
|
1441
|
+
detail: {
|
|
1442
|
+
mediaId: id,
|
|
1443
|
+
peerId: peerId,
|
|
1444
|
+
deviceType: deviceType,
|
|
1445
|
+
paused: notification.method === "producerPaused"
|
|
1446
|
+
}
|
|
804
1447
|
});
|
|
805
1448
|
this.dispatchEvent(event);
|
|
806
1449
|
} else if (notification.method === "requestDeviceResult") {
|
|
807
|
-
const event = new
|
|
1450
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent(notification.method, {
|
|
808
1451
|
detail: notification.data
|
|
809
1452
|
});
|
|
810
1453
|
this.dispatchEvent(event);
|
|
811
1454
|
} else if (notification.method === "terminateRoom") {
|
|
812
1455
|
this.release();
|
|
813
|
-
const event = new
|
|
1456
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent(notification.method, {
|
|
814
1457
|
detail: notification.data
|
|
815
1458
|
});
|
|
816
1459
|
this.dispatchEvent(event);
|
|
@@ -835,7 +1478,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
835
1478
|
const sortedChunks = message.chunks.sort((a, b)=>a.index - b.index);
|
|
836
1479
|
const mergedChunks = sortedChunks.reduce((originalMessage, chunk)=>originalMessage + chunk.data, "");
|
|
837
1480
|
const parsedEvent = JSON.parse(mergedChunks);
|
|
838
|
-
const event = new
|
|
1481
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("customMessage", {
|
|
839
1482
|
detail: {
|
|
840
1483
|
...notification.data,
|
|
841
1484
|
event: parsedEvent
|
|
@@ -847,173 +1490,74 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
847
1490
|
}
|
|
848
1491
|
});
|
|
849
1492
|
}
|
|
850
|
-
deviceAutoDetection() {
|
|
851
|
-
try {
|
|
852
|
-
const ua = navigator.userAgent;
|
|
853
|
-
const browser = $3Sbms$getParser(ua);
|
|
854
|
-
$3Sbms$setTag("DeviceDetectionForced", true);
|
|
855
|
-
$3Sbms$addBreadcrumb({
|
|
856
|
-
type: "debug",
|
|
857
|
-
category: "browser",
|
|
858
|
-
data: browser.getResult()
|
|
859
|
-
});
|
|
860
|
-
const browserOs = browser.getOS();
|
|
861
|
-
if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new $3Sbms$Device({
|
|
862
|
-
handlerName: "Safari12"
|
|
863
|
-
});
|
|
864
|
-
throw Error("failed to autoDetect browser, falling back to chrome 74");
|
|
865
|
-
} catch (error) {
|
|
866
|
-
console.error(error);
|
|
867
|
-
$3Sbms$captureException(error);
|
|
868
|
-
this.dispatchEvent(new CustomEvent("browserDetectionFailed"));
|
|
869
|
-
}
|
|
870
|
-
return new $3Sbms$Device({
|
|
871
|
-
handlerName: "Chrome74"
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
createDevice() {
|
|
875
|
-
try {
|
|
876
|
-
return new $3Sbms$Device();
|
|
877
|
-
} catch (error) {
|
|
878
|
-
console.error("failed to detects device from mediasoup, fallback on auto detection", error);
|
|
879
|
-
return this.deviceAutoDetection();
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
1493
|
closeWebrtcTransport(transport) {
|
|
883
|
-
transport?.transport
|
|
1494
|
+
transport?.transport?.close();
|
|
884
1495
|
clearTimeout(transport?.disconnectTimeout);
|
|
885
1496
|
}
|
|
886
|
-
async
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
iceParameters: transportInfo.iceParameters,
|
|
891
|
-
iceCandidates: transportInfo.iceCandidates,
|
|
892
|
-
dtlsParameters: {
|
|
893
|
-
...transportInfo.dtlsParameters,
|
|
894
|
-
role: "auto"
|
|
895
|
-
},
|
|
896
|
-
sctpParameters: transportInfo.sctpParameters,
|
|
897
|
-
iceServers: this.iceServers,
|
|
898
|
-
proprietaryConstraints: {
|
|
899
|
-
optional: [
|
|
900
|
-
{
|
|
901
|
-
googDscp: true
|
|
902
|
-
}
|
|
903
|
-
]
|
|
904
|
-
},
|
|
905
|
-
additionalSettings: {
|
|
906
|
-
encodedInsertableStreams: false
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
|
-
}
|
|
910
|
-
async createSendTransport(kind1) {
|
|
911
|
-
const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig());
|
|
912
|
-
sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
913
|
-
console.log("dtlsParameters", sendTransport.id, dtlsParameters);
|
|
914
|
-
this.protoo.request("connectWebRtcTransport", {
|
|
915
|
-
transportId: sendTransport.id,
|
|
916
|
-
dtlsParameters: dtlsParameters
|
|
917
|
-
}).then(callback).catch(errback);
|
|
918
|
-
});
|
|
919
|
-
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) {
|
|
920
1501
|
try {
|
|
921
|
-
const
|
|
922
|
-
|
|
1502
|
+
const promise = this.streamerMediasoup.createTransport(this.protoo, direction);
|
|
1503
|
+
transport = {
|
|
1504
|
+
disconnectTimeout: undefined,
|
|
923
1505
|
kind: kind,
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
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;
|
|
933
1514
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
disconnectTimeout: undefined,
|
|
938
|
-
kind: kind1
|
|
939
|
-
};
|
|
940
|
-
this.listenWebRTCTransportStats(result);
|
|
941
|
-
return result;
|
|
942
|
-
}
|
|
943
|
-
async createRecvTransport(kind) {
|
|
944
|
-
const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig());
|
|
945
|
-
recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
|
|
946
|
-
console.log("dtls", recvTransport.id, dtlsParameters);
|
|
947
|
-
this.protoo.request("connectWebRtcTransport", {
|
|
948
|
-
transportId: recvTransport.id,
|
|
949
|
-
dtlsParameters: dtlsParameters
|
|
950
|
-
}).then(callback).catch(errback);
|
|
951
|
-
});
|
|
952
|
-
const result = {
|
|
953
|
-
transport: recvTransport,
|
|
954
|
-
disconnectTimeout: undefined,
|
|
955
|
-
kind: kind
|
|
956
|
-
};
|
|
957
|
-
this.listenWebRTCTransportStats(result);
|
|
958
|
-
return result;
|
|
1515
|
+
return transport.transport;
|
|
1516
|
+
} else if (transport && transport.transport) return transport.transport;
|
|
1517
|
+
else return transport.createPromise;
|
|
959
1518
|
}
|
|
960
|
-
|
|
1519
|
+
listenWebRTCTransportStates(transport) {
|
|
1520
|
+
if (!transport.transport) throw new Error("can not listen states of undefined transport");
|
|
961
1521
|
transport.transport.on("connectionstatechange", (event)=>{
|
|
962
|
-
if (!transport.transport.closed) {
|
|
963
|
-
|
|
1522
|
+
if (transport.transport && !transport.transport.closed) {
|
|
1523
|
+
$c31e3fb4360572af$var$log.log("recv connectionstatechange: ", event);
|
|
964
1524
|
if (event === "disconnected") transport.disconnectTimeout = setTimeout(()=>{
|
|
965
|
-
|
|
966
|
-
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);
|
|
967
1527
|
}, 5000);
|
|
968
1528
|
else if (event === "connected") clearTimeout(transport.disconnectTimeout);
|
|
969
1529
|
else if (event === "failed") {
|
|
970
1530
|
const err = new Error(`webRTC transport state failed for ${transport.kind}`);
|
|
971
1531
|
$3Sbms$captureException(err, {
|
|
972
1532
|
extra: {
|
|
973
|
-
direction: transport.transport
|
|
974
|
-
id: transport.transport
|
|
1533
|
+
direction: transport.transport?.direction,
|
|
1534
|
+
id: transport.transport?.id,
|
|
975
1535
|
kind: transport.kind
|
|
976
1536
|
}
|
|
977
1537
|
});
|
|
978
|
-
|
|
1538
|
+
$c31e3fb4360572af$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
|
|
979
1539
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_FAILED);
|
|
980
1540
|
}
|
|
981
1541
|
}
|
|
982
1542
|
});
|
|
983
1543
|
}
|
|
984
1544
|
async joinRoom() {
|
|
985
|
-
this.
|
|
986
|
-
this.routerRtpCapabilities = await this.protoo.request("getRouterRtpCapabilities");
|
|
987
|
-
this.routerRtpCapabilities.headerExtensions = this.routerRtpCapabilities.headerExtensions?.filter((ext)=>{
|
|
988
|
-
return ext.uri !== "urn:3gpp:video-orientation";
|
|
989
|
-
});
|
|
990
|
-
await this.mediasoupDevice.load({
|
|
991
|
-
routerRtpCapabilities: this.routerRtpCapabilities
|
|
992
|
-
});
|
|
993
|
-
try {
|
|
994
|
-
this.recvAudioTransports = await this.createRecvTransport("audio");
|
|
995
|
-
this.sendAudioTransports = await this.createSendTransport("audio");
|
|
996
|
-
this.recvVideoTransports = await this.createRecvTransport("video");
|
|
997
|
-
this.sendVideoTransports = await this.createSendTransport("video");
|
|
998
|
-
} catch (err) {
|
|
999
|
-
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
|
|
1000
|
-
throw err;
|
|
1001
|
-
}
|
|
1545
|
+
this.streamerMediasoup = await (0, $a2f0e3c29b11c88e$export$2e2bcd8739ae039).create(this.protoo, this.config);
|
|
1002
1546
|
// now we join
|
|
1003
1547
|
if (this.joinOptions.apiKey && this.joinOptions.email) try {
|
|
1004
|
-
const agentInfo = await
|
|
1548
|
+
const agentInfo = await this.fetchAgentInfo({
|
|
1005
1549
|
apiKey: this.joinOptions.apiKey,
|
|
1006
1550
|
email: this.joinOptions.email
|
|
1007
1551
|
});
|
|
1008
|
-
if (agentInfo) this.dispatchEvent(new
|
|
1552
|
+
if (agentInfo) this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("agentIdentity", {
|
|
1009
1553
|
detail: {
|
|
1010
1554
|
success: true,
|
|
1011
1555
|
email: this.joinOptions.email
|
|
1012
1556
|
}
|
|
1013
1557
|
}));
|
|
1014
1558
|
} catch (agentInfoError) {
|
|
1015
|
-
|
|
1016
|
-
this.dispatchEvent(new
|
|
1559
|
+
$c31e3fb4360572af$var$log.warn("joinRoom", agentInfoError);
|
|
1560
|
+
this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("agentIdentity", {
|
|
1017
1561
|
detail: {
|
|
1018
1562
|
success: false
|
|
1019
1563
|
}
|
|
@@ -1031,7 +1575,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1031
1575
|
},
|
|
1032
1576
|
]));
|
|
1033
1577
|
const callId = await this.getCallId();
|
|
1034
|
-
this.dispatchEvent(new
|
|
1578
|
+
this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("enterRoom", {
|
|
1035
1579
|
detail: {
|
|
1036
1580
|
peerId: this.peerId,
|
|
1037
1581
|
peers: peers.map((peer)=>{
|
|
@@ -1043,8 +1587,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1043
1587
|
callId: callId
|
|
1044
1588
|
}
|
|
1045
1589
|
}));
|
|
1046
|
-
|
|
1590
|
+
$c31e3fb4360572af$var$log.log("joinRoom", "peers", peers);
|
|
1047
1591
|
if (this.joinOptions.displayName) await this.setDisplayName(this.joinOptions.displayName);
|
|
1592
|
+
if (this.joinOptions.profile) await this.setProfile(this.joinOptions.profile);
|
|
1048
1593
|
// Consume Peers
|
|
1049
1594
|
peers.forEach((peer)=>{
|
|
1050
1595
|
this.consumePeer({
|
|
@@ -1055,12 +1600,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1055
1600
|
}
|
|
1056
1601
|
async switchMicrophone(deviceId) {
|
|
1057
1602
|
try {
|
|
1058
|
-
|
|
1603
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "switching Microphone");
|
|
1059
1604
|
this.audioLevel?.release();
|
|
1060
1605
|
this.audioLevel = undefined;
|
|
1061
1606
|
if (this.micProducer && this.micProducer.track) {
|
|
1062
1607
|
this.micProducer?.track?.stop();
|
|
1063
|
-
|
|
1608
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "stopping previous track");
|
|
1064
1609
|
}
|
|
1065
1610
|
const stream = await this.handleGetUserMediaError("microphone", navigator.mediaDevices.getUserMedia({
|
|
1066
1611
|
audio: {
|
|
@@ -1070,14 +1615,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1070
1615
|
}
|
|
1071
1616
|
}));
|
|
1072
1617
|
this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
|
|
1073
|
-
this.audioLevel.analyse();
|
|
1618
|
+
// this.audioLevel.analyse();
|
|
1074
1619
|
const track = stream.getAudioTracks()[0];
|
|
1075
1620
|
await this.micProducer?.replaceTrack({
|
|
1076
1621
|
track: track
|
|
1077
1622
|
});
|
|
1078
|
-
|
|
1623
|
+
$c31e3fb4360572af$var$log.log("switchMicrophone", "switched Microphone");
|
|
1079
1624
|
} catch (error) {
|
|
1080
|
-
|
|
1625
|
+
$c31e3fb4360572af$var$log.error("switchMicrophone error", error);
|
|
1081
1626
|
await this.closeMicrophoneProducer();
|
|
1082
1627
|
}
|
|
1083
1628
|
}
|
|
@@ -1085,22 +1630,26 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1085
1630
|
const producerId = this.micProducer?.id;
|
|
1086
1631
|
this.micProducer?.close();
|
|
1087
1632
|
this.micProducer = undefined;
|
|
1088
|
-
const event = new
|
|
1633
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("microphoneMute", {
|
|
1634
|
+
detail: {}
|
|
1635
|
+
});
|
|
1089
1636
|
this.dispatchEvent(event);
|
|
1090
1637
|
await this.protoo.request("closeProducer", {
|
|
1091
1638
|
producerId: producerId
|
|
1092
1639
|
});
|
|
1093
1640
|
}
|
|
1094
1641
|
async onDeviceChange() {
|
|
1095
|
-
|
|
1096
|
-
const deviceListChangeEvent = new
|
|
1642
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "detecting device change");
|
|
1643
|
+
const deviceListChangeEvent = new $c31e3fb4360572af$var$SnapcallEvent("devicesListChange", {
|
|
1644
|
+
detail: {}
|
|
1645
|
+
});
|
|
1097
1646
|
this.dispatchEvent(deviceListChangeEvent);
|
|
1098
1647
|
if (!this.protoo.closed && this.micProducer) {
|
|
1099
1648
|
const lists = await navigator.mediaDevices.enumerateDevices();
|
|
1100
1649
|
const inputs = lists.filter((media)=>media.kind === "audioinput");
|
|
1101
1650
|
// chrome default device
|
|
1102
1651
|
if (inputs.length === 0) {
|
|
1103
|
-
|
|
1652
|
+
$c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input device");
|
|
1104
1653
|
await this.closeMicrophoneProducer();
|
|
1105
1654
|
return;
|
|
1106
1655
|
}
|
|
@@ -1111,21 +1660,21 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1111
1660
|
const change = lists.filter((elements)=>{
|
|
1112
1661
|
return !Boolean(this.devicesList.find((device)=>device.deviceId === elements.deviceId && device.label === elements.label));
|
|
1113
1662
|
});
|
|
1114
|
-
|
|
1663
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", change);
|
|
1115
1664
|
this.devicesList = lists;
|
|
1116
1665
|
const hasAudioInputChange = Boolean(change.find((device)=>device.kind === "audioinput"));
|
|
1117
1666
|
if (change.length !== 0 && hasAudioInputChange === false) {
|
|
1118
|
-
|
|
1667
|
+
$c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input change");
|
|
1119
1668
|
return;
|
|
1120
1669
|
}
|
|
1121
|
-
|
|
1670
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "detecting audio input change");
|
|
1122
1671
|
if (!this.audioInputDefaultDevice || this.audioInputDefaultDevice.label !== defaultDevice.label) {
|
|
1123
|
-
const event = new
|
|
1672
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("defaultAudioDeviceChange", {
|
|
1124
1673
|
detail: defaultDevice
|
|
1125
1674
|
});
|
|
1126
1675
|
this.audioInputDefaultDevice = defaultDevice;
|
|
1127
1676
|
this.dispatchEvent(event);
|
|
1128
|
-
|
|
1677
|
+
$c31e3fb4360572af$var$log.log("onDeviceChange", "new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
|
|
1129
1678
|
}
|
|
1130
1679
|
this.switchMicrophone("default");
|
|
1131
1680
|
}
|
|
@@ -1140,12 +1689,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1140
1689
|
}
|
|
1141
1690
|
}));
|
|
1142
1691
|
this.devicesList = await navigator.mediaDevices.enumerateDevices();
|
|
1143
|
-
|
|
1692
|
+
const transport = await this.getTransport("audio", "send");
|
|
1144
1693
|
this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
|
|
1145
|
-
this.audioLevel.analyse();
|
|
1694
|
+
// this.audioLevel.analyse();
|
|
1146
1695
|
const track = stream.getAudioTracks()[0];
|
|
1147
1696
|
const deviceType = "microphone";
|
|
1148
|
-
const micProducer = await
|
|
1697
|
+
const micProducer = await transport.produce({
|
|
1149
1698
|
track: track,
|
|
1150
1699
|
codecOptions: {
|
|
1151
1700
|
opusStereo: true,
|
|
@@ -1156,18 +1705,20 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1156
1705
|
}
|
|
1157
1706
|
});
|
|
1158
1707
|
micProducer.on("transportclose", ()=>{
|
|
1159
|
-
|
|
1708
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "micproducer transportclose");
|
|
1160
1709
|
});
|
|
1161
1710
|
track.addEventListener("ended", ()=>{
|
|
1162
|
-
|
|
1711
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "track ended!");
|
|
1163
1712
|
});
|
|
1164
1713
|
micProducer.on("trackended", async ()=>{
|
|
1165
|
-
|
|
1714
|
+
$c31e3fb4360572af$var$log.log("enableMicrophone", "microphone disconnected!");
|
|
1166
1715
|
if (navigator.mediaDevices.ondevicechange === undefined) this.closeMicrophoneProducer();
|
|
1167
1716
|
});
|
|
1168
1717
|
this.micProducer = micProducer;
|
|
1169
1718
|
this.muted = false;
|
|
1170
|
-
const event = new
|
|
1719
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("microphoneEnabled", {
|
|
1720
|
+
detail: {}
|
|
1721
|
+
});
|
|
1171
1722
|
this.dispatchEvent(event);
|
|
1172
1723
|
}
|
|
1173
1724
|
}
|
|
@@ -1179,7 +1730,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1179
1730
|
producerId: this.micProducer?.id
|
|
1180
1731
|
});
|
|
1181
1732
|
this.muted = true;
|
|
1182
|
-
const event = new
|
|
1733
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("microphoneMute", {
|
|
1734
|
+
detail: {}
|
|
1735
|
+
});
|
|
1183
1736
|
this.dispatchEvent(event);
|
|
1184
1737
|
}
|
|
1185
1738
|
}
|
|
@@ -1191,7 +1744,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1191
1744
|
producerId: this.micProducer.id
|
|
1192
1745
|
});
|
|
1193
1746
|
this.muted = false;
|
|
1194
|
-
const event = new
|
|
1747
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("microphoneUnmute", {
|
|
1748
|
+
detail: {}
|
|
1749
|
+
});
|
|
1195
1750
|
this.dispatchEvent(event);
|
|
1196
1751
|
}
|
|
1197
1752
|
}
|
|
@@ -1209,11 +1764,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1209
1764
|
}
|
|
1210
1765
|
}
|
|
1211
1766
|
release() {
|
|
1212
|
-
|
|
1213
|
-
this.closeWebrtcTransport(this.
|
|
1214
|
-
this.closeWebrtcTransport(this.recvAudioTransports);
|
|
1215
|
-
this.closeWebrtcTransport(this.sendVideoTransports);
|
|
1216
|
-
this.closeWebrtcTransport(this.recvVideoTransports);
|
|
1767
|
+
$c31e3fb4360572af$var$log.log("release");
|
|
1768
|
+
for(let key in this.mediasoupTransport)this.closeWebrtcTransport(this.mediasoupTransport[key]);
|
|
1217
1769
|
this.webcamTrack?.stop();
|
|
1218
1770
|
this.webcamTrack = null;
|
|
1219
1771
|
this.protooTransport.close();
|
|
@@ -1229,10 +1781,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1229
1781
|
}
|
|
1230
1782
|
endCall() {
|
|
1231
1783
|
this.release();
|
|
1232
|
-
const event = new
|
|
1784
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("leaveRoom", {
|
|
1785
|
+
detail: {}
|
|
1786
|
+
});
|
|
1233
1787
|
this.dispatchEvent(event);
|
|
1234
1788
|
const deprecatedEvent = new CustomEvent("snapcallEvent_callEnd");
|
|
1235
|
-
|
|
1789
|
+
window.dispatchEvent(deprecatedEvent);
|
|
1236
1790
|
}
|
|
1237
1791
|
terminateRoom() {
|
|
1238
1792
|
this.protoo.request("terminateRoom");
|
|
@@ -1246,7 +1800,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1246
1800
|
}
|
|
1247
1801
|
if (this.webcams.size === 0) this.webcam.device = null;
|
|
1248
1802
|
else if (!this.webcam.device) this.webcam.device = this.webcams.values().next().value;
|
|
1249
|
-
const event = new
|
|
1803
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("webcamsUpdate", {
|
|
1250
1804
|
detail: {
|
|
1251
1805
|
numberOfAvailableWebcams: this.webcams.size
|
|
1252
1806
|
}
|
|
@@ -1283,18 +1837,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1283
1837
|
}
|
|
1284
1838
|
}
|
|
1285
1839
|
async restartIce(transport) {
|
|
1286
|
-
|
|
1840
|
+
$c31e3fb4360572af$var$log.log("restartIce", transport.connectionState, transport.closed);
|
|
1287
1841
|
if (transport.connectionState === "disconnected" && !transport.closed) try {
|
|
1288
1842
|
const iceParameters = await this.protoo.request("restartIce", {
|
|
1289
1843
|
transportId: transport.id
|
|
1290
1844
|
});
|
|
1291
|
-
|
|
1845
|
+
$c31e3fb4360572af$var$log.log("restartIce", iceParameters);
|
|
1292
1846
|
await transport.restartIce({
|
|
1293
1847
|
iceParameters: iceParameters
|
|
1294
1848
|
});
|
|
1295
1849
|
} catch (err) {
|
|
1296
1850
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
|
|
1297
|
-
|
|
1851
|
+
$c31e3fb4360572af$var$log.log("restartIce", "restartIceFailed", err);
|
|
1298
1852
|
$3Sbms$captureException(err, {
|
|
1299
1853
|
extra: {
|
|
1300
1854
|
direction: transport.direction,
|
|
@@ -1303,7 +1857,16 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1303
1857
|
});
|
|
1304
1858
|
}
|
|
1305
1859
|
}
|
|
1306
|
-
|
|
1860
|
+
scaleVideoMediasConstraintsParameter(scale) {
|
|
1861
|
+
let videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["hd"];
|
|
1862
|
+
if (scale === 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["vga"];
|
|
1863
|
+
else if (scale > 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["qvga"];
|
|
1864
|
+
if (!this.webcam.resolution || $c31e3fb4360572af$export$d21ffcc5eb136bfa[this.webcam.resolution].qualityIndex >= videoResolution.qualityIndex) {
|
|
1865
|
+
$c31e3fb4360572af$var$log.log("scaleVideoMediasConstraintsParameter", `scaling video by ${scale}`, videoResolution);
|
|
1866
|
+
this.webcamProducer?.track?.applyConstraints(videoResolution);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
scaleVideoEncodingsParameter() {
|
|
1307
1870
|
try {
|
|
1308
1871
|
let videoCount = 0;
|
|
1309
1872
|
this.consumers.forEach((consumer)=>{
|
|
@@ -1319,14 +1882,16 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1319
1882
|
if (videoCount >= 9) scale = {
|
|
1320
1883
|
scaleResolutionDownBy: 4
|
|
1321
1884
|
};
|
|
1885
|
+
if (!(0, $3Sbms$Producer).prototype.setRtpEncodingParameters) return this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
|
|
1322
1886
|
if (this.webcamProducer && !this.webcamProducer.closed) {
|
|
1323
|
-
|
|
1887
|
+
$c31e3fb4360572af$var$log.log("scaleVideoEncodingsParameter", `scaling video by ${scale.scaleResolutionDownBy}`);
|
|
1324
1888
|
this.webcamProducer?.setRtpEncodingParameters?.(scale).catch((err)=>{
|
|
1325
|
-
|
|
1889
|
+
$c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleResolutionDownBy not supported", err);
|
|
1890
|
+
this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
|
|
1326
1891
|
});
|
|
1327
1892
|
}
|
|
1328
1893
|
} catch (error) {
|
|
1329
|
-
|
|
1894
|
+
$c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleVideo error", error);
|
|
1330
1895
|
}
|
|
1331
1896
|
}
|
|
1332
1897
|
async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
|
|
@@ -1353,7 +1918,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1353
1918
|
...$c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution]
|
|
1354
1919
|
}
|
|
1355
1920
|
}));
|
|
1356
|
-
|
|
1921
|
+
const transport = await this.getTransport("video", "send");
|
|
1922
|
+
if (!transport) throw new Error("video transport not found, can not switch");
|
|
1357
1923
|
const track = stream.getVideoTracks()[0];
|
|
1358
1924
|
this.webcamTrack = track;
|
|
1359
1925
|
await this.webcamProducer?.replaceTrack?.({
|
|
@@ -1365,7 +1931,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1365
1931
|
min: capabilities?.zoom?.min || 0,
|
|
1366
1932
|
max: capabilities?.zoom?.max || 0
|
|
1367
1933
|
};
|
|
1368
|
-
const event = new
|
|
1934
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("localVideoChange", {
|
|
1369
1935
|
detail: {
|
|
1370
1936
|
camera: this.getCurrentWebcam()
|
|
1371
1937
|
}
|
|
@@ -1384,7 +1950,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1384
1950
|
...$c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution]
|
|
1385
1951
|
}
|
|
1386
1952
|
}));
|
|
1387
|
-
|
|
1953
|
+
await this.updateWebcams();
|
|
1954
|
+
const transport = await this.getTransport("video", "send");
|
|
1388
1955
|
const track = stream.getVideoTracks()[0];
|
|
1389
1956
|
this.webcamTrack = track;
|
|
1390
1957
|
const capabilities = await track.getCapabilities?.() || navigator.mediaDevices.getSupportedConstraints?.();
|
|
@@ -1398,7 +1965,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1398
1965
|
videoGoogleStartBitrate: 1000
|
|
1399
1966
|
};
|
|
1400
1967
|
const deviceType = "webcam";
|
|
1401
|
-
this.webcamProducer = await
|
|
1968
|
+
this.webcamProducer = await transport.produce({
|
|
1402
1969
|
track: track,
|
|
1403
1970
|
encodings: encodings,
|
|
1404
1971
|
codecOptions: codecOptions,
|
|
@@ -1407,14 +1974,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1407
1974
|
deviceType: deviceType
|
|
1408
1975
|
}
|
|
1409
1976
|
});
|
|
1410
|
-
this.
|
|
1977
|
+
this.scaleVideoEncodingsParameter();
|
|
1411
1978
|
this.webcamProducer.on("transportclose", ()=>{
|
|
1412
1979
|
this.webcamProducer = null;
|
|
1413
1980
|
});
|
|
1414
1981
|
this.webcamProducer.on("trackended", ()=>{
|
|
1415
1982
|
this.disableVideo().catch(()=>{});
|
|
1416
1983
|
});
|
|
1417
|
-
const event = new
|
|
1984
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("localVideoAvailable", {
|
|
1418
1985
|
detail: {
|
|
1419
1986
|
camera: this.getCurrentWebcam()
|
|
1420
1987
|
}
|
|
@@ -1455,7 +2022,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1455
2022
|
producerId: this.webcamProducer.id
|
|
1456
2023
|
});
|
|
1457
2024
|
this.webcamProducer = null;
|
|
1458
|
-
const event = new
|
|
2025
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("localVideoUnavailable", {
|
|
2026
|
+
detail: {}
|
|
2027
|
+
});
|
|
1459
2028
|
this.dispatchEvent(event);
|
|
1460
2029
|
}
|
|
1461
2030
|
async enableScreenshare() {
|
|
@@ -1476,14 +2045,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1476
2045
|
}
|
|
1477
2046
|
}));
|
|
1478
2047
|
if (!stream) return;
|
|
1479
|
-
|
|
2048
|
+
const transport = await this.getTransport("video", "send");
|
|
1480
2049
|
const track = stream.getVideoTracks()[0];
|
|
1481
2050
|
const encodings = undefined;
|
|
1482
2051
|
const codecOptions = {
|
|
1483
2052
|
videoGoogleStartBitrate: 1000
|
|
1484
2053
|
};
|
|
1485
2054
|
let deviceType = "screen";
|
|
1486
|
-
this.screenshareProducer = await
|
|
2055
|
+
this.screenshareProducer = await transport.produce({
|
|
1487
2056
|
track: track,
|
|
1488
2057
|
encodings: encodings,
|
|
1489
2058
|
codecOptions: codecOptions,
|
|
@@ -1498,7 +2067,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1498
2067
|
this.screenshareProducer.on("trackended", ()=>{
|
|
1499
2068
|
this.disableScreenshare().catch(()=>{});
|
|
1500
2069
|
});
|
|
1501
|
-
const event = new
|
|
2070
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("screenshareEnabled", {
|
|
2071
|
+
detail: {}
|
|
2072
|
+
});
|
|
1502
2073
|
this.dispatchEvent(event);
|
|
1503
2074
|
}
|
|
1504
2075
|
async disableScreenshare() {
|
|
@@ -1509,7 +2080,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1509
2080
|
});
|
|
1510
2081
|
this.screenshareProducer = null;
|
|
1511
2082
|
}
|
|
1512
|
-
const event = new
|
|
2083
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("screenshareDisabled", {
|
|
2084
|
+
detail: {}
|
|
2085
|
+
});
|
|
1513
2086
|
this.dispatchEvent(event);
|
|
1514
2087
|
}
|
|
1515
2088
|
onConsumerClose({ consumerId: consumerId }) {
|
|
@@ -1522,26 +2095,28 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1522
2095
|
});
|
|
1523
2096
|
consumer.mediaSoupConsumer.close();
|
|
1524
2097
|
this.consumers.delete(consumerId);
|
|
1525
|
-
this.
|
|
1526
|
-
const event = new
|
|
2098
|
+
this.scaleVideoEncodingsParameter();
|
|
2099
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("mediaStop", {
|
|
1527
2100
|
detail: {
|
|
1528
|
-
|
|
1529
|
-
|
|
2101
|
+
mediaId: consumerId,
|
|
2102
|
+
peerId: String(consumer.mediaSoupConsumer.appData.peerId),
|
|
2103
|
+
deviceType: consumer.deviceType,
|
|
2104
|
+
paused: false
|
|
1530
2105
|
}
|
|
1531
2106
|
});
|
|
1532
2107
|
if (consumer.deviceType === "microphone") this.deleteAudioRenderer(consumerId);
|
|
1533
2108
|
this.dispatchEvent(event);
|
|
1534
2109
|
}
|
|
1535
2110
|
}
|
|
1536
|
-
requestVideo({
|
|
1537
|
-
const consumer = this.consumers.get(
|
|
2111
|
+
requestVideo({ mediaId: mediaId , element: element }) {
|
|
2112
|
+
const consumer = this.consumers.get(mediaId);
|
|
1538
2113
|
if (consumer) {
|
|
1539
2114
|
const mediaStream = new MediaStream();
|
|
1540
|
-
mediaStream.onremovetrack = ()
|
|
1541
|
-
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");
|
|
1542
2117
|
mediaStream.addTrack(consumer.mediaSoupConsumer.track);
|
|
1543
2118
|
element.srcObject = mediaStream;
|
|
1544
|
-
} else
|
|
2119
|
+
} else $c31e3fb4360572af$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
|
|
1545
2120
|
}
|
|
1546
2121
|
async captureVideo(videoElement) {
|
|
1547
2122
|
let image;
|
|
@@ -1566,7 +2141,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1566
2141
|
const mediaStream = new MediaStream();
|
|
1567
2142
|
mediaStream.addTrack(this.screenshareProducer.track);
|
|
1568
2143
|
element.srcObject = mediaStream;
|
|
1569
|
-
} else
|
|
2144
|
+
} else $c31e3fb4360572af$var$log.log("requestLocalScreenshare", "screenshare producer not available yet");
|
|
1570
2145
|
}
|
|
1571
2146
|
consumePeer({ peerId: peerId , producersData: producersData }) {
|
|
1572
2147
|
producersData.forEach((producerData)=>{
|
|
@@ -1578,18 +2153,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1578
2153
|
});
|
|
1579
2154
|
});
|
|
1580
2155
|
}
|
|
1581
|
-
getRecvTransport(deviceType) {
|
|
1582
|
-
if (deviceType === "microphone") return this.recvAudioTransports;
|
|
1583
|
-
else return this.recvVideoTransports;
|
|
1584
|
-
}
|
|
1585
2156
|
async consumeProducer({ peerId: peerId , producerId: producerId , deviceType: deviceType , paused: paused }) {
|
|
1586
|
-
const
|
|
1587
|
-
|
|
2157
|
+
const mediaKind = deviceType === "microphone" ? "audio" : "video";
|
|
2158
|
+
const transport = await this.getTransport(mediaKind, "recv");
|
|
1588
2159
|
const data = await this.protoo.request("consume", {
|
|
1589
2160
|
peerId: peerId,
|
|
1590
2161
|
producerId: producerId,
|
|
1591
|
-
transportId: transport.
|
|
1592
|
-
rtpCapabilities: this.
|
|
2162
|
+
transportId: transport.id,
|
|
2163
|
+
rtpCapabilities: this.streamerMediasoup.getRtpCapabilities()
|
|
1593
2164
|
});
|
|
1594
2165
|
const peer = this.peers.get(peerId);
|
|
1595
2166
|
if (peer) peer.producersData.push({
|
|
@@ -1598,9 +2169,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1598
2169
|
paused: paused
|
|
1599
2170
|
});
|
|
1600
2171
|
const { producerId: resolvedProducerId , id: id , kind: kind , rtpParameters: rtpParameters , appData: appData } = data;
|
|
1601
|
-
|
|
2172
|
+
$c31e3fb4360572af$var$log.log("consumeProducer", "Data: ", data);
|
|
1602
2173
|
try {
|
|
1603
|
-
const consumer = await transport.
|
|
2174
|
+
const consumer = await transport.consume({
|
|
1604
2175
|
id: id,
|
|
1605
2176
|
producerId: resolvedProducerId,
|
|
1606
2177
|
kind: kind,
|
|
@@ -1610,17 +2181,17 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1610
2181
|
peerId: peerId
|
|
1611
2182
|
}
|
|
1612
2183
|
});
|
|
1613
|
-
|
|
1614
|
-
|
|
2184
|
+
$c31e3fb4360572af$var$log.log("transport", transport);
|
|
2185
|
+
$c31e3fb4360572af$var$log.log("consumer", consumer);
|
|
1615
2186
|
this.consumers.set(consumer.id, {
|
|
1616
2187
|
mediaSoupConsumer: consumer,
|
|
1617
2188
|
deviceType: deviceType
|
|
1618
2189
|
});
|
|
1619
|
-
this.
|
|
1620
|
-
const event = new
|
|
2190
|
+
this.scaleVideoEncodingsParameter();
|
|
2191
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("mediaStart", {
|
|
1621
2192
|
detail: {
|
|
1622
2193
|
peerId: peerId,
|
|
1623
|
-
|
|
2194
|
+
mediaId: consumer.id,
|
|
1624
2195
|
deviceType: deviceType,
|
|
1625
2196
|
paused: paused
|
|
1626
2197
|
}
|
|
@@ -1638,18 +2209,32 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1638
2209
|
});
|
|
1639
2210
|
} catch (error) {
|
|
1640
2211
|
this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CONSUME_ERROR);
|
|
1641
|
-
|
|
2212
|
+
$c31e3fb4360572af$var$log.error("consumeProducer", "newConsumer request failed", error);
|
|
1642
2213
|
throw error;
|
|
1643
2214
|
}
|
|
1644
2215
|
}
|
|
1645
2216
|
async setDisplayName(displayName) {
|
|
1646
|
-
this.
|
|
1647
|
-
|
|
1648
|
-
|
|
2217
|
+
await this.setProfile({
|
|
2218
|
+
name: displayName
|
|
2219
|
+
});
|
|
2220
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("selfDisplayName", {
|
|
2221
|
+
detail: {
|
|
2222
|
+
peerId: this.peerId,
|
|
2223
|
+
displayName: this.profile?.name,
|
|
2224
|
+
profile: this.profile
|
|
2225
|
+
}
|
|
1649
2226
|
});
|
|
1650
|
-
|
|
2227
|
+
this.dispatchEvent(event);
|
|
2228
|
+
}
|
|
2229
|
+
async setProfile(profile) {
|
|
2230
|
+
const newProfile = await this.protoo.request("setProfile", profile);
|
|
2231
|
+
this.profile = {
|
|
2232
|
+
...newProfile
|
|
2233
|
+
};
|
|
2234
|
+
const event = new $c31e3fb4360572af$var$SnapcallEvent("selfProfileUpdate", {
|
|
1651
2235
|
detail: {
|
|
1652
|
-
|
|
2236
|
+
peerId: this.peerId,
|
|
2237
|
+
profile: this.profile
|
|
1653
2238
|
}
|
|
1654
2239
|
});
|
|
1655
2240
|
this.dispatchEvent(event);
|
|
@@ -1668,7 +2253,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1668
2253
|
const { callId: callId } = await this.protoo.request("getCallId");
|
|
1669
2254
|
return callId;
|
|
1670
2255
|
} catch (err) {
|
|
1671
|
-
|
|
2256
|
+
$c31e3fb4360572af$var$log.error("getCallId", "Failed to get callId");
|
|
1672
2257
|
throw err;
|
|
1673
2258
|
}
|
|
1674
2259
|
}
|
|
@@ -1742,8 +2327,17 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1742
2327
|
getCurrentWebcam() {
|
|
1743
2328
|
return this.webcam;
|
|
1744
2329
|
}
|
|
1745
|
-
|
|
1746
|
-
return this.
|
|
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";
|
|
1747
2341
|
}
|
|
1748
2342
|
async setWebcamResolution(resolution) {
|
|
1749
2343
|
if (this.webcam.device) await this.switchWebcam({
|
|
@@ -1751,7 +2345,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1751
2345
|
});
|
|
1752
2346
|
else {
|
|
1753
2347
|
this.webcam.resolution = resolution;
|
|
1754
|
-
const e = new
|
|
2348
|
+
const e = new $c31e3fb4360572af$var$SnapcallEvent("localVideoChange", {
|
|
1755
2349
|
detail: {
|
|
1756
2350
|
camera: this.getCurrentWebcam()
|
|
1757
2351
|
}
|
|
@@ -1774,7 +2368,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1774
2368
|
await this.audioRenderers[consumerId]?.play();
|
|
1775
2369
|
}
|
|
1776
2370
|
async setAudioSink(sinkId) {
|
|
1777
|
-
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)));
|
|
1778
2372
|
await Promise.allSettled(promises);
|
|
1779
2373
|
}
|
|
1780
2374
|
dispatchEvent(event) {
|
|
@@ -1782,11 +2376,24 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
1782
2376
|
window.dispatchEvent(event);
|
|
1783
2377
|
return result;
|
|
1784
2378
|
}
|
|
1785
|
-
async
|
|
1786
|
-
const
|
|
1787
|
-
|
|
2379
|
+
async fetchAgentInfo({ apiKey: apiKey , email: email }) {
|
|
2380
|
+
const apiURL = this.config.apiUrl;
|
|
2381
|
+
const agent = await fetch(`${apiURL}/agents/${email}`, {
|
|
2382
|
+
method: "get",
|
|
2383
|
+
headers: {
|
|
2384
|
+
Authorization: `Bearer ${apiKey}`
|
|
2385
|
+
}
|
|
2386
|
+
}).then((response)=>{
|
|
2387
|
+
if (response.ok) return response.json();
|
|
2388
|
+
throw new Error("Invalid agent info");
|
|
1788
2389
|
});
|
|
1789
|
-
return
|
|
2390
|
+
return agent;
|
|
2391
|
+
}
|
|
2392
|
+
setConfig(config) {
|
|
2393
|
+
this.config = {
|
|
2394
|
+
...this.config,
|
|
2395
|
+
...config
|
|
2396
|
+
};
|
|
1790
2397
|
}
|
|
1791
2398
|
}
|
|
1792
2399
|
|
|
@@ -1811,7 +2418,7 @@ let $2884da8a64948e35$export$96a9662a3eda31f6;
|
|
|
1811
2418
|
StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNMUTE"] = 5] = "UNMUTE";
|
|
1812
2419
|
StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_HIGHLIGHTED_TILE"] = 6] = "SET_HIGHLIGHTED_TILE";
|
|
1813
2420
|
StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNSET_HIGHLIGHTED_TILE"] = 7] = "UNSET_HIGHLIGHTED_TILE";
|
|
1814
|
-
StreamsReducerActionTypes1[StreamsReducerActionTypes1["
|
|
2421
|
+
StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_PROFILE"] = 8] = "SET_STREAM_PROFILE";
|
|
1815
2422
|
StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_SPEAKING"] = 9] = "SET_STREAM_SPEAKING";
|
|
1816
2423
|
})($2884da8a64948e35$export$96a9662a3eda31f6 || ($2884da8a64948e35$export$96a9662a3eda31f6 = {}));
|
|
1817
2424
|
const $2884da8a64948e35$export$7fc21eab2c971c9c = {
|
|
@@ -1843,7 +2450,7 @@ const $2884da8a64948e35$export$43fc78ab8758f39 = (state, action)=>{
|
|
|
1843
2450
|
};
|
|
1844
2451
|
case $2884da8a64948e35$export$96a9662a3eda31f6.DEVICE_UPDATE:
|
|
1845
2452
|
{
|
|
1846
|
-
const { streamId: streamId ,
|
|
2453
|
+
const { streamId: streamId , mediaId: mediaId , device: device , available: available , paused: paused } = action.payload;
|
|
1847
2454
|
return {
|
|
1848
2455
|
...state,
|
|
1849
2456
|
streams: state.streams.map((stream)=>{
|
|
@@ -1852,7 +2459,7 @@ const $2884da8a64948e35$export$43fc78ab8758f39 = (state, action)=>{
|
|
|
1852
2459
|
if (device === "microphone") muted = paused;
|
|
1853
2460
|
return {
|
|
1854
2461
|
...stream,
|
|
1855
|
-
[device]: available ?
|
|
2462
|
+
[device]: available ? mediaId : null,
|
|
1856
2463
|
muted: muted
|
|
1857
2464
|
};
|
|
1858
2465
|
}
|
|
@@ -1892,13 +2499,13 @@ const $2884da8a64948e35$export$43fc78ab8758f39 = (state, action)=>{
|
|
|
1892
2499
|
...state,
|
|
1893
2500
|
highlightedTile: null
|
|
1894
2501
|
};
|
|
1895
|
-
case $2884da8a64948e35$export$96a9662a3eda31f6.
|
|
2502
|
+
case $2884da8a64948e35$export$96a9662a3eda31f6.SET_STREAM_PROFILE:
|
|
1896
2503
|
return {
|
|
1897
2504
|
...state,
|
|
1898
2505
|
streams: state.streams.map((stream)=>{
|
|
1899
2506
|
if (stream.id === action.payload.streamId) return {
|
|
1900
2507
|
...stream,
|
|
1901
|
-
|
|
2508
|
+
profile: action.payload.profile
|
|
1902
2509
|
};
|
|
1903
2510
|
return stream;
|
|
1904
2511
|
})
|
|
@@ -2117,6 +2724,7 @@ const $2da9626742e3560b$export$5170987d58ae338d = ()=>/*#__PURE__*/ (0, $3Sbms$j
|
|
|
2117
2724
|
|
|
2118
2725
|
|
|
2119
2726
|
|
|
2727
|
+
|
|
2120
2728
|
const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
|
|
2121
2729
|
(0, $3Sbms$useEffect)(()=>{
|
|
2122
2730
|
const onWindowClick = (event)=>{
|
|
@@ -2137,6 +2745,7 @@ const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
|
|
|
2137
2745
|
|
|
2138
2746
|
|
|
2139
2747
|
|
|
2748
|
+
|
|
2140
2749
|
const $4ee077ee5e6fe3e7$export$d00c23c5e97ada8 = (0, $3Sbms$styledcomponents).div`
|
|
2141
2750
|
display: flex;
|
|
2142
2751
|
flex-direction: column;
|
|
@@ -2200,6 +2809,7 @@ const $4ee077ee5e6fe3e7$export$6755b81a599fadda = (0, $3Sbms$styledcomponents).s
|
|
|
2200
2809
|
|
|
2201
2810
|
|
|
2202
2811
|
const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
|
|
2812
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2203
2813
|
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$b286f91cddfedb5a), {
|
|
2204
2814
|
children: categories.map((category)=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4ee077ee5e6fe3e7$export$d00c23c5e97ada8), {
|
|
2205
2815
|
children: [
|
|
@@ -2221,7 +2831,7 @@ const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
|
|
|
2221
2831
|
}),
|
|
2222
2832
|
item.title,
|
|
2223
2833
|
item.isNew && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$6755b81a599fadda), {
|
|
2224
|
-
children: "
|
|
2834
|
+
children: t("menu.new")
|
|
2225
2835
|
})
|
|
2226
2836
|
]
|
|
2227
2837
|
}, item.id))
|
|
@@ -2313,6 +2923,7 @@ const $ab29487ffcc05855$export$c4e460d5c7d83bc3 = (0, $3Sbms$styledcomponents).d
|
|
|
2313
2923
|
|
|
2314
2924
|
|
|
2315
2925
|
const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories , extraCategories: extraCategories })=>{
|
|
2926
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2316
2927
|
const settingsOptionsContainerRef = (0, $3Sbms$useRef)(null);
|
|
2317
2928
|
const [displaySettingsOptions, setDisplaySettingsOptions] = (0, $3Sbms$useState)(false);
|
|
2318
2929
|
const [menuCategories, setMenuCategories] = (0, $3Sbms$useState)(baseCategories);
|
|
@@ -2405,7 +3016,7 @@ const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories ,
|
|
|
2405
3016
|
children: [
|
|
2406
3017
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$e2457e1974c298c3), {
|
|
2407
3018
|
onClick: onSettingsButtonClick,
|
|
2408
|
-
children: "
|
|
3019
|
+
children: t("menu.title")
|
|
2409
3020
|
}),
|
|
2410
3021
|
displaySettingsOptions && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$c4e460d5c7d83bc3), {
|
|
2411
3022
|
ref: settingsOptionsContainerRef,
|
|
@@ -2422,6 +3033,7 @@ var $ae6e25be45301335$export$2e2bcd8739ae039 = $ae6e25be45301335$var$HeaderSetti
|
|
|
2422
3033
|
|
|
2423
3034
|
|
|
2424
3035
|
|
|
3036
|
+
|
|
2425
3037
|
const $e96d119a19ed0c6c$var$computeLayout = ({ width: width , height: height , tileCount: tileCount })=>{
|
|
2426
3038
|
const tilesPerRow = Math.min(tileCount, 12);
|
|
2427
3039
|
let n = 0;
|
|
@@ -2517,7 +3129,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
|
|
|
2517
3129
|
await this.video.play();
|
|
2518
3130
|
await this.video.requestPictureInPicture();
|
|
2519
3131
|
this.draw();
|
|
2520
|
-
} else (0, $3Sbms$toast)(
|
|
3132
|
+
} else (0, $3Sbms$toast)((0, $384d985bb9605c35$export$2e2bcd8739ae039).t("notifications.noCamera"), {
|
|
2521
3133
|
className: "error"
|
|
2522
3134
|
});
|
|
2523
3135
|
}
|
|
@@ -2599,6 +3211,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
|
|
|
2599
3211
|
const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1ce5e673de)();
|
|
2600
3212
|
const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
|
|
2601
3213
|
const $f235befa4cdc42d6$var$Header = ()=>{
|
|
3214
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
2602
3215
|
const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , options: options , muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
2603
3216
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
2604
3217
|
const [extraOptions, setExtraOptions] = (0, $3Sbms$useState)(options.extraSettingsOptions || []);
|
|
@@ -2627,12 +3240,12 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2627
3240
|
const onCopyCallLinkClick = async ()=>{
|
|
2628
3241
|
try {
|
|
2629
3242
|
await (0, $57162bcada7d6f66$export$2e2bcd8739ae039)(options.sharedURL || window.location.href);
|
|
2630
|
-
(0, $3Sbms$reacthottoast)("
|
|
3243
|
+
(0, $3Sbms$reacthottoast)(t("copyLink.copied"), {
|
|
2631
3244
|
duration: 2000
|
|
2632
3245
|
});
|
|
2633
3246
|
} catch (copyError) {
|
|
2634
3247
|
console.warn(copyError);
|
|
2635
|
-
(0, $3Sbms$reacthottoast)("
|
|
3248
|
+
(0, $3Sbms$reacthottoast)(t("copyLink.error"), {
|
|
2636
3249
|
className: "error"
|
|
2637
3250
|
});
|
|
2638
3251
|
}
|
|
@@ -2658,7 +3271,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2658
3271
|
items: [
|
|
2659
3272
|
{
|
|
2660
3273
|
id: "openNewTab",
|
|
2661
|
-
title: "
|
|
3274
|
+
title: t("menu.openNewTab"),
|
|
2662
3275
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6546b255bd3a2004), {}),
|
|
2663
3276
|
action: onOpenInNewTabClick
|
|
2664
3277
|
},
|
|
@@ -2669,13 +3282,13 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2669
3282
|
items: [
|
|
2670
3283
|
{
|
|
2671
3284
|
id: "copyLink",
|
|
2672
|
-
title: "
|
|
3285
|
+
title: t("copyLink.title"),
|
|
2673
3286
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$92ce62e1201c4fc0), {}),
|
|
2674
3287
|
action: onCopyCallLinkClick
|
|
2675
3288
|
},
|
|
2676
3289
|
{
|
|
2677
3290
|
id: "quickConnect",
|
|
2678
|
-
title: "
|
|
3291
|
+
title: t("quickConnect.title"),
|
|
2679
3292
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6470d09a29d34d08), {}),
|
|
2680
3293
|
action: onScanQuickConnectClick
|
|
2681
3294
|
},
|
|
@@ -2686,7 +3299,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2686
3299
|
items: [
|
|
2687
3300
|
{
|
|
2688
3301
|
id: "settings",
|
|
2689
|
-
title: "
|
|
3302
|
+
title: t("settings.title"),
|
|
2690
3303
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$1095c93890fce526), {}),
|
|
2691
3304
|
action: onSettingsMenuClick
|
|
2692
3305
|
},
|
|
@@ -2695,7 +3308,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2695
3308
|
];
|
|
2696
3309
|
if (document.pictureInPictureEnabled && $f235befa4cdc42d6$var$browser.platform.type === "desktop") computedCategories[0].items.push({
|
|
2697
3310
|
id: "pip",
|
|
2698
|
-
title: "
|
|
3311
|
+
title: t("menu.pictureInPicture"),
|
|
2699
3312
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$5170987d58ae338d), {}),
|
|
2700
3313
|
action: onPipClick
|
|
2701
3314
|
});
|
|
@@ -2705,7 +3318,8 @@ const $f235befa4cdc42d6$var$Header = ()=>{
|
|
|
2705
3318
|
streaming,
|
|
2706
3319
|
options.sharedURL,
|
|
2707
3320
|
setIsQuickConnectPopupVisible,
|
|
2708
|
-
setIsSettingsMenuVisible,
|
|
3321
|
+
setIsSettingsMenuVisible,
|
|
3322
|
+
t,
|
|
2709
3323
|
]);
|
|
2710
3324
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab29487ffcc05855$export$1e86fd0e1db89578), {
|
|
2711
3325
|
children: [
|
|
@@ -2763,6 +3377,7 @@ const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
|
|
|
2763
3377
|
|
|
2764
3378
|
|
|
2765
3379
|
|
|
3380
|
+
|
|
2766
3381
|
const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash , status: status , deviceRequest: deviceRequest })=>{
|
|
2767
3382
|
if (slash) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
|
|
2768
3383
|
width: "24",
|
|
@@ -3170,13 +3785,23 @@ const $7ec04c1818c68245$export$f6525863ef5a71a9 = (0, $3Sbms$styledcomponents).d
|
|
|
3170
3785
|
align-items: center;
|
|
3171
3786
|
width: 14px;
|
|
3172
3787
|
height: 14px;
|
|
3173
|
-
padding: 3px 4px;
|
|
3174
3788
|
box-sizing: border-box;
|
|
3175
3789
|
background-color: #2d2d2d;
|
|
3176
3790
|
border-radius: 50px;
|
|
3177
3791
|
font-size: 9px;
|
|
3178
3792
|
font-weight: 700;
|
|
3179
3793
|
line-height: 8px;
|
|
3794
|
+
|
|
3795
|
+
svg {
|
|
3796
|
+
width: 8px;
|
|
3797
|
+
height: 8px;
|
|
3798
|
+
}
|
|
3799
|
+
`;
|
|
3800
|
+
const $7ec04c1818c68245$export$a7a74ab5cffd1455 = (0, $3Sbms$styledcomponents).img`
|
|
3801
|
+
width: 100%;
|
|
3802
|
+
height: 100%;
|
|
3803
|
+
border-radius: inherit;
|
|
3804
|
+
object-fit: cover;
|
|
3180
3805
|
`;
|
|
3181
3806
|
const $7ec04c1818c68245$export$f217faec90120a0c = (0, $3Sbms$styledcomponents).div`
|
|
3182
3807
|
display: flex;
|
|
@@ -3255,11 +3880,6 @@ const $7ec04c1818c68245$export$a2930b41faa750f4 = (0, $3Sbms$styledcomponents).s
|
|
|
3255
3880
|
line-height: 20px;
|
|
3256
3881
|
color: #fff;
|
|
3257
3882
|
`;
|
|
3258
|
-
const $7ec04c1818c68245$export$2d75367b6e042d67 = (0, $3Sbms$styledcomponents).img`
|
|
3259
|
-
width: inherit;
|
|
3260
|
-
height: inherit;
|
|
3261
|
-
border-radius: inherit;
|
|
3262
|
-
`;
|
|
3263
3883
|
const $7ec04c1818c68245$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).img`
|
|
3264
3884
|
border: 2px solid #fff;
|
|
3265
3885
|
border-radius: 8px;
|
|
@@ -3500,6 +4120,17 @@ const $6efc75079651494a$export$500c3c5544c37412 = (0, $3Sbms$styledcomponents)((
|
|
|
3500
4120
|
font-weight: 700;
|
|
3501
4121
|
line-height: 13px;
|
|
3502
4122
|
`;
|
|
4123
|
+
const $6efc75079651494a$export$88248b9be937544a = (0, $3Sbms$styledcomponents).div`
|
|
4124
|
+
display: flex;
|
|
4125
|
+
align-items: center;
|
|
4126
|
+
font-size: 18px;
|
|
4127
|
+
line-height: 15px;
|
|
4128
|
+
|
|
4129
|
+
svg {
|
|
4130
|
+
width: 12px;
|
|
4131
|
+
height: 12px;
|
|
4132
|
+
}
|
|
4133
|
+
`;
|
|
3503
4134
|
|
|
3504
4135
|
|
|
3505
4136
|
|
|
@@ -3509,6 +4140,7 @@ const $a53a1c6f62ad0fcc$var$getRequestButtonSize = (containerWidth)=>{
|
|
|
3509
4140
|
return "large";
|
|
3510
4141
|
};
|
|
3511
4142
|
const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 , height: height = 0 })=>{
|
|
4143
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
3512
4144
|
const videoElementRef = (0, $3Sbms$useRef)(null);
|
|
3513
4145
|
const [hover, setHover] = (0, $3Sbms$useState)(false);
|
|
3514
4146
|
const [requestingDevice, setRequestingDevice] = (0, $3Sbms$useState)(null);
|
|
@@ -3518,7 +4150,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3518
4150
|
const { highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
3519
4151
|
const isSharingScreen = highlightedTile?.type === "screenshare" && highlightedTile.peerId === selfPeerId;
|
|
3520
4152
|
const microphoneActive = stream.microphone && !stream.muted;
|
|
3521
|
-
const showRequestDevice = !requestingDevice && hover && !highlightedTile && (!microphoneActive || !stream.webcam);
|
|
4153
|
+
const showRequestDevice = !requestingDevice && hover && !highlightedTile && (!microphoneActive || !stream.webcam || !isSharingScreen);
|
|
3522
4154
|
const tileWidth = `${width}px`;
|
|
3523
4155
|
const tileHeight = `${height}px`;
|
|
3524
4156
|
const videoMaxHeight = "100%";
|
|
@@ -3540,7 +4172,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3540
4172
|
(0, $3Sbms$useEffect)(()=>{
|
|
3541
4173
|
if (!videoElementRef.current) throw new Error("videoElementRef not available");
|
|
3542
4174
|
if (stream.webcam && videoElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVideo({
|
|
3543
|
-
|
|
4175
|
+
mediaId: stream.webcam,
|
|
3544
4176
|
element: videoElementRef.current
|
|
3545
4177
|
});
|
|
3546
4178
|
else if (!stream.webcam) videoElementRef.current.srcObject = null;
|
|
@@ -3552,7 +4184,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3552
4184
|
if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
|
|
3553
4185
|
requestingDeviceTimeoutRef.current = setTimeout(()=>{
|
|
3554
4186
|
setRequestingDevice(null);
|
|
3555
|
-
(0, $3Sbms$reacthottoast)("
|
|
4187
|
+
(0, $3Sbms$reacthottoast)(t("requestDevice.timedOut"), {
|
|
3556
4188
|
className: "error"
|
|
3557
4189
|
});
|
|
3558
4190
|
}, 20000);
|
|
@@ -3561,7 +4193,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3561
4193
|
};
|
|
3562
4194
|
} else setHover(false);
|
|
3563
4195
|
}, [
|
|
3564
|
-
requestingDevice
|
|
4196
|
+
requestingDevice,
|
|
4197
|
+
t
|
|
3565
4198
|
]);
|
|
3566
4199
|
(0, $3Sbms$useEffect)(()=>{
|
|
3567
4200
|
const onRequestDeviceResult = (event)=>{
|
|
@@ -3570,8 +4203,10 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3570
4203
|
if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
|
|
3571
4204
|
setRequestingDevice(null);
|
|
3572
4205
|
if (result !== true) {
|
|
3573
|
-
let message = "
|
|
3574
|
-
if (stream.
|
|
4206
|
+
let message = t("requestDevice.declined");
|
|
4207
|
+
if (stream.profile.name) message = t("requestDevice.userDeclined", {
|
|
4208
|
+
user: stream.profile.name
|
|
4209
|
+
});
|
|
3575
4210
|
(0, $3Sbms$reacthottoast)(message, {
|
|
3576
4211
|
className: "error"
|
|
3577
4212
|
});
|
|
@@ -3584,7 +4219,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3584
4219
|
};
|
|
3585
4220
|
}, [
|
|
3586
4221
|
stream.id,
|
|
3587
|
-
stream.
|
|
4222
|
+
stream.profile,
|
|
4223
|
+
t
|
|
3588
4224
|
]);
|
|
3589
4225
|
(0, $3Sbms$useEffect)(()=>{
|
|
3590
4226
|
const onCustomMessage = async (event)=>{
|
|
@@ -3597,8 +4233,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3597
4233
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
|
|
3598
4234
|
};
|
|
3599
4235
|
}, [
|
|
3600
|
-
stream.id
|
|
3601
|
-
stream.displayName
|
|
4236
|
+
stream.id
|
|
3602
4237
|
]);
|
|
3603
4238
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$798352b46783b18d), {
|
|
3604
4239
|
onMouseEnter: onMouseEnter,
|
|
@@ -3647,7 +4282,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3647
4282
|
children: [
|
|
3648
4283
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$df42e007689062b0), {
|
|
3649
4284
|
size: requestButtonSize,
|
|
3650
|
-
children: "
|
|
4285
|
+
children: t("requestDevice.requestInput")
|
|
3651
4286
|
}),
|
|
3652
4287
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$81d5557f9199e44d), {
|
|
3653
4288
|
size: requestButtonSize,
|
|
@@ -3678,24 +4313,25 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
|
|
|
3678
4313
|
]
|
|
3679
4314
|
}),
|
|
3680
4315
|
!requestingDevice && !showRequestDevice && !stream.webcam && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$f217faec90120a0c), {
|
|
3681
|
-
children: /*#__PURE__*/ (0, $3Sbms$
|
|
3682
|
-
children:
|
|
3683
|
-
stream.
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
]
|
|
4316
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$6ddfb572d7b6d164), {
|
|
4317
|
+
children: stream.profile.image ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a7a74ab5cffd1455), {
|
|
4318
|
+
src: stream.profile.image
|
|
4319
|
+
}) : stream.profile.name ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a2930b41faa750f4), {
|
|
4320
|
+
children: stream.profile.name.slice(0, 1).toUpperCase()
|
|
4321
|
+
}) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
|
|
3688
4322
|
})
|
|
3689
4323
|
}),
|
|
3690
4324
|
!showRequestDevice && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$a878cdfb933a1421), {
|
|
3691
4325
|
children: [
|
|
3692
4326
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$f6525863ef5a71a9), {
|
|
3693
|
-
children: stream.
|
|
3694
|
-
|
|
4327
|
+
children: stream.profile.image ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a7a74ab5cffd1455), {
|
|
4328
|
+
src: stream.profile.image
|
|
4329
|
+
}) : stream.profile.name ? /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
4330
|
+
children: stream.profile.name.slice(0, 1).toUpperCase()
|
|
3695
4331
|
}) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
|
|
3696
4332
|
}),
|
|
3697
4333
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
|
|
3698
|
-
children: stream.
|
|
4334
|
+
children: stream.profile.name || t("misc.user")
|
|
3699
4335
|
})
|
|
3700
4336
|
]
|
|
3701
4337
|
})
|
|
@@ -3768,10 +4404,10 @@ const $21c8ac858b8a352e$var$AudioTile = ({ stream: stream })=>{
|
|
|
3768
4404
|
children: [
|
|
3769
4405
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $76e24981612b551d$export$235e35bd03f702fb), {
|
|
3770
4406
|
children: [
|
|
3771
|
-
stream.
|
|
3772
|
-
children: stream.
|
|
4407
|
+
stream.profile.name && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a2930b41faa750f4), {
|
|
4408
|
+
children: stream.profile.name.slice(0, 1).toUpperCase()
|
|
3773
4409
|
}),
|
|
3774
|
-
!stream.
|
|
4410
|
+
!stream.profile.name && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {}),
|
|
3775
4411
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $76e24981612b551d$export$95156eef6a2de99c), {
|
|
3776
4412
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {
|
|
3777
4413
|
redSlash: !isMicrophoneActive
|
|
@@ -3780,7 +4416,7 @@ const $21c8ac858b8a352e$var$AudioTile = ({ stream: stream })=>{
|
|
|
3780
4416
|
]
|
|
3781
4417
|
}),
|
|
3782
4418
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $76e24981612b551d$export$a87ec69641e9884), {
|
|
3783
|
-
children: stream.
|
|
4419
|
+
children: stream.profile.name
|
|
3784
4420
|
})
|
|
3785
4421
|
]
|
|
3786
4422
|
});
|
|
@@ -3796,6 +4432,7 @@ var $21c8ac858b8a352e$export$2e2bcd8739ae039 = $21c8ac858b8a352e$var$AudioTile;
|
|
|
3796
4432
|
|
|
3797
4433
|
|
|
3798
4434
|
|
|
4435
|
+
|
|
3799
4436
|
const $f260365f66cb6a6f$var$Reduce = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
3800
4437
|
width: "22",
|
|
3801
4438
|
height: "22",
|
|
@@ -3818,7 +4455,7 @@ const $57ab7b9a012d9acd$var$Cross = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
|
3818
4455
|
fill: "none",
|
|
3819
4456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3820
4457
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
|
|
3821
|
-
d: "
|
|
4458
|
+
d: "m13.41 12 6.3-6.29a1.004 1.004 0 0 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 1 0-1.42 1.42l6.3 6.29-6.3 6.29a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l6.29-6.3 6.29 6.3a1.001 1.001 0 0 0 1.639-.325 1 1 0 0 0-.22-1.095L13.41 12Z",
|
|
3822
4459
|
fill: "#fff"
|
|
3823
4460
|
})
|
|
3824
4461
|
});
|
|
@@ -3909,11 +4546,7 @@ const $b8e10de7c6dba8c4$export$a6112fefa8de799d = ({ containerWidth: containerWi
|
|
|
3909
4546
|
|
|
3910
4547
|
|
|
3911
4548
|
|
|
3912
|
-
|
|
3913
|
-
microphone: "microphone",
|
|
3914
|
-
webcam: "camera",
|
|
3915
|
-
screen: "screen"
|
|
3916
|
-
};
|
|
4549
|
+
|
|
3917
4550
|
const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
|
|
3918
4551
|
if (device === "microphone") return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
|
|
3919
4552
|
if (device === "webcam") return 0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039;
|
|
@@ -3921,10 +4554,16 @@ const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
|
|
|
3921
4554
|
return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
|
|
3922
4555
|
};
|
|
3923
4556
|
const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: requesterId , setExtended: setExtended , setDeviceRequest: setDeviceRequest })=>{
|
|
4557
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
3924
4558
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
3925
4559
|
const [pending, setPending] = (0, $3Sbms$useState)(false);
|
|
3926
4560
|
const requesterStream = streams.find((stream)=>stream.id === requesterId);
|
|
3927
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
|
+
};
|
|
3928
4567
|
const onAccept = async ()=>{
|
|
3929
4568
|
setExtended(false);
|
|
3930
4569
|
setPending(true);
|
|
@@ -3959,24 +4598,22 @@ const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: req
|
|
|
3959
4598
|
deviceRequest: true
|
|
3960
4599
|
})
|
|
3961
4600
|
}),
|
|
3962
|
-
/*#__PURE__*/ (0, $3Sbms$
|
|
3963
|
-
children:
|
|
3964
|
-
requesterStream?.
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
$7c705c3f08c6d4ca$var$deviceNames[device]
|
|
3968
|
-
]
|
|
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
|
+
})
|
|
3969
4606
|
}),
|
|
3970
4607
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$dfd6aceefcfce0c9), {
|
|
3971
4608
|
children: [
|
|
3972
4609
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
|
|
3973
4610
|
onClick: onAccept,
|
|
3974
4611
|
active: true,
|
|
3975
|
-
children: "
|
|
4612
|
+
children: t("misc.accept")
|
|
3976
4613
|
}),
|
|
3977
4614
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
|
|
3978
4615
|
onClick: onDecline,
|
|
3979
|
-
children: "
|
|
4616
|
+
children: t("misc.decline")
|
|
3980
4617
|
})
|
|
3981
4618
|
]
|
|
3982
4619
|
})
|
|
@@ -4092,7 +4729,9 @@ const $d02c24b66b4606fd$export$ab7d69e250642927 = ({ element: element })=>{
|
|
|
4092
4729
|
|
|
4093
4730
|
|
|
4094
4731
|
|
|
4732
|
+
|
|
4095
4733
|
const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
4734
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4096
4735
|
const { muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
4097
4736
|
(0, $3Sbms$useEffect)(()=>{
|
|
4098
4737
|
navigator.mediaSession?.setMicrophoneActive?.(!muted);
|
|
@@ -4110,7 +4749,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4110
4749
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
|
|
4111
4750
|
} catch (microphoneToggleError) {
|
|
4112
4751
|
console.warn(microphoneToggleError);
|
|
4113
|
-
(0, $3Sbms$reacthottoast)("
|
|
4752
|
+
(0, $3Sbms$reacthottoast)(`${t("notifications.microphoneError")} (PiP)`, {
|
|
4114
4753
|
className: "error"
|
|
4115
4754
|
});
|
|
4116
4755
|
}
|
|
@@ -4126,7 +4765,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4126
4765
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo();
|
|
4127
4766
|
} catch (cameraError) {
|
|
4128
4767
|
console.warn(cameraError);
|
|
4129
|
-
(0, $3Sbms$reacthottoast)("
|
|
4768
|
+
(0, $3Sbms$reacthottoast)(`${t("notifications.cameraError")} (PiP)`, {
|
|
4130
4769
|
className: "error"
|
|
4131
4770
|
});
|
|
4132
4771
|
}
|
|
@@ -4141,7 +4780,9 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
|
|
|
4141
4780
|
} catch (hangupHandlerError) {
|
|
4142
4781
|
console.warn("MediaSession hangup action is not available");
|
|
4143
4782
|
}
|
|
4144
|
-
}, [
|
|
4783
|
+
}, [
|
|
4784
|
+
t
|
|
4785
|
+
]);
|
|
4145
4786
|
return null;
|
|
4146
4787
|
};
|
|
4147
4788
|
var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSession;
|
|
@@ -4153,6 +4794,7 @@ var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSessio
|
|
|
4153
4794
|
const $5939a59dc7c96d41$var$minimumTileWidth = 126;
|
|
4154
4795
|
const $5939a59dc7c96d41$var$maximumTileWidth = 150;
|
|
4155
4796
|
const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePresenting , width: width , height: height })=>{
|
|
4797
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4156
4798
|
const [extended, setExtended] = (0, $3Sbms$useState)(false);
|
|
4157
4799
|
const [zoom, setZoom] = (0, $3Sbms$useState)(false);
|
|
4158
4800
|
const [zoomAvailable, setZoomAvailable] = (0, $3Sbms$useState)(false);
|
|
@@ -4163,7 +4805,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4163
4805
|
const videoElementRef = (0, $3Sbms$useRef)(null);
|
|
4164
4806
|
const videoMediaProviderRef = (0, $3Sbms$useRef)(null);
|
|
4165
4807
|
const SelfTileRef = (0, $3Sbms$useRef)(null);
|
|
4166
|
-
const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef ,
|
|
4808
|
+
const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
4167
4809
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
4168
4810
|
const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(videosContainerRef.current);
|
|
4169
4811
|
const isAlone = streams.length < 1;
|
|
@@ -4215,7 +4857,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4215
4857
|
const base64Image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElementRef.current);
|
|
4216
4858
|
setSnapshotImage(base64Image);
|
|
4217
4859
|
try {
|
|
4218
|
-
const { objectUrl: objectUrl } = await fetch(`${
|
|
4860
|
+
const { objectUrl: objectUrl } = await fetch(`${options.streamApiURL}/uploadSnapshot`, {
|
|
4219
4861
|
method: "POST",
|
|
4220
4862
|
body: JSON.stringify({
|
|
4221
4863
|
file: base64Image
|
|
@@ -4225,8 +4867,13 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4225
4867
|
type: "snapshot",
|
|
4226
4868
|
imageSrc: objectUrl
|
|
4227
4869
|
});
|
|
4228
|
-
let notificationMessage = "
|
|
4229
|
-
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
|
+
}
|
|
4230
4877
|
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(notificationMessage, {
|
|
4231
4878
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$26fe7ec9351ff761), {
|
|
4232
4879
|
src: base64Image
|
|
@@ -4234,7 +4881,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4234
4881
|
duration: 2500
|
|
4235
4882
|
});
|
|
4236
4883
|
} catch (sendMessageError) {
|
|
4237
|
-
(0, $3Sbms$reacthottoast)("
|
|
4884
|
+
(0, $3Sbms$reacthottoast)(t("snapshot.error"), {
|
|
4238
4885
|
className: "error"
|
|
4239
4886
|
});
|
|
4240
4887
|
console.error(sendMessageError);
|
|
@@ -4246,7 +4893,6 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4246
4893
|
if (SelfTileRef.current) (0, $d02c24b66b4606fd$export$ab7d69e250642927)({
|
|
4247
4894
|
element: SelfTileRef.current
|
|
4248
4895
|
});
|
|
4249
|
-
if (deviceType === "screen") return;
|
|
4250
4896
|
setDeviceRequest({
|
|
4251
4897
|
device: deviceType,
|
|
4252
4898
|
requesterId: peerId
|
|
@@ -4344,16 +4990,16 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4344
4990
|
!streaming && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$f217faec90120a0c), {
|
|
4345
4991
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$6ddfb572d7b6d164), {
|
|
4346
4992
|
children: [
|
|
4347
|
-
|
|
4348
|
-
children:
|
|
4993
|
+
profile.name && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$a2930b41faa750f4), {
|
|
4994
|
+
children: profile.name.slice(0, 1).toUpperCase()
|
|
4349
4995
|
}),
|
|
4350
|
-
!
|
|
4996
|
+
!profile.name && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
|
|
4351
4997
|
]
|
|
4352
4998
|
})
|
|
4353
4999
|
}),
|
|
4354
5000
|
!extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$500c3c5544c37412), {
|
|
4355
5001
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
4356
|
-
children: "
|
|
5002
|
+
children: t("misc.you")
|
|
4357
5003
|
})
|
|
4358
5004
|
}),
|
|
4359
5005
|
extended && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$a7365e2302f8d10a), {
|
|
@@ -4379,12 +5025,14 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
|
|
|
4379
5025
|
onClick: onSnapshotClick,
|
|
4380
5026
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $e1d1366624f88f6d$export$c58e349a67ffa055), {})
|
|
4381
5027
|
}),
|
|
4382
|
-
zoomAvailable && /*#__PURE__*/ (0, $3Sbms$
|
|
5028
|
+
zoomAvailable && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$e07ea3386b3cb3d9), {
|
|
4383
5029
|
onClick: onZoomClick,
|
|
4384
|
-
children:
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
5030
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$88248b9be937544a), {
|
|
5031
|
+
children: [
|
|
5032
|
+
zoom ? "2" : "1",
|
|
5033
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {})
|
|
5034
|
+
]
|
|
5035
|
+
})
|
|
4388
5036
|
}),
|
|
4389
5037
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
4390
5038
|
style: {
|
|
@@ -4469,12 +5117,12 @@ const $306a53f44040492f$var$ScreenshareTile = (tile)=>{
|
|
|
4469
5117
|
const videoElementRef = (0, $3Sbms$useRef)(null);
|
|
4470
5118
|
const isSelf = tile.peerId === selfPeerId;
|
|
4471
5119
|
(0, $3Sbms$useEffect)(()=>{
|
|
4472
|
-
if (tile.data.
|
|
4473
|
-
|
|
5120
|
+
if (tile.data.mediaId && videoElementRef.current) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestVideo({
|
|
5121
|
+
mediaId: tile.data.mediaId,
|
|
4474
5122
|
element: videoElementRef.current
|
|
4475
5123
|
});
|
|
4476
5124
|
}, [
|
|
4477
|
-
tile.data.
|
|
5125
|
+
tile.data.mediaId
|
|
4478
5126
|
]);
|
|
4479
5127
|
(0, $3Sbms$useEffect)(()=>{
|
|
4480
5128
|
if (isSelf && videoElementRef.current) {
|
|
@@ -4517,6 +5165,7 @@ const $04dc495b2c5350ca$export$2cb99e4be0dc4646 = (url)=>new Promise((resolve, r
|
|
|
4517
5165
|
|
|
4518
5166
|
|
|
4519
5167
|
|
|
5168
|
+
|
|
4520
5169
|
const $6a95863cd4ef501c$export$eb5bbbfc393ab8ac = (0, $3Sbms$styledcomponents).div`
|
|
4521
5170
|
max-width: 100%;
|
|
4522
5171
|
margin-top: 60px;
|
|
@@ -4586,6 +5235,7 @@ const $f81bfa56534026c2$export$e9785ae652b3a722 = (item)=>{
|
|
|
4586
5235
|
} else console.warn("Undefined room ID");
|
|
4587
5236
|
};
|
|
4588
5237
|
const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
|
|
5238
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4589
5239
|
const [history, setHistory] = (0, $3Sbms$useState)([]);
|
|
4590
5240
|
(0, $3Sbms$useEffect)(()=>{
|
|
4591
5241
|
try {
|
|
@@ -4603,7 +5253,7 @@ const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
|
|
|
4603
5253
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6a95863cd4ef501c$export$eb5bbbfc393ab8ac), {
|
|
4604
5254
|
children: [
|
|
4605
5255
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$ebce8992dc3bd82), {
|
|
4606
|
-
children: "
|
|
5256
|
+
children: t("sharedHistory.shared")
|
|
4607
5257
|
}),
|
|
4608
5258
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$e6c0b06d6e2dd9e3), {
|
|
4609
5259
|
children: history.map((item)=>{
|
|
@@ -4803,6 +5453,7 @@ var $5e2ac34f2c3f1b42$export$2e2bcd8739ae039 = $5e2ac34f2c3f1b42$var$YoutubeTile
|
|
|
4803
5453
|
|
|
4804
5454
|
|
|
4805
5455
|
|
|
5456
|
+
|
|
4806
5457
|
const $ab48431cd035ee30$export$e19cf0169f1019bf = (0, $3Sbms$styledcomponents).div`
|
|
4807
5458
|
display: flex;
|
|
4808
5459
|
position: relative;
|
|
@@ -4852,12 +5503,20 @@ const $ab48431cd035ee30$export$a06f1c675e846f6f = (0, $3Sbms$styledcomponents).d
|
|
|
4852
5503
|
justify-content: center;
|
|
4853
5504
|
`;
|
|
4854
5505
|
const $ab48431cd035ee30$export$f9985cea9f8ad92f = (0, $3Sbms$styledcomponents).button`
|
|
5506
|
+
display: flex;
|
|
5507
|
+
justify-content: center;
|
|
5508
|
+
align-items: center;
|
|
4855
5509
|
width: 36px;
|
|
4856
5510
|
height: 36px;
|
|
4857
5511
|
padding: 7px;
|
|
4858
5512
|
background: rgba(28, 32, 36, 0.5);
|
|
4859
5513
|
border: none;
|
|
4860
5514
|
border-radius: 50px;
|
|
5515
|
+
|
|
5516
|
+
svg {
|
|
5517
|
+
width: 17px;
|
|
5518
|
+
height: 17px;
|
|
5519
|
+
}
|
|
4861
5520
|
`;
|
|
4862
5521
|
const $ab48431cd035ee30$export$26fe7ec9351ff761 = (0, $3Sbms$styledcomponents).img`
|
|
4863
5522
|
border: 2px solid #fff;
|
|
@@ -4885,6 +5544,7 @@ const $ab48431cd035ee30$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).di
|
|
|
4885
5544
|
|
|
4886
5545
|
|
|
4887
5546
|
const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
5547
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
4888
5548
|
const { dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
4889
5549
|
const snapshotImageRef = (0, $3Sbms$useRef)(null);
|
|
4890
5550
|
const [downloadURL, setDownloadURL] = (0, $3Sbms$useState)(tile.data.url);
|
|
@@ -4952,7 +5612,8 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
|
4952
5612
|
children: [
|
|
4953
5613
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$7c309220fd1fb205), {
|
|
4954
5614
|
children: [
|
|
4955
|
-
"
|
|
5615
|
+
t("snapshot.title"),
|
|
5616
|
+
" \xb7 ",
|
|
4956
5617
|
formattedTime
|
|
4957
5618
|
]
|
|
4958
5619
|
}),
|
|
@@ -4960,7 +5621,7 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
|
|
|
4960
5621
|
href: downloadURL,
|
|
4961
5622
|
target: "_blank",
|
|
4962
5623
|
download: filename,
|
|
4963
|
-
children: "
|
|
5624
|
+
children: t("snapshot.save")
|
|
4964
5625
|
})
|
|
4965
5626
|
]
|
|
4966
5627
|
}),
|
|
@@ -4987,8 +5648,8 @@ const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
|
|
|
4987
5648
|
const { dispatch: dispatch , highlightedTile: highlightedTile } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
4988
5649
|
(0, $3Sbms$useEffect)(()=>{
|
|
4989
5650
|
const onRemoteScreensharingUpdate = (event)=>{
|
|
4990
|
-
const { peerId: peerId ,
|
|
4991
|
-
const available = event.type === "
|
|
5651
|
+
const { peerId: peerId , mediaId: mediaId , deviceType: deviceType } = event.detail;
|
|
5652
|
+
const available = event.type === "mediaStart";
|
|
4992
5653
|
if (deviceType === "screen" && available) dispatch({
|
|
4993
5654
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
|
|
4994
5655
|
payload: {
|
|
@@ -4996,7 +5657,7 @@ const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
|
|
|
4996
5657
|
peerId: peerId,
|
|
4997
5658
|
isGlobal: true,
|
|
4998
5659
|
data: {
|
|
4999
|
-
|
|
5660
|
+
mediaId: mediaId
|
|
5000
5661
|
}
|
|
5001
5662
|
}
|
|
5002
5663
|
});
|
|
@@ -5021,13 +5682,13 @@ const $288d5802b3a8deca$var$ScreenshareEvents = ()=>{
|
|
|
5021
5682
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).UNSET_HIGHLIGHTED_TILE
|
|
5022
5683
|
});
|
|
5023
5684
|
};
|
|
5024
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5025
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5685
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaStart", onRemoteScreensharingUpdate);
|
|
5686
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaStop", onRemoteScreensharingUpdate);
|
|
5026
5687
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreensharingUpdate);
|
|
5027
5688
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareDisabled", onScreensharingUpdate);
|
|
5028
5689
|
return ()=>{
|
|
5029
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5030
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5690
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaStart", onRemoteScreensharingUpdate);
|
|
5691
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaStop", onRemoteScreensharingUpdate);
|
|
5031
5692
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreensharingUpdate);
|
|
5032
5693
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareDisabled", onScreensharingUpdate);
|
|
5033
5694
|
};
|
|
@@ -5090,7 +5751,9 @@ var $e4ddb9f41b4a5cba$export$2e2bcd8739ae039 = $e4ddb9f41b4a5cba$var$YoutubeEven
|
|
|
5090
5751
|
|
|
5091
5752
|
|
|
5092
5753
|
|
|
5754
|
+
|
|
5093
5755
|
const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
5756
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5094
5757
|
const { dispatch: dispatch , streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
5095
5758
|
(0, $3Sbms$useEffect)(()=>{
|
|
5096
5759
|
const onCustomMessage = async (event)=>{
|
|
@@ -5099,18 +5762,18 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5099
5762
|
if (type === "snapshot") {
|
|
5100
5763
|
const sender = streams.find((stream)=>stream.id === peerId);
|
|
5101
5764
|
if (sender) {
|
|
5102
|
-
const statusIcon = sender.
|
|
5103
|
-
children: sender.
|
|
5765
|
+
const statusIcon = sender.profile.name ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$49ac927a2aaad85), {
|
|
5766
|
+
children: sender.profile.name.slice(0, 1).toUpperCase()
|
|
5104
5767
|
}) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$49ac927a2aaad85), {
|
|
5105
5768
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
|
|
5106
5769
|
});
|
|
5107
5770
|
const createdAtDate = new Date();
|
|
5108
5771
|
const notificationStatus = {
|
|
5109
|
-
text: "
|
|
5110
|
-
boldText: sender.
|
|
5772
|
+
text: t("misc.from"),
|
|
5773
|
+
boldText: sender.profile.name || t("misc.user"),
|
|
5111
5774
|
icon: statusIcon
|
|
5112
5775
|
};
|
|
5113
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)("
|
|
5776
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("snapshot.shared"), {
|
|
5114
5777
|
width: "290px",
|
|
5115
5778
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$26fe7ec9351ff761), {
|
|
5116
5779
|
src: imageSrc,
|
|
@@ -5121,7 +5784,7 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5121
5784
|
fontSize: "16px"
|
|
5122
5785
|
},
|
|
5123
5786
|
button: {
|
|
5124
|
-
text: "
|
|
5787
|
+
text: t("misc.open"),
|
|
5125
5788
|
action: ({ close: close })=>{
|
|
5126
5789
|
dispatch({
|
|
5127
5790
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
|
|
@@ -5146,15 +5809,15 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5146
5809
|
minute: "2-digit"
|
|
5147
5810
|
});
|
|
5148
5811
|
(0, $f81bfa56534026c2$export$e9785ae652b3a722)({
|
|
5149
|
-
title:
|
|
5812
|
+
title: `${t("snapshot.title")} · ${formattedTime}`,
|
|
5150
5813
|
url: imageSrc,
|
|
5151
5814
|
iconUrl: imageSrc,
|
|
5152
5815
|
iconStyle: {
|
|
5153
5816
|
border: "2px solid #fff"
|
|
5154
5817
|
},
|
|
5155
5818
|
statusText: notificationStatus.boldText,
|
|
5156
|
-
statusIconLetter: sender.
|
|
5157
|
-
statusIconUser: sender.
|
|
5819
|
+
statusIconLetter: sender.profile.name ? sender.profile.name.slice(0, 1).toUpperCase() : undefined,
|
|
5820
|
+
statusIconUser: sender.profile.name ? false : true
|
|
5158
5821
|
});
|
|
5159
5822
|
}
|
|
5160
5823
|
}
|
|
@@ -5165,7 +5828,8 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
|
|
|
5165
5828
|
};
|
|
5166
5829
|
}, [
|
|
5167
5830
|
streams,
|
|
5168
|
-
dispatch
|
|
5831
|
+
dispatch,
|
|
5832
|
+
t
|
|
5169
5833
|
]);
|
|
5170
5834
|
return null;
|
|
5171
5835
|
};
|
|
@@ -5345,7 +6009,7 @@ var $b8963bf62cf5b984$export$2e2bcd8739ae039 = $b8963bf62cf5b984$var$tooltip;
|
|
|
5345
6009
|
|
|
5346
6010
|
|
|
5347
6011
|
const $cdab47bb8796991e$var$Video = ()=>{
|
|
5348
|
-
const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted ,
|
|
6012
|
+
const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , profile: profile1 , orientation: orientation , userInteractionTriggered: userInteractionTriggered , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
5349
6013
|
const [tileSize, setTileSize] = (0, $3Sbms$useState)({
|
|
5350
6014
|
width: 0,
|
|
5351
6015
|
height: 0
|
|
@@ -5395,32 +6059,32 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
5395
6059
|
]);
|
|
5396
6060
|
(0, $3Sbms$useEffect)(()=>{
|
|
5397
6061
|
const onNewPeer = (event)=>{
|
|
5398
|
-
const { peerId: peerId ,
|
|
6062
|
+
const { peerId: peerId , profile: profile } = event.detail;
|
|
5399
6063
|
dispatch({
|
|
5400
6064
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).ADD_STREAM,
|
|
5401
6065
|
payload: {
|
|
5402
6066
|
id: peerId,
|
|
5403
|
-
|
|
6067
|
+
profile: profile
|
|
5404
6068
|
}
|
|
5405
6069
|
});
|
|
5406
6070
|
};
|
|
5407
|
-
const
|
|
5408
|
-
const { peerId: peerId ,
|
|
5409
|
-
const available = event.type === "
|
|
6071
|
+
const onMediaEvent = (event)=>{
|
|
6072
|
+
const { peerId: peerId , mediaId: mediaId , deviceType: deviceType , paused: paused } = event.detail;
|
|
6073
|
+
const available = event.type === "mediaStart";
|
|
5410
6074
|
if (deviceType !== "screen") dispatch({
|
|
5411
6075
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).DEVICE_UPDATE,
|
|
5412
6076
|
payload: {
|
|
5413
6077
|
streamId: peerId,
|
|
5414
|
-
|
|
6078
|
+
mediaId: mediaId,
|
|
5415
6079
|
device: deviceType,
|
|
5416
6080
|
available: available,
|
|
5417
6081
|
paused: paused
|
|
5418
6082
|
}
|
|
5419
6083
|
});
|
|
5420
6084
|
};
|
|
5421
|
-
const
|
|
6085
|
+
const onMediaStateChange = (event)=>{
|
|
5422
6086
|
const { peerId: peerId , deviceType: deviceType } = event.detail;
|
|
5423
|
-
const isPaused = event.type === "
|
|
6087
|
+
const isPaused = event.type === "mediaPause";
|
|
5424
6088
|
if (deviceType === "microphone" && isPaused) dispatch({
|
|
5425
6089
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).MUTE,
|
|
5426
6090
|
payload: {
|
|
@@ -5438,7 +6102,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
5438
6102
|
const { peers: peers } = event.detail;
|
|
5439
6103
|
const roomStreams = peers.map((peer)=>({
|
|
5440
6104
|
id: peer.peerId,
|
|
5441
|
-
|
|
6105
|
+
profile: peer.profile
|
|
5442
6106
|
}));
|
|
5443
6107
|
dispatch({
|
|
5444
6108
|
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_STREAMS,
|
|
@@ -5454,13 +6118,13 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
5454
6118
|
}
|
|
5455
6119
|
});
|
|
5456
6120
|
};
|
|
5457
|
-
const
|
|
5458
|
-
const { peerId: peerId ,
|
|
6121
|
+
const onProfileUpdate = (event)=>{
|
|
6122
|
+
const { peerId: peerId , profile: profile } = event.detail;
|
|
5459
6123
|
dispatch({
|
|
5460
|
-
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).
|
|
6124
|
+
type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_STREAM_PROFILE,
|
|
5461
6125
|
payload: {
|
|
5462
6126
|
streamId: peerId,
|
|
5463
|
-
|
|
6127
|
+
profile: profile
|
|
5464
6128
|
}
|
|
5465
6129
|
});
|
|
5466
6130
|
};
|
|
@@ -5478,22 +6142,22 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
5478
6142
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
|
|
5479
6143
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("newPeer", onNewPeer);
|
|
5480
6144
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerClosed", onPeerClosed);
|
|
5481
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5482
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5483
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5484
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
5485
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
6145
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaStart", onMediaEvent);
|
|
6146
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaStop", onMediaEvent);
|
|
6147
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaPause", onMediaStateChange);
|
|
6148
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("mediaResume", onMediaStateChange);
|
|
6149
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("profileUpdate", onProfileUpdate);
|
|
5486
6150
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerStartSpeak", onPeerSpeakingUpdate);
|
|
5487
6151
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("peerStopSpeak", onPeerSpeakingUpdate);
|
|
5488
6152
|
return ()=>{
|
|
5489
6153
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
|
|
5490
6154
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("newPeer", onNewPeer);
|
|
5491
6155
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerClosed", onPeerClosed);
|
|
5492
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5493
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5494
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5495
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
5496
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
6156
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaStart", onMediaEvent);
|
|
6157
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaStop", onMediaEvent);
|
|
6158
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaPause", onMediaStateChange);
|
|
6159
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("mediaResume", onMediaStateChange);
|
|
6160
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("profileUpdate", onProfileUpdate);
|
|
5497
6161
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerStartSpeak", onPeerSpeakingUpdate);
|
|
5498
6162
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("peerStopSpeak", onPeerSpeakingUpdate);
|
|
5499
6163
|
};
|
|
@@ -5523,7 +6187,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
|
|
|
5523
6187
|
stream: {
|
|
5524
6188
|
id: String(selfPeerId),
|
|
5525
6189
|
muted: selfMuted,
|
|
5526
|
-
|
|
6190
|
+
profile: profile1
|
|
5527
6191
|
}
|
|
5528
6192
|
}),
|
|
5529
6193
|
streams.map((stream)=>{
|
|
@@ -5552,6 +6216,7 @@ var $cdab47bb8796991e$export$2e2bcd8739ae039 = $cdab47bb8796991e$var$Video;
|
|
|
5552
6216
|
|
|
5553
6217
|
|
|
5554
6218
|
|
|
6219
|
+
|
|
5555
6220
|
const $f0e90fb231c59fab$var$HangUp = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
5556
6221
|
width: "25",
|
|
5557
6222
|
height: "24",
|
|
@@ -5647,6 +6312,7 @@ var $8b7bd174d29d9a1f$export$2e2bcd8739ae039 = $8b7bd174d29d9a1f$var$Spinner;
|
|
|
5647
6312
|
|
|
5648
6313
|
|
|
5649
6314
|
|
|
6315
|
+
|
|
5650
6316
|
const $a2d206a438475087$var$YoutubeIcon = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
5651
6317
|
width: "24",
|
|
5652
6318
|
height: "25",
|
|
@@ -5760,6 +6426,7 @@ const $ae07ea3548d561ea$export$d5bc2acf69f5bdaf = (0, $3Sbms$styledcomponents).d
|
|
|
5760
6426
|
|
|
5761
6427
|
const $db92fac48417791a$var$isScreenshareSupported = Boolean(navigator.mediaDevices.getDisplayMedia);
|
|
5762
6428
|
const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
6429
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5763
6430
|
const highlightMenuRef = (0, $3Sbms$useRef)(null);
|
|
5764
6431
|
const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
|
|
5765
6432
|
const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
@@ -5778,7 +6445,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5778
6445
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare();
|
|
5779
6446
|
} catch (screenshareError) {
|
|
5780
6447
|
console.warn(screenshareError);
|
|
5781
|
-
(0, $3Sbms$reacthottoast)("
|
|
6448
|
+
(0, $3Sbms$reacthottoast)(t("notifications.screensharingError"), {
|
|
5782
6449
|
className: "error"
|
|
5783
6450
|
});
|
|
5784
6451
|
}
|
|
@@ -5797,7 +6464,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5797
6464
|
items: [
|
|
5798
6465
|
{
|
|
5799
6466
|
id: "linksharing",
|
|
5800
|
-
title: "
|
|
6467
|
+
title: t("shareLink.title"),
|
|
5801
6468
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
|
|
5802
6469
|
action: onLinkshareClick
|
|
5803
6470
|
},
|
|
@@ -5815,7 +6482,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
|
|
|
5815
6482
|
items: [
|
|
5816
6483
|
{
|
|
5817
6484
|
id: "screensharing",
|
|
5818
|
-
title: "
|
|
6485
|
+
title: t("menu.screenSharing"),
|
|
5819
6486
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
|
|
5820
6487
|
action: onScreenshareClick
|
|
5821
6488
|
},
|
|
@@ -5847,6 +6514,7 @@ var $db92fac48417791a$export$2e2bcd8739ae039 = $db92fac48417791a$var$HighlightBu
|
|
|
5847
6514
|
|
|
5848
6515
|
|
|
5849
6516
|
const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
6517
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
5850
6518
|
const leaveMenuRef = (0, $3Sbms$useRef)(null);
|
|
5851
6519
|
const [webcamCount, setWebcamCount] = (0, $3Sbms$useState)(0);
|
|
5852
6520
|
const [isLeaveMenuOpen, setIsLeaveMenuOpen] = (0, $3Sbms$useState)(false);
|
|
@@ -5860,7 +6528,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5860
6528
|
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
|
|
5861
6529
|
} catch (muteError) {
|
|
5862
6530
|
console.warn(muteError);
|
|
5863
|
-
(0, $3Sbms$reacthottoast)("
|
|
6531
|
+
(0, $3Sbms$reacthottoast)(t("notifications.microphoneError"), {
|
|
5864
6532
|
className: "error"
|
|
5865
6533
|
});
|
|
5866
6534
|
}
|
|
@@ -5874,7 +6542,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5874
6542
|
}
|
|
5875
6543
|
} catch (cameraError) {
|
|
5876
6544
|
console.warn(cameraError);
|
|
5877
|
-
(0, $3Sbms$reacthottoast)("
|
|
6545
|
+
(0, $3Sbms$reacthottoast)(t("notifications.cameraError"), {
|
|
5878
6546
|
className: "error"
|
|
5879
6547
|
});
|
|
5880
6548
|
} finally{
|
|
@@ -5886,7 +6554,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5886
6554
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
|
|
5887
6555
|
} catch (rotateError) {
|
|
5888
6556
|
console.warn(rotateError);
|
|
5889
|
-
(0, $3Sbms$reacthottoast)("
|
|
6557
|
+
(0, $3Sbms$reacthottoast)(t("notifications.cameraRotateError"), {
|
|
5890
6558
|
className: "error"
|
|
5891
6559
|
});
|
|
5892
6560
|
}
|
|
@@ -5943,13 +6611,13 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5943
6611
|
items: [
|
|
5944
6612
|
{
|
|
5945
6613
|
id: "leaveCall",
|
|
5946
|
-
title: "
|
|
6614
|
+
title: t("leave.leaveCall"),
|
|
5947
6615
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$56fe02ef449b2606), {}),
|
|
5948
6616
|
action: leaveCall
|
|
5949
6617
|
},
|
|
5950
6618
|
{
|
|
5951
6619
|
id: "terminateCall",
|
|
5952
|
-
title: "
|
|
6620
|
+
title: t("leave.endCall"),
|
|
5953
6621
|
jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$e57aa6aff2e1f414), {}),
|
|
5954
6622
|
action: terminateCall,
|
|
5955
6623
|
danger: true
|
|
@@ -5965,7 +6633,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
|
|
|
5965
6633
|
children: [
|
|
5966
6634
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f0e90fb231c59fab$export$2e2bcd8739ae039), {}),
|
|
5967
6635
|
/*#__PURE__*/ (0, $3Sbms$jsx)("p", {
|
|
5968
|
-
children: "
|
|
6636
|
+
children: t("leave.title")
|
|
5969
6637
|
})
|
|
5970
6638
|
]
|
|
5971
6639
|
})
|
|
@@ -5988,6 +6656,7 @@ var $69a9c49ece80e773$export$2e2bcd8739ae039 = $69a9c49ece80e773$var$ControlBar;
|
|
|
5988
6656
|
|
|
5989
6657
|
|
|
5990
6658
|
|
|
6659
|
+
|
|
5991
6660
|
const $8d3d0e80c56cde5c$export$9d03e7b857083c37 = (0, $3Sbms$styledcomponents).div`
|
|
5992
6661
|
position: absolute;
|
|
5993
6662
|
width: 100%;
|
|
@@ -6066,9 +6735,10 @@ const $8d3d0e80c56cde5c$export$51760c3b0f5567d2 = (0, $3Sbms$styledcomponents).p
|
|
|
6066
6735
|
|
|
6067
6736
|
|
|
6068
6737
|
const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
6738
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6069
6739
|
const QuickConnectContainerRef = (0, $3Sbms$useRef)(null);
|
|
6070
6740
|
const QuickConnectRef = (0, $3Sbms$useRef)(null);
|
|
6071
|
-
const { selfPeerId: selfPeerId ,
|
|
6741
|
+
const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6072
6742
|
(0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(QuickConnectContainerRef, ()=>{
|
|
6073
6743
|
if (isQuickConnectPopupVisible) setIsQuickConnectPopupVisible(false);
|
|
6074
6744
|
});
|
|
@@ -6084,13 +6754,13 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6084
6754
|
url.searchParams.set("microphone-enabled", "0");
|
|
6085
6755
|
url.searchParams.set("camera-enabled", "1");
|
|
6086
6756
|
url.searchParams.set("quick-connect", selfPeerId);
|
|
6087
|
-
if (
|
|
6757
|
+
if (profile.name) url.searchParams.set("name", profile.name);
|
|
6088
6758
|
}
|
|
6089
6759
|
return url.href;
|
|
6090
6760
|
}, [
|
|
6091
6761
|
options.sharedURL,
|
|
6092
6762
|
selfPeerId,
|
|
6093
|
-
|
|
6763
|
+
profile.name
|
|
6094
6764
|
]);
|
|
6095
6765
|
const onQuickConnectPopupCloseClick = ()=>setIsQuickConnectPopupVisible(false);
|
|
6096
6766
|
(0, $3Sbms$useEffect)(()=>{
|
|
@@ -6119,8 +6789,12 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6119
6789
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(quickConnectParam, {
|
|
6120
6790
|
type: "quick_connect_close"
|
|
6121
6791
|
});
|
|
6122
|
-
if (quickConnectNameParam) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).
|
|
6123
|
-
|
|
6792
|
+
if (quickConnectNameParam) (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile({
|
|
6793
|
+
name: `${quickConnectNameParam} (mobile)`
|
|
6794
|
+
});
|
|
6795
|
+
else (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile({
|
|
6796
|
+
name: "Mobile"
|
|
6797
|
+
});
|
|
6124
6798
|
}
|
|
6125
6799
|
}
|
|
6126
6800
|
}, [
|
|
@@ -6136,7 +6810,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6136
6810
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $8d3d0e80c56cde5c$export$f8e80e2c9abbb7eb), {
|
|
6137
6811
|
children: [
|
|
6138
6812
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
6139
|
-
children: "
|
|
6813
|
+
children: t("quickConnect.scanTitle")
|
|
6140
6814
|
}),
|
|
6141
6815
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$b421c25a8e0ea22e), {
|
|
6142
6816
|
onClick: onQuickConnectPopupCloseClick,
|
|
@@ -6150,7 +6824,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
|
|
|
6150
6824
|
})
|
|
6151
6825
|
}),
|
|
6152
6826
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$51760c3b0f5567d2), {
|
|
6153
|
-
children: "
|
|
6827
|
+
children: t("quickConnect.scan")
|
|
6154
6828
|
})
|
|
6155
6829
|
]
|
|
6156
6830
|
})
|
|
@@ -6162,10 +6836,6 @@ var $5b80b81d7b095f89$export$2e2bcd8739ae039 = $5b80b81d7b095f89$var$QuickConnec
|
|
|
6162
6836
|
|
|
6163
6837
|
|
|
6164
6838
|
|
|
6165
|
-
const $b26ed507544ea00c$var$capitalizeFirstLetter = (string)=>{
|
|
6166
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
6167
|
-
};
|
|
6168
|
-
var $b26ed507544ea00c$export$2e2bcd8739ae039 = $b26ed507544ea00c$var$capitalizeFirstLetter;
|
|
6169
6839
|
|
|
6170
6840
|
|
|
6171
6841
|
|
|
@@ -6232,6 +6902,8 @@ var $c45f2504881e174b$export$2e2bcd8739ae039 = $c45f2504881e174b$var$Speaker;
|
|
|
6232
6902
|
|
|
6233
6903
|
|
|
6234
6904
|
|
|
6905
|
+
|
|
6906
|
+
|
|
6235
6907
|
const $910dd7d7d872a463$var$Checkmark = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
6236
6908
|
width: "20",
|
|
6237
6909
|
height: "20",
|
|
@@ -6249,7 +6921,6 @@ var $910dd7d7d872a463$export$2e2bcd8739ae039 = $910dd7d7d872a463$var$Checkmark;
|
|
|
6249
6921
|
|
|
6250
6922
|
|
|
6251
6923
|
|
|
6252
|
-
|
|
6253
6924
|
const $658749b7ab14b607$export$304c350e86a38cee = (0, $3Sbms$styledcomponents).div`
|
|
6254
6925
|
display: flex;
|
|
6255
6926
|
flex-direction: column;
|
|
@@ -6333,8 +7004,10 @@ const $658749b7ab14b607$export$db1aade9877208c7 = (0, $3Sbms$styledcomponents).b
|
|
|
6333
7004
|
border-radius: 10px;
|
|
6334
7005
|
justify-content: space-between;
|
|
6335
7006
|
align-items: center;
|
|
6336
|
-
padding:
|
|
7007
|
+
padding: 15px;
|
|
6337
7008
|
font-size: 14px;
|
|
7009
|
+
font-weight: 600;
|
|
7010
|
+
line-height: 20px;
|
|
6338
7011
|
color: ${(props)=>props.theme.settingsTextColor};
|
|
6339
7012
|
|
|
6340
7013
|
span {
|
|
@@ -6409,27 +7082,16 @@ const $658749b7ab14b607$export$73afb47ae3e10bf1 = (0, $3Sbms$styledcomponents).p
|
|
|
6409
7082
|
`;
|
|
6410
7083
|
|
|
6411
7084
|
|
|
6412
|
-
const $1694791461215de9$var$
|
|
6413
|
-
"english"
|
|
6414
|
-
];
|
|
6415
|
-
const $1694791461215de9$export$604ba5624273df44 = ()=>{
|
|
6416
|
-
try {
|
|
6417
|
-
const storedTheme = localStorage.getItem("stream_ui_language");
|
|
6418
|
-
if (storedTheme) return storedTheme;
|
|
6419
|
-
return "english";
|
|
6420
|
-
} catch (localStorageError) {
|
|
6421
|
-
console.warn(localStorageError);
|
|
6422
|
-
return "english";
|
|
6423
|
-
}
|
|
6424
|
-
};
|
|
7085
|
+
const $1694791461215de9$var$languages = Object.keys((0, $384d985bb9605c35$export$150b732325d14d04));
|
|
6425
7086
|
const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
7087
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6426
7088
|
const { language: language , setLanguage: setLanguage } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6427
7089
|
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
|
|
6428
7090
|
children: [
|
|
6429
7091
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6430
7092
|
children: [
|
|
6431
7093
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6432
|
-
children: "
|
|
7094
|
+
children: t("settings.language")
|
|
6433
7095
|
}),
|
|
6434
7096
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6435
7097
|
onClick: back,
|
|
@@ -6443,9 +7105,9 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
|
6443
7105
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6444
7106
|
children: [
|
|
6445
7107
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6446
|
-
children: "
|
|
7108
|
+
children: t("settings.language")
|
|
6447
7109
|
}),
|
|
6448
|
-
$1694791461215de9$var$
|
|
7110
|
+
$1694791461215de9$var$languages.map((lang)=>{
|
|
6449
7111
|
const checked = language === lang;
|
|
6450
7112
|
const onLanguageClick = ()=>{
|
|
6451
7113
|
setLanguage(lang);
|
|
@@ -6454,7 +7116,7 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
|
|
|
6454
7116
|
onClick: onLanguageClick,
|
|
6455
7117
|
children: [
|
|
6456
7118
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6457
|
-
children: (0, $
|
|
7119
|
+
children: (0, $384d985bb9605c35$export$150b732325d14d04)[lang].name
|
|
6458
7120
|
}),
|
|
6459
7121
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6460
7122
|
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
@@ -6479,39 +7141,50 @@ var $1694791461215de9$export$2e2bcd8739ae039 = $1694791461215de9$var$LanguageSub
|
|
|
6479
7141
|
|
|
6480
7142
|
|
|
6481
7143
|
|
|
7144
|
+
|
|
7145
|
+
|
|
7146
|
+
|
|
6482
7147
|
const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
6483
|
-
const
|
|
6484
|
-
const [
|
|
6485
|
-
const [
|
|
6486
|
-
const [
|
|
6487
|
-
const
|
|
6488
|
-
const
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
setCurrentSpeaker(speaker || null);
|
|
6498
|
-
});
|
|
6499
|
-
const onMicClick = (0, $3Sbms$useCallback)(async (mic)=>{
|
|
6500
|
-
if (currentMic?.deviceId === mic.deviceId) return;
|
|
7148
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7149
|
+
const [audioDevices, setAudioDevices] = (0, $3Sbms$useState)([]);
|
|
7150
|
+
const [currentMicrophoneId, setCurrentMicrophoneId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentMicrophoneId());
|
|
7151
|
+
const [currentSpeakerId, setCurrentSpeakerId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentSpeakerId());
|
|
7152
|
+
const microphoneDevices = audioDevices.filter((device)=>device.kind === "audioinput");
|
|
7153
|
+
const speakerDevices = audioDevices.filter((device)=>device.kind === "audiooutput");
|
|
7154
|
+
const isMicrophoneAccessBlocked = microphoneDevices.length && audioDevices.every((device)=>device.deviceId === "");
|
|
7155
|
+
const canChangeSpeakers = "setSinkId" in HTMLAudioElement.prototype;
|
|
7156
|
+
const listDevices = async ()=>{
|
|
7157
|
+
const audioDevicesList = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listAudioDevices();
|
|
7158
|
+
setAudioDevices(audioDevicesList);
|
|
7159
|
+
};
|
|
7160
|
+
const onMicClick = async (mic)=>{
|
|
7161
|
+
if (currentMicrophoneId === mic.deviceId) return;
|
|
6501
7162
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchMicrophone(mic.deviceId);
|
|
6502
|
-
|
|
6503
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
7163
|
+
setCurrentMicrophoneId(mic.deviceId);
|
|
7164
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7165
|
+
name: mic.label
|
|
7166
|
+
}), {
|
|
7167
|
+
duration: 3000,
|
|
7168
|
+
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
|
|
7169
|
+
messageStyle: {
|
|
7170
|
+
fontWeight: 600
|
|
7171
|
+
}
|
|
7172
|
+
});
|
|
7173
|
+
};
|
|
7174
|
+
const onSpeakerClick = (speaker)=>{
|
|
7175
|
+
if (currentSpeakerId === speaker.deviceId) return;
|
|
6509
7176
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).setAudioSink(speaker.deviceId);
|
|
6510
|
-
|
|
6511
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
7177
|
+
setCurrentSpeakerId(speaker.deviceId);
|
|
7178
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7179
|
+
name: speaker.label
|
|
7180
|
+
}), {
|
|
7181
|
+
duration: 3000,
|
|
7182
|
+
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {}),
|
|
7183
|
+
messageStyle: {
|
|
7184
|
+
fontWeight: 600
|
|
7185
|
+
}
|
|
7186
|
+
});
|
|
7187
|
+
};
|
|
6515
7188
|
(0, $3Sbms$useEffect)(()=>{
|
|
6516
7189
|
listDevices();
|
|
6517
7190
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("devicesListChange", listDevices);
|
|
@@ -6522,7 +7195,7 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6522
7195
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6523
7196
|
children: [
|
|
6524
7197
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6525
|
-
children: "
|
|
7198
|
+
children: t("audioMenu.title")
|
|
6526
7199
|
}),
|
|
6527
7200
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6528
7201
|
onClick: back,
|
|
@@ -6532,61 +7205,64 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
|
|
|
6532
7205
|
})
|
|
6533
7206
|
]
|
|
6534
7207
|
}),
|
|
6535
|
-
/*#__PURE__*/ (0, $3Sbms$
|
|
6536
|
-
children:
|
|
6537
|
-
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$
|
|
6538
|
-
children: [
|
|
6539
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6540
|
-
children: "Microphone"
|
|
6541
|
-
}),
|
|
6542
|
-
canChangeSpeakers && micDevices.map((mic)=>{
|
|
6543
|
-
const checked = mic.deviceId === currentMic?.deviceId;
|
|
6544
|
-
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6545
|
-
onClick: ()=>onMicClick(mic),
|
|
6546
|
-
children: [
|
|
6547
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6548
|
-
children: mic.label
|
|
6549
|
-
}),
|
|
6550
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6551
|
-
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
6552
|
-
})
|
|
6553
|
-
]
|
|
6554
|
-
}, mic.deviceId);
|
|
6555
|
-
}),
|
|
6556
|
-
!canChangeSpeakers && micDevices.length < 1 && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6557
|
-
children: [
|
|
6558
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
6559
|
-
children: "Microphone is blocked."
|
|
6560
|
-
}),
|
|
6561
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
6562
|
-
children: "Please accept microphone sharing before accessing these options."
|
|
6563
|
-
})
|
|
6564
|
-
]
|
|
6565
|
-
})
|
|
6566
|
-
]
|
|
6567
|
-
}),
|
|
6568
|
-
canChangeSpeakers && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7208
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
|
|
7209
|
+
children: isMicrophoneAccessBlocked ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7210
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6569
7211
|
children: [
|
|
6570
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$
|
|
6571
|
-
children: "
|
|
7212
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
7213
|
+
children: t("audioMenu.blockedMicrophone")
|
|
6572
7214
|
}),
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6576
|
-
onClick: ()=>onSpeakerClick(speaker),
|
|
6577
|
-
children: [
|
|
6578
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6579
|
-
children: speaker.label
|
|
6580
|
-
}),
|
|
6581
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6582
|
-
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
6583
|
-
})
|
|
6584
|
-
]
|
|
6585
|
-
}, speaker.deviceId);
|
|
7215
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
7216
|
+
children: t("audioMenu.microphonePermissions")
|
|
6586
7217
|
})
|
|
6587
7218
|
]
|
|
6588
7219
|
})
|
|
6589
|
-
|
|
7220
|
+
}) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
|
|
7221
|
+
children: [
|
|
7222
|
+
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7223
|
+
children: [
|
|
7224
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
7225
|
+
children: t("misc.microphone")
|
|
7226
|
+
}),
|
|
7227
|
+
microphoneDevices.map((microphone)=>{
|
|
7228
|
+
const checked = microphone.deviceId === currentMicrophoneId;
|
|
7229
|
+
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
7230
|
+
onClick: ()=>onMicClick(microphone),
|
|
7231
|
+
children: [
|
|
7232
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
7233
|
+
children: microphone.label
|
|
7234
|
+
}),
|
|
7235
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7236
|
+
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
7237
|
+
})
|
|
7238
|
+
]
|
|
7239
|
+
}, microphone.deviceId);
|
|
7240
|
+
})
|
|
7241
|
+
]
|
|
7242
|
+
}),
|
|
7243
|
+
canChangeSpeakers && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7244
|
+
children: [
|
|
7245
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
7246
|
+
children: t("misc.speaker")
|
|
7247
|
+
}),
|
|
7248
|
+
speakerDevices.map((speaker)=>{
|
|
7249
|
+
const checked = speaker.deviceId === currentSpeakerId;
|
|
7250
|
+
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
7251
|
+
onClick: ()=>onSpeakerClick(speaker),
|
|
7252
|
+
children: [
|
|
7253
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
7254
|
+
children: speaker.label
|
|
7255
|
+
}),
|
|
7256
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7257
|
+
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
7258
|
+
})
|
|
7259
|
+
]
|
|
7260
|
+
}, speaker.deviceId);
|
|
7261
|
+
})
|
|
7262
|
+
]
|
|
7263
|
+
})
|
|
7264
|
+
]
|
|
7265
|
+
})
|
|
6590
7266
|
})
|
|
6591
7267
|
]
|
|
6592
7268
|
});
|
|
@@ -6602,62 +7278,67 @@ var $b7a5d5760b390f40$export$2e2bcd8739ae039 = $b7a5d5760b390f40$var$AudioSubMen
|
|
|
6602
7278
|
|
|
6603
7279
|
|
|
6604
7280
|
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
switch(constraints[key].height.ideal){
|
|
6608
|
-
case 240:
|
|
6609
|
-
return {
|
|
6610
|
-
name: "Low definition (240p)",
|
|
6611
|
-
key: key
|
|
6612
|
-
};
|
|
6613
|
-
case 480:
|
|
6614
|
-
return {
|
|
6615
|
-
name: "Standard definition (480p)",
|
|
6616
|
-
key: key
|
|
6617
|
-
};
|
|
6618
|
-
case 720:
|
|
6619
|
-
return {
|
|
6620
|
-
name: "Hight definition (720p)",
|
|
6621
|
-
key: key
|
|
6622
|
-
};
|
|
6623
|
-
default:
|
|
6624
|
-
return {
|
|
6625
|
-
name: "",
|
|
6626
|
-
key: key
|
|
6627
|
-
};
|
|
6628
|
-
}
|
|
6629
|
-
}).filter((def)=>def.name !== "");
|
|
7281
|
+
|
|
7282
|
+
|
|
6630
7283
|
const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
6631
|
-
const
|
|
7284
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7285
|
+
const [cameraDevices, setCameraDevices] = (0, $3Sbms$useState)([]);
|
|
6632
7286
|
const [currentCamera, setCurrentCamera] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentWebcam());
|
|
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
|
+
]);
|
|
6633
7315
|
const listDevices = async ()=>{
|
|
6634
|
-
const
|
|
6635
|
-
|
|
6636
|
-
if (authorisedCameras.length > 0) setCameraDevices(authorisedCameras);
|
|
7316
|
+
const videoDevices = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listVideoDevices();
|
|
7317
|
+
setCameraDevices(videoDevices);
|
|
6637
7318
|
};
|
|
6638
7319
|
const onCameraClick = async (camera)=>{
|
|
6639
7320
|
if (currentCamera.device?.deviceId === camera.deviceId) return;
|
|
6640
|
-
if (currentCamera.device) {
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
})
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
}
|
|
6655
|
-
}
|
|
7321
|
+
if (currentCamera.device) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchWebcam({
|
|
7322
|
+
device: camera
|
|
7323
|
+
});
|
|
7324
|
+
else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
|
|
7325
|
+
device: camera,
|
|
7326
|
+
resolution: currentCamera.resolution
|
|
7327
|
+
});
|
|
7328
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
|
|
7329
|
+
name: camera.label
|
|
7330
|
+
}), {
|
|
7331
|
+
duration: 3000,
|
|
7332
|
+
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {}),
|
|
7333
|
+
messageStyle: {
|
|
7334
|
+
fontWeight: 600
|
|
7335
|
+
}
|
|
7336
|
+
});
|
|
6656
7337
|
};
|
|
6657
7338
|
const onSendResolutionClick = async (resolution)=>{
|
|
6658
7339
|
if (currentCamera.resolution === resolution.key) return;
|
|
6659
7340
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setWebcamResolution(resolution.key);
|
|
6660
|
-
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(
|
|
7341
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(resolution.name, {
|
|
6661
7342
|
duration: 3000
|
|
6662
7343
|
});
|
|
6663
7344
|
};
|
|
@@ -6682,7 +7363,7 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6682
7363
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6683
7364
|
children: [
|
|
6684
7365
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6685
|
-
children: "
|
|
7366
|
+
children: t("videoMenu.title")
|
|
6686
7367
|
}),
|
|
6687
7368
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6688
7369
|
onClick: back,
|
|
@@ -6692,61 +7373,64 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
|
|
|
6692
7373
|
})
|
|
6693
7374
|
]
|
|
6694
7375
|
}),
|
|
6695
|
-
/*#__PURE__*/ (0, $3Sbms$
|
|
6696
|
-
children:
|
|
6697
|
-
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$
|
|
6698
|
-
children: [
|
|
6699
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6700
|
-
children: "Camera"
|
|
6701
|
-
}),
|
|
6702
|
-
cameraDevices.map((camera)=>{
|
|
6703
|
-
const checked = camera.deviceId === currentCamera.device?.deviceId;
|
|
6704
|
-
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6705
|
-
onClick: ()=>onCameraClick(camera),
|
|
6706
|
-
children: [
|
|
6707
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6708
|
-
children: camera.label
|
|
6709
|
-
}),
|
|
6710
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6711
|
-
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
6712
|
-
})
|
|
6713
|
-
]
|
|
6714
|
-
}, camera.deviceId);
|
|
6715
|
-
}),
|
|
6716
|
-
cameraDevices.length < 1 && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6717
|
-
children: [
|
|
6718
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
6719
|
-
children: "Camera is blocked."
|
|
6720
|
-
}),
|
|
6721
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
6722
|
-
children: "Please accept camera sharing before accessing these options."
|
|
6723
|
-
})
|
|
6724
|
-
]
|
|
6725
|
-
})
|
|
6726
|
-
]
|
|
6727
|
-
}),
|
|
6728
|
-
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7376
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b286f91cddfedb5a), {
|
|
7377
|
+
children: isCameraAccessBlocked ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7378
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
|
|
6729
7379
|
children: [
|
|
6730
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$
|
|
6731
|
-
children: "
|
|
7380
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
|
|
7381
|
+
children: t("videoMenu.blockedCamera")
|
|
6732
7382
|
}),
|
|
6733
|
-
$
|
|
6734
|
-
|
|
6735
|
-
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6736
|
-
onClick: ()=>onSendResolutionClick(resolution),
|
|
6737
|
-
children: [
|
|
6738
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
6739
|
-
children: resolution.name
|
|
6740
|
-
}),
|
|
6741
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6742
|
-
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
6743
|
-
})
|
|
6744
|
-
]
|
|
6745
|
-
}, resolution.key);
|
|
7383
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
|
|
7384
|
+
children: t("videoMenu.cameraPermissions")
|
|
6746
7385
|
})
|
|
6747
7386
|
]
|
|
6748
7387
|
})
|
|
6749
|
-
|
|
7388
|
+
}) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
|
|
7389
|
+
children: [
|
|
7390
|
+
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7391
|
+
children: [
|
|
7392
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
7393
|
+
children: t("misc.camera")
|
|
7394
|
+
}),
|
|
7395
|
+
cameraDevices.map((camera)=>{
|
|
7396
|
+
const checked = camera.deviceId === currentCamera.device?.deviceId;
|
|
7397
|
+
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
7398
|
+
onClick: ()=>onCameraClick(camera),
|
|
7399
|
+
children: [
|
|
7400
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
7401
|
+
children: camera.label
|
|
7402
|
+
}),
|
|
7403
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7404
|
+
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
7405
|
+
})
|
|
7406
|
+
]
|
|
7407
|
+
}, camera.deviceId);
|
|
7408
|
+
})
|
|
7409
|
+
]
|
|
7410
|
+
}),
|
|
7411
|
+
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
7412
|
+
children: [
|
|
7413
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
7414
|
+
children: t("videoMenu.sendResolution")
|
|
7415
|
+
}),
|
|
7416
|
+
resolutions.map((resolution)=>{
|
|
7417
|
+
const checked = resolution.key === currentCamera.resolution;
|
|
7418
|
+
return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
7419
|
+
onClick: ()=>onSendResolutionClick(resolution),
|
|
7420
|
+
children: [
|
|
7421
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
|
|
7422
|
+
children: resolution.name
|
|
7423
|
+
}),
|
|
7424
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7425
|
+
children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
|
|
7426
|
+
})
|
|
7427
|
+
]
|
|
7428
|
+
}, resolution.key);
|
|
7429
|
+
})
|
|
7430
|
+
]
|
|
7431
|
+
})
|
|
7432
|
+
]
|
|
7433
|
+
})
|
|
6750
7434
|
})
|
|
6751
7435
|
]
|
|
6752
7436
|
});
|
|
@@ -6756,6 +7440,7 @@ var $57896f163f7e1230$export$2e2bcd8739ae039 = $57896f163f7e1230$var$VideoSubMen
|
|
|
6756
7440
|
|
|
6757
7441
|
|
|
6758
7442
|
const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
7443
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6759
7444
|
const [currentMenu, setCurrentMenu] = (0, $3Sbms$useState)("base");
|
|
6760
7445
|
const menuPopupRef = (0, $3Sbms$useRef)(null);
|
|
6761
7446
|
const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
@@ -6798,7 +7483,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6798
7483
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
|
|
6799
7484
|
children: [
|
|
6800
7485
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
|
|
6801
|
-
children: "
|
|
7486
|
+
children: t("settings.title")
|
|
6802
7487
|
}),
|
|
6803
7488
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
|
|
6804
7489
|
onClick: onCloseClick,
|
|
@@ -6811,17 +7496,17 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6811
7496
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6812
7497
|
children: [
|
|
6813
7498
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6814
|
-
children: "
|
|
7499
|
+
children: t("settings.preferences")
|
|
6815
7500
|
}),
|
|
6816
7501
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6817
7502
|
onClick: onLanguageMenuClick,
|
|
6818
7503
|
children: [
|
|
6819
7504
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6820
|
-
children: "
|
|
7505
|
+
children: t("settings.language")
|
|
6821
7506
|
}),
|
|
6822
7507
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
6823
7508
|
children: [
|
|
6824
|
-
(0, $
|
|
7509
|
+
(0, $384d985bb9605c35$export$150b732325d14d04)[language]?.name,
|
|
6825
7510
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
|
|
6826
7511
|
direction: "right"
|
|
6827
7512
|
})
|
|
@@ -6834,7 +7519,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6834
7519
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6835
7520
|
children: [
|
|
6836
7521
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6837
|
-
children: "
|
|
7522
|
+
children: t("settings.devices")
|
|
6838
7523
|
}),
|
|
6839
7524
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).isListDevicesSupported() && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6840
7525
|
onClick: onAudioClick,
|
|
@@ -6844,7 +7529,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6844
7529
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
|
|
6845
7530
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {})
|
|
6846
7531
|
}),
|
|
6847
|
-
"
|
|
7532
|
+
t("audioMenu.title")
|
|
6848
7533
|
]
|
|
6849
7534
|
}),
|
|
6850
7535
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
@@ -6862,7 +7547,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6862
7547
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
|
|
6863
7548
|
children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {})
|
|
6864
7549
|
}),
|
|
6865
|
-
"
|
|
7550
|
+
t("videoMenu.title")
|
|
6866
7551
|
]
|
|
6867
7552
|
}),
|
|
6868
7553
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
|
|
@@ -6877,13 +7562,13 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
6877
7562
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
|
|
6878
7563
|
children: [
|
|
6879
7564
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
|
|
6880
|
-
children: "
|
|
7565
|
+
children: t("settings.help")
|
|
6881
7566
|
}),
|
|
6882
7567
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
|
|
6883
7568
|
onClick: onHelpCenterClick,
|
|
6884
7569
|
children: [
|
|
6885
7570
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
6886
|
-
children: "
|
|
7571
|
+
children: t("settings.helpCenter")
|
|
6887
7572
|
}),
|
|
6888
7573
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $b93bcb828d5c97d8$export$2e2bcd8739ae039), {})
|
|
6889
7574
|
]
|
|
@@ -6916,6 +7601,7 @@ var $c11e4c21ca692a16$export$2e2bcd8739ae039 = $c11e4c21ca692a16$var$Menu;
|
|
|
6916
7601
|
|
|
6917
7602
|
|
|
6918
7603
|
|
|
7604
|
+
|
|
6919
7605
|
const $d677836e2f373a45$export$b679a9a7caefa4b1 = (0, $3Sbms$styledcomponents).div`
|
|
6920
7606
|
position: absolute;
|
|
6921
7607
|
width: 100%;
|
|
@@ -6961,7 +7647,8 @@ const $d677836e2f373a45$export$11781939bbc73f8b = (0, $3Sbms$styledcomponents).d
|
|
|
6961
7647
|
}
|
|
6962
7648
|
|
|
6963
7649
|
svg {
|
|
6964
|
-
|
|
7650
|
+
width: 20px;
|
|
7651
|
+
height: 21px;
|
|
6965
7652
|
}
|
|
6966
7653
|
`;
|
|
6967
7654
|
const $d677836e2f373a45$export$7ae684a6a708b51d = (0, $3Sbms$styledcomponents).button`
|
|
@@ -6976,8 +7663,8 @@ const $d677836e2f373a45$export$7ae684a6a708b51d = (0, $3Sbms$styledcomponents).b
|
|
|
6976
7663
|
padding: 0;
|
|
6977
7664
|
|
|
6978
7665
|
svg {
|
|
6979
|
-
height:
|
|
6980
|
-
width:
|
|
7666
|
+
height: 15px;
|
|
7667
|
+
width: 15px;
|
|
6981
7668
|
|
|
6982
7669
|
path {
|
|
6983
7670
|
fill: #000;
|
|
@@ -7040,6 +7727,7 @@ const $d677836e2f373a45$export$3711c5e6a7ba3fdc = (0, $3Sbms$styledcomponents).b
|
|
|
7040
7727
|
|
|
7041
7728
|
const $49372cd9190da903$var$youtubeIDRegExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;
|
|
7042
7729
|
const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
7730
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7043
7731
|
const youtubePopupRef = (0, $3Sbms$useRef)(null);
|
|
7044
7732
|
const [youtubeInputValue, setYoutubeInputValue] = (0, $3Sbms$useState)("");
|
|
7045
7733
|
const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
|
|
@@ -7066,7 +7754,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7066
7754
|
}
|
|
7067
7755
|
});
|
|
7068
7756
|
setIsYoutubePopupVisible(false);
|
|
7069
|
-
} else setErrorMessage("
|
|
7757
|
+
} else setErrorMessage(t("youtube.invalid"));
|
|
7070
7758
|
};
|
|
7071
7759
|
const onCloseClick = ()=>setIsYoutubePopupVisible(false);
|
|
7072
7760
|
(0, $3Sbms$useEffect)(()=>{
|
|
@@ -7088,7 +7776,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7088
7776
|
children: [
|
|
7089
7777
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2d206a438475087$export$2e2bcd8739ae039), {}),
|
|
7090
7778
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
7091
|
-
children: "
|
|
7779
|
+
children: t("youtube.title")
|
|
7092
7780
|
})
|
|
7093
7781
|
]
|
|
7094
7782
|
}),
|
|
@@ -7106,7 +7794,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7106
7794
|
children: [
|
|
7107
7795
|
/*#__PURE__*/ (0, $3Sbms$jsx)("label", {
|
|
7108
7796
|
htmlFor: "youtube-popup-input",
|
|
7109
|
-
children: "
|
|
7797
|
+
children: t("youtube.url")
|
|
7110
7798
|
}),
|
|
7111
7799
|
/*#__PURE__*/ (0, $3Sbms$jsx)("input", {
|
|
7112
7800
|
id: "youtube-popup-input",
|
|
@@ -7124,7 +7812,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
|
|
|
7124
7812
|
}),
|
|
7125
7813
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $d677836e2f373a45$export$3711c5e6a7ba3fdc), {
|
|
7126
7814
|
type: "submit",
|
|
7127
|
-
children: "
|
|
7815
|
+
children: t("youtube.share")
|
|
7128
7816
|
})
|
|
7129
7817
|
]
|
|
7130
7818
|
})
|
|
@@ -7144,6 +7832,7 @@ var $49372cd9190da903$export$2e2bcd8739ae039 = $49372cd9190da903$var$YoutubePopu
|
|
|
7144
7832
|
|
|
7145
7833
|
|
|
7146
7834
|
|
|
7835
|
+
|
|
7147
7836
|
const $dc26e7b014ddcf8c$var$PaypalWhite = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
|
|
7148
7837
|
width: "24",
|
|
7149
7838
|
height: "24",
|
|
@@ -7248,7 +7937,8 @@ const $554f3984e3212196$export$7563f0d47f114601 = (0, $3Sbms$styledcomponents).d
|
|
|
7248
7937
|
}
|
|
7249
7938
|
|
|
7250
7939
|
svg {
|
|
7251
|
-
|
|
7940
|
+
width: 20px;
|
|
7941
|
+
height: 20px;
|
|
7252
7942
|
}
|
|
7253
7943
|
`;
|
|
7254
7944
|
const $554f3984e3212196$export$fcade06574a60ff0 = (0, $3Sbms$styledcomponents).button`
|
|
@@ -7263,8 +7953,8 @@ const $554f3984e3212196$export$fcade06574a60ff0 = (0, $3Sbms$styledcomponents).b
|
|
|
7263
7953
|
padding: 0;
|
|
7264
7954
|
|
|
7265
7955
|
svg {
|
|
7266
|
-
|
|
7267
|
-
|
|
7956
|
+
width: 15px;
|
|
7957
|
+
height: 15px;
|
|
7268
7958
|
|
|
7269
7959
|
path {
|
|
7270
7960
|
fill: #000;
|
|
@@ -7336,7 +8026,7 @@ const $554f3984e3212196$export$5e3f251c730829 = (0, $3Sbms$styledcomponents).div
|
|
|
7336
8026
|
|
|
7337
8027
|
|
|
7338
8028
|
const $98933bbc579a3e66$export$a1eac7fdbc2db4af = "linkshare_sent";
|
|
7339
|
-
const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
8029
|
+
const $98933bbc579a3e66$var$sendLinkNotification = (data, t)=>{
|
|
7340
8030
|
let notificationStatusText = new URL(data.url).hostname;
|
|
7341
8031
|
if (notificationStatusText.startsWith("www.")) notificationStatusText = notificationStatusText.slice(4);
|
|
7342
8032
|
const notificationIcon = data.ogImage ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$9e155375d8fb1f67), {
|
|
@@ -7347,11 +8037,11 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
|
7347
8037
|
icon: notificationIcon,
|
|
7348
8038
|
status: {
|
|
7349
8039
|
icon: data.favicon,
|
|
7350
|
-
text: "
|
|
8040
|
+
text: t("misc.from"),
|
|
7351
8041
|
boldText: notificationStatusText
|
|
7352
8042
|
},
|
|
7353
8043
|
button: {
|
|
7354
|
-
text: "
|
|
8044
|
+
text: t("misc.open"),
|
|
7355
8045
|
action: ({ close: close })=>{
|
|
7356
8046
|
window.open(data.url, "_blank");
|
|
7357
8047
|
close();
|
|
@@ -7368,19 +8058,22 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
|
|
|
7368
8058
|
statusText: notificationStatusText
|
|
7369
8059
|
});
|
|
7370
8060
|
};
|
|
7371
|
-
const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
|
|
7372
|
-
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
|
+
});
|
|
7373
8066
|
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(title, {
|
|
7374
8067
|
button: {
|
|
7375
8068
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {}),
|
|
7376
|
-
text: "
|
|
8069
|
+
text: t("shareLink.pay"),
|
|
7377
8070
|
action: ()=>window.open(url, "_blank")
|
|
7378
8071
|
},
|
|
7379
8072
|
status: {
|
|
7380
8073
|
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {
|
|
7381
8074
|
colored: true
|
|
7382
8075
|
}),
|
|
7383
|
-
text: "
|
|
8076
|
+
text: t("shareLink.poweredBy"),
|
|
7384
8077
|
boldText: "PayPal"
|
|
7385
8078
|
},
|
|
7386
8079
|
duration: 10000
|
|
@@ -7393,23 +8086,25 @@ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
|
|
|
7393
8086
|
});
|
|
7394
8087
|
};
|
|
7395
8088
|
const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
8089
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7396
8090
|
const linksharePopupRef = (0, $3Sbms$useRef)(null);
|
|
7397
8091
|
const linkshareInputRef = (0, $3Sbms$useRef)(null);
|
|
7398
8092
|
const [linkshareInputValue, setLinkshareInputValue] = (0, $3Sbms$useState)("");
|
|
7399
8093
|
const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
|
|
7400
8094
|
const [isLoading, setIsLoading] = (0, $3Sbms$useState)(false);
|
|
7401
|
-
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));
|
|
7402
8096
|
const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
|
|
7403
8097
|
const desktop = orientation === "landscape";
|
|
7404
8098
|
const onCustomMessage = (0, $3Sbms$useCallback)((event)=>{
|
|
7405
8099
|
const { type: type , data: data } = event.detail.event;
|
|
7406
|
-
if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data);
|
|
8100
|
+
if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data, t);
|
|
7407
8101
|
else if (type === "paypal_invoice") {
|
|
7408
8102
|
const sender = streams.find((stream)=>stream.id === event.detail.peerId);
|
|
7409
|
-
$98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.
|
|
8103
|
+
$98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url, t);
|
|
7410
8104
|
}
|
|
7411
8105
|
}, [
|
|
7412
|
-
streams
|
|
8106
|
+
streams,
|
|
8107
|
+
t
|
|
7413
8108
|
]);
|
|
7414
8109
|
const onShareClick = async (event)=>{
|
|
7415
8110
|
event.preventDefault();
|
|
@@ -7421,7 +8116,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7421
8116
|
url = new URL(linkshareInputValue);
|
|
7422
8117
|
if (url.protocol === "http") url.protocol = "https";
|
|
7423
8118
|
} catch (err) {
|
|
7424
|
-
setErrorMessage("
|
|
8119
|
+
setErrorMessage(t("shareLink.invalid"));
|
|
7425
8120
|
console.error(err);
|
|
7426
8121
|
}
|
|
7427
8122
|
if (url) {
|
|
@@ -7433,18 +8128,27 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7433
8128
|
}
|
|
7434
8129
|
});
|
|
7435
8130
|
else {
|
|
7436
|
-
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());
|
|
7437
8137
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
|
|
7438
8138
|
type: $98933bbc579a3e66$export$a1eac7fdbc2db4af,
|
|
7439
8139
|
data: data
|
|
7440
8140
|
});
|
|
7441
8141
|
}
|
|
7442
|
-
if (streams.length < 2)
|
|
7443
|
-
|
|
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"));
|
|
7444
8148
|
setIsLinksharePopupVisible(false);
|
|
7445
8149
|
} catch (err) {
|
|
7446
8150
|
console.error(err);
|
|
7447
|
-
(0, $3Sbms$reacthottoast)("
|
|
8151
|
+
(0, $3Sbms$reacthottoast)(t("shareLink.failed"), {
|
|
7448
8152
|
className: "error"
|
|
7449
8153
|
});
|
|
7450
8154
|
}
|
|
@@ -7478,7 +8182,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7478
8182
|
children: [
|
|
7479
8183
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
|
|
7480
8184
|
/*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
|
|
7481
|
-
children: "
|
|
8185
|
+
children: t("shareLink.title2")
|
|
7482
8186
|
})
|
|
7483
8187
|
]
|
|
7484
8188
|
}),
|
|
@@ -7496,7 +8200,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7496
8200
|
children: [
|
|
7497
8201
|
/*#__PURE__*/ (0, $3Sbms$jsx)("label", {
|
|
7498
8202
|
htmlFor: "linkshare-popup-input",
|
|
7499
|
-
children: "
|
|
8203
|
+
children: t("shareLink.linkUrl")
|
|
7500
8204
|
}),
|
|
7501
8205
|
/*#__PURE__*/ (0, $3Sbms$jsx)("input", {
|
|
7502
8206
|
id: "linkshare-popup-input",
|
|
@@ -7522,10 +8226,10 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
|
|
|
7522
8226
|
size: "18px"
|
|
7523
8227
|
}),
|
|
7524
8228
|
/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
|
|
7525
|
-
children: "
|
|
8229
|
+
children: t("shareLink.creating")
|
|
7526
8230
|
})
|
|
7527
8231
|
]
|
|
7528
|
-
}) : "
|
|
8232
|
+
}) : t("shareLink.title")
|
|
7529
8233
|
})
|
|
7530
8234
|
]
|
|
7531
8235
|
})
|
|
@@ -7570,6 +8274,7 @@ var $01986a58bfba8001$export$2e2bcd8739ae039 = $01986a58bfba8001$var$Settings;
|
|
|
7570
8274
|
|
|
7571
8275
|
|
|
7572
8276
|
|
|
8277
|
+
|
|
7573
8278
|
const $61b9018279e658f9$export$104f28dc79f055f4 = (0, $3Sbms$styledcomponents).div`
|
|
7574
8279
|
display: flex;
|
|
7575
8280
|
flex: 1;
|
|
@@ -7608,6 +8313,7 @@ const $61b9018279e658f9$export$3a4deda42b6182b7 = (0, $3Sbms$styledcomponents).b
|
|
|
7608
8313
|
|
|
7609
8314
|
|
|
7610
8315
|
const $df41bfe6da05853a$var$EndView = ()=>{
|
|
8316
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
7611
8317
|
const { streamState: streamState , setStreamState: setStreamState } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
7612
8318
|
const ended = streamState === "ended";
|
|
7613
8319
|
const terminated = streamState === "terminated";
|
|
@@ -7629,17 +8335,17 @@ const $df41bfe6da05853a$var$EndView = ()=>{
|
|
|
7629
8335
|
}),
|
|
7630
8336
|
/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $61b9018279e658f9$export$eebc018855fb0cb6), {
|
|
7631
8337
|
children: [
|
|
7632
|
-
ended && "
|
|
7633
|
-
terminated && "
|
|
7634
|
-
expired && "
|
|
8338
|
+
ended && t("endView.callLeft"),
|
|
8339
|
+
terminated && t("endView.callEnded"),
|
|
8340
|
+
expired && t("endView.tooLate")
|
|
7635
8341
|
]
|
|
7636
8342
|
}),
|
|
7637
8343
|
expired && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$f4e7b895a81715e9), {
|
|
7638
|
-
children: "
|
|
8344
|
+
children: t("endView.callIsOver")
|
|
7639
8345
|
}),
|
|
7640
8346
|
ended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$3a4deda42b6182b7), {
|
|
7641
8347
|
onClick: onGoBackClick,
|
|
7642
|
-
children: "
|
|
8348
|
+
children: t("endView.goBack")
|
|
7643
8349
|
}),
|
|
7644
8350
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $f81bfa56534026c2$export$ad5f39c592532e2d), {})
|
|
7645
8351
|
]
|
|
@@ -7996,6 +8702,82 @@ var $d6008ea114507578$export$2e2bcd8739ae039 = $d6008ea114507578$var$SvgDefiniti
|
|
|
7996
8702
|
|
|
7997
8703
|
|
|
7998
8704
|
|
|
8705
|
+
|
|
8706
|
+
|
|
8707
|
+
|
|
8708
|
+
const $fdbe2be8571dfcd7$export$8bac64dfa46a096a = (0, $3Sbms$styledcomponents).div`
|
|
8709
|
+
display: flex;
|
|
8710
|
+
justify-content: center;
|
|
8711
|
+
align-items: center;
|
|
8712
|
+
position: absolute;
|
|
8713
|
+
width: 100%;
|
|
8714
|
+
height: 100%;
|
|
8715
|
+
background-color: rgba(0, 0, 0, 0.75);
|
|
8716
|
+
z-index: 999;
|
|
8717
|
+
`;
|
|
8718
|
+
const $fdbe2be8571dfcd7$export$f2f6e48f0181f95d = (0, $3Sbms$styledcomponents).div`
|
|
8719
|
+
display: flex;
|
|
8720
|
+
flex-direction: column;
|
|
8721
|
+
align-items: flex-start;
|
|
8722
|
+
background-color: #fff;
|
|
8723
|
+
padding: 20px;
|
|
8724
|
+
max-width: 300px;
|
|
8725
|
+
border-radius: 10px;
|
|
8726
|
+
box-sizing: border-box;
|
|
8727
|
+
`;
|
|
8728
|
+
const $fdbe2be8571dfcd7$export$b834616c6081368f = (0, $3Sbms$styledcomponents).h2`
|
|
8729
|
+
font-size: 16px;
|
|
8730
|
+
font-weight: 700;
|
|
8731
|
+
color: #242324;
|
|
8732
|
+
margin: 0 0 10px 0;
|
|
8733
|
+
`;
|
|
8734
|
+
const $fdbe2be8571dfcd7$export$12ed2ca69ff6905b = (0, $3Sbms$styledcomponents).p`
|
|
8735
|
+
font-size: 12px;
|
|
8736
|
+
font-weight: 500;
|
|
8737
|
+
color: #2d2d2d;
|
|
8738
|
+
margin: 0 0 15px 0;
|
|
8739
|
+
`;
|
|
8740
|
+
const $fdbe2be8571dfcd7$export$d39b0d24481757e7 = (0, $3Sbms$styledcomponents).button`
|
|
8741
|
+
align-self: flex-end;
|
|
8742
|
+
color: #242324;
|
|
8743
|
+
background-color: transparent;
|
|
8744
|
+
border: 2px solid #242324;
|
|
8745
|
+
border-radius: 50px;
|
|
8746
|
+
padding: 8px 18px;
|
|
8747
|
+
box-sizing: border-box;
|
|
8748
|
+
font-size: 14px;
|
|
8749
|
+
font-weight: 700;
|
|
8750
|
+
line-height: 16px;
|
|
8751
|
+
|
|
8752
|
+
&:hover {
|
|
8753
|
+
color: #fff;
|
|
8754
|
+
background-color: #242324;
|
|
8755
|
+
}
|
|
8756
|
+
`;
|
|
8757
|
+
|
|
8758
|
+
|
|
8759
|
+
const $6aca0f707e80bf63$var$BlockedDevicesPopup = ({ close: close })=>{
|
|
8760
|
+
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
8761
|
+
return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$8bac64dfa46a096a), {
|
|
8762
|
+
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $fdbe2be8571dfcd7$export$f2f6e48f0181f95d), {
|
|
8763
|
+
children: [
|
|
8764
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$b834616c6081368f), {
|
|
8765
|
+
children: t("notifications.blockedMicrophonePopupTitle")
|
|
8766
|
+
}),
|
|
8767
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$12ed2ca69ff6905b), {
|
|
8768
|
+
children: t("notifications.blockedMicrophonePopup")
|
|
8769
|
+
}),
|
|
8770
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$d39b0d24481757e7), {
|
|
8771
|
+
onClick: close,
|
|
8772
|
+
children: "Dismiss"
|
|
8773
|
+
})
|
|
8774
|
+
]
|
|
8775
|
+
})
|
|
8776
|
+
});
|
|
8777
|
+
};
|
|
8778
|
+
var $6aca0f707e80bf63$export$2e2bcd8739ae039 = $6aca0f707e80bf63$var$BlockedDevicesPopup;
|
|
8779
|
+
|
|
8780
|
+
|
|
7999
8781
|
// https://github.com/video-dev/can-autoplay
|
|
8000
8782
|
const $15a01b611391c1e7$var$audioSource = new Blob([
|
|
8001
8783
|
new Uint8Array([
|
|
@@ -8307,8 +9089,9 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
|
|
|
8307
9089
|
|
|
8308
9090
|
|
|
8309
9091
|
|
|
9092
|
+
|
|
8310
9093
|
const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
|
|
8311
|
-
const $26ed036cbc17809a$var$currentLanguage = (0, $
|
|
9094
|
+
const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
|
|
8312
9095
|
let $26ed036cbc17809a$var$timestampCriticalError = -1;
|
|
8313
9096
|
const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
8314
9097
|
const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
|
|
@@ -8321,14 +9104,15 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8321
9104
|
const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
|
|
8322
9105
|
const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $3Sbms$useState)(false);
|
|
8323
9106
|
const [theme, setTheme] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentTheme);
|
|
8324
|
-
const [language, setLanguage] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentLanguage);
|
|
8325
|
-
const [
|
|
9107
|
+
const [language, setLanguage] = (0, $3Sbms$useState)(options.language || $26ed036cbc17809a$var$currentLanguage);
|
|
9108
|
+
const [profile1, setProfile] = (0, $3Sbms$useState)({});
|
|
8326
9109
|
const [muted, setMuted] = (0, $3Sbms$useState)(true);
|
|
8327
9110
|
const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
|
|
8328
9111
|
const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
|
|
8329
9112
|
const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
|
|
8330
9113
|
const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
|
|
8331
9114
|
const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(streamUIContainerRef.current);
|
|
9115
|
+
const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $3Sbms$useState)(false);
|
|
8332
9116
|
const orientation = containerWidth > containerHeight ? "landscape" : "portrait";
|
|
8333
9117
|
const styledTheme = theme === "dark" ? (0, $52580db2e49cdd90$export$3e936a8db52a10a0) : (0, $52580db2e49cdd90$export$f30cb9bc4f736419);
|
|
8334
9118
|
const onEnterRoom = async (event)=>{
|
|
@@ -8338,6 +9122,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8338
9122
|
await (0, $15a01b611391c1e7$export$494039379563c94d)();
|
|
8339
9123
|
setUserInteractionTriggered(true);
|
|
8340
9124
|
} catch (userInteractionError) {
|
|
9125
|
+
setBlockedDevicesPopupOpen(true);
|
|
8341
9126
|
console.error("User interaction trigger failed", userInteractionError);
|
|
8342
9127
|
}
|
|
8343
9128
|
};
|
|
@@ -8355,11 +9140,17 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8355
9140
|
};
|
|
8356
9141
|
const onDefaultAudioDeviceChange = (event)=>{
|
|
8357
9142
|
const micro = event.detail.label;
|
|
8358
|
-
(0, $
|
|
9143
|
+
(0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${micro}`, {
|
|
9144
|
+
duration: 3000,
|
|
9145
|
+
icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
|
|
9146
|
+
messageStyle: {
|
|
9147
|
+
fontWeight: 600
|
|
9148
|
+
}
|
|
9149
|
+
});
|
|
8359
9150
|
};
|
|
8360
|
-
const
|
|
8361
|
-
const {
|
|
8362
|
-
|
|
9151
|
+
const onSelfProfileUpdate = (event)=>{
|
|
9152
|
+
const { profile: profile } = event.detail;
|
|
9153
|
+
setProfile(profile);
|
|
8363
9154
|
};
|
|
8364
9155
|
const onCallEnd = ()=>{
|
|
8365
9156
|
(0, $15a01b611391c1e7$export$716eeec86fd18da7)();
|
|
@@ -8411,6 +9202,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8411
9202
|
(0, $3Sbms$useEffect)(()=>{
|
|
8412
9203
|
try {
|
|
8413
9204
|
localStorage.setItem("stream_ui_language", language);
|
|
9205
|
+
(0, $384d985bb9605c35$export$2e2bcd8739ae039).changeLanguage(language);
|
|
8414
9206
|
} catch (localStorageError) {
|
|
8415
9207
|
console.warn(localStorageError);
|
|
8416
9208
|
}
|
|
@@ -8427,7 +9219,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8427
9219
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneMute", onMicrophoneUpdate);
|
|
8428
9220
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneUnmute", onMicrophoneUpdate);
|
|
8429
9221
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
|
|
8430
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("
|
|
9222
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("selfProfileUpdate", onSelfProfileUpdate);
|
|
8431
9223
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("terminateRoom", onCallTerminated);
|
|
8432
9224
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onCallEnd);
|
|
8433
9225
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("invalidRoom", onInvalidRoom);
|
|
@@ -8443,7 +9235,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8443
9235
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneMute", onMicrophoneUpdate);
|
|
8444
9236
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneUnmute", onMicrophoneUpdate);
|
|
8445
9237
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("defaultAudioDeviceChange", onDefaultAudioDeviceChange);
|
|
8446
|
-
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("
|
|
9238
|
+
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("selfProfileUpdate", onSelfProfileUpdate);
|
|
8447
9239
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("terminateRoom", onCallTerminated);
|
|
8448
9240
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onCallEnd);
|
|
8449
9241
|
(0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("invalidRoom", onInvalidRoom);
|
|
@@ -8472,7 +9264,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8472
9264
|
language: language,
|
|
8473
9265
|
setLanguage: setLanguage,
|
|
8474
9266
|
options: options,
|
|
8475
|
-
|
|
9267
|
+
profile: profile1,
|
|
8476
9268
|
muted: muted,
|
|
8477
9269
|
streaming: streaming,
|
|
8478
9270
|
screensharing: screensharing,
|
|
@@ -8490,6 +9282,12 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
|
|
|
8490
9282
|
children: [
|
|
8491
9283
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
|
|
8492
9284
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
|
|
9285
|
+
isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
|
|
9286
|
+
close: ()=>{
|
|
9287
|
+
setUserInteractionTriggered(true);
|
|
9288
|
+
setBlockedDevicesPopupOpen(false);
|
|
9289
|
+
}
|
|
9290
|
+
}),
|
|
8493
9291
|
streamState === "streaming" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
|
|
8494
9292
|
children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
|
|
8495
9293
|
children: [
|
|
@@ -8511,6 +9309,7 @@ var $26ed036cbc17809a$export$2e2bcd8739ae039 = $26ed036cbc17809a$var$StreamUI;
|
|
|
8511
9309
|
|
|
8512
9310
|
|
|
8513
9311
|
|
|
9312
|
+
|
|
8514
9313
|
const $24075a5d702d64b3$var$currentURL = new URL(window.location.href);
|
|
8515
9314
|
const $24075a5d702d64b3$var$microphoneEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("microphone-enabled") !== "0";
|
|
8516
9315
|
const $24075a5d702d64b3$var$cameraEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("camera-enabled") === "1";
|
|
@@ -8529,7 +9328,8 @@ const $24075a5d702d64b3$var$defaultOptions = {
|
|
|
8529
9328
|
screenshare: {
|
|
8530
9329
|
available: true
|
|
8531
9330
|
}
|
|
8532
|
-
}
|
|
9331
|
+
},
|
|
9332
|
+
streamApiURL: String("https://apistream.snapcall.io")
|
|
8533
9333
|
};
|
|
8534
9334
|
const $24075a5d702d64b3$export$3f94917203ab7078 = {
|
|
8535
9335
|
init: ({ element: element , ...options })=>{
|
|
@@ -8554,7 +9354,10 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
|
|
|
8554
9354
|
generateToken: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).generateToken.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8555
9355
|
addEventListener: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8556
9356
|
dispatchEvent: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).dispatchEvent.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
8557
|
-
getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2))
|
|
9357
|
+
getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
|
|
9358
|
+
setProfile: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile.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)
|
|
8558
9361
|
};
|
|
8559
9362
|
window.streamUI = $24075a5d702d64b3$export$3f94917203ab7078;
|
|
8560
9363
|
// Backward compatibility
|