@cloudflare/realtimekit-ui 2.1.0 → 2.2.0-staging.1
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/browser.js +1 -1
- package/dist/cjs/{config-HiqPJwIo.js → config-QKPY7hOX.js} +4 -4
- package/dist/cjs/index.cjs.js +4 -3
- package/dist/cjs/rtk-avatar_26.cjs.entry.js +9 -8
- package/dist/cjs/rtk-screenshare-view.cjs.entry.js +45 -39
- package/dist/cjs/rtk-ui-provider.cjs.entry.js +6 -5
- package/dist/cjs/{merge-DSuacPWu.js → ui-kit-metadata-Cjs7_Xqr.js} +40 -0
- package/dist/collection/components/rtk-meeting/rtk-meeting.js +2 -0
- package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +45 -39
- package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +2 -0
- package/dist/collection/exports.js +1 -0
- package/dist/collection/utils/ui-kit-metadata.js +37 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-By2mVWfn.js → p-CRh2Y0y5.js} +1 -1
- package/dist/components/p-CqIpJqLB.js +1 -0
- package/dist/components/rtk-meeting.js +1 -1
- package/dist/components/rtk-screenshare-view.js +1 -1
- package/dist/components/rtk-ui-provider.js +1 -1
- package/dist/docs/docs-components.json +1 -1
- package/dist/esm/{config-RftCp4k_.js → config-CvBBWjUo.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +78 -39
- package/dist/esm/rtk-avatar_26.entry.js +3 -2
- package/dist/esm/rtk-screenshare-view.entry.js +45 -39
- package/dist/esm/rtk-ui-provider.entry.js +2 -1
- package/dist/esm/{merge-9wD3oWzy.js → ui-kit-metadata-BfDGhHU-.js} +39 -1
- package/dist/realtimekit-ui/index.esm.js +1 -1
- package/dist/realtimekit-ui/p-207ce4c5.entry.js +1 -0
- package/dist/realtimekit-ui/{p-BKOrdZVd.js → p-4wo9JvMs.js} +1 -1
- package/dist/realtimekit-ui/p-57b4007f.entry.js +1 -0
- package/dist/realtimekit-ui/p-BPp8I5C6.js +1 -0
- package/dist/realtimekit-ui/p-aeddf24f.entry.js +1 -0
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
- package/dist/types/components/rtk-screenshare-view/rtk-screenshare-view.d.ts +3 -2
- package/dist/types/exports.d.ts +1 -0
- package/dist/types/utils/ui-kit-metadata.d.ts +10 -0
- package/package.json +2 -6
- package/dist/components/p-BRxdAqtR.js +0 -1
- package/dist/realtimekit-ui/p-39f0b141.entry.js +0 -1
- package/dist/realtimekit-ui/p-7690e88e.entry.js +0 -1
- package/dist/realtimekit-ui/p-aa40e2af.entry.js +0 -1
- package/dist/realtimekit-ui/p-kO5UeN9F.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./p-D4GSX-co.js";import{i as e,m as r}from"./p-
|
|
1
|
+
import{c as t}from"./p-D4GSX-co.js";import{i as e,m as r}from"./p-CqIpJqLB.js";import{i}from"./p-C0vp-Q7v.js";const a=(e,i=t())=>{let a=Object.assign({},i);return r(a,e),a},o=(t,r,o={},l={grid_pagination:!0,settings_toggle:!0})=>{var n,d,g,s,c,v,k,p,m,u,h,b,x,f,S,y,w,O;const I={showSetupScreen:!0};let _,M=["rtk-stage"],T={},j={};const R=!1!==(null==l?void 0:l.settings_toggle),C=!1!==(null==l?void 0:l.grid_pagination);if(null===(n=t.controlBar)||void 0===n?void 0:n.isEnabled){M.push("rtk-controlbar");const{elements:e}=t.controlBar,a=[...e.fullscreen?["rtk-fullscreen-toggle"]:[],...R?["rtk-settings-toggle"]:[]],o=[],l=[];(null===(d=r.participants.pip)||void 0===d?void 0:d.isSupported())&&(null===(s=null===(g=r.self)||void 0===g?void 0:g.config)||void 0===s?void 0:s.pipMode)&&"LIVESTREAM"!==(null===(c=r.self.config)||void 0===c?void 0:c.viewType)&&l.push("rtk-pip-toggle"),(null==r?void 0:r.self.permissions.canDisableParticipantAudio)&&l.push("rtk-mute-all-button"),l.push("rtk-breakout-rooms-toggle"),(null===(v=r.self)||void 0===v?void 0:v.permissions.canRecord)&&l.push("rtk-recording-toggle"),null!==(k=r.self.permissions.transcriptionEnabled)&&void 0!==k&&k&&l.push("rtk-caption-toggle"),"ReactNative"!==navigator.product&&l.push("rtk-debugger-toggle"),i(r)&&a.push("rtk-livestream-toggle"),e.screenshare&&a.push("rtk-screen-share-toggle"),e.chat&&o.push("rtk-chat-toggle"),e.polls&&o.push("rtk-polls-toggle"),e.participants&&o.push("rtk-participants-toggle"),e.plugins&&o.push("rtk-plugins-toggle"),o.push("rtk-ai-toggle");const n=["rtk-mic-toggle","rtk-camera-toggle","rtk-stage-toggle","rtk-leave-button"];l.length>0&&n.push("rtk-more-toggle");const p=a.concat(o).concat(l);let m=!1;p.length>0&&(m=!0),j={"rtk-controlbar":{states:["activeMoreMenu"],children:["div#controlbar-left","div#controlbar-center","div#controlbar-right"]},"div#controlbar-left":a,"div#controlbar-center":n,"div#controlbar-right":o,"rtk-more-toggle":{states:["activeMoreMenu"],children:[]},"rtk-more-toggle.activeMoreMenu":l.map((t=>[t,{variant:"horizontal",slot:"more-elements"}])),"rtk-controlbar.sm":["div#controlbar-mobile"],"rtk-controlbar.md":["div#controlbar-mobile"],"rtk-more-toggle.activeMoreMenu.md":p.map((t=>[t,{variant:"horizontal",slot:"more-elements"}])),"rtk-more-toggle.activeMoreMenu.sm":p.map((t=>[t,{variant:"horizontal",slot:"more-elements"}])),"div#controlbar-mobile":["rtk-mic-toggle","rtk-camera-toggle","rtk-stage-toggle",m&&"rtk-more-toggle","rtk-leave-button"]}}if(null===(p=t.header)||void 0===p?void 0:p.isEnabled){M.unshift("rtk-header");const{elements:e}=t.header;let r=["rtk-recording-indicator","rtk-livestream-indicator"],i=[],a=[];C&&a.push("rtk-grid-pagination"),e.title&&i.push("rtk-meeting-title"),"string"==typeof e.logo&&e.logo.length>0&&(_=e.logo,r.unshift("rtk-logo")),e.participantCount&&a.push("rtk-participant-count","rtk-viewer-count"),e.timer&&a.push("rtk-clock"),T={"rtk-header":["div#header-left","div#header-center","div#header-right"],"rtk-header.sm":{remove:["div#header-center"]},"div#header-left":r,"div#header-center":i,"div#header-right":a,"div#header-left.sm":{remove:["rtk-logo"],prepend:["rtk-meeting-title"]}}}M.push("rtk-participants-audio","rtk-dialog-manager");let z={logo:_};z=t.designTokens,e(null===(u=null===(m=null==t?void 0:t.designTokens)||void 0===m?void 0:m.colors)||void 0===u?void 0:u.textOnBrand)&&(z.colors["text-on-brand"]=null===(b=null===(h=null==t?void 0:t.designTokens)||void 0===h?void 0:h.colors)||void 0===b?void 0:b.textOnBrand),e(null===(f=null===(x=null==t?void 0:t.designTokens)||void 0===x?void 0:x.colors)||void 0===f?void 0:f.videoBg)&&(z.colors["video-bg"]=null===(y=null===(S=null==t?void 0:t.designTokens)||void 0===S?void 0:S.colors)||void 0===y?void 0:y.videoBg);let A={designTokens:z,styles:{"rtk-header":{display:"grid",height:"48px",gridTemplateColumns:"repeat(3, 1fr)",gridTemplateRows:"1fr",alignItems:"center","--header-section-gap":"var(--rtk-space-2, 8px)"},"rtk-header.sm":{display:"grid",gridArea:"header",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"1fr",alignItems:"center","--header-section-gap":"var(--rtk-space-1, 4px)"},"div#header-left":{display:"flex",alignItems:"center",height:"48px",wordBreak:"break-all",gap:"var(--header-section-gap)"},"rtk-logo":{height:"26px"},"div#header-center":{display:"flex",alignItems:"center",justifyContent:"center",wordBreak:"break-all",gap:"var(--header-section-gap)",paddingInline:"var(--rtk-space-3, 12px)"},"div#header-right":{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"var(--header-section-gap)"},"rtk-stage":{display:"flex",flex:"1"},"rtk-grid":{flex:"1",height:"auto"},"rtk-controlbar":{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"1fr",alignItems:"center",padding:"8px"},"rtk-controlbar.sm":{display:"flex",position:"relative",backgroundColor:"var(--rtk-colors-background-1000, #000)"},"rtk-controlbar.md":{display:"flex",position:"relative",backgroundColor:"var(--rtk-colors-background-1000, #000)"},"div#controlbar-left":{display:"flex",alignItems:"center",gap:"var(--rtk-space-1, 4px)"},"div#controlbar-center":{display:"flex",alignItems:"center",position:"relative",overflow:"visible",justifyContent:"center",gap:"var(--rtk-space-1, 4px)"},"div#controlbar-mobile":{display:"flex",flex:"1",alignItems:"center",justifyContent:"center",zIndex:"10000",gap:"var(--rtk-space-1, 4px)"},"div#controlbar-right":{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"var(--rtk-space-1, 4px)"},"rtk-settings":{width:"720px",height:"480px"},"rtk-debugger":{width:"720px",height:"480px"},"div#setupcontrols-indicator":{position:"absolute",bottom:"12px",left:"12px",display:"flex",gap:"6px",background:"rgb(var(--rtk-colors-background-800, 0 0 0))",borderRadius:"100%"},"div#setupcontrols-media":{position:"absolute",bottom:"8px",right:"8px",display:"flex",gap:"6px"},"div#setupcontrols-settings":{position:"absolute",top:"8px",right:"8px",display:"flex",flexDirection:"column",gap:"6px"},"rtk-meeting-title.sm":{marginLeft:"0"},"rtk-clock":{marginRight:"0"}},root:Object.assign(Object.assign(Object.assign({"rtk-meeting":{state:"meeting",states:["activeSidebar"]},"rtk-meeting[meeting=idle]":["rtk-idle-screen"],"rtk-meeting[meeting=waiting]":["rtk-waiting-screen"],"rtk-meeting[meeting=setup]":["rtk-setup-screen","rtk-dialog-manager"],"rtk-meeting[meeting=joined]":M,"rtk-meeting[meeting=joined].activeSidebar.sm":{add:[["rtk-sidebar",{view:"full-screen"}]]},"rtk-meeting[meeting=joined].activeSidebar.md":{add:[["rtk-sidebar",{view:"full-screen"}]]},"rtk-meeting[meeting=ended]":["rtk-ended-screen"]},T),j),{"rtk-stage":{states:["activeSidebar"],children:["rtk-grid","rtk-notifications","rtk-transcripts"]},"rtk-stage.activeSidebar":{add:[["rtk-sidebar",{view:"sidebar"}]]},"rtk-stage.activeSidebar.sm":{remove:["rtk-sidebar"]},"rtk-grid":{states:["activeScreenShare","activePlugin","activeSpotlight"],state:"viewType",children:["rtk-simple-grid"]},"rtk-grid[viewType=AUDIO_ROOM]":["rtk-audio-grid"],"rtk-grid[viewType=AUDIO_ROOM].activePlugin":["rtk-mixed-grid"],"rtk-grid[viewType=AUDIO_ROOM].activeScreenshare":["rtk-mixed-grid"],"rtk-grid[viewType=AUDIO_ROOM].activeScreenShare.activeSpotlight":["rtk-mixed-grid"],"rtk-grid[viewType=AUDIO_ROOM].activePlugin.activeSpotlight":["rtk-mixed-grid"],"rtk-grid[viewType=AUDIO_ROOM].activePlugin.activeScreenShare.activeSpotlight":["rtk-mixed-grid"],"rtk-grid.activeSpotlight":["rtk-spotlight-grid"],"rtk-grid.activeScreenShare":["rtk-mixed-grid"],"rtk-grid.activePlugin":["rtk-mixed-grid"],"rtk-grid.activeScreenShare.activeSpotlight":["rtk-mixed-grid"],"rtk-grid.activePlugin.activeSpotlight":["rtk-mixed-grid"],"rtk-grid.activePlugin.activeScreenShare.activeSpotlight":["rtk-mixed-grid"],"rtk-mixed-grid":{states:["activeSpotlight"],state:"viewType",children:["rtk-simple-grid"]},"rtk-mixed-grid[viewType=AUDIO_ROOM]":["rtk-audio-grid"],"rtk-mixed-grid.activeSpotlight":["rtk-spotlight-grid"],"rtk-participant-tile":{state:"meeting",children:["rtk-name-tag","rtk-avatar","rtk-network-indicator"]},"rtk-participant-setup":["rtk-avatar","div#setupcontrols-media"],"rtk-participant-tile[meeting=setup]":["rtk-avatar","div#setupcontrols-indicator","div#setupcontrols-media",...R?["div#setupcontrols-settings"]:[]],"div#setupcontrols-indicator":[["rtk-audio-visualizer",{slot:"start",hideMuted:!0}]],"div#setupcontrols-media":[["rtk-mic-toggle",{size:"sm"}],["rtk-camera-toggle",{size:"sm"}]],"div#setupcontrols-settings":[["rtk-settings-toggle",{size:"sm"}]],"rtk-screenshare-view":["rtk-name-tag","rtk-network-indicator"],"rtk-name-tag":[["rtk-audio-visualizer",{slot:"start"}]]}),config:{notification_sounds:{participant_left:!1},participant_joined_sound_notification_limit:3,participant_chat_message_sound_notification_limit:10,videoFit:"cover"}};return A=a(o,A),I.showSetupScreen=null===(O=null===(w=t.setupScreen)||void 0===w?void 0:w.isEnabled)||void 0===O||O,{config:A,data:I}};export{a as e,o as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,k as n,l as o,m as r,n as e,o as i,p as s,q as a,r as c,s as f,t as u,v as d,w as l,x as v,y as m,z as p,A as b,S as g}from"./p-D4GSX-co.js";import{i as y,a as k,b as F}from"./p-Dkd2PDJ-.js";var $=[0,.5,1,1.5,2,3,4,5,6,7,8,9,10,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96];const x={darkest:{background:{1e3:"#080808",900:"#1A1A1A",800:"#1E1E1E",700:"#2C2C2C",600:"#393939"},text:"#FFFFFF"},dark:{background:{1e3:"#252525",900:"#2F2F2F",800:"#323232",700:"#3E3E3E",600:"#4A4A4A"},text:"#F5F5F5","video-bg":"#1C1C1C"},light:{background:{1e3:"#FFFFFF",900:"#F5F5F5",800:"#EBEBEB",700:"#E0E0E0",600:"#D6D6D6"},text:"#111111","text-on-brand":"#ffffff","video-bg":"#DADADA"}},h={none:{none:0,sm:0,md:0,lg:0},thin:{none:0,sm:1,md:2,lg:4},fat:{none:0,sm:2,md:4,lg:8}},j={sharp:{none:0,sm:0,md:0,lg:0},rounded:{none:0,sm:4,md:8,lg:12},"extra-rounded":{none:0,sm:8,md:16,lg:24},circular:{none:9999,sm:9999,md:9999,lg:9999}};function E(t){let n="0",o="0",r="0";return 4==(t=t.trim()).length?(n="0x"+t[1]+t[1],o="0x"+t[2]+t[2],r="0x"+t[3]+t[3]):t.length>6&&(n="0x"+t[1]+t[2],o="0x"+t[3]+t[4],r="0x"+t[5]+t[6]),[+n,+o,+r]}const A=t=>"string"==typeof t&&7===t.length&&t.startsWith("#"),O="--rtk-";function D(t,n=O){return n+t}const w=(t,n,o=O)=>{Object.keys(n).forEach((r=>{const e=n[r];if("string"==typeof e)if("text"===r||"text-on-brand"===r){const n=E(e).join(" ");t.style.setProperty(D(`colors-${r}-1000`,o),`${n}`),t.style.setProperty(D(`colors-${r}-900`,o),`${n} / 0.88`),t.style.setProperty(D(`colors-${r}-800`,o),`${n} / 0.76`),t.style.setProperty(D(`colors-${r}-700`,o),`${n} / 0.64`),t.style.setProperty(D(`colors-${r}-600`,o),`${n} / 0.52`)}else{const n=E(e).join(" ");t.style.setProperty(D(`colors-${r}`,o),n)}else"object"==typeof e&&Object.keys(e).forEach((n=>{const i=E(e[n]).join(" ");t.style.setProperty(D(`colors-${r}-${n}`,o),i)}))}))},C=(t,{spacingBase:n,borderRadius:o,borderWidth:r,colors:e,fontFamily:i,googleFont:s,theme:a,tokenPrefix:c=O})=>{if("object"!=typeof t)throw new Error("[rtk-ui-kit] (provideRtkDesignSystem): Passed element is not a valid HTML Element");if("string"==typeof s&&((t=>{const n=[];if(null==document.querySelector("link[data-rtk-font]")){const t=document.createElement("link");t.rel="preconnect",t.setAttribute("data-rtk-font","true"),t.href="https://fonts.googleapis.com";const o=t.cloneNode(!0);o.href="https://fonts.gstatic.com",o.crossOrigin="",n.push(t,o)}const o=document.createElement("link");o.rel="stylesheet",o.setAttribute("data-rtk-font",t),o.href=encodeURI(`https://fonts.googleapis.com/css2?family=${t}:wght@${[400,500,700].join(";")}&display=swap`),n.push(o),document.head.append(...n)})(s),t.style.setProperty(D("font-family",c),s)),"string"==typeof i&&t.style.setProperty(D("font-family",c),i),"number"==typeof n&&((t,n,o=O)=>{$.forEach((r=>{t.style.setProperty(D(`space-${r}`,o),r*n+"px")}))})(t,n,c),"string"==typeof r&&((t,n,o=O)=>{if(n in h){const r=h[n];Object.keys(r).forEach((n=>{t.style.setProperty(D(`border-width-${n}`,o),`${r[n]}px`)}))}})(t,r,c),"string"==typeof o&&((t,n,o=O)=>{if(n in j){const r=j[n];Object.keys(r).forEach((n=>{t.style.setProperty(D(`border-radius-${n}`,o),`${r[n]}px`)}))}})(t,o,c),"string"==typeof a){const n=x[a];null!=n&&w(t,n,c)}"object"==typeof e&&w(t,e,c)};function _(t){return t}var S,R,B,I=Date.now,P=t?function(n,o){return t(n,"toString",{configurable:!0,enumerable:!1,value:(r=o,function(){return r}),writable:!0});var r}:_,L=(S=P,R=0,B=0,function(){var t=I(),n=16-(t-B);if(B=t,n>0){if(++R>=800)return arguments[0]}else R=0;return S.apply(void 0,arguments)}),N=Math.max;var T=Object.prototype.hasOwnProperty;function H(t){return r(t)?a(t,!0):function(t){if(!y(t))return function(t){var n=[];if(null!=t)for(var o in Object(t))n.push(o);return n}(t);var n=s(t),o=[];for(var r in t)("constructor"!=r||!n&&T.call(t,r))&&o.push(r);return o}(t)}var M=Function.prototype.toString,U=Object.prototype.hasOwnProperty,V=M.call(Object);function q(t,o,r){(void 0!==r&&!i(t[o],r)||void 0===r&&!(o in t))&&n(t,o,r)}function z(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}function G(t,e,i,s,a,g,$){var x=z(t,i),h=z(e,i),j=$.get(h);if(j)q(t,i,j);else{var E,A=g?g(x,h,i+"",t,e,$):void 0,O=void 0===A;if(O){var D=d(h),w=!D&&f(h),C=!D&&!w&&u(h);A=h,D||w||C?d(x)?A=x:k(E=x)&&r(E)?A=function(t,n){var o=-1,r=t.length;for(n||(n=Array(r));++o<r;)n[o]=t[o];return n}(x):w?(O=!1,A=l(h,!0)):C?(O=!1,A=v(h,!0)):A=[]:function(t){if(!k(t)||"[object Object]"!=F(t))return!1;var n=c(t);if(null===n)return!0;var o=U.call(n,"constructor")&&n.constructor;return"function"==typeof o&&o instanceof o&&M.call(o)==V}(h)||m(h)?(A=x,m(x)?A=function(t){return function(t,r,e){var i=!e;e||(e={});for(var s=-1,a=r.length;++s<a;){var c=r[s],f=void 0;void 0===f&&(f=t[c]),i?n(e,c,f):o(e,c,f)}return e}(t,H(t))}(x):y(x)&&!p(x)||(A=b(h))):O=!1}O&&($.set(h,A),a(A,h,s,g,$),$.delete(h)),q(t,i,A)}}function J(t,n,o,r,e){t!==n&&function(t,n,o){for(var r=-1,e=Object(t),i=o(t),s=i.length;s--;){var a=i[++r];if(!1===n(e[a],a,e))break}}(n,(function(i,s){if(e||(e=new g),y(i))G(t,n,s,o,J,r,e);else{var a=r?r(z(t,s),i,s+"",t,n,e):void 0;void 0===a&&(a=i),q(t,s,a)}}),H)}var K,W=(K=function(t,n,o){J(t,n,o)},function(t,n){return L(function(t,n,o){return n=N(void 0===n?t.length-1:n,0),function(){for(var r=arguments,e=-1,i=N(r.length-n,0),s=Array(i);++e<i;)s[e]=r[n+e];e=-1;for(var a=Array(n+1);++e<n;)a[e]=r[e];return a[n]=o(s),function(t,n,o){switch(o.length){case 0:return t.call(n);case 1:return t.call(n,o[0]);case 2:return t.call(n,o[0],o[1]);case 3:return t.call(n,o[0],o[1],o[2])}return t.apply(n,o)}(t,this,a)}}(t,n,_),t+"")}((function(t,n){var o=-1,s=n.length,a=s>1?n[s-1]:void 0,c=s>2?n[2]:void 0;for(a=K.length>3&&"function"==typeof a?(s--,a):void 0,c&&function(t,n,o){if(!y(o))return!1;var s=typeof n;return!!("number"==s?r(o)&&e(n,o.length):"string"==s&&n in o)&&i(o[n],t)}(n[0],n[1],c)&&(a=s<3?void 0:a,s=1),t=Object(t);++o<s;){var f=n[o];f&&K(t,f,o)}return t})));const X=Symbol.for("rtk.uikit.sdkName"),Q=globalThis;function Y(t){Q[X]=t}function Z(){var t;return null!==(t=Q[X])&&void 0!==t?t:"html"}function tt(t){var n,o;try{null===(o=null===(n=null==t?void 0:t.__internals__)||void 0===n?void 0:n.setUiKitMetadata)||void 0===o||o.call(n,{sdkVersion:"2.2.0-staging.1",sdkName:Z()})}catch(t){}}export{A as i,W as m,C as p,tt as r,Y as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,c as i,h as r}from"./p-BBHQOrFK.js";import{p as o,m as a}from"./p-BRxdAqtR.js";import{u as n,i as m,c as h,e as c,f as d,b as p}from"./p-D4GSX-co.js";import{R as k}from"./p-CBJjerDR.js";import"./p-Rq_6y0HI.js";import{g as l}from"./p-By2mVWfn.js";import"./p-Dguuxuf6.js";import{i as u}from"./p-FdeAvICb.js";import{g}from"./p-Cj-LCS8F.js";import{g as f}from"./p-vBfDtD_u.js";import{d as v}from"./p-Cer_tqK4.js";import{d as b}from"./p-D6vw6bT2.js";import{d as j}from"./p-4YgSkkuy.js";import{d as w}from"./p-YvtLtXG0.js";import{d as E}from"./p-CYD_rssA.js";import{d as C}from"./p-JLHMB5KF.js";import{d as y}from"./p-BdxzrANc.js";import{d as S}from"./p-D3Csm8eQ.js";import{d as x}from"./p-CcZ1rLgH.js";import{d as D}from"./p-CNApM3eU.js";import{d as B}from"./p-B-Um3Y0q.js";import{d as P}from"./p-jMTHZUBS.js";import{d as U}from"./p-BYIBbfJ8.js";import{d as R}from"./p-BOEr6Iwn.js";import{d as L}from"./p-oXrlIvqH.js";import{d as I}from"./p-D9p14DJ_.js";import{d as M}from"./p-Bki9SL7E.js";import{d as q}from"./p-BDVl60pn.js";import{d as H}from"./p-QjucuYy0.js";import{d as J}from"./p-DjY5-zh6.js";import{d as O}from"./p-yDQrj0hk.js";import{d as Y}from"./p-CMjUxdV6.js";import{d as _}from"./p-Bn0NaoHe.js";import{d as z}from"./p-BlOYC_3W.js";import{d as A}from"./p-DHSRRtn3.js";const T=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.providerId="provider-"+Math.floor(100*Math.random()),this.roomJoinedListener=()=>{this.updateStates({meeting:"joined",preJoinError:null})},this.waitlistedListener=()=>{this.updateStates({meeting:"waiting"})},this.roomLeftListener=({state:t})=>{"disconnected"!==t&&"failed"!==t&&this.updateStates({meeting:"ended",roomLeftState:t})},this.mediaPermissionUpdateListener=({kind:t,message:e})=>{!["audio","video"].includes(t)||"DENIED"!==e&&"SYSTEM_DENIED"!==e||!0===(this.peerStore||n).state.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),this.leaveRoomTimer)},this.peerStore=null,this.loadConfigFromPreset=!1,this.applyDesignSystem=!1,this.mode="fixed",this.leaveOnUnmount=!1,this.t=m(),this.config=h(),this.gridLayout="row",this.iconPack=c,this.overrides=d,this.handleChangingMeeting=t=>{this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},(this.peerStore||n).state.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}}connectedCallback(){var t;"undefined"!=typeof window&&(this.initErrorListener=t=>{const e=g(this.t,t.detail);e&&this.updateStates({preJoinError:e})},window.addEventListener("ClientError",this.initErrorListener)),this.leaveRoomTimer=1e4,this.loadConfigFromPreset=!0,this.applyDesignSystem=!0,this.setupStoreRequestListener(),this.setupStateUpdateListener(),this.meetingChanged(this.meeting),this.iconPackChanged(this.iconPack),this.tChanged(this.t),this.configChanged(this.config),this.overridesChanged(this.overrides),this.resizeObserver=new u((()=>this.handleResize())),this.resizeObserver.observe(this.host),this.applyDesignSystem&&null!=(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,this.config.designTokens)}disconnectedCallback(){var t;this.leaveOnUnmount&&(null===(t=this.meeting)||void 0===t||t.leave()),this.resizeObserver.disconnect(),window.removeEventListener("ClientError",this.initErrorListener),this.storeRequestListener&&(this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=null),this.stateUpdateListener&&(this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=null),this.meeting&&this.clearListeners(this.meeting)}setupStoreRequestListener(){this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=t=>{if(!this.peerStore)return;const e=new CustomEvent("rtkProvideStore",{detail:{store:this.peerStore,requestId:t.detail.requestId}});document.dispatchEvent(e),t.stopPropagation()},this.host.addEventListener("rtkRequestStore",this.storeRequestListener)}setupStateUpdateListener(){this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=t=>{this.host.contains(t.target)&&this.updateStates(t.detail)},this.host.addEventListener("rtkStateUpdate",this.stateUpdateListener)}clearListeners(t){t&&(t.self.removeListener("roomLeft",this.roomLeftListener),t.self.removeListener("roomJoined",this.roomJoinedListener),t.self.removeListener("waitlisted",this.waitlistedListener),t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}meetingChanged(t,e){var s,i;if(!t)return;t?(this.peerStore=p({meeting:t,config:this.config,iconPack:this.iconPack,t:this.t,providerId:this.providerId,overrides:a(Object.assign({},d),this.overrides)}),document.dispatchEvent(new CustomEvent("rtkPeerStoreReady",{detail:{peerId:t.self.id}}))):this.peerStore=null;const r=this.peerStore||n;if(this.updateStates({viewType:t.meta.viewType,activeCaptions:e?!!r.state.states.activeCaptions:!!t.self.permissions.transcriptionEnabled}),this.loadConfigFromPreset&&null!=t.self.config){const e=t.self.config,{config:i,data:o}=l(e,t);this.config=i,null==this.showSetupScreen&&(this.showSetupScreen=o.showSetupScreen),(null===(s=r.state.states.activeBreakoutRoomsManager)||void 0===s?void 0:s.destinationMeetingId)&&(this.showSetupScreen=!1)}this.applyDesignSystem&&null!=(null===(i=this.config)||void 0===i?void 0:i.designTokens)&&"undefined"!=typeof document&&!0!==r.state.states.activeDebugger&&o(document.documentElement,this.config.designTokens),t.self.addListener("roomJoined",this.roomJoinedListener),t.self.addListener("waitlisted",this.waitlistedListener),t.self.addListener("roomLeft",this.roomLeftListener),t.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),t.connectedMeetings.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.join().then((()=>{this.updateStates({preJoinError:null})})).catch((t=>{const{message:e,code:s}=f(this.t,t);this.updateStates({preJoinError:{message:e,code:s}})})),window.removeEventListener("ClientError",this.initErrorListener)}iconPackChanged(t){this.peerStore&&(this.peerStore.state.iconPack=t)}tChanged(t){this.peerStore&&(this.peerStore.state.t=t)}configChanged(t){this.peerStore&&(this.peerStore.state.config=t),(null==t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,t.designTokens)}overridesChanged(t){this.peerStore&&(this.peerStore.state.overrides=a(Object.assign({},d),t))}handleResize(){this.size=(t=>t>=1080?"lg":t>=768?"md":"sm")(this.host.clientWidth)}updateStates(t){const e=this.peerStore||n,s=Object.assign({},e.state.states);e.state.states=a(s,t),this.statesUpdate.emit(e.state.states);const i=new CustomEvent("rtkStatesUpdate",{detail:e.state.states,bubbles:!0,composed:!0});this.host.dispatchEvent(i)}render(){const t={meeting:this.meeting,size:this.size,states:(this.peerStore||n).state.states,config:this.config||h(),iconPack:this.iconPack,t:this.t};return"CHAT"===(this.peerStore||n).state.states.viewType?r("rtk-chat",Object.assign({},t)):r(k,{element:"rtk-meeting",defaults:t,asHost:!0,elementProps:{"rtk-grid":{layout:this.gridLayout}}})}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}}static get style(){return":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;position:fixed;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);height:100%;width:100%}:host([mode='fill']){position:relative}"}},[1,"rtk-meeting",{loadConfigFromPreset:[1028,"load-config-from-preset"],applyDesignSystem:[1028,"apply-design-system"],mode:[513],leaveOnUnmount:[4,"leave-on-unmount"],meeting:[16],showSetupScreen:[1028,"show-setup-screen"],t:[16],config:[1040],size:[1537],gridLayout:[1,"grid-layout"],iconPack:[16],overrides:[16]},void 0,{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["rtk-meeting","rtk-avatar","rtk-button","rtk-chat","rtk-chat-composer-view","rtk-chat-header","rtk-chat-messages-ui-paginated","rtk-chat-selector","rtk-draft-attachment-view","rtk-emoji-picker","rtk-emoji-picker-button","rtk-file-message-view","rtk-file-picker-button","rtk-icon","rtk-image-message-view","rtk-markdown-view","rtk-menu","rtk-menu-item","rtk-menu-list","rtk-message-view","rtk-paginated-list","rtk-pinned-message-selector","rtk-spinner","rtk-text-composer-view","rtk-text-message-view","rtk-tooltip"].forEach((e=>{switch(e){case"rtk-meeting":customElements.get(t(e))||customElements.define(t(e),T);break;case"rtk-avatar":customElements.get(t(e))||v();break;case"rtk-button":customElements.get(t(e))||b();break;case"rtk-chat":customElements.get(t(e))||j();break;case"rtk-chat-composer-view":customElements.get(t(e))||w();break;case"rtk-chat-header":customElements.get(t(e))||E();break;case"rtk-chat-messages-ui-paginated":customElements.get(t(e))||C();break;case"rtk-chat-selector":customElements.get(t(e))||y();break;case"rtk-draft-attachment-view":customElements.get(t(e))||S();break;case"rtk-emoji-picker":customElements.get(t(e))||x();break;case"rtk-emoji-picker-button":customElements.get(t(e))||D();break;case"rtk-file-message-view":customElements.get(t(e))||B();break;case"rtk-file-picker-button":customElements.get(t(e))||P();break;case"rtk-icon":customElements.get(t(e))||U();break;case"rtk-image-message-view":customElements.get(t(e))||R();break;case"rtk-markdown-view":customElements.get(t(e))||L();break;case"rtk-menu":customElements.get(t(e))||I();break;case"rtk-menu-item":customElements.get(t(e))||M();break;case"rtk-menu-list":customElements.get(t(e))||q();break;case"rtk-message-view":customElements.get(t(e))||H();break;case"rtk-paginated-list":customElements.get(t(e))||J();break;case"rtk-pinned-message-selector":customElements.get(t(e))||O();break;case"rtk-spinner":customElements.get(t(e))||Y();break;case"rtk-text-composer-view":customElements.get(t(e))||_();break;case"rtk-text-message-view":customElements.get(t(e))||z();break;case"rtk-tooltip":customElements.get(t(e))||A()}}))}F();const N=T,Q=F;export{N as RtkMeeting,Q as defineCustomElement}
|
|
1
|
+
import{t,p as e,H as s,c as i,h as r}from"./p-BBHQOrFK.js";import{p as o,r as a,m as n}from"./p-CqIpJqLB.js";import{u as m,i as h,c,e as d,f as p,b as k}from"./p-D4GSX-co.js";import{R as l}from"./p-CBJjerDR.js";import"./p-Rq_6y0HI.js";import{g as u}from"./p-CRh2Y0y5.js";import"./p-Dguuxuf6.js";import{i as g}from"./p-FdeAvICb.js";import{g as f}from"./p-Cj-LCS8F.js";import{g as v}from"./p-vBfDtD_u.js";import{d as b}from"./p-Cer_tqK4.js";import{d as j}from"./p-D6vw6bT2.js";import{d as w}from"./p-4YgSkkuy.js";import{d as E}from"./p-YvtLtXG0.js";import{d as C}from"./p-CYD_rssA.js";import{d as y}from"./p-JLHMB5KF.js";import{d as S}from"./p-BdxzrANc.js";import{d as x}from"./p-D3Csm8eQ.js";import{d as D}from"./p-CcZ1rLgH.js";import{d as B}from"./p-CNApM3eU.js";import{d as P}from"./p-B-Um3Y0q.js";import{d as U}from"./p-jMTHZUBS.js";import{d as L}from"./p-BYIBbfJ8.js";import{d as R}from"./p-BOEr6Iwn.js";import{d as I}from"./p-oXrlIvqH.js";import{d as q}from"./p-D9p14DJ_.js";import{d as J}from"./p-Bki9SL7E.js";import{d as M}from"./p-BDVl60pn.js";import{d as H}from"./p-QjucuYy0.js";import{d as O}from"./p-DjY5-zh6.js";import{d as Y}from"./p-yDQrj0hk.js";import{d as _}from"./p-CMjUxdV6.js";import{d as z}from"./p-Bn0NaoHe.js";import{d as T}from"./p-BlOYC_3W.js";import{d as A}from"./p-DHSRRtn3.js";const F=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.providerId="provider-"+Math.floor(100*Math.random()),this.roomJoinedListener=()=>{this.updateStates({meeting:"joined",preJoinError:null})},this.waitlistedListener=()=>{this.updateStates({meeting:"waiting"})},this.roomLeftListener=({state:t})=>{"disconnected"!==t&&"failed"!==t&&this.updateStates({meeting:"ended",roomLeftState:t})},this.mediaPermissionUpdateListener=({kind:t,message:e})=>{!["audio","video"].includes(t)||"DENIED"!==e&&"SYSTEM_DENIED"!==e||!0===(this.peerStore||m).state.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),this.leaveRoomTimer)},this.peerStore=null,this.loadConfigFromPreset=!1,this.applyDesignSystem=!1,this.mode="fixed",this.leaveOnUnmount=!1,this.t=h(),this.config=c(),this.gridLayout="row",this.iconPack=d,this.overrides=p,this.handleChangingMeeting=t=>{this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},(this.peerStore||m).state.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}}connectedCallback(){var t;"undefined"!=typeof window&&(this.initErrorListener=t=>{const e=f(this.t,t.detail);e&&this.updateStates({preJoinError:e})},window.addEventListener("ClientError",this.initErrorListener)),this.leaveRoomTimer=1e4,this.loadConfigFromPreset=!0,this.applyDesignSystem=!0,this.setupStoreRequestListener(),this.setupStateUpdateListener(),this.meetingChanged(this.meeting),this.iconPackChanged(this.iconPack),this.tChanged(this.t),this.configChanged(this.config),this.overridesChanged(this.overrides),this.resizeObserver=new g((()=>this.handleResize())),this.resizeObserver.observe(this.host),this.applyDesignSystem&&null!=(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||m).state.states.activeDebugger&&o(document.documentElement,this.config.designTokens)}disconnectedCallback(){var t;this.leaveOnUnmount&&(null===(t=this.meeting)||void 0===t||t.leave()),this.resizeObserver.disconnect(),window.removeEventListener("ClientError",this.initErrorListener),this.storeRequestListener&&(this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=null),this.stateUpdateListener&&(this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=null),this.meeting&&this.clearListeners(this.meeting)}setupStoreRequestListener(){this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=t=>{if(!this.peerStore)return;const e=new CustomEvent("rtkProvideStore",{detail:{store:this.peerStore,requestId:t.detail.requestId}});document.dispatchEvent(e),t.stopPropagation()},this.host.addEventListener("rtkRequestStore",this.storeRequestListener)}setupStateUpdateListener(){this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=t=>{this.host.contains(t.target)&&this.updateStates(t.detail)},this.host.addEventListener("rtkStateUpdate",this.stateUpdateListener)}clearListeners(t){t&&(t.self.removeListener("roomLeft",this.roomLeftListener),t.self.removeListener("roomJoined",this.roomJoinedListener),t.self.removeListener("waitlisted",this.waitlistedListener),t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}meetingChanged(t,e){var s,i;if(!t)return;a(t),t?(this.peerStore=k({meeting:t,config:this.config,iconPack:this.iconPack,t:this.t,providerId:this.providerId,overrides:n(Object.assign({},p),this.overrides)}),document.dispatchEvent(new CustomEvent("rtkPeerStoreReady",{detail:{peerId:t.self.id}}))):this.peerStore=null;const r=this.peerStore||m;if(this.updateStates({viewType:t.meta.viewType,activeCaptions:e?!!r.state.states.activeCaptions:!!t.self.permissions.transcriptionEnabled}),this.loadConfigFromPreset&&null!=t.self.config){const e=t.self.config,{config:i,data:o}=u(e,t);this.config=i,null==this.showSetupScreen&&(this.showSetupScreen=o.showSetupScreen),(null===(s=r.state.states.activeBreakoutRoomsManager)||void 0===s?void 0:s.destinationMeetingId)&&(this.showSetupScreen=!1)}this.applyDesignSystem&&null!=(null===(i=this.config)||void 0===i?void 0:i.designTokens)&&"undefined"!=typeof document&&!0!==r.state.states.activeDebugger&&o(document.documentElement,this.config.designTokens),t.self.addListener("roomJoined",this.roomJoinedListener),t.self.addListener("waitlisted",this.waitlistedListener),t.self.addListener("roomLeft",this.roomLeftListener),t.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),t.connectedMeetings.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.join().then((()=>{this.updateStates({preJoinError:null})})).catch((t=>{const{message:e,code:s}=v(this.t,t);this.updateStates({preJoinError:{message:e,code:s}})})),window.removeEventListener("ClientError",this.initErrorListener)}iconPackChanged(t){this.peerStore&&(this.peerStore.state.iconPack=t)}tChanged(t){this.peerStore&&(this.peerStore.state.t=t)}configChanged(t){this.peerStore&&(this.peerStore.state.config=t),(null==t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||m).state.states.activeDebugger&&o(document.documentElement,t.designTokens)}overridesChanged(t){this.peerStore&&(this.peerStore.state.overrides=n(Object.assign({},p),t))}handleResize(){this.size=(t=>t>=1080?"lg":t>=768?"md":"sm")(this.host.clientWidth)}updateStates(t){const e=this.peerStore||m,s=Object.assign({},e.state.states);e.state.states=n(s,t),this.statesUpdate.emit(e.state.states);const i=new CustomEvent("rtkStatesUpdate",{detail:e.state.states,bubbles:!0,composed:!0});this.host.dispatchEvent(i)}render(){const t={meeting:this.meeting,size:this.size,states:(this.peerStore||m).state.states,config:this.config||c(),iconPack:this.iconPack,t:this.t};return"CHAT"===(this.peerStore||m).state.states.viewType?r("rtk-chat",Object.assign({},t)):r(l,{element:"rtk-meeting",defaults:t,asHost:!0,elementProps:{"rtk-grid":{layout:this.gridLayout}}})}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}}static get style(){return":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;position:fixed;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);height:100%;width:100%}:host([mode='fill']){position:relative}"}},[1,"rtk-meeting",{loadConfigFromPreset:[1028,"load-config-from-preset"],applyDesignSystem:[1028,"apply-design-system"],mode:[513],leaveOnUnmount:[4,"leave-on-unmount"],meeting:[16],showSetupScreen:[1028,"show-setup-screen"],t:[16],config:[1040],size:[1537],gridLayout:[1,"grid-layout"],iconPack:[16],overrides:[16]},void 0,{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}]);function N(){"undefined"!=typeof customElements&&["rtk-meeting","rtk-avatar","rtk-button","rtk-chat","rtk-chat-composer-view","rtk-chat-header","rtk-chat-messages-ui-paginated","rtk-chat-selector","rtk-draft-attachment-view","rtk-emoji-picker","rtk-emoji-picker-button","rtk-file-message-view","rtk-file-picker-button","rtk-icon","rtk-image-message-view","rtk-markdown-view","rtk-menu","rtk-menu-item","rtk-menu-list","rtk-message-view","rtk-paginated-list","rtk-pinned-message-selector","rtk-spinner","rtk-text-composer-view","rtk-text-message-view","rtk-tooltip"].forEach((e=>{switch(e){case"rtk-meeting":customElements.get(t(e))||customElements.define(t(e),F);break;case"rtk-avatar":customElements.get(t(e))||b();break;case"rtk-button":customElements.get(t(e))||j();break;case"rtk-chat":customElements.get(t(e))||w();break;case"rtk-chat-composer-view":customElements.get(t(e))||E();break;case"rtk-chat-header":customElements.get(t(e))||C();break;case"rtk-chat-messages-ui-paginated":customElements.get(t(e))||y();break;case"rtk-chat-selector":customElements.get(t(e))||S();break;case"rtk-draft-attachment-view":customElements.get(t(e))||x();break;case"rtk-emoji-picker":customElements.get(t(e))||D();break;case"rtk-emoji-picker-button":customElements.get(t(e))||B();break;case"rtk-file-message-view":customElements.get(t(e))||P();break;case"rtk-file-picker-button":customElements.get(t(e))||U();break;case"rtk-icon":customElements.get(t(e))||L();break;case"rtk-image-message-view":customElements.get(t(e))||R();break;case"rtk-markdown-view":customElements.get(t(e))||I();break;case"rtk-menu":customElements.get(t(e))||q();break;case"rtk-menu-item":customElements.get(t(e))||J();break;case"rtk-menu-list":customElements.get(t(e))||M();break;case"rtk-message-view":customElements.get(t(e))||H();break;case"rtk-paginated-list":customElements.get(t(e))||O();break;case"rtk-pinned-message-selector":customElements.get(t(e))||Y();break;case"rtk-spinner":customElements.get(t(e))||_();break;case"rtk-text-composer-view":customElements.get(t(e))||z();break;case"rtk-text-message-view":customElements.get(t(e))||T();break;case"rtk-tooltip":customElements.get(t(e))||A()}}))}N();const Q=F,K=N;export{Q as RtkMeeting,K as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as a,w as i,h as r,d as s,t as o}from"./p-BBHQOrFK.js";import{e as n,i as c}from"./p-D4GSX-co.js";import{i as d,r as l,e as p,a as h}from"./p-GSFejkz7.js";import{S as f}from"./p-C8uVSyiQ.js";import{d as k}from"./p-D6vw6bT2.js";import{d as g}from"./p-BYIBbfJ8.js";import{d as b}from"./p-DHSRRtn3.js";var v=function(t,e,a,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,a,o):r(e,a))||o);return s>3&&o&&Object.defineProperty(e,a,o),o};const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=a(this,"rtkStateUpdate",7),this.play=a(this,"screensharePlay",7),this.fullScreenListener=()=>{this.isFullScreen=d()},this.participantScreenshareUpdate=t=>{t.id===this.participant.id&&this.screenShareListener(t)},this.hideFullScreenButton=!1,this.nameTagPosition="bottom-left",this.variant="solid",this.iconPack=n,this.t=c(),this.videoExpanded=!1,this.screenShareEnabled=!1,this.isSwitchingScreen=!1,this.isFullScreen=!1,this.shareDifferentScreen=async()=>{const t=this.meeting;if(null!=t&&!this.isSwitchingScreen){this.isSwitchingScreen=!0;try{await t.self.enableScreenShare()}catch(e){t.__internals__.logger.error("rtkScreenshareView::shareDifferentScreen",{error:e})}finally{this.isSwitchingScreen=!1}}},this.toggleFullScreen=()=>{this.isFullScreen?(p(),this.isFullScreen=!1):(l(this.host),this.isFullScreen=!0)}}connectedCallback(){null===window||void 0===window||window.addEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.addEventListener("webkitfullscreenchange",this.fullScreenListener)}componentDidLoad(){this.participantChanged(this.participant)}disconnectedCallback(){if(!this.meeting)return;const{self:t}=this.meeting;this.participant.id===t.id&&this.screenShareListener?this.participant.removeListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.removeListener("screenShareUpdate",this.participantScreenshareUpdate),null===window||void 0===window||window.removeEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.removeEventListener("webkitfullscreenchange",this.fullScreenListener)}participantChanged(t){if(null!=t&&this.meeting){const{self:e}=this.meeting;this.screenShareListener=({screenShareEnabled:t,screenShareTracks:e})=>{const a=t&&null!=e.video;if(i((()=>{this.screenShareEnabled=a})),a){const t=new MediaStream;t.addTrack(e.video),null!=this.videoEl&&(this.videoEl.srcObject=t,this.videoEl.play())}else null!=this.videoEl&&(this.videoEl.srcObject=void 0)},this.screenShareListener(t),t.id===e.id?t.addListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.addListener("screenShareUpdate",this.participantScreenshareUpdate)}}render(){var t,e,a;const i=(null===(t=this.participant)||void 0===t?void 0:t.id)===(null===(e=this.meeting)||void 0===e?void 0:e.self.id),o=this.t(this.isFullScreen?"full_screen.exit":"full_screen"),n=this.isFullScreen?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize;return r(s,{key:"0de66f829d0426af746b72561e7470c50c703060",class:{isSelf:i}},r("div",{key:"video-container",id:"video-container",class:{expand:this.videoExpanded}},r("video",{key:"2e56da582533ee6a8286483fa4495ff9a88453a0",ref:t=>this.videoEl=t,class:{visible:this.screenShareEnabled,"fit-in-container":this.participant.supportsRemoteControl},playsInline:!0,onPlay:()=>{this.play.emit({screenshareParticipant:this.participant,participant:this.meeting.self})},autoPlay:!0,muted:!0,id:"screen-share-video-"+this.participant.id})),r("div",{id:"controls",key:"controls"},!this.hideFullScreenButton&&!i&&h()&&r("rtk-tooltip",{key:"7cd30b509e71685bb28615fd0eeb289764bc6f4b",label:o},r("rtk-button",{key:"0610dd55ad5a29cdbb77c61ed024253a70c66020",id:"full-screen-btn",kind:"icon",onClick:this.toggleFullScreen,title:o},r("rtk-icon",{key:"1ea3a04938cb5836afcf171fa881916f1a63da79",icon:n,"aria-hidden":!0,tabIndex:-1})))),i&&r("div",{id:"self-message",key:"self-message"},r("h3",{key:"4758cad86ab2453cbfbf9276e9db8f4f45889e4a"},this.t("screenshare.shared")),r("div",{key:"136f80c0f74bbc9d860dfc9a5f2f04531dc9fe80",class:"actions"},null!=this.meeting&&r("rtk-button",{key:"2588174e0054805565c0ae9d3d7001d812c25d6c",variant:"danger",onClick:()=>{this.meeting.self.disableScreenShare()}},r("rtk-icon",{key:"10de1c2c538cc069d5ea9c4a8e89699cdb06e970",icon:this.iconPack.share_screen_stop,slot:"start"}),this.t("screenshare.stop")),null!=this.meeting&&r("rtk-button",{key:"916802524a950adadd39eac97660d05034840a8b",variant:"secondary",disabled:this.isSwitchingScreen,onClick:this.shareDifferentScreen},r("rtk-icon",{key:"5142a5fe580a7c900d7435e5c638bef0533a289b",icon:null!==(a=this.iconPack.share_screen_different)&&void 0!==a?a:this.iconPack.share_screen_start,slot:"start"}),this.t("screenshare.share_different_screen")),r("rtk-button",{key:"6b024ca8b2b537b84862f96f35ab1e2a9832c974",variant:"secondary",id:"expand-btn",onClick:()=>{this.videoExpanded=!this.videoExpanded}},r("rtk-icon",{key:"aef5ba226ba681c6ec6d11f0ac78c03329a88f27",icon:this.videoExpanded?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize,slot:"start"}),this.t(this.videoExpanded?"screenshare.min_preview":"screenshare.max_preview")))),r("slot",{key:"f21ad85d1847864f268d1fa33235467f14de2420"}))}get host(){return this}static get watchers(){return{participant:[{participantChanged:0}]}}static get style(){return":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{height:100%;width:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));container-type:inline-size;container-name:screentile}::slotted(rtk-name-tag){position:absolute;left:var(--rtk-space-3, 12px);bottom:var(--rtk-space-3, 12px);opacity:0.8}#video-container{position:absolute;display:block;height:100%;width:100%}#video-container .fit-in-container{-o-object-fit:fill;object-fit:fill}video{height:100%;width:100%;-o-object-fit:contain;object-fit:contain}:host([variant='gradient']) ::slotted(rtk-audio-visualizer){position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px)}:host([variant='gradient']) ::slotted(rtk-name-tag){bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);display:flex;width:100%;align-items:center;justify-content:center;text-align:center;background-color:transparent;background-image:linear-gradient(to top, var(--tw-gradient-stops));--tw-gradient-from:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-gradient-to:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:transparent}:host([size='sm'][variant='gradient']) ::slotted(rtk-audio-visualizer){height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}video.visible{animation:video-fadein 0.4s ease}#controls{display:none;position:absolute;top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);align-items:center;justify-content:flex-end;gap:var(--rtk-space-2, 8px)}:host(:hover) #controls,:host(:active) #controls,:host(:focus-visible) #controls{display:flex}#full-screen-btn{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}h3{margin-top:var(--rtk-space-10, 40px);margin-bottom:var(--rtk-space-6, 24px);text-align:center;font-size:20px;font-weight:500}:host([size='sm']) h3{font-size:16px}#self-message{padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host(.isSelf) #self-view{flex:1 1 0%}:host(.isSelf) #video-container{position:static;aspect-ratio:auto;height:auto;width:50%;max-width:var(--rtk-space-96, 384px);border-radius:var(--rtk-border-radius-md, 8px);transition:0.6s ease}:host(.isSelf) #video-container.expand{width:60%;max-width:100%}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--rtk-space-2, 8px)}:host([size='sm'].isSelf) #video-container,:host([size='md'].isSelf) #video-container,:host([size='sm'].isSelf) #expand-btn,:host([size='md'].isSelf) #expand-btn{display:none}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.remote-control{z-index:10;height:100%;max-height:100%;flex:0 1 auto}#remote-control-self{position:absolute;top:var(--rtk-space-0, 0px);left:50%;z-index:10;width:-moz-max-content;width:max-content;max-width:100%;box-sizing:border-box;display:flex;height:var(--rtk-space-8, 32px);align-items:center;overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-1000, 255 255 255));transform:translateX(-50%)}#remote-control-self p{padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}#remote-control-self rtk-button{height:100%;border-radius:var(--rtk-border-radius-none, 0);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-bg-opacity));font-size:12px}:host([size='sm']) #remote-control-self{height:auto;flex-direction:column}:host([size='sm']) #remote-control-self rtk-button{width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}:host([name-tag-position='bottom-right']) ::slotted(rtk-name-tag){left:auto;right:var(--rtk-space-3, 12px)}:host([name-tag-position='bottom-center']) ::slotted(rtk-name-tag){left:auto;right:auto}:host([name-tag-position='top-left']) ::slotted(rtk-name-tag){top:var(--rtk-space-3, 12px);bottom:auto}:host([name-tag-position='top-right']) ::slotted(rtk-name-tag){top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);left:auto;bottom:auto}:host([name-tag-position='top-center']) ::slotted(rtk-name-tag){left:auto;right:auto;bottom:auto;top:var(--rtk-space-3, 12px)}@keyframes video-fadein{0%{opacity:0;transform:scale(1.4) translateY(20px)}100%{opacity:1;transform:scale(1) translateY(0)}}::slotted(rtk-network-indicator){position:absolute;right:var(--rtk-space-3, 12px);bottom:var(--rtk-space-3, 12px)}@media only screen and (max-height: 480px) and (orientation: landscape){:host([size='sm'][variant='solid']) ::slotted(rtk-name-tag),:host([size='sm'][variant='solid']) rtk-name-tag{left:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);border-radius:var(--rtk-border-radius-none, 0);transform-origin:0% 110%;transform:scale(0.6)}}@container screentile (max-width: 400px){::slotted(rtk-name-tag){transform-origin:0 130%;transform:scale(0.7)}}"}},[257,"rtk-screenshare-view",{hideFullScreenButton:[4,"hide-full-screen-button"],nameTagPosition:[513,"name-tag-position"],participant:[16],meeting:[16],variant:[513],size:[513],iconPack:[16],t:[16],videoExpanded:[32],screenShareEnabled:[32],isSwitchingScreen:[32],isFullScreen:[32],remoteControlInfo:[32]},void 0,{participant:[{participantChanged:0}]}]);function u(){"undefined"!=typeof customElements&&["rtk-screenshare-view","rtk-button","rtk-icon","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-screenshare-view":customElements.get(o(t))||customElements.define(o(t),m);break;case"rtk-button":customElements.get(o(t))||k();break;case"rtk-icon":customElements.get(o(t))||g();break;case"rtk-tooltip":customElements.get(o(t))||b()}}))}v([f()],m.prototype,"meeting",void 0),v([f()],m.prototype,"iconPack",void 0),v([f()],m.prototype,"t",void 0),u();const x=m,w=u;export{x as RtkScreenshareView,w as defineCustomElement}
|
|
1
|
+
import{p as t,H as e,c as a,w as i,h as r,d as s,t as o}from"./p-BBHQOrFK.js";import{e as n,i as c}from"./p-D4GSX-co.js";import{i as d,r as l,e as p,a as h}from"./p-GSFejkz7.js";import{S as b}from"./p-C8uVSyiQ.js";import{d as f}from"./p-D6vw6bT2.js";import{d as k}from"./p-BYIBbfJ8.js";import{d as g}from"./p-DHSRRtn3.js";var v=function(t,e,a,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,a,o):r(e,a))||o);return s>3&&o&&Object.defineProperty(e,a,o),o};const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=a(this,"rtkStateUpdate",7),this.play=a(this,"screensharePlay",7),this.screenShareListener=({screenShareEnabled:t,screenShareTracks:e})=>{const a=t&&null!=e.video;i((()=>{this.screenShareEnabled=a}))},this.onVideoRef=t=>{var e;null!=t&&t!==this.videoEl&&(this.videoEl=t,null===(e=this.participant)||void 0===e||e.registerScreenshareVideoElement(t))},this.fullScreenListener=()=>{this.isFullScreen=d()},this.participantScreenshareUpdate=t=>{t.id===this.participant.id&&this.screenShareListener(t)},this.hideFullScreenButton=!1,this.nameTagPosition="bottom-left",this.variant="solid",this.iconPack=n,this.t=c(),this.videoExpanded=!1,this.screenShareEnabled=!1,this.isSwitchingScreen=!1,this.isFullScreen=!1,this.shareDifferentScreen=async()=>{const t=this.meeting;if(null!=t&&!this.isSwitchingScreen){this.isSwitchingScreen=!0;try{await t.self.enableScreenShare()}catch(e){t.__internals__.logger.error("rtkScreenshareView::shareDifferentScreen",{error:e})}finally{this.isSwitchingScreen=!1}}},this.toggleFullScreen=()=>{this.isFullScreen?(p(),this.isFullScreen=!1):(l(this.host),this.isFullScreen=!0)}}connectedCallback(){null===window||void 0===window||window.addEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.addEventListener("webkitfullscreenchange",this.fullScreenListener),this.participantChanged(this.participant)}disconnectedCallback(){this.cleanupParticipant(this.participant),null===window||void 0===window||window.removeEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.removeEventListener("webkitfullscreenchange",this.fullScreenListener)}participantChanged(t,e){this.cleanupParticipant(e),null!=t&&(this.videoEl&&t.registerScreenshareVideoElement(this.videoEl),this.meeting&&(this.screenShareListener(t),t.id===this.meeting.self.id?t.addListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.addListener("screenShareUpdate",this.participantScreenshareUpdate)))}cleanupParticipant(t){null!=t&&(this.videoEl&&t.deregisterScreenshareVideoElement(this.videoEl),this.meeting&&(t.id===this.meeting.self.id?t.removeListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.removeListener("screenShareUpdate",this.participantScreenshareUpdate)))}render(){var t,e,a;const i=(null===(t=this.participant)||void 0===t?void 0:t.id)===(null===(e=this.meeting)||void 0===e?void 0:e.self.id),o=this.t(this.isFullScreen?"full_screen.exit":"full_screen"),n=this.isFullScreen?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize;return r(s,{key:"194efb9fa8783a441c8050ebab07a2d3546446bf",class:{isSelf:i}},r("div",{key:"video-container",id:"video-container",class:{expand:this.videoExpanded}},r("video",{key:"de008c1a856ba19e766c03b71b1be492a9975261",ref:this.onVideoRef,class:{visible:this.screenShareEnabled,"fit-in-container":this.participant.supportsRemoteControl},playsInline:!0,onPlay:()=>{this.play.emit({screenshareParticipant:this.participant,participant:this.meeting.self})},autoPlay:!0,muted:!0,id:"screen-share-video-"+this.participant.id})),r("div",{id:"controls",key:"controls"},!this.hideFullScreenButton&&!i&&h()&&r("rtk-tooltip",{key:"bf9a96bcba99bb9cf13bbcf572e5a9b71d53498b",label:o},r("rtk-button",{key:"06a5eb9396056114d9e1a339454e782b9c533a9b",id:"full-screen-btn",kind:"icon",onClick:this.toggleFullScreen,title:o},r("rtk-icon",{key:"fa4e499769a910ceb9b2bffa6668db83adbad135",icon:n,"aria-hidden":!0,tabIndex:-1})))),i&&r("div",{id:"self-message",key:"self-message"},r("h3",{key:"1650592e64dd44004a53ccc168ab7138c78ea7f4"},this.t("screenshare.shared")),r("div",{key:"d09216ab62012e1d2d445b8f080ae18786fc197e",class:"actions"},null!=this.meeting&&r("rtk-button",{key:"f4e8c65eaaf40190eb566eb473d7932411731793",variant:"danger",onClick:()=>{this.meeting.self.disableScreenShare()}},r("rtk-icon",{key:"215fd1e658442e6f9c70ee5f7cabcd22e0901886",icon:this.iconPack.share_screen_stop,slot:"start"}),this.t("screenshare.stop")),null!=this.meeting&&r("rtk-button",{key:"a73b3774901661020ef20e9e48dc81a4277cc471",variant:"secondary",disabled:this.isSwitchingScreen,onClick:this.shareDifferentScreen},r("rtk-icon",{key:"f9a4304e8cb648f5f2ca6ee650f6b512e86f1833",icon:null!==(a=this.iconPack.share_screen_different)&&void 0!==a?a:this.iconPack.share_screen_start,slot:"start"}),this.t("screenshare.share_different_screen")),r("rtk-button",{key:"b2f93bd50018b9a727860014d0d4c33ab8a23334",variant:"secondary",id:"expand-btn",onClick:()=>{this.videoExpanded=!this.videoExpanded}},r("rtk-icon",{key:"40d5bb9a3dfc648035b946ced0c584b3a6312100",icon:this.videoExpanded?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize,slot:"start"}),this.t(this.videoExpanded?"screenshare.min_preview":"screenshare.max_preview")))),r("slot",{key:"a2908fef4320f0bf4408a6a07d2ba4bea0acdc4c"}))}get host(){return this}static get watchers(){return{participant:[{participantChanged:0}]}}static get style(){return":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{height:100%;width:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));container-type:inline-size;container-name:screentile}::slotted(rtk-name-tag){position:absolute;left:var(--rtk-space-3, 12px);bottom:var(--rtk-space-3, 12px);opacity:0.8}#video-container{position:absolute;display:block;height:100%;width:100%}#video-container .fit-in-container{-o-object-fit:fill;object-fit:fill}video{height:100%;width:100%;-o-object-fit:contain;object-fit:contain}:host([variant='gradient']) ::slotted(rtk-audio-visualizer){position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px)}:host([variant='gradient']) ::slotted(rtk-name-tag){bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);display:flex;width:100%;align-items:center;justify-content:center;text-align:center;background-color:transparent;background-image:linear-gradient(to top, var(--tw-gradient-stops));--tw-gradient-from:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-gradient-to:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:transparent}:host([size='sm'][variant='gradient']) ::slotted(rtk-audio-visualizer){height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}video.visible{animation:video-fadein 0.4s ease}#controls{display:none;position:absolute;top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);align-items:center;justify-content:flex-end;gap:var(--rtk-space-2, 8px)}:host(:hover) #controls,:host(:active) #controls,:host(:focus-visible) #controls{display:flex}#full-screen-btn{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}h3{margin-top:var(--rtk-space-10, 40px);margin-bottom:var(--rtk-space-6, 24px);text-align:center;font-size:20px;font-weight:500}:host([size='sm']) h3{font-size:16px}#self-message{padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host(.isSelf) #self-view{flex:1 1 0%}:host(.isSelf) #video-container{position:static;aspect-ratio:auto;height:auto;width:50%;max-width:var(--rtk-space-96, 384px);border-radius:var(--rtk-border-radius-md, 8px);transition:0.6s ease}:host(.isSelf) #video-container.expand{width:60%;max-width:100%}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--rtk-space-2, 8px)}:host([size='sm'].isSelf) #video-container,:host([size='md'].isSelf) #video-container,:host([size='sm'].isSelf) #expand-btn,:host([size='md'].isSelf) #expand-btn{display:none}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.remote-control{z-index:10;height:100%;max-height:100%;flex:0 1 auto}#remote-control-self{position:absolute;top:var(--rtk-space-0, 0px);left:50%;z-index:10;width:-moz-max-content;width:max-content;max-width:100%;box-sizing:border-box;display:flex;height:var(--rtk-space-8, 32px);align-items:center;overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-1000, 255 255 255));transform:translateX(-50%)}#remote-control-self p{padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}#remote-control-self rtk-button{height:100%;border-radius:var(--rtk-border-radius-none, 0);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-bg-opacity));font-size:12px}:host([size='sm']) #remote-control-self{height:auto;flex-direction:column}:host([size='sm']) #remote-control-self rtk-button{width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}:host([name-tag-position='bottom-right']) ::slotted(rtk-name-tag){left:auto;right:var(--rtk-space-3, 12px)}:host([name-tag-position='bottom-center']) ::slotted(rtk-name-tag){left:auto;right:auto}:host([name-tag-position='top-left']) ::slotted(rtk-name-tag){top:var(--rtk-space-3, 12px);bottom:auto}:host([name-tag-position='top-right']) ::slotted(rtk-name-tag){top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);left:auto;bottom:auto}:host([name-tag-position='top-center']) ::slotted(rtk-name-tag){left:auto;right:auto;bottom:auto;top:var(--rtk-space-3, 12px)}@keyframes video-fadein{0%{opacity:0;transform:scale(1.4) translateY(20px)}100%{opacity:1;transform:scale(1) translateY(0)}}::slotted(rtk-network-indicator){position:absolute;right:var(--rtk-space-3, 12px);bottom:var(--rtk-space-3, 12px)}@media only screen and (max-height: 480px) and (orientation: landscape){:host([size='sm'][variant='solid']) ::slotted(rtk-name-tag),:host([size='sm'][variant='solid']) rtk-name-tag{left:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);border-radius:var(--rtk-border-radius-none, 0);transform-origin:0% 110%;transform:scale(0.6)}}@container screentile (max-width: 400px){::slotted(rtk-name-tag){transform-origin:0 130%;transform:scale(0.7)}}"}},[257,"rtk-screenshare-view",{hideFullScreenButton:[4,"hide-full-screen-button"],nameTagPosition:[513,"name-tag-position"],participant:[16],meeting:[16],variant:[513],size:[513],iconPack:[16],t:[16],videoExpanded:[32],screenShareEnabled:[32],isSwitchingScreen:[32],isFullScreen:[32],remoteControlInfo:[32]},void 0,{participant:[{participantChanged:0}]}]);function u(){"undefined"!=typeof customElements&&["rtk-screenshare-view","rtk-button","rtk-icon","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-screenshare-view":customElements.get(o(t))||customElements.define(o(t),m);break;case"rtk-button":customElements.get(o(t))||f();break;case"rtk-icon":customElements.get(o(t))||k();break;case"rtk-tooltip":customElements.get(o(t))||g()}}))}v([b()],m.prototype,"meeting",void 0),v([b()],m.prototype,"iconPack",void 0),v([b()],m.prototype,"t",void 0),u();const x=m,w=u;export{x as RtkScreenshareView,w as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,c as s,h as o,d as
|
|
1
|
+
import{t,p as e,H as i,c as s,h as o,d as r}from"./p-BBHQOrFK.js";import"./p-Rq_6y0HI.js";import{m as n,r as h,p as a}from"./p-CqIpJqLB.js";import{e as d,i as c,c as p,f as g,u as m,b as l}from"./p-D4GSX-co.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{g as u}from"./p-Cj-LCS8F.js";import{g as f}from"./p-vBfDtD_u.js";const v=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.statesUpdate=s(this,"rtkStatesUpdate",7),this.peerStore=null,this.providerId="provider-"+Math.floor(100*Math.random()),this.meeting=null,this.iconPack=d,this.t=c(),this.config=p(),this.mode="fixed",this.showSetupScreen=!1,this.overrides=g,this.roomJoinedListener=()=>{this.updateStates({meeting:"joined",preJoinError:null})},this.waitlistedListener=()=>{this.updateStates({meeting:"waiting"})},this.roomLeftListener=({state:t})=>{"disconnected"!==t&&"failed"!==t&&this.updateStates({meeting:"ended",roomLeftState:t})},this.mediaPermissionUpdateListener=({kind:t,message:e})=>{!["audio","video"].includes(t)||"DENIED"!==e&&"SYSTEM_DENIED"!==e||!0===(this.peerStore||m).state.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),1e4)},this.handleChangingMeeting=t=>{this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},this.peerStore.state.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}}connectedCallback(){"undefined"!=typeof window&&(this.initErrorListener=t=>{const e=u(this.t,t.detail);e&&this.updateStates({preJoinError:e})},window.addEventListener("ClientError",this.initErrorListener)),this.setupStoreRequestListener(),this.meetingChanged(this.meeting),this.iconPackChanged(this.iconPack),this.tChanged(this.t),this.configChanged(this.config),this.overridesChanged(this.overrides)}disconnectedCallback(){window.removeEventListener("ClientError",this.initErrorListener),this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.meeting&&(this.meeting.self.removeListener("roomLeft",this.roomLeftListener),this.meeting.self.removeListener("roomJoined",this.roomJoinedListener),this.meeting.self.removeListener("waitlisted",this.waitlistedListener),this.meeting.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),this.meeting.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}updateStates(t){const e=this.peerStore||m,i=Object.assign({},e.state.states);e.state.states=n(i,t),this.statesUpdate.emit(e.state.states);const s=new CustomEvent("rtkStatesUpdate",{detail:e.state.states,bubbles:!0,composed:!0});this.host.dispatchEvent(s)}setupStateUpdateListener(){this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=t=>{this.updateStates(t.detail)},this.host.addEventListener("rtkStateUpdate",this.stateUpdateListener)}setupStoreRequestListener(){this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=t=>{if(!this.peerStore)return;const e=new CustomEvent("rtkProvideStore",{detail:{store:this.peerStore,requestId:t.detail.requestId}});document.dispatchEvent(e),t.stopPropagation()},this.host.addEventListener("rtkRequestStore",this.storeRequestListener)}meetingChanged(t,e){if(t&&(h(t),this.peerStore=l({meeting:t,config:this.config,iconPack:this.iconPack,t:this.t,providerId:this.providerId,overrides:n(Object.assign({},g),this.overrides)}),document.dispatchEvent(new CustomEvent("rtkPeerStoreReady",{detail:{peerId:t.self.id}}))),this.setupStateUpdateListener(),t){const i=this.peerStore||m;i.state.meeting=t,this.updateStates({viewType:t.meta.viewType,activeCaptions:e?!!i.state.states.activeCaptions:!!t.self.permissions.transcriptionEnabled}),t.self.addListener("roomJoined",this.roomJoinedListener),t.self.addListener("waitlisted",this.waitlistedListener),t.self.addListener("roomLeft",this.roomLeftListener),t.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),t.connectedMeetings.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.join().then((()=>{this.updateStates({preJoinError:null})})).catch((t=>{const{message:e,code:i}=f(this.t,t);this.updateStates({preJoinError:{message:e,code:i}})})),window.removeEventListener("ClientError",this.initErrorListener)}}iconPackChanged(t){this.peerStore&&(this.peerStore.state.iconPack=t)}tChanged(t){this.peerStore&&(this.peerStore.state.t=t)}configChanged(t){this.peerStore&&(this.peerStore.state.config=t),(null==t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||m).state.states.activeDebugger&&a(document.documentElement,t.designTokens)}overridesChanged(t){this.peerStore&&(this.peerStore.state.overrides=n(Object.assign({},g),t))}render(){return this.meeting?o(r,null,o("slot",null)):null}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}}static get style(){return":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;position:fixed;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);height:100%;width:100%}:host([mode='fill']){position:relative}"}},[260,"rtk-ui-provider",{meeting:[16],iconPack:[16],t:[16],config:[16],mode:[513],showSetupScreen:[4,"show-setup-screen"],overrides:[16]},void 0,{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}]);function k(){"undefined"!=typeof customElements&&["rtk-ui-provider"].forEach((e=>{"rtk-ui-provider"===e&&(customElements.get(t(e))||customElements.define(t(e),v))}))}k();const C=v,b=k;export{C as RtkUiProvider,b as defineCustomElement}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createDefaultConfig } from './ui-store-Bx-7w8Yb.js';
|
|
2
|
-
import { m as merge, i as isValidHexColor } from './
|
|
2
|
+
import { m as merge, i as isValidHexColor } from './ui-kit-metadata-BfDGhHU-.js';
|
|
3
3
|
import { i as isLiveStreamHost } from './livestream-C0vp-Q7v.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { B as BreakoutRoomsManager } from './breakout-rooms-manager-DKvL7M6E.js';
|
|
2
|
-
export { p as provideRtkDesignSystem } from './
|
|
3
|
-
import { g as generateConfig } from './config-
|
|
4
|
-
export { e as extendConfig } from './config-
|
|
2
|
+
export { p as provideRtkDesignSystem, s as setUiKitSdkName } from './ui-kit-metadata-BfDGhHU-.js';
|
|
3
|
+
import { g as generateConfig } from './config-CvBBWjUo.js';
|
|
4
|
+
export { e as extendConfig } from './config-CvBBWjUo.js';
|
|
5
5
|
import { c as createDefaultConfig } from './ui-store-Bx-7w8Yb.js';
|
|
6
6
|
export { b as createPeerStore, d as defaultConfig, e as defaultIconPack, h as defaultLanguage, f as defaultOverrides, g as getInitialStates, a as uiState, u as uiStore, i as useLanguage } from './ui-store-Bx-7w8Yb.js';
|
|
7
7
|
export { R as RtkNotificationsAudio } from './notification-DZgheLdK.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -9911,6 +9911,37 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
9911
9911
|
baseMerge(object, source, srcIndex);
|
|
9912
9912
|
});
|
|
9913
9913
|
|
|
9914
|
+
/**
|
|
9915
|
+
* The literal below is replaced with the released package version by `prepublish.js`.
|
|
9916
|
+
* Builds that are not published (local, dev) report it as is.
|
|
9917
|
+
*/
|
|
9918
|
+
const UI_KIT_VERSION = '2.2.0-staging.1';
|
|
9919
|
+
/**
|
|
9920
|
+
* The wrapper packages load components from the loader bundle, which carries its own copy of
|
|
9921
|
+
* this module, separate from the copy behind the main entry. The registered symbol is the one
|
|
9922
|
+
* slot both copies can see.
|
|
9923
|
+
*/
|
|
9924
|
+
const SDK_NAME_KEY = Symbol.for('rtk.uikit.sdkName');
|
|
9925
|
+
const sdkNameSlot = globalThis;
|
|
9926
|
+
function getUiKitSdkName() {
|
|
9927
|
+
var _a;
|
|
9928
|
+
return (_a = sdkNameSlot[SDK_NAME_KEY]) !== null && _a !== void 0 ? _a : 'html';
|
|
9929
|
+
}
|
|
9930
|
+
/** Tells the core SDK which UI Kit package and version is driving the meeting. */
|
|
9931
|
+
function reportUiKitMetadata(meeting) {
|
|
9932
|
+
var _a, _b;
|
|
9933
|
+
try {
|
|
9934
|
+
// Older core SDK versions do not have this method
|
|
9935
|
+
(_b = (_a = meeting === null || meeting === void 0 ? void 0 : meeting.__internals__) === null || _a === void 0 ? void 0 : _a.setUiKitMetadata) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
9936
|
+
sdkVersion: UI_KIT_VERSION,
|
|
9937
|
+
sdkName: getUiKitSdkName(),
|
|
9938
|
+
});
|
|
9939
|
+
}
|
|
9940
|
+
catch (_c) {
|
|
9941
|
+
// Reporting must never break the meeting
|
|
9942
|
+
}
|
|
9943
|
+
}
|
|
9944
|
+
|
|
9914
9945
|
/**
|
|
9915
9946
|
* Computes selectors and returns them based on their priority.
|
|
9916
9947
|
*/
|
|
@@ -15037,6 +15068,7 @@ const RtkMeeting = class {
|
|
|
15037
15068
|
var _a, _b;
|
|
15038
15069
|
if (!meeting)
|
|
15039
15070
|
return;
|
|
15071
|
+
reportUiKitMetadata(meeting);
|
|
15040
15072
|
// Create peer specific store for this meeting peer instance
|
|
15041
15073
|
if (meeting) {
|
|
15042
15074
|
this.peerStore = createPeerStore({
|
|
@@ -23648,6 +23680,19 @@ const RtkScreenshareView = class {
|
|
|
23648
23680
|
registerInstance(this, hostRef);
|
|
23649
23681
|
this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
|
|
23650
23682
|
this.play = createEvent(this, "screensharePlay", 7);
|
|
23683
|
+
this.screenShareListener = ({ screenShareEnabled, screenShareTracks, }) => {
|
|
23684
|
+
const enabled = screenShareEnabled && screenShareTracks.video != null;
|
|
23685
|
+
writeTask(() => {
|
|
23686
|
+
this.screenShareEnabled = enabled;
|
|
23687
|
+
});
|
|
23688
|
+
};
|
|
23689
|
+
this.onVideoRef = (el) => {
|
|
23690
|
+
var _a;
|
|
23691
|
+
if (el == null || el === this.videoEl)
|
|
23692
|
+
return;
|
|
23693
|
+
this.videoEl = el;
|
|
23694
|
+
(_a = this.participant) === null || _a === void 0 ? void 0 : _a.registerScreenshareVideoElement(el);
|
|
23695
|
+
};
|
|
23651
23696
|
this.fullScreenListener = () => {
|
|
23652
23697
|
this.isFullScreen = isFullScreenEnabled();
|
|
23653
23698
|
};
|
|
@@ -23699,47 +23744,40 @@ const RtkScreenshareView = class {
|
|
|
23699
23744
|
connectedCallback() {
|
|
23700
23745
|
window === null || window === void 0 ? void 0 : window.addEventListener('fullscreenchange', this.fullScreenListener);
|
|
23701
23746
|
window === null || window === void 0 ? void 0 : window.addEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
23702
|
-
}
|
|
23703
|
-
componentDidLoad() {
|
|
23704
23747
|
this.participantChanged(this.participant);
|
|
23705
23748
|
}
|
|
23706
23749
|
disconnectedCallback() {
|
|
23750
|
+
this.cleanupParticipant(this.participant);
|
|
23751
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('fullscreenchange', this.fullScreenListener);
|
|
23752
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
23753
|
+
}
|
|
23754
|
+
participantChanged(participant, oldParticipant) {
|
|
23755
|
+
// The SDK ignores a video element that another participant still manages
|
|
23756
|
+
this.cleanupParticipant(oldParticipant);
|
|
23757
|
+
if (participant == null)
|
|
23758
|
+
return;
|
|
23759
|
+
// On first load the video element is registered once it renders, see onVideoRef
|
|
23760
|
+
if (this.videoEl)
|
|
23761
|
+
participant.registerScreenshareVideoElement(this.videoEl);
|
|
23707
23762
|
if (!this.meeting)
|
|
23708
23763
|
return;
|
|
23709
|
-
|
|
23710
|
-
if (
|
|
23711
|
-
|
|
23764
|
+
this.screenShareListener(participant);
|
|
23765
|
+
if (participant.id === this.meeting.self.id)
|
|
23766
|
+
participant.addListener('screenShareUpdate', this.screenShareListener);
|
|
23712
23767
|
else
|
|
23713
|
-
this.meeting.participants.joined.
|
|
23714
|
-
window === null || window === void 0 ? void 0 : window.removeEventListener('fullscreenchange', this.fullScreenListener);
|
|
23715
|
-
window === null || window === void 0 ? void 0 : window.removeEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
23768
|
+
this.meeting.participants.joined.addListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
23716
23769
|
}
|
|
23717
|
-
|
|
23718
|
-
if (participant
|
|
23719
|
-
|
|
23720
|
-
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
|
|
23728
|
-
if (this.videoEl != null) {
|
|
23729
|
-
this.videoEl.srcObject = stream;
|
|
23730
|
-
this.videoEl.play();
|
|
23731
|
-
}
|
|
23732
|
-
}
|
|
23733
|
-
else if (this.videoEl != null) {
|
|
23734
|
-
this.videoEl.srcObject = undefined;
|
|
23735
|
-
}
|
|
23736
|
-
};
|
|
23737
|
-
this.screenShareListener(participant);
|
|
23738
|
-
if (participant.id === self.id)
|
|
23739
|
-
participant.addListener('screenShareUpdate', this.screenShareListener);
|
|
23740
|
-
else
|
|
23741
|
-
this.meeting.participants.joined.addListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
23742
|
-
}
|
|
23770
|
+
cleanupParticipant(participant) {
|
|
23771
|
+
if (participant == null)
|
|
23772
|
+
return;
|
|
23773
|
+
if (this.videoEl)
|
|
23774
|
+
participant.deregisterScreenshareVideoElement(this.videoEl);
|
|
23775
|
+
if (!this.meeting)
|
|
23776
|
+
return;
|
|
23777
|
+
if (participant.id === this.meeting.self.id)
|
|
23778
|
+
participant.removeListener('screenShareUpdate', this.screenShareListener);
|
|
23779
|
+
else
|
|
23780
|
+
this.meeting.participants.joined.removeListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
23743
23781
|
}
|
|
23744
23782
|
render() {
|
|
23745
23783
|
var _a, _b, _c;
|
|
@@ -23748,7 +23786,7 @@ const RtkScreenshareView = class {
|
|
|
23748
23786
|
const icon = this.isFullScreen
|
|
23749
23787
|
? this.iconPack.full_screen_minimize
|
|
23750
23788
|
: this.iconPack.full_screen_maximize;
|
|
23751
|
-
return (h(Host, { key: '
|
|
23789
|
+
return (h(Host, { key: '194efb9fa8783a441c8050ebab07a2d3546446bf', class: { isSelf } }, h("div", { key: "video-container", id: "video-container", class: { expand: this.videoExpanded } }, h("video", { key: 'de008c1a856ba19e766c03b71b1be492a9975261', ref: this.onVideoRef, class: {
|
|
23752
23790
|
visible: this.screenShareEnabled,
|
|
23753
23791
|
'fit-in-container': this.participant.supportsRemoteControl,
|
|
23754
23792
|
}, playsInline: true, onPlay: () => {
|
|
@@ -23756,15 +23794,15 @@ const RtkScreenshareView = class {
|
|
|
23756
23794
|
screenshareParticipant: this.participant,
|
|
23757
23795
|
participant: this.meeting.self,
|
|
23758
23796
|
});
|
|
23759
|
-
}, autoPlay: true, muted: true, id: `screen-share-video-${this.participant.id}` })), h("div", { id: "controls", key: "controls" }, !this.hideFullScreenButton && !isSelf && isFullScreenSupported() && (h("rtk-tooltip", { key: '
|
|
23797
|
+
}, autoPlay: true, muted: true, id: `screen-share-video-${this.participant.id}` })), h("div", { id: "controls", key: "controls" }, !this.hideFullScreenButton && !isSelf && isFullScreenSupported() && (h("rtk-tooltip", { key: 'bf9a96bcba99bb9cf13bbcf572e5a9b71d53498b', label: text }, h("rtk-button", { key: '06a5eb9396056114d9e1a339454e782b9c533a9b', id: "full-screen-btn", kind: "icon", onClick: this.toggleFullScreen, title: text }, h("rtk-icon", { key: 'fa4e499769a910ceb9b2bffa6668db83adbad135', icon: icon, "aria-hidden": true, tabIndex: -1 }))))), isSelf && (h("div", { id: "self-message", key: "self-message" }, h("h3", { key: '1650592e64dd44004a53ccc168ab7138c78ea7f4' }, this.t('screenshare.shared')), h("div", { key: 'd09216ab62012e1d2d445b8f080ae18786fc197e', class: "actions" }, this.meeting != null && (h("rtk-button", { key: 'f4e8c65eaaf40190eb566eb473d7932411731793', variant: "danger", onClick: () => {
|
|
23760
23798
|
this.meeting.self.disableScreenShare();
|
|
23761
|
-
} }, h("rtk-icon", { key: '
|
|
23799
|
+
} }, h("rtk-icon", { key: '215fd1e658442e6f9c70ee5f7cabcd22e0901886', icon: this.iconPack.share_screen_stop, slot: "start" }), this.t('screenshare.stop'))), this.meeting != null && (h("rtk-button", { key: 'a73b3774901661020ef20e9e48dc81a4277cc471', variant: "secondary", disabled: this.isSwitchingScreen, onClick: this.shareDifferentScreen }, h("rtk-icon", { key: 'f9a4304e8cb648f5f2ca6ee650f6b512e86f1833', icon: (_c = this.iconPack.share_screen_different) !== null && _c !== void 0 ? _c : this.iconPack.share_screen_start, slot: "start" }), this.t('screenshare.share_different_screen'))), h("rtk-button", { key: 'b2f93bd50018b9a727860014d0d4c33ab8a23334', variant: "secondary", id: "expand-btn", onClick: () => {
|
|
23762
23800
|
this.videoExpanded = !this.videoExpanded;
|
|
23763
|
-
} }, h("rtk-icon", { key: '
|
|
23801
|
+
} }, h("rtk-icon", { key: '40d5bb9a3dfc648035b946ced0c584b3a6312100', icon: this.videoExpanded
|
|
23764
23802
|
? this.iconPack.full_screen_minimize
|
|
23765
23803
|
: this.iconPack.full_screen_maximize, slot: "start" }), this.videoExpanded
|
|
23766
23804
|
? this.t('screenshare.min_preview')
|
|
23767
|
-
: this.t('screenshare.max_preview'))))), h("slot", { key: '
|
|
23805
|
+
: this.t('screenshare.max_preview'))))), h("slot", { key: 'a2908fef4320f0bf4408a6a07d2ba4bea0acdc4c' })));
|
|
23768
23806
|
}
|
|
23769
23807
|
get host() { return getElement(this); }
|
|
23770
23808
|
static get watchers() { return {
|
|
@@ -24990,6 +25028,7 @@ const RtkUiProvider = class {
|
|
|
24990
25028
|
}
|
|
24991
25029
|
meetingChanged(meeting, oldMeeting) {
|
|
24992
25030
|
if (meeting) {
|
|
25031
|
+
reportUiKitMetadata(meeting);
|
|
24993
25032
|
this.peerStore = createPeerStore({
|
|
24994
25033
|
meeting,
|
|
24995
25034
|
config: this.config,
|
|
@@ -6,9 +6,9 @@ import { h as handleFilesDataTransfer, M as MAX_TEXT_LENGTH, p as parseRichText,
|
|
|
6
6
|
import './breakout-rooms-manager-DKvL7M6E.js';
|
|
7
7
|
import './livestream-C0vp-Q7v.js';
|
|
8
8
|
import { g as getExtension, a as getFileSize, d as downloadFile } from './file-6Fkktc2w.js';
|
|
9
|
-
import { p as provideRtkDesignSystem, m as merge } from './
|
|
9
|
+
import { p as provideRtkDesignSystem, r as reportUiKitMetadata, m as merge } from './ui-kit-metadata-BfDGhHU-.js';
|
|
10
10
|
import { R as Render } from './index-BUsisVB6.js';
|
|
11
|
-
import { g as generateConfig } from './config-
|
|
11
|
+
import { g as generateConfig } from './config-CvBBWjUo.js';
|
|
12
12
|
import { i as index } from './ResizeObserver.es-FdeAvICb.js';
|
|
13
13
|
import { g as getInitErrorInfo } from './init-error-Cj-LCS8F.js';
|
|
14
14
|
import { g as getJoinErrorInfo } from './join-error-vBfDtD_u.js';
|
|
@@ -1590,6 +1590,7 @@ const RtkMeeting = class {
|
|
|
1590
1590
|
var _a, _b;
|
|
1591
1591
|
if (!meeting)
|
|
1592
1592
|
return;
|
|
1593
|
+
reportUiKitMetadata(meeting);
|
|
1593
1594
|
// Create peer specific store for this meeting peer instance
|
|
1594
1595
|
if (meeting) {
|
|
1595
1596
|
this.peerStore = createPeerStore({
|
|
@@ -20,6 +20,19 @@ const RtkScreenshareView = class {
|
|
|
20
20
|
registerInstance(this, hostRef);
|
|
21
21
|
this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
|
|
22
22
|
this.play = createEvent(this, "screensharePlay", 7);
|
|
23
|
+
this.screenShareListener = ({ screenShareEnabled, screenShareTracks, }) => {
|
|
24
|
+
const enabled = screenShareEnabled && screenShareTracks.video != null;
|
|
25
|
+
writeTask(() => {
|
|
26
|
+
this.screenShareEnabled = enabled;
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
this.onVideoRef = (el) => {
|
|
30
|
+
var _a;
|
|
31
|
+
if (el == null || el === this.videoEl)
|
|
32
|
+
return;
|
|
33
|
+
this.videoEl = el;
|
|
34
|
+
(_a = this.participant) === null || _a === void 0 ? void 0 : _a.registerScreenshareVideoElement(el);
|
|
35
|
+
};
|
|
23
36
|
this.fullScreenListener = () => {
|
|
24
37
|
this.isFullScreen = isFullScreenEnabled();
|
|
25
38
|
};
|
|
@@ -71,47 +84,40 @@ const RtkScreenshareView = class {
|
|
|
71
84
|
connectedCallback() {
|
|
72
85
|
window === null || window === void 0 ? void 0 : window.addEventListener('fullscreenchange', this.fullScreenListener);
|
|
73
86
|
window === null || window === void 0 ? void 0 : window.addEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
74
|
-
}
|
|
75
|
-
componentDidLoad() {
|
|
76
87
|
this.participantChanged(this.participant);
|
|
77
88
|
}
|
|
78
89
|
disconnectedCallback() {
|
|
90
|
+
this.cleanupParticipant(this.participant);
|
|
91
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('fullscreenchange', this.fullScreenListener);
|
|
92
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
93
|
+
}
|
|
94
|
+
participantChanged(participant, oldParticipant) {
|
|
95
|
+
// The SDK ignores a video element that another participant still manages
|
|
96
|
+
this.cleanupParticipant(oldParticipant);
|
|
97
|
+
if (participant == null)
|
|
98
|
+
return;
|
|
99
|
+
// On first load the video element is registered once it renders, see onVideoRef
|
|
100
|
+
if (this.videoEl)
|
|
101
|
+
participant.registerScreenshareVideoElement(this.videoEl);
|
|
79
102
|
if (!this.meeting)
|
|
80
103
|
return;
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
104
|
+
this.screenShareListener(participant);
|
|
105
|
+
if (participant.id === this.meeting.self.id)
|
|
106
|
+
participant.addListener('screenShareUpdate', this.screenShareListener);
|
|
84
107
|
else
|
|
85
|
-
this.meeting.participants.joined.
|
|
86
|
-
window === null || window === void 0 ? void 0 : window.removeEventListener('fullscreenchange', this.fullScreenListener);
|
|
87
|
-
window === null || window === void 0 ? void 0 : window.removeEventListener('webkitfullscreenchange', this.fullScreenListener);
|
|
108
|
+
this.meeting.participants.joined.addListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
88
109
|
}
|
|
89
|
-
|
|
90
|
-
if (participant
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (this.videoEl != null) {
|
|
101
|
-
this.videoEl.srcObject = stream;
|
|
102
|
-
this.videoEl.play();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else if (this.videoEl != null) {
|
|
106
|
-
this.videoEl.srcObject = undefined;
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
this.screenShareListener(participant);
|
|
110
|
-
if (participant.id === self.id)
|
|
111
|
-
participant.addListener('screenShareUpdate', this.screenShareListener);
|
|
112
|
-
else
|
|
113
|
-
this.meeting.participants.joined.addListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
114
|
-
}
|
|
110
|
+
cleanupParticipant(participant) {
|
|
111
|
+
if (participant == null)
|
|
112
|
+
return;
|
|
113
|
+
if (this.videoEl)
|
|
114
|
+
participant.deregisterScreenshareVideoElement(this.videoEl);
|
|
115
|
+
if (!this.meeting)
|
|
116
|
+
return;
|
|
117
|
+
if (participant.id === this.meeting.self.id)
|
|
118
|
+
participant.removeListener('screenShareUpdate', this.screenShareListener);
|
|
119
|
+
else
|
|
120
|
+
this.meeting.participants.joined.removeListener('screenShareUpdate', this.participantScreenshareUpdate);
|
|
115
121
|
}
|
|
116
122
|
render() {
|
|
117
123
|
var _a, _b, _c;
|
|
@@ -120,7 +126,7 @@ const RtkScreenshareView = class {
|
|
|
120
126
|
const icon = this.isFullScreen
|
|
121
127
|
? this.iconPack.full_screen_minimize
|
|
122
128
|
: this.iconPack.full_screen_maximize;
|
|
123
|
-
return (h(Host, { key: '
|
|
129
|
+
return (h(Host, { key: '194efb9fa8783a441c8050ebab07a2d3546446bf', class: { isSelf } }, h("div", { key: "video-container", id: "video-container", class: { expand: this.videoExpanded } }, h("video", { key: 'de008c1a856ba19e766c03b71b1be492a9975261', ref: this.onVideoRef, class: {
|
|
124
130
|
visible: this.screenShareEnabled,
|
|
125
131
|
'fit-in-container': this.participant.supportsRemoteControl,
|
|
126
132
|
}, playsInline: true, onPlay: () => {
|
|
@@ -128,15 +134,15 @@ const RtkScreenshareView = class {
|
|
|
128
134
|
screenshareParticipant: this.participant,
|
|
129
135
|
participant: this.meeting.self,
|
|
130
136
|
});
|
|
131
|
-
}, autoPlay: true, muted: true, id: `screen-share-video-${this.participant.id}` })), h("div", { id: "controls", key: "controls" }, !this.hideFullScreenButton && !isSelf && isFullScreenSupported() && (h("rtk-tooltip", { key: '
|
|
137
|
+
}, autoPlay: true, muted: true, id: `screen-share-video-${this.participant.id}` })), h("div", { id: "controls", key: "controls" }, !this.hideFullScreenButton && !isSelf && isFullScreenSupported() && (h("rtk-tooltip", { key: 'bf9a96bcba99bb9cf13bbcf572e5a9b71d53498b', label: text }, h("rtk-button", { key: '06a5eb9396056114d9e1a339454e782b9c533a9b', id: "full-screen-btn", kind: "icon", onClick: this.toggleFullScreen, title: text }, h("rtk-icon", { key: 'fa4e499769a910ceb9b2bffa6668db83adbad135', icon: icon, "aria-hidden": true, tabIndex: -1 }))))), isSelf && (h("div", { id: "self-message", key: "self-message" }, h("h3", { key: '1650592e64dd44004a53ccc168ab7138c78ea7f4' }, this.t('screenshare.shared')), h("div", { key: 'd09216ab62012e1d2d445b8f080ae18786fc197e', class: "actions" }, this.meeting != null && (h("rtk-button", { key: 'f4e8c65eaaf40190eb566eb473d7932411731793', variant: "danger", onClick: () => {
|
|
132
138
|
this.meeting.self.disableScreenShare();
|
|
133
|
-
} }, h("rtk-icon", { key: '
|
|
139
|
+
} }, h("rtk-icon", { key: '215fd1e658442e6f9c70ee5f7cabcd22e0901886', icon: this.iconPack.share_screen_stop, slot: "start" }), this.t('screenshare.stop'))), this.meeting != null && (h("rtk-button", { key: 'a73b3774901661020ef20e9e48dc81a4277cc471', variant: "secondary", disabled: this.isSwitchingScreen, onClick: this.shareDifferentScreen }, h("rtk-icon", { key: 'f9a4304e8cb648f5f2ca6ee650f6b512e86f1833', icon: (_c = this.iconPack.share_screen_different) !== null && _c !== void 0 ? _c : this.iconPack.share_screen_start, slot: "start" }), this.t('screenshare.share_different_screen'))), h("rtk-button", { key: 'b2f93bd50018b9a727860014d0d4c33ab8a23334', variant: "secondary", id: "expand-btn", onClick: () => {
|
|
134
140
|
this.videoExpanded = !this.videoExpanded;
|
|
135
|
-
} }, h("rtk-icon", { key: '
|
|
141
|
+
} }, h("rtk-icon", { key: '40d5bb9a3dfc648035b946ced0c584b3a6312100', icon: this.videoExpanded
|
|
136
142
|
? this.iconPack.full_screen_minimize
|
|
137
143
|
: this.iconPack.full_screen_maximize, slot: "start" }), this.videoExpanded
|
|
138
144
|
? this.t('screenshare.min_preview')
|
|
139
|
-
: this.t('screenshare.max_preview'))))), h("slot", { key: '
|
|
145
|
+
: this.t('screenshare.max_preview'))))), h("slot", { key: 'a2908fef4320f0bf4408a6a07d2ba4bea0acdc4c' })));
|
|
140
146
|
}
|
|
141
147
|
get host() { return getElement(this); }
|
|
142
148
|
static get watchers() { return {
|