@snapcall/stream-ui 1.17.0 → 1.18.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 +19 -68
- package/dist/stream-ui.js +19 -68
- package/dist/stream-ui.umd.js +4 -4
- package/dist/types.d.ts +3 -4
- package/package.json +1 -1
package/dist/stream-ui.esm.js
CHANGED
|
@@ -655,7 +655,7 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
|
|
|
655
655
|
},
|
|
656
656
|
endView: {
|
|
657
657
|
goBack: "Retourner dans l'appel",
|
|
658
|
-
tooLate: "Vous \xeates
|
|
658
|
+
tooLate: "Vous \xeates arriv\xe9 trop tard",
|
|
659
659
|
callIsOver: "Cet appel est termin\xe9 ou supprim\xe9",
|
|
660
660
|
callEnded: "Cet appel est termin\xe9",
|
|
661
661
|
callLeft: "Vous avez quitt\xe9 l'appel",
|
|
@@ -1412,54 +1412,7 @@ class $82e31ca38889c079$var$AudioRenderer {
|
|
|
1412
1412
|
var $82e31ca38889c079$export$2e2bcd8739ae039 = $82e31ca38889c079$var$AudioRenderer;
|
|
1413
1413
|
|
|
1414
1414
|
|
|
1415
|
-
const $850842193b726422$export$218be676a714a9df = '<svg width="103" height="36" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".8" fill="#fff"><path d="M10.994 33.06c.903 0 1.658-.734 1.392-1.581a5.249 5.249 0 0 0-1.279-2.124 5.171 5.171 0 0 0-3.673-1.535 5.171 5.171 0 0 0-3.673 1.535c-.595.6-1.03 1.33-1.28 2.124-.265.847.49 1.582 1.393 1.582h7.12ZM10.65 16.2c-.902 0-1.658.735-1.392 1.582.25.794.685 1.524 1.28 2.124a5.171 5.171 0 0 0 3.672 1.535 5.172 5.172 0 0 0 3.674-1.535 5.25 5.25 0 0 0 1.279-2.124c.266-.847-.49-1.582-1.393-1.582h-7.12ZM14.21 31.455c0 .887.75 1.63 1.606 1.35a5.187 5.187 0 0 0 2.067-1.279 5.264 5.264 0 0 0 1.521-3.706c0-1.39-.547-2.723-1.52-3.705a5.187 5.187 0 0 0-2.068-1.278c-.856-.281-1.606.462-1.606 1.349v7.27ZM7.434 17.806c0-.887-.75-1.63-1.607-1.35a5.186 5.186 0 0 0-2.066 1.279 5.264 5.264 0 0 0-1.522 3.706c0 1.39.548 2.723 1.522 3.705a5.186 5.186 0 0 0 2.066 1.278c.857.281 1.607-.462 1.607-1.349v-7.27Z"/><path d="M32.965 31.098c-1.442 0-2.601-.227-3.478-.68-.865-.465-1.517-1.043-1.955-1.734a.416.416 0 0 1-.052-.187c0-.125.057-.227.173-.306l.986-.731a.286.286 0 0 1 .208-.085c.103 0 .201.062.294.187.773 1.224 2.07 1.836 3.893 1.836.796 0 1.471-.142 2.025-.425.565-.284.848-.737.848-1.36 0-.465-.161-.827-.485-1.088-.311-.26-.796-.493-1.453-.697-.6-.181-.975-.289-1.125-.323-.992-.283-1.707-.504-2.146-.663-1.107-.408-1.84-.878-2.198-1.41-.357-.534-.536-1.089-.536-1.667 0-.476.15-.986.45-1.53.311-.555.796-1.025 1.453-1.41.67-.397 1.506-.595 2.51-.595 1.05 0 1.932.13 2.647.39.716.25 1.396.67 2.042 1.258.081.08.121.159.121.238 0 .114-.057.204-.173.272l-1.107.731a.469.469 0 0 1-.225.085c-.104 0-.202-.05-.294-.153-.692-.725-1.644-1.088-2.856-1.088-.692 0-1.228.102-1.609.306-.37.204-.617.431-.744.68-.115.25-.173.47-.173.663 0 .408.162.737.485.986.323.25.801.476 1.436.68.058.023.502.153 1.332.391.52.136 1.056.29 1.61.46 1.21.396 2.019.9 2.422 1.512.416.612.623 1.201.623 1.768 0 .612-.15 1.196-.45 1.75-.288.556-.801 1.02-1.54 1.395-.727.362-1.713.544-2.959.544ZM44.114 21.766c.865 0 1.667.249 2.405.748.739.487 1.108 1.388 1.108 2.702v5.321a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085H46.14a.423.423 0 0 1-.277-.085.407.407 0 0 1-.087-.272v-5.032c-.035-.646-.22-1.155-.554-1.53-.323-.373-.744-.56-1.263-.56-.37 0-.738.102-1.107.306-.358.192-.664.492-.918.9-.253.397-.403.896-.45 1.496v4.42a.365.365 0 0 1-.103.272c-.058.057-.145.085-.26.085h-1.125a.423.423 0 0 1-.276-.085.407.407 0 0 1-.087-.272v-8.193c0-.114.029-.199.087-.255a.378.378 0 0 1 .276-.102h1.125c.116 0 .202.034.26.102.069.056.103.141.103.255v.204c0 .079.012.141.035.187a.168.168 0 0 0 .121.05c.092 0 .214-.062.364-.186a4.02 4.02 0 0 1 1.038-.612c.38-.148.738-.221 1.073-.221ZM57.436 28.207c.023.34.081.607.173.8.093.18.289.322.589.424.184.068.277.165.277.29a.396.396 0 0 1-.052.17l-.485.951c-.092.204-.242.278-.45.221-.669-.147-1.13-.47-1.384-.969-.058-.124-.115-.187-.173-.187-.058 0-.121.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.056-1.02-.207-.408-.311-.799-.311-1.173 0-.612.19-1.161.571-1.648.392-.488.975-.828 1.748-1.02.53-.125 1.269-.221 2.215-.29.646-.045 1.113-.09 1.401-.135.231-.034.335-.17.312-.408-.058-.51-.23-.918-.52-1.224-.276-.318-.743-.476-1.4-.476-.428 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.104.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288 0-.034.011-.085.034-.153a3.292 3.292 0 0 1 1.367-1.564c.635-.397 1.46-.595 2.475-.595.992 0 1.834.255 2.526.765.693.498 1.062 1.224 1.108 2.176.011.453.017 1.06.017 1.819.012.759.017 1.308.017 1.648Zm-4.326 1.445c.312 0 .652-.073 1.021-.22.38-.148.715-.403 1.004-.766.3-.374.484-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.162-.09-.277-.067l-.675.067c-.75.069-1.361.148-1.834.238-.462.08-.86.227-1.194.442a.984.984 0 0 0-.485.884c0 .465.208.782.623.952.416.17.871.255 1.367.255ZM64.486 21.766c1.107 0 1.967.26 2.578.782.611.51 1.027 1.116 1.246 1.819a6.83 6.83 0 0 1 .329 2.073c0 .692-.11 1.389-.329 2.091-.22.692-.635 1.298-1.246 1.82-.611.509-1.47.764-2.578.764-.9 0-1.65-.238-2.25-.714-.08-.08-.161-.119-.242-.119-.116 0-.173.096-.173.29v3.569c0 .113-.035.198-.104.255-.058.068-.144.102-.26.102H60.42a.378.378 0 0 1-.277-.102c-.058-.057-.086-.142-.086-.255V22.344c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.038c.116 0 .202.034.26.102.069.056.104.141.104.255 0 .09.011.164.034.22.035.046.075.069.122.069.057 0 .109-.023.155-.068.612-.533 1.396-.8 2.354-.8Zm-.173 7.785c.888 0 1.54-.3 1.955-.9.427-.601.64-1.338.64-2.21 0-.873-.213-1.61-.64-2.21-.415-.601-1.067-.902-1.955-.902-.877 0-1.518.3-1.921.901-.393.59-.589 1.326-.589 2.21 0 .884.197 1.627.589 2.227.403.59 1.044.884 1.92.884ZM76.268 31.097c-1.316 0-2.452-.277-3.41-.833a5.531 5.531 0 0 1-2.163-2.277c-.484-.975-.726-2.08-.726-3.315 0-1.236.242-2.335.727-3.298a5.507 5.507 0 0 1 2.163-2.295c.957-.555 2.094-.833 3.409-.833 1.246 0 2.324.25 3.236.748a5.437 5.437 0 0 1 2.163 2.09c.034.069.052.131.052.188 0 .125-.087.215-.26.272l-1.298.323a.39.39 0 0 1-.12.017c-.151 0-.266-.074-.347-.221-.715-1.156-1.857-1.734-3.426-1.734-.97 0-1.771.221-2.406.663a3.907 3.907 0 0 0-1.401 1.75c-.3.715-.45 1.491-.45 2.33 0 .838.15 1.615.45 2.329.3.713.767 1.291 1.401 1.733.635.442 1.437.663 2.406.663.911 0 1.701-.21 2.37-.628.681-.42 1.165-1.06 1.454-1.921.08-.216.225-.306.433-.272l1.315.17c.196.034.294.124.294.272 0 .022-.012.079-.035.17-.507 1.303-1.246 2.283-2.215 2.94-.957.646-2.163.97-3.616.97ZM91.216 28.207c.023.34.08.607.173.8.092.18.288.322.588.424.185.068.277.165.277.29a.396.396 0 0 1-.052.17l-.484.951c-.093.204-.243.278-.45.221-.67-.147-1.13-.47-1.385-.969-.057-.124-.115-.187-.173-.187-.057 0-.12.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.055-1.02-.208-.408-.312-.799-.312-1.173 0-.612.19-1.161.571-1.648.393-.488.975-.828 1.748-1.02.53-.125 1.27-.221 2.215-.29.646-.045 1.113-.09 1.402-.135.23-.034.334-.17.311-.408-.057-.51-.23-.918-.519-1.224-.277-.318-.744-.476-1.401-.476-.427 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.103.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288a.53.53 0 0 1 .034-.153 3.293 3.293 0 0 1 1.368-1.564c.634-.397 1.459-.595 2.474-.595.992 0 1.834.255 2.527.765.692.498 1.06 1.224 1.107 2.176.012.453.017 1.06.017 1.819.012.759.018 1.308.018 1.648Zm-4.326 1.445c.311 0 .651-.073 1.02-.22.381-.148.716-.403 1.004-.766.3-.374.485-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.161-.09-.277-.067l-.675.067c-.75.069-1.36.148-1.834.238-.461.08-.86.227-1.194.442a.984.984 0 0 0-.484.884c0 .465.207.782.622.952.416.17.871.255 1.368.255ZM95.687 30.536a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085h-1.125a.424.424 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.029-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.116 0 .202.034.26.102.069.056.104.141.104.255v11.746ZM100.033 30.536a.364.364 0 0 1-.104.272c-.057.057-.144.085-.26.085h-1.124a.423.423 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.115 0 .202.034.26.102.069.056.103.141.103.255v11.746Z" stroke="#fff" stroke-width=".5"/><path d="M43.151 8.686c.296 0 .554-.036.774-.108.22-.076.402-.182.546-.318.148-.14.258-.308.33-.504.072-.2.108-.422.108-.666a1.75 1.75 0 0 0-.108-.63 1.245 1.245 0 0 0-.324-.48 1.41 1.41 0 0 0-.546-.3 2.516 2.516 0 0 0-.78-.108h-1.206v3.114h1.206Zm0-4.362c.58 0 1.082.068 1.506.204.424.136.774.326 1.05.57.276.244.48.536.612.876.136.34.204.712.204 1.116 0 .42-.07.806-.21 1.158-.14.348-.35.648-.63.9s-.632.448-1.056.588c-.42.14-.912.21-1.476.21h-1.206V13h-1.614V4.324h2.82Zm6.819 2.424c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222Zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516Zm12.85-5.106L60.866 13h-1.188c-.136 0-.23-.088-.282-.264L58.29 9.178c-.036-.12-.07-.238-.102-.354a5.729 5.729 0 0 1-.072-.36 6.81 6.81 0 0 1-.084.366c-.028.12-.06.24-.096.36l-1.122 3.546c-.048.176-.154.264-.318.264h-1.14l-1.95-6.156h1.182c.108 0 .2.026.276.078a.363.363 0 0 1 .15.198l.882 3.288c.044.18.082.356.114.528.036.172.066.344.09.516.044-.172.09-.344.138-.516l.162-.528 1.02-3.3a.382.382 0 0 1 .138-.198.429.429 0 0 1 .258-.078h.654c.104 0 .192.026.264.078a.363.363 0 0 1 .15.198l.99 3.3c.052.18.1.358.144.534.048.172.094.344.138.516.052-.34.126-.69.222-1.05l.906-3.288a.405.405 0 0 1 .15-.198.429.429 0 0 1 .258-.078h1.128Zm4.704 2.37c0-.192-.028-.372-.084-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.826.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm6.668-2.196c.192-.368.42-.656.684-.864a1.45 1.45 0 0 1 .936-.318c.284 0 .512.062.684.186l-.096 1.11a.294.294 0 0 1-.09.156.239.239 0 0 1-.15.042c-.06 0-.15-.01-.27-.03a2.01 2.01 0 0 0-.342-.03 1.11 1.11 0 0 0-.786.282c-.1.088-.19.196-.27.324a3.44 3.44 0 0 0-.216.438V13h-1.482V6.844h.87c.152 0 .258.028.318.084.06.052.1.148.12.288l.09.696Zm6.87 1.302c0-.192-.029-.372-.085-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.827.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm9.134-1.692a1.451 1.451 0 0 0-.552-.432 1.597 1.597 0 0 0-.636-.126c-.224 0-.426.042-.606.126a1.21 1.21 0 0 0-.462.384 1.8 1.8 0 0 0-.294.648c-.068.26-.102.568-.102.924 0 .36.028.666.084.918.06.248.144.452.252.612.108.156.24.27.396.342.156.068.33.102.522.102.308 0 .57-.064.786-.192.216-.128.42-.31.612-.546v-2.76Zm1.482-4.332V13h-.906c-.196 0-.32-.09-.372-.27l-.126-.594a3.09 3.09 0 0 1-.858.69c-.32.176-.694.264-1.122.264-.336 0-.644-.07-.924-.21a2.098 2.098 0 0 1-.726-.606 3.033 3.033 0 0 1-.468-.99 5.072 5.072 0 0 1-.162-1.344c0-.456.062-.88.186-1.272s.302-.732.534-1.02c.232-.288.51-.512.834-.672a2.384 2.384 0 0 1 1.092-.246c.344 0 .638.054.882.162.244.108.462.254.654.438V4.084h1.482Zm5.863 7.32c.168.204.35.348.546.432.2.084.41.126.63.126.228 0 .432-.04.612-.12.184-.084.34-.212.468-.384a1.93 1.93 0 0 0 .294-.666 4.05 4.05 0 0 0 .102-.972c0-.676-.112-1.164-.336-1.464-.224-.304-.546-.456-.966-.456-.284 0-.532.066-.744.198a2.38 2.38 0 0 0-.606.546v2.76Zm0-3.804a3.02 3.02 0 0 1 .822-.618c.304-.156.65-.234 1.038-.234.356 0 .676.07.96.21.288.14.532.342.732.606.204.26.36.576.468.948.108.372.162.79.162 1.254 0 .5-.062.954-.186 1.362a3.132 3.132 0 0 1-.534 1.05 2.4 2.4 0 0 1-.828.672c-.324.16-.684.24-1.08.24a2.103 2.103 0 0 1-.954-.216 1.891 1.891 0 0 1-.366-.246c-.108-.1-.212-.21-.312-.33l-.066.414c-.024.104-.066.178-.126.222a.37.37 0 0 1-.234.066h-.978V4.084h1.482V7.6Zm10.743-.756-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084H97.68l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188Z"/></g></svg>';
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
const $9ac119af65504970$export$eabbd7447140cfb = `<svg xmlns="http://www.w3.org/2000/svg" width="100" height="103"><path d="M92.527 39.465 22.312 1.87A15.549 15.549 0 0 0 14.777 0c-2.64.02-5.226.703-7.5 1.98a14.086 14.086 0 0 0-5.332 5.032A13.185 13.185 0 0 0 0 13.906v75.188c-.004 2.422.668 4.8 1.945 6.894 1.278 2.094 3.117 3.832 5.332 5.035a15.598 15.598 0 0 0 7.5 1.977 15.6 15.6 0 0 0 7.536-1.867l70.214-37.598c2.262-1.187 4.153-2.933 5.465-5.05A13.198 13.198 0 0 0 100 51.5c0-2.457-.691-4.867-2.008-6.984-1.312-2.118-3.203-3.86-5.465-5.051Zm0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/></svg>`;
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
const $15ddac3121cc3a5d$var$getWatermarkedCanvas = (canvas, dpr = 1)=>new Promise((resolve)=>{
|
|
1422
|
-
const context = canvas.getContext("2d");
|
|
1423
|
-
const svgBlob = new Blob([
|
|
1424
|
-
(0, $850842193b726422$export$218be676a714a9df)
|
|
1425
|
-
], {
|
|
1426
|
-
type: "image/svg+xml;charset=utf-8"
|
|
1427
|
-
});
|
|
1428
|
-
const blobUrl = URL.createObjectURL(svgBlob);
|
|
1429
|
-
const watermarkImage = new Image();
|
|
1430
|
-
watermarkImage.onload = ()=>{
|
|
1431
|
-
const x = canvas.width / dpr - watermarkImage.width - 16;
|
|
1432
|
-
const y = canvas.height / dpr - watermarkImage.height - 16;
|
|
1433
|
-
context?.drawImage(watermarkImage, x, y);
|
|
1434
|
-
resolve(canvas);
|
|
1435
|
-
};
|
|
1436
|
-
watermarkImage.src = blobUrl;
|
|
1437
|
-
});
|
|
1438
|
-
const $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas = (canvas, dpr = 1)=>new Promise((resolve)=>{
|
|
1439
|
-
const context = canvas.getContext("2d");
|
|
1440
|
-
const svgBlob = new Blob([
|
|
1441
|
-
(0, $9ac119af65504970$export$eabbd7447140cfb)
|
|
1442
|
-
], {
|
|
1443
|
-
type: "image/svg+xml;charset=utf-8"
|
|
1444
|
-
});
|
|
1445
|
-
const blobUrl = URL.createObjectURL(svgBlob);
|
|
1446
|
-
const watermarkImage = new Image();
|
|
1447
|
-
watermarkImage.onload = ()=>{
|
|
1448
|
-
const x = canvas.width / dpr / 2 - watermarkImage.width / 2;
|
|
1449
|
-
const y = canvas.height / dpr / 2 - watermarkImage.height / 2;
|
|
1450
|
-
context?.drawImage(watermarkImage, x, y);
|
|
1451
|
-
resolve(canvas);
|
|
1452
|
-
};
|
|
1453
|
-
watermarkImage.src = blobUrl;
|
|
1454
|
-
if (context) {
|
|
1455
|
-
context.fillStyle = "#00000064";
|
|
1456
|
-
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
1457
|
-
context.restore();
|
|
1458
|
-
}
|
|
1459
|
-
});
|
|
1460
|
-
const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
|
|
1461
|
-
addPlayWatermark: false
|
|
1462
|
-
})=>{
|
|
1415
|
+
const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video)=>{
|
|
1463
1416
|
const { videoWidth: videoWidth , videoHeight: videoHeight } = video;
|
|
1464
1417
|
const orientation = videoWidth > videoHeight ? "landscape" : "portrait";
|
|
1465
1418
|
const sourceWidth = orientation === "portrait" ? videoWidth : videoHeight;
|
|
@@ -1473,13 +1426,9 @@ const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
|
|
|
1473
1426
|
canvas.height = sourceHeight * dpr;
|
|
1474
1427
|
ctx?.scale(dpr, dpr);
|
|
1475
1428
|
ctx?.drawImage(video, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, canvas.width / dpr, canvas.height / dpr);
|
|
1476
|
-
|
|
1477
|
-
const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas, window.devicePixelRatio);
|
|
1478
|
-
return watermarkedCanvas.toDataURL("image/jpeg");
|
|
1429
|
+
return canvas.toDataURL("image/jpeg");
|
|
1479
1430
|
};
|
|
1480
|
-
const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src
|
|
1481
|
-
addPlayWatermark: false
|
|
1482
|
-
})=>{
|
|
1431
|
+
const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
|
|
1483
1432
|
const video = document.createElement("video");
|
|
1484
1433
|
const stream = new MediaStream();
|
|
1485
1434
|
stream.addTrack(src);
|
|
@@ -1494,9 +1443,7 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src, options = {
|
|
|
1494
1443
|
canvas.height = video.height;
|
|
1495
1444
|
canvas.width = video.width;
|
|
1496
1445
|
ctx?.drawImage(video, 0, 0);
|
|
1497
|
-
|
|
1498
|
-
const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas);
|
|
1499
|
-
return watermarkedCanvas.toDataURL("image/jpeg");
|
|
1446
|
+
return canvas.toDataURL("image/jpeg");
|
|
1500
1447
|
};
|
|
1501
1448
|
|
|
1502
1449
|
|
|
@@ -2942,6 +2889,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2942
2889
|
min: capabilities?.zoom?.min || 0,
|
|
2943
2890
|
max: capabilities?.zoom?.max || 0
|
|
2944
2891
|
};
|
|
2892
|
+
if (capabilities.focusMode) // https://github.com/w3c/mediacapture-image/blob/main/implementation-status.md
|
|
2893
|
+
track.applyConstraints({
|
|
2894
|
+
advanced: [
|
|
2895
|
+
{
|
|
2896
|
+
focusMode: "continuous"
|
|
2897
|
+
}
|
|
2898
|
+
]
|
|
2899
|
+
});
|
|
2945
2900
|
const encodings = undefined;
|
|
2946
2901
|
const codecOptions = {
|
|
2947
2902
|
videoGoogleStartBitrate: 1000
|
|
@@ -3154,11 +3109,11 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
3154
3109
|
});
|
|
3155
3110
|
return res;
|
|
3156
3111
|
}
|
|
3157
|
-
async captureVideo(videoElement
|
|
3112
|
+
async captureVideo(videoElement) {
|
|
3158
3113
|
if (this.permissions.find((permission)=>permission === "instant_picture")) {
|
|
3159
3114
|
let image;
|
|
3160
|
-
if (videoElement) image = await (0, $15ddac3121cc3a5d$export$674c90a250a8b2c5)(videoElement
|
|
3161
|
-
else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $15ddac3121cc3a5d$export$4a210166cc9cb64b)(this.webcamProducer.track
|
|
3115
|
+
if (videoElement) image = await (0, $15ddac3121cc3a5d$export$674c90a250a8b2c5)(videoElement);
|
|
3116
|
+
else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $15ddac3121cc3a5d$export$4a210166cc9cb64b)(this.webcamProducer.track);
|
|
3162
3117
|
else throw new Error("no video to capture");
|
|
3163
3118
|
return image;
|
|
3164
3119
|
} else throw new Error("feature not allowed");
|
|
@@ -9855,7 +9810,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
|
|
|
9855
9810
|
setTheme('dark');
|
|
9856
9811
|
}
|
|
9857
9812
|
}; */ const onHelpCenterClick = ()=>{
|
|
9858
|
-
window.open("https://
|
|
9813
|
+
window.open("https://help.snapcall.io", "_blank");
|
|
9859
9814
|
};
|
|
9860
9815
|
const handleOutisdeClick = (0, $3Sbms$useCallback)((event)=>{
|
|
9861
9816
|
if (!menuPopupRef?.current?.contains(event.target) && document.body.contains(event.target)) {
|
|
@@ -15829,12 +15784,8 @@ const $b76354b532370976$export$336a011955157f9a = ()=>{
|
|
|
15829
15784
|
const loginModalState = (0, $3Sbms$useOverlayTriggerState)({});
|
|
15830
15785
|
const [thumbnailURL, setLastThumbnailURL] = (0, $3Sbms$useState)(undefined);
|
|
15831
15786
|
const captureThumbnail = async (videoElement)=>{
|
|
15832
|
-
let image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined
|
|
15833
|
-
|
|
15834
|
-
}).catch(console.error);
|
|
15835
|
-
if (!image) image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement, {
|
|
15836
|
-
addPlayWatermark: true
|
|
15837
|
-
});
|
|
15787
|
+
let image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
15788
|
+
if (!image) image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
|
|
15838
15789
|
const { url: url } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveThumbnail(image);
|
|
15839
15790
|
setLastThumbnailURL(url);
|
|
15840
15791
|
};
|
package/dist/stream-ui.js
CHANGED
|
@@ -660,7 +660,7 @@ const $e52ca91c2b296e41$export$acb2a88f7d552ebf = {
|
|
|
660
660
|
},
|
|
661
661
|
endView: {
|
|
662
662
|
goBack: "Retourner dans l'appel",
|
|
663
|
-
tooLate: "Vous \xeates
|
|
663
|
+
tooLate: "Vous \xeates arriv\xe9 trop tard",
|
|
664
664
|
callIsOver: "Cet appel est termin\xe9 ou supprim\xe9",
|
|
665
665
|
callEnded: "Cet appel est termin\xe9",
|
|
666
666
|
callLeft: "Vous avez quitt\xe9 l'appel",
|
|
@@ -1417,54 +1417,7 @@ class $1bfa11322d1d6377$var$AudioRenderer {
|
|
|
1417
1417
|
var $1bfa11322d1d6377$export$2e2bcd8739ae039 = $1bfa11322d1d6377$var$AudioRenderer;
|
|
1418
1418
|
|
|
1419
1419
|
|
|
1420
|
-
const $67e3b71ab2fb8185$export$218be676a714a9df = '<svg width="103" height="36" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".8" fill="#fff"><path d="M10.994 33.06c.903 0 1.658-.734 1.392-1.581a5.249 5.249 0 0 0-1.279-2.124 5.171 5.171 0 0 0-3.673-1.535 5.171 5.171 0 0 0-3.673 1.535c-.595.6-1.03 1.33-1.28 2.124-.265.847.49 1.582 1.393 1.582h7.12ZM10.65 16.2c-.902 0-1.658.735-1.392 1.582.25.794.685 1.524 1.28 2.124a5.171 5.171 0 0 0 3.672 1.535 5.172 5.172 0 0 0 3.674-1.535 5.25 5.25 0 0 0 1.279-2.124c.266-.847-.49-1.582-1.393-1.582h-7.12ZM14.21 31.455c0 .887.75 1.63 1.606 1.35a5.187 5.187 0 0 0 2.067-1.279 5.264 5.264 0 0 0 1.521-3.706c0-1.39-.547-2.723-1.52-3.705a5.187 5.187 0 0 0-2.068-1.278c-.856-.281-1.606.462-1.606 1.349v7.27ZM7.434 17.806c0-.887-.75-1.63-1.607-1.35a5.186 5.186 0 0 0-2.066 1.279 5.264 5.264 0 0 0-1.522 3.706c0 1.39.548 2.723 1.522 3.705a5.186 5.186 0 0 0 2.066 1.278c.857.281 1.607-.462 1.607-1.349v-7.27Z"/><path d="M32.965 31.098c-1.442 0-2.601-.227-3.478-.68-.865-.465-1.517-1.043-1.955-1.734a.416.416 0 0 1-.052-.187c0-.125.057-.227.173-.306l.986-.731a.286.286 0 0 1 .208-.085c.103 0 .201.062.294.187.773 1.224 2.07 1.836 3.893 1.836.796 0 1.471-.142 2.025-.425.565-.284.848-.737.848-1.36 0-.465-.161-.827-.485-1.088-.311-.26-.796-.493-1.453-.697-.6-.181-.975-.289-1.125-.323-.992-.283-1.707-.504-2.146-.663-1.107-.408-1.84-.878-2.198-1.41-.357-.534-.536-1.089-.536-1.667 0-.476.15-.986.45-1.53.311-.555.796-1.025 1.453-1.41.67-.397 1.506-.595 2.51-.595 1.05 0 1.932.13 2.647.39.716.25 1.396.67 2.042 1.258.081.08.121.159.121.238 0 .114-.057.204-.173.272l-1.107.731a.469.469 0 0 1-.225.085c-.104 0-.202-.05-.294-.153-.692-.725-1.644-1.088-2.856-1.088-.692 0-1.228.102-1.609.306-.37.204-.617.431-.744.68-.115.25-.173.47-.173.663 0 .408.162.737.485.986.323.25.801.476 1.436.68.058.023.502.153 1.332.391.52.136 1.056.29 1.61.46 1.21.396 2.019.9 2.422 1.512.416.612.623 1.201.623 1.768 0 .612-.15 1.196-.45 1.75-.288.556-.801 1.02-1.54 1.395-.727.362-1.713.544-2.959.544ZM44.114 21.766c.865 0 1.667.249 2.405.748.739.487 1.108 1.388 1.108 2.702v5.321a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085H46.14a.423.423 0 0 1-.277-.085.407.407 0 0 1-.087-.272v-5.032c-.035-.646-.22-1.155-.554-1.53-.323-.373-.744-.56-1.263-.56-.37 0-.738.102-1.107.306-.358.192-.664.492-.918.9-.253.397-.403.896-.45 1.496v4.42a.365.365 0 0 1-.103.272c-.058.057-.145.085-.26.085h-1.125a.423.423 0 0 1-.276-.085.407.407 0 0 1-.087-.272v-8.193c0-.114.029-.199.087-.255a.378.378 0 0 1 .276-.102h1.125c.116 0 .202.034.26.102.069.056.103.141.103.255v.204c0 .079.012.141.035.187a.168.168 0 0 0 .121.05c.092 0 .214-.062.364-.186a4.02 4.02 0 0 1 1.038-.612c.38-.148.738-.221 1.073-.221ZM57.436 28.207c.023.34.081.607.173.8.093.18.289.322.589.424.184.068.277.165.277.29a.396.396 0 0 1-.052.17l-.485.951c-.092.204-.242.278-.45.221-.669-.147-1.13-.47-1.384-.969-.058-.124-.115-.187-.173-.187-.058 0-.121.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.056-1.02-.207-.408-.311-.799-.311-1.173 0-.612.19-1.161.571-1.648.392-.488.975-.828 1.748-1.02.53-.125 1.269-.221 2.215-.29.646-.045 1.113-.09 1.401-.135.231-.034.335-.17.312-.408-.058-.51-.23-.918-.52-1.224-.276-.318-.743-.476-1.4-.476-.428 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.104.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288 0-.034.011-.085.034-.153a3.292 3.292 0 0 1 1.367-1.564c.635-.397 1.46-.595 2.475-.595.992 0 1.834.255 2.526.765.693.498 1.062 1.224 1.108 2.176.011.453.017 1.06.017 1.819.012.759.017 1.308.017 1.648Zm-4.326 1.445c.312 0 .652-.073 1.021-.22.38-.148.715-.403 1.004-.766.3-.374.484-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.162-.09-.277-.067l-.675.067c-.75.069-1.361.148-1.834.238-.462.08-.86.227-1.194.442a.984.984 0 0 0-.485.884c0 .465.208.782.623.952.416.17.871.255 1.367.255ZM64.486 21.766c1.107 0 1.967.26 2.578.782.611.51 1.027 1.116 1.246 1.819a6.83 6.83 0 0 1 .329 2.073c0 .692-.11 1.389-.329 2.091-.22.692-.635 1.298-1.246 1.82-.611.509-1.47.764-2.578.764-.9 0-1.65-.238-2.25-.714-.08-.08-.161-.119-.242-.119-.116 0-.173.096-.173.29v3.569c0 .113-.035.198-.104.255-.058.068-.144.102-.26.102H60.42a.378.378 0 0 1-.277-.102c-.058-.057-.086-.142-.086-.255V22.344c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.038c.116 0 .202.034.26.102.069.056.104.141.104.255 0 .09.011.164.034.22.035.046.075.069.122.069.057 0 .109-.023.155-.068.612-.533 1.396-.8 2.354-.8Zm-.173 7.785c.888 0 1.54-.3 1.955-.9.427-.601.64-1.338.64-2.21 0-.873-.213-1.61-.64-2.21-.415-.601-1.067-.902-1.955-.902-.877 0-1.518.3-1.921.901-.393.59-.589 1.326-.589 2.21 0 .884.197 1.627.589 2.227.403.59 1.044.884 1.92.884ZM76.268 31.097c-1.316 0-2.452-.277-3.41-.833a5.531 5.531 0 0 1-2.163-2.277c-.484-.975-.726-2.08-.726-3.315 0-1.236.242-2.335.727-3.298a5.507 5.507 0 0 1 2.163-2.295c.957-.555 2.094-.833 3.409-.833 1.246 0 2.324.25 3.236.748a5.437 5.437 0 0 1 2.163 2.09c.034.069.052.131.052.188 0 .125-.087.215-.26.272l-1.298.323a.39.39 0 0 1-.12.017c-.151 0-.266-.074-.347-.221-.715-1.156-1.857-1.734-3.426-1.734-.97 0-1.771.221-2.406.663a3.907 3.907 0 0 0-1.401 1.75c-.3.715-.45 1.491-.45 2.33 0 .838.15 1.615.45 2.329.3.713.767 1.291 1.401 1.733.635.442 1.437.663 2.406.663.911 0 1.701-.21 2.37-.628.681-.42 1.165-1.06 1.454-1.921.08-.216.225-.306.433-.272l1.315.17c.196.034.294.124.294.272 0 .022-.012.079-.035.17-.507 1.303-1.246 2.283-2.215 2.94-.957.646-2.163.97-3.616.97ZM91.216 28.207c.023.34.08.607.173.8.092.18.288.322.588.424.185.068.277.165.277.29a.396.396 0 0 1-.052.17l-.484.951c-.093.204-.243.278-.45.221-.67-.147-1.13-.47-1.385-.969-.057-.124-.115-.187-.173-.187-.057 0-.12.046-.19.136-.6.714-1.575 1.071-2.925 1.071-.819 0-1.482-.141-1.99-.425-.496-.283-.848-.623-1.055-1.02-.208-.408-.312-.799-.312-1.173 0-.612.19-1.161.571-1.648.393-.488.975-.828 1.748-1.02.53-.125 1.27-.221 2.215-.29.646-.045 1.113-.09 1.402-.135.23-.034.334-.17.311-.408-.057-.51-.23-.918-.519-1.224-.277-.318-.744-.476-1.401-.476-.427 0-.837.09-1.23.272-.38.17-.674.47-.882.9-.103.216-.254.29-.45.222l-1.055-.29c-.185-.056-.277-.152-.277-.288a.53.53 0 0 1 .034-.153 3.293 3.293 0 0 1 1.368-1.564c.634-.397 1.459-.595 2.474-.595.992 0 1.834.255 2.527.765.692.498 1.06 1.224 1.107 2.176.012.453.017 1.06.017 1.819.012.759.018 1.308.018 1.648Zm-4.326 1.445c.311 0 .651-.073 1.02-.22.381-.148.716-.403 1.004-.766.3-.374.485-.872.554-1.495v-.034c0-.114-.035-.199-.104-.256-.07-.067-.161-.09-.277-.067l-.675.067c-.75.069-1.36.148-1.834.238-.461.08-.86.227-1.194.442a.984.984 0 0 0-.484.884c0 .465.207.782.622.952.416.17.871.255 1.368.255ZM95.687 30.536a.364.364 0 0 1-.104.272c-.058.057-.144.085-.26.085h-1.125a.424.424 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.029-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.116 0 .202.034.26.102.069.056.104.141.104.255v11.746ZM100.033 30.536a.364.364 0 0 1-.104.272c-.057.057-.144.085-.26.085h-1.124a.423.423 0 0 1-.277-.085.407.407 0 0 1-.086-.272V18.79c0-.114.028-.199.086-.255a.378.378 0 0 1 .277-.102h1.125c.115 0 .202.034.26.102.069.056.103.141.103.255v11.746Z" stroke="#fff" stroke-width=".5"/><path d="M43.151 8.686c.296 0 .554-.036.774-.108.22-.076.402-.182.546-.318.148-.14.258-.308.33-.504.072-.2.108-.422.108-.666a1.75 1.75 0 0 0-.108-.63 1.245 1.245 0 0 0-.324-.48 1.41 1.41 0 0 0-.546-.3 2.516 2.516 0 0 0-.78-.108h-1.206v3.114h1.206Zm0-4.362c.58 0 1.082.068 1.506.204.424.136.774.326 1.05.57.276.244.48.536.612.876.136.34.204.712.204 1.116 0 .42-.07.806-.21 1.158-.14.348-.35.648-.63.9s-.632.448-1.056.588c-.42.14-.912.21-1.476.21h-1.206V13h-1.614V4.324h2.82Zm6.819 2.424c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222Zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516Zm12.85-5.106L60.866 13h-1.188c-.136 0-.23-.088-.282-.264L58.29 9.178c-.036-.12-.07-.238-.102-.354a5.729 5.729 0 0 1-.072-.36 6.81 6.81 0 0 1-.084.366c-.028.12-.06.24-.096.36l-1.122 3.546c-.048.176-.154.264-.318.264h-1.14l-1.95-6.156h1.182c.108 0 .2.026.276.078a.363.363 0 0 1 .15.198l.882 3.288c.044.18.082.356.114.528.036.172.066.344.09.516.044-.172.09-.344.138-.516l.162-.528 1.02-3.3a.382.382 0 0 1 .138-.198.429.429 0 0 1 .258-.078h.654c.104 0 .192.026.264.078a.363.363 0 0 1 .15.198l.99 3.3c.052.18.1.358.144.534.048.172.094.344.138.516.052-.34.126-.69.222-1.05l.906-3.288a.405.405 0 0 1 .15-.198.429.429 0 0 1 .258-.078h1.128Zm4.704 2.37c0-.192-.028-.372-.084-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.826.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm6.668-2.196c.192-.368.42-.656.684-.864a1.45 1.45 0 0 1 .936-.318c.284 0 .512.062.684.186l-.096 1.11a.294.294 0 0 1-.09.156.239.239 0 0 1-.15.042c-.06 0-.15-.01-.27-.03a2.01 2.01 0 0 0-.342-.03 1.11 1.11 0 0 0-.786.282c-.1.088-.19.196-.27.324a3.44 3.44 0 0 0-.216.438V13h-1.482V6.844h.87c.152 0 .258.028.318.084.06.052.1.148.12.288l.09.696Zm6.87 1.302c0-.192-.029-.372-.085-.54a1.25 1.25 0 0 0-.24-.45 1.096 1.096 0 0 0-.414-.3 1.358 1.358 0 0 0-.576-.114c-.428 0-.766.122-1.014.366-.244.244-.4.59-.468 1.038h2.796Zm-2.827.894c.024.316.08.59.168.822.088.228.204.418.348.57.144.148.314.26.51.336.2.072.42.108.66.108.24 0 .446-.028.618-.084a2.76 2.76 0 0 0 .456-.186 7.55 7.55 0 0 0 .342-.186.59.59 0 0 1 .288-.084c.124 0 .216.046.276.138l.426.54a2.536 2.536 0 0 1-.552.486 3.281 3.281 0 0 1-1.32.474 4.79 4.79 0 0 1-.666.048 3.33 3.33 0 0 1-1.194-.21 2.726 2.726 0 0 1-.96-.63 2.993 2.993 0 0 1-.642-1.032c-.156-.412-.234-.888-.234-1.428 0-.42.068-.814.204-1.182.136-.372.33-.694.582-.966.256-.276.566-.494.93-.654.368-.16.782-.24 1.242-.24.388 0 .746.062 1.074.186.328.124.61.306.846.546.236.236.42.528.552.876.136.344.204.738.204 1.182 0 .224-.024.376-.072.456-.048.076-.14.114-.276.114h-3.81Zm9.134-1.692a1.451 1.451 0 0 0-.552-.432 1.597 1.597 0 0 0-.636-.126c-.224 0-.426.042-.606.126a1.21 1.21 0 0 0-.462.384 1.8 1.8 0 0 0-.294.648c-.068.26-.102.568-.102.924 0 .36.028.666.084.918.06.248.144.452.252.612.108.156.24.27.396.342.156.068.33.102.522.102.308 0 .57-.064.786-.192.216-.128.42-.31.612-.546v-2.76Zm1.482-4.332V13h-.906c-.196 0-.32-.09-.372-.27l-.126-.594a3.09 3.09 0 0 1-.858.69c-.32.176-.694.264-1.122.264-.336 0-.644-.07-.924-.21a2.098 2.098 0 0 1-.726-.606 3.033 3.033 0 0 1-.468-.99 5.072 5.072 0 0 1-.162-1.344c0-.456.062-.88.186-1.272s.302-.732.534-1.02c.232-.288.51-.512.834-.672a2.384 2.384 0 0 1 1.092-.246c.344 0 .638.054.882.162.244.108.462.254.654.438V4.084h1.482Zm5.863 7.32c.168.204.35.348.546.432.2.084.41.126.63.126.228 0 .432-.04.612-.12.184-.084.34-.212.468-.384a1.93 1.93 0 0 0 .294-.666 4.05 4.05 0 0 0 .102-.972c0-.676-.112-1.164-.336-1.464-.224-.304-.546-.456-.966-.456-.284 0-.532.066-.744.198a2.38 2.38 0 0 0-.606.546v2.76Zm0-3.804a3.02 3.02 0 0 1 .822-.618c.304-.156.65-.234 1.038-.234.356 0 .676.07.96.21.288.14.532.342.732.606.204.26.36.576.468.948.108.372.162.79.162 1.254 0 .5-.062.954-.186 1.362a3.132 3.132 0 0 1-.534 1.05 2.4 2.4 0 0 1-.828.672c-.324.16-.684.24-1.08.24a2.103 2.103 0 0 1-.954-.216 1.891 1.891 0 0 1-.366-.246c-.108-.1-.212-.21-.312-.33l-.066.414c-.024.104-.066.178-.126.222a.37.37 0 0 1-.234.066h-.978V4.084h1.482V7.6Zm10.743-.756-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084H97.68l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188Z"/></g></svg>';
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
const $83954b4ec0d03b4b$export$eabbd7447140cfb = `<svg xmlns="http://www.w3.org/2000/svg" width="100" height="103"><path d="M92.527 39.465 22.312 1.87A15.549 15.549 0 0 0 14.777 0c-2.64.02-5.226.703-7.5 1.98a14.086 14.086 0 0 0-5.332 5.032A13.185 13.185 0 0 0 0 13.906v75.188c-.004 2.422.668 4.8 1.945 6.894 1.278 2.094 3.117 3.832 5.332 5.035a15.598 15.598 0 0 0 7.5 1.977 15.6 15.6 0 0 0 7.536-1.867l70.214-37.598c2.262-1.187 4.153-2.933 5.465-5.05A13.198 13.198 0 0 0 100 51.5c0-2.457-.691-4.867-2.008-6.984-1.312-2.118-3.203-3.86-5.465-5.051Zm0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/></svg>`;
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
const $3575c8a563f2a1da$var$getWatermarkedCanvas = (canvas, dpr = 1)=>new Promise((resolve)=>{
|
|
1427
|
-
const context = canvas.getContext("2d");
|
|
1428
|
-
const svgBlob = new Blob([
|
|
1429
|
-
(0, $67e3b71ab2fb8185$export$218be676a714a9df)
|
|
1430
|
-
], {
|
|
1431
|
-
type: "image/svg+xml;charset=utf-8"
|
|
1432
|
-
});
|
|
1433
|
-
const blobUrl = URL.createObjectURL(svgBlob);
|
|
1434
|
-
const watermarkImage = new Image();
|
|
1435
|
-
watermarkImage.onload = ()=>{
|
|
1436
|
-
const x = canvas.width / dpr - watermarkImage.width - 16;
|
|
1437
|
-
const y = canvas.height / dpr - watermarkImage.height - 16;
|
|
1438
|
-
context?.drawImage(watermarkImage, x, y);
|
|
1439
|
-
resolve(canvas);
|
|
1440
|
-
};
|
|
1441
|
-
watermarkImage.src = blobUrl;
|
|
1442
|
-
});
|
|
1443
|
-
const $3575c8a563f2a1da$var$addVideoPlayerWatermarkedCanvas = (canvas, dpr = 1)=>new Promise((resolve)=>{
|
|
1444
|
-
const context = canvas.getContext("2d");
|
|
1445
|
-
const svgBlob = new Blob([
|
|
1446
|
-
(0, $83954b4ec0d03b4b$export$eabbd7447140cfb)
|
|
1447
|
-
], {
|
|
1448
|
-
type: "image/svg+xml;charset=utf-8"
|
|
1449
|
-
});
|
|
1450
|
-
const blobUrl = URL.createObjectURL(svgBlob);
|
|
1451
|
-
const watermarkImage = new Image();
|
|
1452
|
-
watermarkImage.onload = ()=>{
|
|
1453
|
-
const x = canvas.width / dpr / 2 - watermarkImage.width / 2;
|
|
1454
|
-
const y = canvas.height / dpr / 2 - watermarkImage.height / 2;
|
|
1455
|
-
context?.drawImage(watermarkImage, x, y);
|
|
1456
|
-
resolve(canvas);
|
|
1457
|
-
};
|
|
1458
|
-
watermarkImage.src = blobUrl;
|
|
1459
|
-
if (context) {
|
|
1460
|
-
context.fillStyle = "#00000064";
|
|
1461
|
-
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
1462
|
-
context.restore();
|
|
1463
|
-
}
|
|
1464
|
-
});
|
|
1465
|
-
const $3575c8a563f2a1da$export$674c90a250a8b2c5 = async (video, options = {
|
|
1466
|
-
addPlayWatermark: false
|
|
1467
|
-
})=>{
|
|
1420
|
+
const $3575c8a563f2a1da$export$674c90a250a8b2c5 = async (video)=>{
|
|
1468
1421
|
const { videoWidth: videoWidth , videoHeight: videoHeight } = video;
|
|
1469
1422
|
const orientation = videoWidth > videoHeight ? "landscape" : "portrait";
|
|
1470
1423
|
const sourceWidth = orientation === "portrait" ? videoWidth : videoHeight;
|
|
@@ -1478,13 +1431,9 @@ const $3575c8a563f2a1da$export$674c90a250a8b2c5 = async (video, options = {
|
|
|
1478
1431
|
canvas.height = sourceHeight * dpr;
|
|
1479
1432
|
ctx?.scale(dpr, dpr);
|
|
1480
1433
|
ctx?.drawImage(video, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, canvas.width / dpr, canvas.height / dpr);
|
|
1481
|
-
|
|
1482
|
-
const watermarkedCanvas = await $3575c8a563f2a1da$var$getWatermarkedCanvas(canvas, window.devicePixelRatio);
|
|
1483
|
-
return watermarkedCanvas.toDataURL("image/jpeg");
|
|
1434
|
+
return canvas.toDataURL("image/jpeg");
|
|
1484
1435
|
};
|
|
1485
|
-
const $3575c8a563f2a1da$export$4a210166cc9cb64b = async (src
|
|
1486
|
-
addPlayWatermark: false
|
|
1487
|
-
})=>{
|
|
1436
|
+
const $3575c8a563f2a1da$export$4a210166cc9cb64b = async (src)=>{
|
|
1488
1437
|
const video = document.createElement("video");
|
|
1489
1438
|
const stream = new MediaStream();
|
|
1490
1439
|
stream.addTrack(src);
|
|
@@ -1499,9 +1448,7 @@ const $3575c8a563f2a1da$export$4a210166cc9cb64b = async (src, options = {
|
|
|
1499
1448
|
canvas.height = video.height;
|
|
1500
1449
|
canvas.width = video.width;
|
|
1501
1450
|
ctx?.drawImage(video, 0, 0);
|
|
1502
|
-
|
|
1503
|
-
const watermarkedCanvas = await $3575c8a563f2a1da$var$getWatermarkedCanvas(canvas);
|
|
1504
|
-
return watermarkedCanvas.toDataURL("image/jpeg");
|
|
1451
|
+
return canvas.toDataURL("image/jpeg");
|
|
1505
1452
|
};
|
|
1506
1453
|
|
|
1507
1454
|
|
|
@@ -2947,6 +2894,14 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
|
|
|
2947
2894
|
min: capabilities?.zoom?.min || 0,
|
|
2948
2895
|
max: capabilities?.zoom?.max || 0
|
|
2949
2896
|
};
|
|
2897
|
+
if (capabilities.focusMode) // https://github.com/w3c/mediacapture-image/blob/main/implementation-status.md
|
|
2898
|
+
track.applyConstraints({
|
|
2899
|
+
advanced: [
|
|
2900
|
+
{
|
|
2901
|
+
focusMode: "continuous"
|
|
2902
|
+
}
|
|
2903
|
+
]
|
|
2904
|
+
});
|
|
2950
2905
|
const encodings = undefined;
|
|
2951
2906
|
const codecOptions = {
|
|
2952
2907
|
videoGoogleStartBitrate: 1000
|
|
@@ -3159,11 +3114,11 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
|
|
|
3159
3114
|
});
|
|
3160
3115
|
return res;
|
|
3161
3116
|
}
|
|
3162
|
-
async captureVideo(videoElement
|
|
3117
|
+
async captureVideo(videoElement) {
|
|
3163
3118
|
if (this.permissions.find((permission)=>permission === "instant_picture")) {
|
|
3164
3119
|
let image;
|
|
3165
|
-
if (videoElement) image = await (0, $3575c8a563f2a1da$export$674c90a250a8b2c5)(videoElement
|
|
3166
|
-
else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $3575c8a563f2a1da$export$4a210166cc9cb64b)(this.webcamProducer.track
|
|
3120
|
+
if (videoElement) image = await (0, $3575c8a563f2a1da$export$674c90a250a8b2c5)(videoElement);
|
|
3121
|
+
else if (this.webcamProducer && this.webcamProducer.track) image = await (0, $3575c8a563f2a1da$export$4a210166cc9cb64b)(this.webcamProducer.track);
|
|
3167
3122
|
else throw new Error("no video to capture");
|
|
3168
3123
|
return image;
|
|
3169
3124
|
} else throw new Error("feature not allowed");
|
|
@@ -9860,7 +9815,7 @@ const $7d4fa7ceb4c29739$var$Menu = ()=>{
|
|
|
9860
9815
|
setTheme('dark');
|
|
9861
9816
|
}
|
|
9862
9817
|
}; */ const onHelpCenterClick = ()=>{
|
|
9863
|
-
window.open("https://
|
|
9818
|
+
window.open("https://help.snapcall.io", "_blank");
|
|
9864
9819
|
};
|
|
9865
9820
|
const handleOutisdeClick = (0, $jQDcL$react.useCallback)((event)=>{
|
|
9866
9821
|
if (!menuPopupRef?.current?.contains(event.target) && document.body.contains(event.target)) {
|
|
@@ -15834,12 +15789,8 @@ const $b939cb69b1cbeb59$export$336a011955157f9a = ()=>{
|
|
|
15834
15789
|
const loginModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({});
|
|
15835
15790
|
const [thumbnailURL, setLastThumbnailURL] = (0, $jQDcL$react.useState)(undefined);
|
|
15836
15791
|
const captureThumbnail = async (videoElement)=>{
|
|
15837
|
-
let image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(undefined
|
|
15838
|
-
|
|
15839
|
-
}).catch(console.error);
|
|
15840
|
-
if (!image) image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(videoElement, {
|
|
15841
|
-
addPlayWatermark: true
|
|
15842
|
-
});
|
|
15792
|
+
let image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
15793
|
+
if (!image) image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(videoElement);
|
|
15843
15794
|
const { url: url } = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).saveThumbnail(image);
|
|
15844
15795
|
setLastThumbnailURL(url);
|
|
15845
15796
|
};
|