1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[2469,3791],{2469:function(e,t,n){n.r(t),n.d(t,{dyte_livestream_toggle:function(){return d}});var i=n(4165),r=n(5861),a=n(5671),o=n(3144),s=n(2304),u=n(5855),l=n(7622),c=n(5231),v=n(2274),d=function(){function e(t){var n=this;(0,a.Z)(this,e),(0,s.r)(this,t),this.stateUpdate=(0,s.c)(this,"dyteStateUpdate",7),this.dyteAPIError=(0,s.c)(this,"dyteAPIError",7),this.livestreamStateListener=function(e){n.livestreamState=e,"LIVESTREAMING"!==e&&"IDLE"!==e||(n.stateUpdate.emit({activeMoreMenu:!1}),v.s.activeMoreMenu=!1)},this.isLoading=function(){return null==n.meeting||"STARTING"===n.livestreamState||"STOPPING"===n.livestreamState},this.variant="button",this.meeting=void 0,this.size=void 0,this.iconPack=u.d,this.t=(0,l.u)(),this.livestreamState="IDLE"}return(0,o.Z)(e,[{key:"connectedCallback",value:function(){this.meetingChanged(this.meeting)}},{key:"disconnectedCallback",value:function(){this.clearListeners()}},{key:"meetingChanged",value:function(e){var t,n;null!=e&&(this.livestreamState=null===(t=this.meeting.livestream)||void 0===t?void 0:t.state,null===(n=this.meeting.livestream)||void 0===n||n.on("livestreamUpdate",this.livestreamStateListener))}},{key:"toggleLivestream",value:function(){var e=(0,r.Z)((0,i.Z)().mark((function e(){var t,n;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("LIVESTREAMING"!==this.livestreamState){e.next=11;break}return e.prev=1,e.next=4,null===(t=this.meeting.livestream)||void 0===t?void 0:t.stop();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),this.dyteAPIError.emit({trace:this.t("livestream.stop"),message:this.t("Error while stopping livestream.")});case 9:e.next=19;break;case 11:return e.prev=11,e.next=14,null===(n=this.meeting.livestream)||void 0===n?void 0:n.start();case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(11),this.dyteAPIError.emit({trace:this.t("livestream.start"),message:this.t("Error while starting livestream.")});case 19:case"end":return e.stop()}}),e,this,[[1,6],[11,16]])})));return function(){return e.apply(this,arguments)}}()},{key:"clearListeners",value:function(){var e;null===(e=this.meeting.livestream)||void 0===e||e.removeListener("livestreamUpdate",this.livestreamStateListener)}},{key:"getLivestreamLabel",value:function(){switch(this.livestreamState){case"IDLE":return this.t("Go Live");case"LIVESTREAMING":return this.t("End Live");case"STARTING":return this.t("Starting");case"STOPPING":return this.t("Stopping");default:return this.t("Error")}}},{key:"getLivestreamIcon",value:function(){return"IDLE"===this.livestreamState?this.iconPack.start_livestream:this.iconPack.stop_livestream}},{key:"render",value:function(){var e=this;if((0,c.a)(this.meeting))return(0,s.h)(s.H,null,(0,s.h)("dyte-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,t:this.t,isLoading:this.isLoading(),class:{"active-livestream":"LIVESTREAMING"===this.livestreamState},onClick:function(){return e.toggleLivestream()},icon:this.getLivestreamIcon(),disabled:this.isLoading(),label:this.t(this.getLivestreamLabel()),variant:this.variant}))}}],[{key:"watchers",get:function(){return{meeting:["meetingChanged"]}}}]),e}();d.style=":host{line-height:initial;font-family:var(--dyte-font-family, sans-serif);display:block}"},5231:function(e,t,n){n.d(t,{P:function(){return i},a:function(){return o},b:function(){return v},c:function(){return c},d:function(){return r},e:function(){return u},f:function(){return l},i:function(){return a},s:function(){return s}});var i,r,a=function(e){return!!s(e)&&("LIVESTREAM"===e.meta.viewType&&"ON_STAGE"!==e.stage.status)},o=function(e){var t;return!!s(e)&&("LIVESTREAM"===e.meta.viewType&&(null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions.canLivestream))},s=function(e){var t;return(null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions.isV2)&&(null===e||void 0===e?void 0:e.livestream)};!function(e){e.BUFFERING="Buffering",e.ENDED="Ended",e.IDLE="Idle",e.PLAYING="Playing",e.READY="Ready"}(i||(i={})),function(e){e.INITIALIZED="PlayerInitialized",e.QUALITY_CHANGED="PlayerQualityChanged",e.DURATION_CHANGED="PlayerDurationChanged",e.VOLUME_CHANGED="PlayerVolumeChanged",e.MUTED_CHANGED="PlayerMutedChanged",e.PLAYBACK_RATE_CHANGED="PlayerPlaybackRateChanged",e.REBUFFERING="PlayerRebuffering",e.AUDIO_BLOCKED="PlayerAudioBlocked",e.PLAYBACK_BLOCKED="PlayerPlaybackBlocked",e.ERROR="PlayerError",e.RECOVERABLE_ERROR="PlayerRecoverableError",e.ANALYTICS_EVENT="PlayerAnalyticsEvent",e.TIME_UPDATE="PlayerTimeUpdate",e.BUFFER_UPDATE="PlayerBufferUpdate",e.SEEK_COMPLETED="PlayerSeekCompleted",e.SESSION_DATA="PlayerSessionData",e.STATE_CHANGED="PlayerStateChanged",e.WORKER_ERROR="PlayerWorkerError",e.METADATA="PlayerMetadata",e.TEXT_CUE="PlayerTextCue",e.TEXT_METADATA_CUE="PlayerTextMetadataCue",e.AD_CUE="PlayerAdCue",e.STREAM_SOURCE_CUE="PlayerStreamSourceCue",e.NETWORK_UNAVAILABLE="PlayerNetworkUnavailable",e.SEGMENT_DISCONTINUITY="PlayerSegmentDiscontinuity",e.SEGMENT_METADATA="PlayerSegmentMetadata",e.PLAYER_METADATA="PlayerMetadata"}(r||(r={}));var u=[r.TIME_UPDATE,r.BUFFER_UPDATE,r.TEXT_METADATA_CUE,r.PLAYER_METADATA],l=[r.REBUFFERING,r.AUDIO_BLOCKED,r.PLAYBACK_BLOCKED,r.ERROR,r.RECOVERABLE_ERROR,r.WORKER_ERROR,r.NETWORK_UNAVAILABLE,r.ANALYTICS_EVENT,r.PLAYBACK_RATE_CHANGED,r.QUALITY_CHANGED,r.INITIALIZED],c=function(e){var t,n,i,r,a,o;return!!s(e)&&("ALLOWED"===(null===(n=null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions)||void 0===n?void 0:n.canProduceAudio)||"ALLOWED"===(null===(r=null===(i=null===e||void 0===e?void 0:e.self)||void 0===i?void 0:i.permissions)||void 0===r?void 0:r.canProduceScreenshare)||"ALLOWED"===(null===(o=null===(a=null===e||void 0===e?void 0:e.self)||void 0===a?void 0:a.permissions)||void 0===o?void 0:o.canProduceVideo))},v=function(e){var t,n,i,r,a,o,u,l;return!!s(e)&&("NOT_ALLOWED"!==(null===(n=null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions)||void 0===n?void 0:n.canProduceAudio)||"NOT_ALLOWED"!==(null===(r=null===(i=null===e||void 0===e?void 0:e.self)||void 0===i?void 0:i.permissions)||void 0===r?void 0:r.canProduceScreenshare)||"
1NOT_ALLOWED"!==(null===(o=null===(a=null===e||void 0===e?void 0:e.self)||void 0===a?void 0:a.permissions)||void 0===o?void 0:o.canProduceVideo)||(null===(l=null===(u=null===e||void 0===e?void 0:e.self)||void 0===u?void 0:u.permissions)||void 0===l?void 0:l.canLivestream))}},2274:function(e,t,n){n.d(t,{o:function(){return v},s:function(){return c}});var i=n(7762),r=n(2304),a=function(e){return!("isConnected"in e)||e.isConnected},o=function(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){n=0,e.apply(void 0,r)}),t)}}((function(e){var t,n=(0,i.Z)(e.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;e.set(r,e.get(r).filter(a))}}catch(o){n.e(o)}finally{n.f()}}),2e3),s=function(e){return"function"===typeof e?e():e},u=function(e,t){var n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.length--)},l=function(e,t){var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e!==t},n=s(e),i=new Map(Object.entries(null!==n&&void 0!==n?n:{})),r={dispose:[],get:[],set:[],reset:[]},a=function(){var t;i=new Map(Object.entries(null!==(t=s(e))&&void 0!==t?t:{})),r.reset.forEach((function(e){return e()}))},o=function(e){return r.get.forEach((function(t){return t(e)})),i.get(e)},l=function(e,n){var a=i.get(e);t(n,a,e)&&(i.set(e,n),r.set.forEach((function(t){return t(e,n,a)})))},c="undefined"===typeof Proxy?{}:new Proxy(n,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(i.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(e,t){return i.has(t)},set:function(e,t,n){return l(t,n),!0}}),v=function(e,t){return r[e].push(t),function(){u(r[e],t)}};return{state:c,get:o,set:l,on:v,onChange:function(t,n){var i=v("set",(function(e,i){e===t&&n(i)})),r=v("reset",(function(){return n(s(e)[t])}));return function(){i(),r()}},use:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return t.set&&e.push(v("set",t.set)),t.get&&e.push(v("get",t.get)),t.reset&&e.push(v("reset",t.reset)),t.dispose&&e.push(v("dispose",t.dispose)),e}),[]);return function(){return i.forEach((function(e){return e()}))}},dispose:function(){r.dispose.forEach((function(e){return e()})),a()},reset:a,forceUpdate:function(e){var t=i.get(e);r.set.forEach((function(n){return n(e,t,t)}))}}}(e,t);return n.use(function(){if("function"!==typeof r.a)return{};var e=new Map;return{dispose:function(){return e.clear()},get:function(t){var n=(0,r.a)();n&&function(e,t,n){var i=e.get(t);i?i.includes(n)||i.push(n):e.set(t,[n])}(e,t,n)},set:function(t){var n=e.get(t);n&&e.set(t,n.filter(r.f)),o(e)},reset:function(){e.forEach((function(e){return e.forEach(r.f)})),o(e)}}}()),n}({}),c=l.state,v=l.onChange}}]); 2//# sourceMappingURL=2469.4c99668b.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.