(function(){var e={8842:function(e,t,i){"use strict";var s=i(9242),o=i(6935),r=i(8650),n=i(2741),a=i.n(n),c=i(1373),d=i(4695),l=i(2026),u=i(4940);function p(){const e=i(2479),t={};return e.keys().forEach((i=>{const s=i.match(/([A-Za-z0-9-_]+)\./i);if(s&&s.length>1){const o=s[1];t[o]=e(i)}})),t}const m=(0,u.o)({locale:(0,l.G3)()||"en",legacy:!1,globalInjection:!0,global:!0,fallbackLocale:"en",messages:p()});var h=m,f=i(1949),v=i.n(f);const g="https://web.sdk.qcloud.com"===window.location.origin,b={dev:"iHWefAYqvXVdajviap",prod:"iHWefAYqpBFdmIMeDi"},I=new(v())({id:g?b.prod:b.dev,reportApiSpeed:!0,reportAssetSpeed:!0});var y=I,w=i(3396),S=i(5574),k=(0,w.aZ)({setup(e){const t=(0,w.f3)("$aegis");return a().checkSystemRequirements().then((e=>{e.result||(0,S.z8)({message:"当前浏览器不支持webRTC请升级或更换浏览器在尝试",type:"error"})})),t.reportEvent({name:"loaded",ext1:"loaded-success",ext2:"webrtcQuickDemoVue3"}),(e,t)=>{const i=(0,w.up)("router-view");return(0,w.wg)(),(0,w.j4)(i)}}});const _=k;var $=_,D=i(678),A=(i(6885),i(8839),i(172),i(6809),i(6939)),C=i(7610),U=i(5728),E=i(5791),x=i(7139),L=i(4870),P=i.p+"img/clippy.83b2d7c4.svg",j=i(630);const V=e=>((0,w.dD)("data-v-a3d5746c"),e=e(),(0,w.Cn)(),e),K={class:"inputs-container"},z={style:{"font-size":"14px","font-weight":"500"}},T=V((()=>(0,w._)("div",{class:"key"},"SDKAppID",-1))),W=V((()=>(0,w._)("div",{class:"key"},"SecretKey",-1))),Z=V((()=>(0,w._)("div",{class:"key"},"UserID",-1))),R=V((()=>(0,w._)("div",{class:"key"},"RoomID",-1)));var O=(0,w.aZ)({setup(e){const{t:t}=(0,u.QT)(),i=(0,j.Z)();i.$patch({userId:(0,l.cP)("userId"),roomId:(0,l.cP)("roomId")});const s={url:window.location.href.split("?")[0]};return window.history.pushState(s,"","index.html#/"),(e,s)=>{const o=U.EZ,r=C.Dv,n=A.dq;return(0,w.wg)(),(0,w.iD)("div",K,[(0,w._)("h1",z,(0,x.zw)((0,L.SU)(t)("param")),1),(0,w.Wm)(n,{gutter:10},{default:(0,w.w5)((()=>[(0,w.Wm)(r,{span:12},{default:(0,w.w5)((()=>[(0,w.Wm)(o,{modelValue:(0,L.SU)(i).sdkAppId,"onUpdate:modelValue":s[0]||(s[0]=e=>(0,L.SU)(i).sdkAppId=e),placeholder:"sdkAppId",type:"number",disabled:""},{prepend:(0,w.w5)((()=>[T])),_:1},8,["modelValue"])])),_:1}),(0,w.Wm)(r,{span:12},{default:(0,w.w5)((()=>[(0,w.Wm)(o,{modelValue:(0,L.SU)(i).secretKey,"onUpdate:modelValue":s[1]||(s[1]=e=>(0,L.SU)(i).secretKey=e),placeholder:"secretKey",type:"string",disabled:""},{prepend:(0,w.w5)((()=>[W])),_:1},8,["modelValue"])])),_:1})])),_:1}),(0,w.Wm)(n,{gutter:10},{default:(0,w.w5)((()=>[(0,w.Wm)(r,{span:12},{default:(0,w.w5)((()=>[(0,w.Wm)(o,{modelValue:(0,L.SU)(i).userId,"onUpdate:modelValue":s[2]||(s[2]=e=>(0,L.SU)(i).userId=e),placeholder:"userID"},{prepend:(0,w.w5)((()=>[Z])),_:1},8,["modelValue"])])),_:1}),(0,w.Wm)(r,{span:12},{default:(0,w.w5)((()=>[(0,w.Wm)(o,{modelValue:(0,L.SU)(i).roomId,"onUpdate:modelValue":s[3]||(s[3]=e=>(0,L.SU)(i).roomId=e),placeholder:"roomID",type:"number"},{prepend:(0,w.w5)((()=>[R])),_:1},8,["modelValue"])])),_:1})])),_:1})])}}}),J=i(89);const q=(0,J.Z)(O,[["__scopeId","data-v-a3d5746c"]]);var M=q,N=(i(9863),i(8217),i(438));const Q=e=>((0,w.dD)("data-v-21141a18"),e=e(),(0,w.Cn)(),e),B={class:"select-container"},H={style:{"font-size":"14px","font-weight":"500"}},F=Q((()=>(0,w._)("div",{class:"label"},"Camera",-1))),Y=Q((()=>(0,w._)("div",{class:"label"},"Microphone",-1))),G={style:{"font-size":"14px"}};var X=(0,w.aZ)({emits:["switchDevice"],setup(e,{emit:t}){const i=(0,j.Z)(),{t:s}=(0,u.QT)(),o=async()=>{console.log("updateDevice");const e=await a().getCameras();e.forEach((e=>{e.value=e.deviceId}));const t=await a().getMicrophones();t.forEach((e=>{e.value=e.deviceId})),i.$patch({cameraList:e,microphoneList:t}),i.videoDeviceId||(i.videoDeviceId=e[0].deviceId),i.audioDeviceId||(i.audioDeviceId=t[0].deviceId)};navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then((e=>{e.getTracks().forEach((e=>{e.stop()})),o()})).catch((()=>{(0,S.z8)({message:s("permit"),type:"error"})})),navigator.mediaDevices.ondevicechange=o;const r=()=>{t("switchDevice",{videoId:i.videoDeviceId,audioId:i.audioDeviceId})};return(e,t)=>{const o=N.BT,n=N.km,a=C.Dv,c=A.dq;return(0,w.wg)(),(0,w.iD)("div",B,[(0,w._)("h1",H,(0,x.zw)((0,L.SU)(s)("device")),1),(0,w.Wm)(c,{gutter:10},{default:(0,w.w5)((()=>[(0,w.Wm)(a,{span:12,class:"device-container"},{default:(0,w.w5)((()=>[F,(0,w.Wm)(n,{class:"select",modelValue:(0,L.SU)(i).videoDeviceId,"onUpdate:modelValue":t[0]||(t[0]=e=>(0,L.SU)(i).videoDeviceId=e),placeholder:"Camera",onChange:r},{default:(0,w.w5)((()=>[((0,w.wg)(!0),(0,w.iD)(w.HY,null,(0,w.Ko)((0,L.SU)(i).cameraList,(e=>((0,w.wg)(),(0,w.j4)(o,{key:e.deviceId,label:e.label,value:e.deviceId},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),(0,w.Wm)(a,{span:12,class:"device-container"},{default:(0,w.w5)((()=>[Y,(0,w.Wm)(n,{class:"select",modelValue:(0,L.SU)(i).audioDeviceId,"onUpdate:modelValue":t[1]||(t[1]=e=>(0,L.SU)(i).audioDeviceId=e),placeholder:"Microphone",onChange:r},{default:(0,w.w5)((()=>[((0,w.wg)(!0),(0,w.iD)(w.HY,null,(0,w.Ko)((0,L.SU)(i).microphoneList,(e=>((0,w.wg)(),(0,w.j4)(o,{key:e.deviceId,label:e.label,value:e.deviceId},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1}),(0,w._)("p",G,(0,x.zw)((0,L.SU)(s)("deviceHint")),1)])}}});const ee=(0,J.Z)(X,[["__scopeId","data-v-21141a18"]]);var te=ee;const ie={class:"player-container"},se=["id"];var oe=(0,w.aZ)({setup(e){const t=(0,j.Z)(),i=(0,w.f3)("$bus");return i.on("stream-subscribed",(async e=>{const i=e.stream,s=i.getId(),o=i.getUserId(),r=`${s}`;t.remoteStreams.push(i),await(0,w.Y3)(),i.play(r).then((()=>{t.addSuccessLog(`RemoteStream play success: [${o}]`)})).catch((e=>{t.addFailedLog(`RemoteStream play failed: [${o}], error: ${e.message_}`)})),console.log("stream-subscribed ID: ",s)})),i.on("stream-removed",(e=>{const i=e.stream,s=i.getId();t.remoteStreams=t.remoteStreams.filter((e=>e.getId()!==s))})),(e,i)=>((0,w.wg)(),(0,w.iD)("div",ie,[((0,w.wg)(!0),(0,w.iD)(w.HY,null,(0,w.Ko)((0,L.SU)(t).remoteStreams,(e=>((0,w.wg)(),(0,w.iD)("div",{key:e.getId(),class:"remote",id:e.getId()},null,8,se)))),128))]))}});const re=(0,J.Z)(oe,[["__scopeId","data-v-b6a5647e"]]);var ne=re,ae=i(2482),ce=i(1735);class de{constructor(e){(0,ae.Z)(this,"sdkAppId",void 0),(0,ae.Z)(this,"userId",void 0),(0,ae.Z)(this,"secretKey",void 0),(0,ae.Z)(this,"roomId",void 0),(0,ae.Z)(this,"client",void 0),(0,ae.Z)(this,"localStream",void 0),(0,ae.Z)(this,"isJoined",void 0),(0,ae.Z)(this,"isPublished",void 0),(0,ae.Z)(this,"isLeaving",void 0);const{sdkAppId:t,userId:i,roomId:s,secretKey:o}=e;this.sdkAppId=t,this.userId=i,this.secretKey=o,this.roomId=s,this.isJoined=!1,this.isPublished=!1,this.isLeaving=!1,this.initClient()}initClient(){const{userSig:e}=(0,ce.h)({sdkAppId:this.sdkAppId,userId:this.userId,secretKey:this.secretKey});try{this.client=a().createClient({mode:"rtc",sdkAppId:this.sdkAppId,userId:this.userId,userSig:e}),console.log(`Client [${this.userId}] created.`),this.installEventHandlers()}catch(t){console.error(`Failed to create Client [${this.userId}].`)}}async initLocalStream(){try{return this.localStream=a().createStream({audio:!1,screen:!0,userId:this.userId}),this.localStream.setScreenProfile({width:960,height:540,frameRate:15,bitrate:2e3}),await this.localStream.initialize(),this.localStream.on("screen-sharing-stopped",(()=>{console.log("ShareStream video track ended"),this.leave()})),this.localStream}catch(e){return console.error(`ShareStream failed to initialize. Error: ${e}`),null}}async join(){console.log("join room clicked");try{await this.client.join({roomId:this.roomId}),await this.initLocalStream(),this.isJoined=!0}catch(e){console.error("join room failed",e)}}async publish(){if(this.isJoined)if(this.isPublished)console.warn("duplicate publish() observed");else try{await this.client.publish(this.localStream),console.log("ShareStream is published successfully"),this.isPublished=!0}catch(e){console.error(`ShareStream is failed to publish. Error: ${e}`)}else console.warn("call publish()- please join() firstly")}async unpublish(){if(this.isJoined)if(this.isPublished)try{this.localStream&&await this.client.unpublish(this.localStream),this.isPublished=!1,console.log("Unpublish ShareStream success")}catch(e){console.error("unpublish failed",e)}else console.warn("call unpublish() - you have not published yet");else console.warn("unpublish() - please join() firstly")}async leave(){if(this.isJoined)if(this.isLeaving)console.warn("duplicate leave() observed");else{this.isPublished&&await this.unpublish();try{this.isLeaving=!0,await this.client.leave(),this.isJoined=!1,console.log("Local share client leave room success"),this.localStream&&(this.localStream.stop(),this.localStream.close(),this.localStream=null),this.isLeaving=!1}catch(e){console.error("leave failed",e)}}else console.warn("leave() - please join() firstly")}installEventHandlers(){this.client.on("error",this.handleError.bind(this)),this.client.on("client-banned",this.handleBanned.bind(this)),this.client.on("stream-subscribed",this.handleStreamSubscribed.bind(this))}handleError(e){console.error("client error",e)}handleBanned(e){console.warn(`client has been banned for ${e.reason}`)}handleStreamSubscribed(e){const t=e.stream,i=t.getId(),s=t.getUserId();console.log(`remote stream subscribed: [${s}] ID: ${i} type: ${t.getType()}`),this.client.unsubscribe(t)}}var le=de;const ue=e=>((0,w.dD)("data-v-032ebefc"),e=e(),(0,w.Cn)(),e),pe={style:{"font-size":"14px","font-weight":"500"}},me={class:"btn-line"},he=(0,w.Uk)(" 加入房间 "),fe=(0,w.Uk)(" 公开obs "),ve=(0,w.Uk)(" 停止obs "),ge=(0,w.Uk)(" 离开房间 "),be={class:"btn-line"},Ie=(0,w.Uk)("分享屏幕"),ye=(0,w.Uk)("停止分享屏幕"),we={key:0,class:"share-link"},Se={class:"alert"},ke={class:"invite"},_e=ue((()=>(0,w._)("img",{src:P,alt:"Copy to clipboard",class:"clip"},null,-1))),$e=[_e],De={class:"pusher"},Ae={class:"local",id:"local"},Ce={class:"tag"};var Ue=(0,w.aZ)({setup(e){const t=(0,w.f3)("$bus"),i=(0,w.f3)("$aegis"),{t:s}=(0,u.QT)(),o=(0,j.Z)();let r,n,c;const l=(0,L.iH)(!1),p=(0,L.iH)(!1),m=(0,L.iH)(),h=e=>{o.logs.push({type:"success",content:e})},f=e=>{o.logs.push({type:"failed",content:e})},v=()=>{l.value?(n.unmuteAudio(),l.value=!1):(n.muteAudio(),l.value=!0)},g=()=>{p.value?(n.unmuteVideo(),p.value=!1):(n.muteVideo(),p.value=!0)};async function b(){c=new le({sdkAppId:parseInt(o.sdkAppId,10),userId:`share${o.userId}`,roomId:parseInt(o.roomId,10),secretKey:o.secretKey});try{await c.join(),await c.publish(),h("Start share screen success"),o.isShared=!0}catch(e){f(`Start share error: ${e.message_}`)}}async function I(){try{await c.unpublish(),await c.leave(),h("Stop share screen success"),o.isShared=!1}catch(e){f(`Stop share error: ${e.message_}`)}}async function y(){try{n=a().createStream({userId:o.userId,audio:!0,video:!0,cameraId:o.videoDeviceId,microphoneId:o.audioDeviceId}),n.setVideoProfile("480p"),console.log(a(),"TRTC"),await n.initialize(),h(`LocalStream [${o.userId}] initialized`),n.play("local").then((()=>{V(),h(`LocalStream [${o.userId}] playing`)})).catch((e=>{f(`LocalStream [${o.userId}] failed to play. Error: ${e.message_}`)}))}catch(e){f(`LocalStream failed to initialize. Error: ${e.message_}`)}}async function k(){if(!o.getInitParamsStates())return void(0,S.z8)({message:s("paramsNeed"),type:"error"});const e=o.getUserSig();try{r=a().createClient({mode:"live",sdkAppId:parseInt(o.sdkAppId,10),userId:o.userId,userSig:e}),h(`Client [${o.userId}] created`),K(),await r.join({roomId:parseInt(o.roomId,10)}),o.isJoined=!0,m.value=o.createShareLink(),h(`Join room [${o.roomId}] success`),i.reportEvent({name:"joinRoom",ext1:"joinRoom-success",ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}catch(t){f(`Join room ${o.roomId} failed, please check your params. Error: ${t.message_}`),i.reportEvent({name:"joinRoom",ext1:`joinRoom-failed#${o.roomId}*${o.userId}*${t.message_}`,ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}await y(),await _()}async function _(){if(o.isJoined)if(o.isPublished)(0,S.z8)({message:"duplicate publish() observed",type:"warning"});else try{await r.publish(n),h("LocalStream is published successfully"),o.isPublished=!0,i.reportEvent({name:"publish",ext1:"publish-success",ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}catch(e){f(`LocalStream is failed to publish. Error: ${e.message_}`),i.reportEvent({name:"publish",ext1:`publish-failed#${o.roomId}*${o.userId}*${e.message_}`,ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}else(0,S.z8)({message:"请先进入房间",type:"warning"})}async function $(){if(o.isJoined)if(o.isPublished)try{await r.unpublish(n),o.isPublished=!1,h("Unpublish localStream success"),i.reportEvent({name:"unpublish",ext1:"unpublish-success",ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}catch(e){f(`LocalStream is failed to unpublish. Error: ${e.message_}`),i.reportEvent({name:"unpublish",ext1:`unpublish-failed#${o.roomId}*${o.userId}*${e.message_}`,ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}else(0,S.z8)({message:"call unpublish() - you have not published yet",type:"warning"});else(0,S.z8)({message:"unpublish() - please join() firstly",type:"warning"})}async function D(){if(o.isJoined){o.isPublished&&await $();try{F(),await r.leave(),o.isJoined=!1,h("Leave room success"),n&&(n.stop(),n.close(),n=null),i.reportEvent({name:"leaveRoom",ext1:"leaveRoom-success",ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}catch(e){f(`Leave room failed. Error: ${e.message_}`),i.reportEvent({name:"leaveRoom",ext1:`leaveRoom-failed#${o.roomId}*${o.userId}*${e.message_}`,ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}}else(0,S.z8)({message:"leave() - please join() firstly",type:"warning"})}async function P({videoId:e,audioId:t}){if(o.isJoined){if(e)try{await n.switchDevice("video",e),h("LocalStream switch video device success")}catch(i){f("Switch video device failed")}if(t)try{await n.switchDevice("audio",t),h("LocalStream switch audio device success")}catch(i){f("Switch audio device failed")}}}function V(){console.log("addLocalControlView")}function K(){r&&(r.on("error",R),r.on("client-banned",O),r.on("peer-join",J),r.on("peer-leave",q),r.on("stream-added",N),r.on("stream-subscribed",Q),r.on("stream-removed",B),r.on("stream-updated",H),r.on("mute-video",z),r.on("mute-audio",T),r.on("unmute-video",W),r.on("unmute-audio",Z))}function z(e){h(`[${e.userId}] mute video`)}function T(e){h(`[${e.userId}] mute audio`)}function W(e){h(`[${e.userId}] unmute video`)}function Z(e){h(`[${e.userId}] unmute audio`)}function R(e){(0,S.z8)({message:`LocalClient error: ${e.message_}`,type:"error"}),h(`LocalClient error: ${e.message_}`)}function O(e){(0,S.z8)({message:`Client has been banned for ${e.reason}`,type:"warning"}),h(`Client has been banned for ${e.reason}`)}function J(e){const{userId:t}=e;"local-screen"!==t&&h(`Peer Client [${t}] joined`)}function q(e){const{userId:t}=e;"local-screen"!==t&&h(`[${t}] leave`)}function N(e){const t=e.stream,s=t.getId(),n=t.getUserId();t.getUserId()===`share_${o.userId}`?r.unsubscribe(t).catch((e=>{f(`unsubscribe failed: ${e.message_}`)})):(h(`remote stream added: [${n}] ID: ${s} type: ${t.getType()}`),r.subscribe(t).catch((e=>{f(`subscribe failed: ${e.message_}`),i.reportEvent({name:"subscribe",ext1:`subscribe-failed#${o.roomId}*${o.userId}*${e.message_}`,ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})})))}function Q(e){const s=e.stream,r=s.getUserId();h(`RemoteStream subscribed: [${r}]`),t.emit("stream-subscribed",e),i.reportEvent({name:"subscribe",ext1:"subscribe-success",ext2:"webrtcQuickDemoVue3",ext3:o.sdkAppId})}function B(e){const i=e.stream,s=i.getUserId();h(`RemoteStream removed: [${s}]`),t.emit("stream-removed",e)}function H(e){const t=e.stream,i=t.getUserId();h(`RemoteStream updated: [${i}] audio:${t.hasAudio()} video:${t.hasVideo()}`)}function F(){r&&(r.off("error",R),r.off("error",R),r.off("client-banned",O),r.off("peer-join",J),r.off("peer-leave",q),r.off("stream-added",N),r.off("stream-subscribed",Q),r.off("stream-removed",B),r.off("stream-updated",H),r.off("mute-video",z),r.off("mute-audio",T),r.off("unmute-video",W),r.off("unmute-audio",Z))}function Y(){(0,d.z)(m.value,void 0,(e=>{e?(0,S.z8)({message:"Copy failed!",type:"error"}):(0,S.z8)({message:"Copied!",type:"success"}),m.value=o.createShareLink()}))}return(e,t)=>{const i=E.mi,r=U.EZ,n=C.Dv,a=A.dq;return(0,w.wg)(),(0,w.j4)(a,{style:{padding:"0 10px 40px 10px"}},{default:(0,w.w5)((()=>[(0,w.Wm)(n,{md:{span:18,offset:3},sm:{span:24}},{default:(0,w.w5)((()=>[(0,w.Wm)(M),(0,w.Wm)(te,{onSwitchDevice:P}),(0,w._)("h1",pe,(0,x.zw)((0,L.SU)(s)("operation")),1),(0,w._)("div",me,[(0,w.Wm)(i,{type:"primary",onClick:k},{default:(0,w.w5)((()=>[he])),_:1}),(0,w.Wm)(i,{type:"primary",onClick:_},{default:(0,w.w5)((()=>[fe])),_:1}),(0,w.Wm)(i,{type:"primary",onClick:$},{default:(0,w.w5)((()=>[ve])),_:1}),(0,w.Wm)(i,{type:"primary",onClick:D},{default:(0,w.w5)((()=>[ge])),_:1})]),(0,w._)("div",be,[(0,w.Wm)(i,{type:"primary",onClick:b},{default:(0,w.w5)((()=>[Ie])),_:1}),(0,w.Wm)(i,{type:"primary",onClick:I},{default:(0,w.w5)((()=>[ye])),_:1})]),(0,L.SU)(o).isJoined?((0,w.wg)(),(0,w.iD)("div",we,[(0,w._)("div",Se,(0,x.zw)((0,L.SU)(s)("invite")),1),(0,w._)("div",ke,[(0,w._)("button",{class:"invite-btn",onClick:Y},$e),(0,w.Wm)(r,{id:"foo",modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=e=>m.value=e)},null,8,["modelValue"])])])):(0,w.kq)("",!0),(0,w._)("div",De,[(0,w._)("div",Ae,[(0,w._)("div",Ce,[(0,w._)("div",{class:(0,x.C_)(l.value?"muteAudio":"unmuteAudio"),onClick:v},null,2),(0,w._)("div",{class:(0,x.C_)(p.value?"muteVideo":"unmuteVideo"),onClick:g},null,2)])])]),(0,w.Wm)(ne)])),_:1})])),_:1})}}});const Ee=(0,J.Z)(Ue,[["__scopeId","data-v-032ebefc"]]);var xe=Ee;const Le=[{path:"/",name:"home",component:xe},{path:"/invite",name:"invite",component:()=>i.e(443).then(i.bind(i,6079))}],Pe=(0,D.p7)({history:(0,D.r5)(),routes:Le});var je=Pe;i(4415);const Ve=(0,s.ri)($),Ke=(0,c.Z)();a().Logger.setLogLevel(a().Logger.LogLevel.DEBUG),Ve.use(h),Ve.use(je),Ve.use((0,r.WB)()),Ve.use(o.Z),Ve.use(d.Z,{autoSetContainer:!0,appendToBody:!0}),Ve.provide("$bus",Ke),Ve.provide("$aegis",y),Ve.config.globalProperties.$bus=Ke,Ve.config.globalProperties.$aegis=y,Ve.mount("#app")},630:function(e,t,i){"use strict";var s=i(8650),o=i(1735);const r=(0,s.Q_)("app",{state:()=>({sdkAppId:"1400761306",userId:"",roomId:"",secretKey:"b4143f5814b9335c7587049ced22e997d8746a1ed8f5ac5c05153c67a0d769de",userSig:"",audioDeviceId:"",videoDeviceId:"",cameraList:[],microphoneList:[],logs:[],isJoined:!1,isPublished:!1,isShared:!1,remoteStreams:[],invitedRemoteStreams:[]}),getters:{},actions:{getInitParamsStates(){return!!(this.sdkAppId&&this.secretKey&&this.roomId&&this.userId)},getUserSig(){return this.userSig||(0,o.h)({sdkAppId:parseInt(this.sdkAppId,10),userId:this.userId,secretKey:this.secretKey}).userSig},createShareLink(){const e=`Guest_${Math.floor(1e6*Math.random())}`,{userSig:t}=(0,o.h)({sdkAppId:parseInt(this.sdkAppId,10),userId:e,secretKey:this.secretKey}),{origin:i}=window.location,{pathname:s}=window.location;return`${i}${s}#/invite?userSig=${t}&&SDKAppId=${this.sdkAppId}&&userId=${e}&&roomId=${this.roomId}`},addSuccessLog(e){this.logs.push({type:"success",content:e})},addFailedLog(e){this.logs.push({type:"failed",content:e})}}});t["Z"]=r},1735:function(e,t,i){"use strict";function s({sdkAppId:e,userId:t,secretKey:i}){const s=e,o=604800,r=i;void 0!=s&&""!==r||alert("请先配置好您的账号信息: SDKAPPID 及 SECRETKEY \r\n\r\nPlease configure your SDKAPPID/SECRETKEY in js/debug/GenerateTestUserSig.js");const n=new window.LibGenerateTestUserSig(s,r,o),a=n.genTestUserSig(t);return{sdkAppId:s,userSig:a}}i.d(t,{h:function(){return s}})},2026:function(e,t,i){"use strict";function s(e){const t=decodeURI(window.location.href.replace(/^[^?]*\?/,"")),i=new RegExp(`(^|&)${e}=([^&#]*)(&|$|)`,"i"),s=t.match(i);return s?s[2]:""}function o(){let e=localStorage.getItem("trtc-quick-vue3-language")||s("lang")||navigator.language||"zh";return e=e.replace(/_/,"-").toLowerCase(),"zh-cn"===e||"zh"===e?e="zh":"en"!==e&&"en-us"!==e&&"en-GB"!==e||(e="en"),e}i.d(t,{G3:function(){return o},cP:function(){return r}});const r=e=>{if(s(e))return s(e);switch(e){case"userId":return`user_${Math.floor(1e8*Math.random())}`;case"roomId":return Math.floor(1e5*Math.random());case"sdkAppId":return;case"secretKey":return;default:return}};/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},2479:function(e,t,i){var s={"./en.json":7960,"./zh.json":3071};function o(e){var t=r(e);return i(t)}function r(e){if(!i.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=r,e.exports=o,o.id=2479},7960:function(e){"use strict";e.exports=JSON.parse('{"title":"Tencent Cloud TRTC","logo":"https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/trtc-logo-en-w.png","step1":"Step 1 : Check Current Environment","step2":"Step 2 : Create New Application","step3":"Step 3 : Get SDKAppID and SecretKey","step4":"Step 4 : Start Video Call","param":"Params","alert":"Notes: this Demo is only applicable for debugging. Before official launch, please migrate the UserSig calculation code and key to your backend server to avoid unauthorized traffic use caused by the leakage of encryption key.","click":"View documents","url":"https://intl.cloud.tencent.com/document/product/647/35166","device":"Device","operation":"Operation","permit":"Please enable your microphone and camera for current page.","paramsNeed":"Please enter the correct SDKAppId, secretKey, userId, roomId!","invite":"Copy the link to invite friends to join the video call, one link can invite only one person, the link will be updated automatically after copying.","inviteUrl":"You are invited to this video chat room!","check":"Please reacquire the invitation link!","deviceHint":"PS: Please confirm that cameras and microphones are allowed on the current page before entering the room"}')},3071:function(e){"use strict";e.exports=JSON.parse('{"title":"TRTC 实时音视频","logo":"https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/trtc-logo-cn-w.png","step1":"步骤 1 : 判断当前环境是否满足条件","step2":"步骤 2 : 创建新的应用","step3":"步骤 3 : 获取 SDKAppID 和 密钥 SecretKey","step4":"步骤 4 : 开始视频通话","param":"参数","alert":"注意️:本 Demo 仅用于调试,正式上线前请将 UserSig 计算代码和密钥迁移到您的后台服务器上,以避免加密密钥泄露导致的流量盗用。","click":"查看文档","url":"https://cloud.tencent.com/document/product/647/17275","device":"设备","operation":"操作","permit":"请授权您的麦克风和摄像头权限","paramsNeed":"请检查参数 SDKAppId, secretKey, userId, roomId 是否输入正确!","invite":"复制链接邀请好友加入视频通话,一条链接仅可邀请一人,复制后自动更新链接。","inviteUrl":"你被邀请参加视频通话!","check":"请重新获取邀请链接!","deviceHint":"PS: 进房之前请确认当前页面允许使用摄像头和麦克风"}')}},t={};function i(s){var o=t[s];if(void 0!==o)return o.exports;var r=t[s]={exports:{}};return e[s].call(r.exports,r,r.exports,i),r.exports}i.m=e,function(){var e=[];i.O=function(t,s,o,r){if(!s){var n=1/0;for(l=0;l=r)&&Object.keys(i.O).every((function(e){return i.O[e](s[c])}))?s.splice(c--,1):(a=!1,r0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[s,o,r]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,s){return i.f[s](e,t),t}),[]))}}(),function(){i.u=function(e){return"js/about.24e22fde.js"}}(),function(){i.miniCssF=function(e){return"css/about.b3f65ee9.css"}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="quick-vue3:";i.l=function(s,o,r,n){if(e[s])e[s].push(o);else{var a,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l