1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[5729],{5729:function(e,t,i){i.r(t),i.d(t,{dyte_settings_audio:function(){return h},dyte_settings_video:function(){return f}});var n=i(4165),r=i(3433),o=i(5861),s=i(5671),a=i(3144),c=i(2304),d=i(5855),u=i(7622),l=i(4153),v=i(2274),h=(i(4130),function(){function e(t){var i=this;(0,s.Z)(this,e),(0,c.r)(this,t),this.stateUpdate=(0,c.c)(this,"dyteStateUpdate",7),this.stageStateListener=function(){i.updateCanProduce(i.meeting)},this.selfStageLeftListener=function(){i.canProduceAudio=!1},this.meeting=void 0,this.states=void 0,this.size=void 0,this.iconPack=d.d,this.t=(0,u.u)(),this.audioDevices=[],this.speakerDevices=[],this.canProduceAudio=!0}return(0,a.Z)(e,[{key:"connectedCallback",value:function(){this.meetingChanged(this.meeting)}},{key:"disconnectedCallback",value:function(){var e,t,i,n,r,o,s;null===(e=this.meeting)||void 0===e||e.self.removeListener("joinStageRequestAccepted",this.stageStateListener),null===(t=this.meeting)||void 0===t||t.self.removeListener("stageJoined",this.stageStateListener),null===(i=this.meeting)||void 0===i||i.self.removeListener("removedFromStage",this.stageStateListener),null===(r=null===(n=this.meeting)||void 0===n?void 0:n.stage)||void 0===r||r.removeListener("stageStatusUpdate",this.stageStateListener),null===(o=this.meeting)||void 0===o||o.self.removeListener("stageLeft",this.selfStageLeftListener),null===(s=this.meeting)||void 0===s||s.self.removeListener("joinStageRequestRejected",this.stageStateListener)}},{key:"updateCanProduce",value:function(e){var t=e.self,i=e.meta,n=e.stage,r="ALLOWED"===t.permissions.canProduceAudio,o="WEBINAR"===i.viewType,s="LIVESTREAM"===i.viewType;if(this.canProduceAudio=!1,r)this.canProduceAudio=!0;else if(o||s){"CAN_REQUEST"===t.permissions.canProduceAudio&&(o&&("ON_STAGE"===t.webinarStageStatus||"ACCEPTED_TO_JOIN_STAGE"===t.webinarStageStatus)||s&&("ON_STAGE"===n.status||"ACCEPTED_TO_JOIN_STAGE"===n.status))&&(this.canProduceAudio=!0)}}},{key:"meetingChanged",value:function(e){var t=this;null!=e&&(0,c.w)((0,o.Z)((0,n.Z)().mark((function i(){var o,s,a,c,d,u,l,v,h,f;return(0,n.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return d=e.self,u=e.stage,i.next=3,e.self.getAudioDevices();case 3:return l=i.sent,i.next=6,e.self.getSpeakerDevices();case 6:v=i.sent,h=null===(o=e.self.getCurrentDevices())||void 0===o?void 0:o.audio,f=null===(s=e.self.getCurrentDevices())||void 0===s?void 0:s.speaker,t.updateCanProduce(e),d.addListener("joinStageRequestAccepted",t.stageStateListener),d.addListener("stageJoined",t.stageStateListener),d.addListener("removedFromStage",t.stageStateListener),null===u||void 0===u||u.addListener("stageStatusUpdate",t.stageStateListener),d.addListener("stageLeft",t.selfStageLeftListener),d.addListener("joinStageRequestRejected",t.stageStateListener),t.audioDevices=void 0!=h?[null!==(a=l.find((function(e){return e.deviceId===h.deviceId})))&&void 0!==a?a:h].concat((0,r.Z)(l.filter((function(e){return e.deviceId!==h.deviceId})))):l,t.speakerDevices=void 0!=f?[null!==(c=v.find((function(e){return e.deviceId===f.deviceId})))&&void 0!==c?c:f].concat((0,r.Z)(v.filter((function(e){return e.deviceId!==f.deviceId})))):v;case 18:case"end":return i.stop()}}),i)}))))}},{key:"testAudio",value:function(){var e;null===(e=this.testAudioEl)||void 0===e||e.play()}},{key:"setDevice",value:function(e,t){var i,n,r="audio"===e?this.audioDevices.find((function(e){return e.deviceId===t})):this.speakerDevices.find((function(e){return e.deviceId===t}));null!=r&&(null===(i=this.meeting)||void 0===i||i.self.setDevice(r),"audiooutput"===r.kind&&(null===(n=this.testAudioEl)||void 0===n||n.setSinkId(r.deviceId)))}},{key:"render",value:function(){var e,t,i,n=this;if(null==this.meeting)return null;var r=0,o=0,s=null===(e=this.meeting)||void 0===e?void 0:e.self.getCurrentDevices(),a=this.states||v.s,d=!0===(null===(t=null===a||void 0===a?void 0:a.prefs)||void 0===t?void 0:t.muteNotificationSounds)||"true"===(0,l.a)("mute-notification-sounds");return(0,c.h)(c.H,null,(0,c.h)("audio",{preload:"auto",src:"https://assets.dyte.io/ui-kit/speaker-test.mp3",ref:function(e){return n.testAudioEl=e}}),this.canProduceAudio&&(0,c.h)("div",{class:"group",part:"microphone-selection"},(0,c.h)("label",null,"Microphone (input)"),(0,c.h)("div",{class:"row"},(0,c.h)("select",{class:"dyte-select",onChange:function(e){return n.setDevice("audio",e.target.value)}},this.audioDevices.map((function(e){var t,i=e.deviceId,n=e.label;return(0,c.h)("option",{value:i,selected:(null===(t=s.audio)||void 0===t?void 0:t.deviceId)===i},n||"Microphone ".concat(++r))}))),(0,c.h)("dyte-audio-visualizer",{participant:null===(i=this.meeting)||void 0===i?void 0:i.self,iconPack:this.iconPack,t:this.t}))),(0,c.h)("div",{class:"group",part:"speaker-selection"},this.speakerDevices.length>0&&(0,c.h)("div",null,(0,c.h)("label",null,"Speaker (output)"),(0,c.h)("div",{class:"row"},(0,c.h)("select",{class:"dyte-select",onChange:function(e){return n.setDevice("speaker",e.target.value)}},this.speakerDevices.map((function(e){var t,i=e.deviceId,n=e.label;return(0,c.h)("option",{value:i,selected:(null===(t=s.speaker)||void 0===t?void 0:t.deviceId)===i},n||"Speaker ".concat(++o))}))))),(0,c.h)("dyte-button",{variant:"secondary",onClick:function(){return n.testAudio()},iconPack:this.iconPack,t:this.t},(0,c.h)("dyte-icon",{icon:this.iconPack.speaker,slot:"start",iconPack:this.iconPack,t:this.t}),"Test")),(0,c.h)("div",{class:"group",part:"notification-toggle"},(0,c.h)("div",{class:"row"},(0,c.h)("label",{htmlFor:"notification-toggle"},"Notification sound"),(0,c.h)("dyte-switch",{id:"notification-toggle",checked:!d,onDyteChange:function(e){var t,i=!e.target.checked;n.stateUpdate.emit({prefs:{muteNotificationSounds:i}}),v.s.prefs=Object.assign(Object.assign({},null!==(t=v.s.prefs)&&void 0!==t?t:{}),{muteNotificationSounds:i}),(0,l.s)("mute-notification-sounds",i)},iconPack:this.iconPack,t:this.t}))))}}],[{key:"watchers",get:function(){return{meeting:["meetingChanged"]}}}]),e}());h.style=":host{line-height:initial;font-family:var(--dyte-font-family, sans-serif)}.dyte-select{--tw-bg-opacity:1;background-color:rgba(var(--dyte-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--dyte-colors-text-1000, 255 255 255))}.dyte-select:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)}.dyte-select{display:block;border-radius:var(--dyte-border-radius-sm, 4px);border-width:var(--dyte-border-width-none, 0);border-style:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--dyte-space-3, 12px);font-size:16px;--icon-size:var(--dyte-select-chevron-size, var(--dyte-space-6, 24px));--icon-right-position:var(--dyte-select-chevron-right-position, var(--dyte-space-2, 8px));background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right var(--icon-right-position) center;background-repeat:no-repeat;background-size:var(--icon-size) var(--icon-size);padding-right:calc(var(--icon-right-position) * 5)}:host{display:flex;width:100%;flex-direction:column}audio{visibility:hidden}label{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:14px}.group{margin-top:var(--dyte-space-2, 8px);margin-bottom:var(--dyte-space-2, 8px)}.group>*{margin-bottom:var(--dyte-space-2, 8px)}.group>*:last-child{margin-bottom:var(--dyte-space-0, 0px)}.group select{flex:1 1 0%}.row{display:flex;align-items:center;justify-content:space-between;gap:var(--dyte-space-3, 12px)}.dyte-select{width:100%;max-width:100%}dyte-audio-visualizer{flex-shrink:0}dyte-button{border-radius:var(--dyte-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--dyte-colors-background-700, 44 44 44) / var(--tw-bg-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-sha
1dow)}dyte-button dyte-icon{margin-right:var(--dyte-space-2, 8px)}";var f=function(){function e(t){var i=this;(0,s.Z)(this,e),(0,c.r)(this,t),this.stateUpdate=(0,c.c)(this,"dyteStateUpdate",7),this.onVideoUpdate=function(e){i.videoEnabled=e.videoEnabled},this.meeting=void 0,this.states=void 0,this.size=void 0,this.iconPack=d.d,this.t=(0,u.u)(),this.videoDevices=[],this.currentDevice=void 0,this.videoEnabled=void 0}return(0,a.Z)(e,[{key:"componentDidLoad",value:function(){this.meetingChanged(this.meeting)}},{key:"meetingChanged",value:function(e){var t,i=this;null!=e&&(this.videoEnabled=e.self.videoEnabled,null===(t=e.self)||void 0===t||t.addListener("videoUpdate",this.onVideoUpdate),(0,c.w)((0,o.Z)((0,n.Z)().mark((function t(){var o,s,a,c;return(0,n.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.self.getVideoDevices();case 2:a=t.sent,c=null===(o=e.self.getCurrentDevices())||void 0===o?void 0:o.video,i.videoDevices=void 0!=c?[null!==(s=a.find((function(e){return e.deviceId===c.deviceId})))&&void 0!==s?s:c].concat((0,r.Z)(a.filter((function(e){return e.deviceId!==c.deviceId})))):a;case 5:case"end":return t.stop()}}),t)})))))}},{key:"disconnectedCallback",value:function(){var e;null===(e=this.meeting.self)||void 0===e||e.removeListener("videoUpdate",this.onVideoUpdate)}},{key:"setDevice",value:function(){var e=(0,o.Z)((0,n.Z)().mark((function e(t){var i,r;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.videoDevices.find((function(e){return e.deviceId===t})),this.currentDevice=r,null==r){e.next=5;break}return e.next=5,null===(i=this.meeting)||void 0===i?void 0:i.self.setDevice(r);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e,t,i=this;if(null==this.meeting)return null;var n=0,r=this.states||v.s,o=!0===(null===(e=null===r||void 0===r?void 0:r.prefs)||void 0===e?void 0:e.mirrorVideo)||"true"===(0,l.a)("mirror-video");return(0,c.h)(c.H,null,(0,c.h)("div",{class:"group",part:"tile-preview"},!0===this.videoEnabled?(0,c.h)("dyte-participant-tile",{participant:null===(t=this.meeting)||void 0===t?void 0:t.self,iconPack:this.iconPack,t:this.t,states:r,isPreview:!0}):(0,c.h)("div",{class:"camera-off-helper"},(0,c.h)("dyte-participant-tile",{participant:void 0},(0,c.h)("div",null,(0,c.h)("dyte-icon",{id:"icon",icon:this.iconPack.video_off,tabIndex:-1,"aria-hidden":!0,iconPack:this.iconPack,t:this.t}),(0,c.h)("div",null,"Camera is off"))))),(0,c.h)("div",{class:"group",part:"camera-selection"},(0,c.h)("label",null,"Camera"),(0,c.h)("div",{class:"row"},(0,c.h)("select",{class:"dyte-select",onChange:function(e){return i.setDevice(e.target.value)}},this.videoDevices.map((function(e){var t=e.deviceId,i=e.label;return(0,c.h)("option",{value:t},i||"Camera ".concat(++n))}))))),(0,c.h)("div",{class:"group",part:"mirror-toggle"},(0,c.h)("div",{class:"row"},(0,c.h)("label",{htmlFor:"mirror-toggle"},"Mirror my Video"),(0,c.h)("dyte-switch",{checked:o,iconPack:this.iconPack,t:this.t,onDyteChange:function(e){var t,n=e.target.checked;i.stateUpdate.emit({prefs:{mirrorVideo:n}}),v.s.prefs=Object.assign(Object.assign({},null!==(t=v.s.prefs)&&void 0!==t?t:{}),{mirrorVideo:n}),(0,l.s)("mirror-video",n)}}))))}}],[{key:"watchers",get:function(){return{meeting:["meetingChanged"]}}}]),e}();f.style=":host{line-height:initial;font-family:var(--dyte-font-family, sans-serif)}.dyte-select{--tw-bg-opacity:1;background-color:rgba(var(--dyte-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--dyte-colors-text-1000, 255 255 255))}.dyte-select:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1dow, 0 0 #0000)}.dyte-select{display:block;border-radius:var(--dyte-border-radius-sm, 4px);border-width:var(--dyte-border-width-none, 0);border-style:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--dyte-space-3, 12px);font-size:16px;--icon-size:var(--dyte-select-chevron-size, var(--dyte-space-6, 24px));--icon-right-position:var(--dyte-select-chevron-right-position, var(--dyte-space-2, 8px));background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right var(--icon-right-position) center;background-repeat:no-repeat;background-size:var(--icon-size) var(--icon-size);padding-right:calc(var(--icon-right-position) * 5)}:host{display:flex;width:100%;flex-direction:column}dyte-participant-tile{margin-left:auto;margin-right:auto;margin-bottom:var(--dyte-space-4, 16px);max-width:100%}#icon{padding-bottom:var(--dyte-space-1, 4px)}.apply-button{height:var(--dyte-space-10, 40px)}label{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:14px}.group{margin-top:var(--dyte-space-2, 8px);margin-bottom:var(--dyte-space-2, 8px)}.group>*{margin-bottom:var(--dyte-space-2, 8px)}.group>*:last-child{margin-bottom:var(--dyte-space-0, 0px)}.group select{flex:1 1 0%}.row{display:flex;align-items:center;justify-content:space-between;gap:var(--dyte-space-3, 12px)}"},2274:function(e,t,i){i.d(t,{o:function(){return l},s:function(){return u}});var n=i(7762),r=i(2304),o=function(e){return!("isConnected"in e)||e.isConnected},s=function(e,t){var i;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];i&&clearTimeout(i),i=setTimeout((function(){i=0,e.apply(void 0,r)}),t)}}((function(e){var t,i=(0,n.Z)(e.keys());try{for(i.s();!(t=i.n()).done;){var r=t.value;e.set(r,e.get(r).filter(o))}}catch(s){i.e(s)}finally{i.f()}}),2e3),a=function(e){return"function"===typeof e?e():e},c=function(e,t){var i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.length--)},d=function(e,t){var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e!==t},i=a(e),n=new Map(Object.entries(null!==i&&void 0!==i?i:{})),r={dispose:[],get:[],set:[],reset:[]},o=function(){var t;n=new Map(Object.entries(null!==(t=a(e))&&void 0!==t?t:{})),r.reset.forEach((function(e){return e()}))},s=function(e){return r.get.forEach((function(t){return t(e)})),n.get(e)},d=function(e,i){var o=n.get(e);t(i,o,e)&&(n.set(e,i),r.set.forEach((function(t){return t(e,i,o)})))},u="undefined"===typeof Proxy?{}:new Proxy(i,{get:function(e,t){return s(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(e,t){return n.has(t)},set:function(e,t,i){return d(t,i),!0}}),l=function(e,t){return r[e].push(t),function(){c(r[e],t)}};return{state:u,get:s,set:d,on:l,onChange:function(t,i){var n=l("set",(function(e,n){e===t&&i(n)})),r=l("reset",(function(){return i(a(e)[t])}));return function(){n(),r()}},use:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t.reduce((function(e,t){return t.set&&e.push(l("set",t.set)),t.get&&e.push(l("get",t.get)),t.reset&&e.push(l("reset",t.reset)),t.dispose&&e.push(l("dispose",t.dispose)),e}),[]);return function(){return n.forEach((function(e){return e()}))}},dispose:function(){r.dispose.forEach((function(e){return e()})),o()},reset:o,forceUpdate:function(e){var t=n.get(e);r.set.forEach((function(i){return i(e,t,t)}))}}}(e,t);return i.use(function(){if("function"!==typeof r.a)return{};var e=new Map;return{dispose:function(){return e.clear()},get:function(t){var i=(0,r.a)();i&&function(e,t,i){var n=e.get(t);n?n.includes(i)||n.push(i):e.set(t,[i])}(e,t,i)},set:function(t){var i=e.get(t);i&&e.set(t,i.filter(r.f)),s(e)},reset:function(){e.forEach((function(e){return e.forEach(r.f)})),s(e)}}}()),i}({}),u=d.state,l=d.onChange}}]); 2//# sourceMappingURL=5729.9067ae39.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.