trtc-sdk-v5 5.7.2-beta.4 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -329,7 +329,6 @@ declare interface UpdateSEIOptions {
329
329
  options: {
330
330
  seiPayloadType: number;
331
331
  toSubStream?: boolean;
332
- small?: boolean;
333
332
  };
334
333
  }
335
334
  declare type PluginStopOptionsMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cdn-streaming",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x CDN streaming plugin",
5
5
  "main": "./cdn-streaming.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/debug",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK Debug Plugin",
5
5
  "main": "./debug.esm.js",
6
6
  "author": "leochliu <leochliu@tencent.com>",
@@ -1212,7 +1212,7 @@ var TV=Object.defineProperty,xV=Object.defineProperties;var vV=Object.getOwnProp
1212
1212
  </div>
1213
1213
  </div>
1214
1214
  </div>
1215
- `:q``}};h(re,"properties",{audioUrl:{type:String},activeDetector:String,handleComplete:Function,constructTime:{type:Number}});customElements.get("trtc-speaker-detector")||customElements.define("trtc-speaker-detector",re);var ne=class extends E{constructor(){super(),this.NETWORK_QUALITY={},this.currentDetector="network",this.detectorInfo={},this.count=15,this.timer=null,this.networkInfo=null,this.testResult={uplinkNetworkQualities:[],downlinkNetworkQualities:[],rttList:[],average:{uplinkNetworkQuality:0,downlinkNetworkQuality:0,rtt:0},result:{rtt:0,quality:0}},this._initializeTRTC(),this.isDownlink=!1,this.networkInfo&&this.networkInfo.downlinkUserId&&this.networkInfo.downlinkUserSig&&(this.isDownlink=!0),this.Enum={0:"0\uFF1A\u7F51\u7EDC\u72B6\u51B5\u672A\u77E5",1:"1\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u4F73",2:"2\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u597D",3:"3\uFF1A\u7F51\u7EDC\u72B6\u51B5\u4E00\u822C",4:"4\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u5DEE",5:"5\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u5DEE",6:"6\uFF1A\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00"},this.EnumEng={0:"0: unknown",1:"1: excellent",2:"2: good",3:"3: fair",4:"4: poor",5:"5: very poor",6:"6: disconnected"};let e=navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"en";this.isChinese=e.indexOf("zh")>-1,this.attachShadow({mode:"open"})}_initializeTRTC(){this.networkInfo=S.networkInfo,Object.defineProperty(S,"networkInfo",{set:e=>{this.networkInfo=e},get:()=>this.networkInfo})}firstUpdated(){}updated(e){e.has("activeDetector")&&this.activeDetector===this.currentDetector&&this.count!==0&&(this.count=15,this.getDetectorInfo())}async testUplinkNetworkQuality(){let{sdkAppId:e,uplinkTRTC:t,userId:i,userSig:A,roomId:o}=this.networkInfo;try{await t.exitRoom()}catch(s){}await t.enterRoom({roomId:o||8080,sdkAppId:e,userId:i,userSig:A,scene:"rtc"}),!this.hasStartLocalVideo&&await t.startLocalVideo({option:{profile:"480p"}}),this.setHasStartLocalVideo(),this.hasStartLocalVideo=!0,t.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{uplinkNetworkQuality:n,uplinkRTT:r}=s;this.testResult.uplinkNetworkQualities.push(n),this.testResult.rttList.push(r)})}async testDownlinkNetworkQuality(){let{sdkAppId:e,downlinkUserId:t,downlinkTRTC:i,downlinkUserSig:A,roomId:o}=this.networkInfo;try{await i.exitRoom()}catch(s){}await i.enterRoom({roomId:o||8080,sdkAppId:e,userId:t,userSig:A,scene:"rtc"}),i.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{downlinkNetworkQuality:n}=s;this.testResult.downlinkNetworkQualities.push(n)})}async getDetectorInfo(){let e=S.getSystem(),t=await S.isTRTCSupported(),i=S.getAPISupported();this.detectorInfo={system:e.OS,browser:`${e.browser.name} ${e.browser.version}`,TRTCSupport:t.result?"Yes":"No",screenMediaSupport:i.isScreenCaptureAPISupported?"Yes":"No"},this.timer=setInterval(()=>{this.count=this.count-1,this.requestUpdate(),this.count===0&&clearInterval(this.timer)},1e3),this.testUplinkNetworkQuality(),this.isDownlink&&this.testDownlinkNetworkQuality(),setTimeout(async()=>{this.testResult.uplinkNetworkQualities.length>0&&(this.testResult.average.uplinkNetworkQuality=Math.ceil(this.testResult.uplinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.uplinkNetworkQualities.length)),this.testResult.downlinkNetworkQualities.length>0&&(this.testResult.average.downlinkNetworkQuality=Math.ceil(this.testResult.downlinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.downlinkNetworkQualities.length)),this.testResult.rttList.length>0&&(this.testResult.average.rtt=Math.ceil(this.testResult.rttList.reduce((A,o)=>A+o,0)/this.testResult.rttList.length)),this.testResult.average.uplinkNetworkQuality===0||this.isDownlink&&this.testResult.average.downlinkNetworkQuality===0?this.testResult.result.quality=0:this.testResult.result.quality=Math.max(this.testResult.average.uplinkNetworkQuality,this.testResult.average.downlinkNetworkQuality),this.testResult.result.rtt=this.testResult.average.rtt,this.requestUpdate(),await this.networkInfo.uplinkTRTC.stopLocalAudio(),this.networkInfo.uplinkTRTC.exitRoom(),this.isDownlink&&this.networkInfo.downlinkTRTC.exitRoom()},15*1e3)}disconnectedCallback(){this.timer&&clearInterval(this.timer),this.remove()}async handleSuccess(){this.hasStartLocalVideo&&await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.generateReport();let e=new Date().getTime();g&&g.kvStatManager.addSuccessEvent({key:591711,cost:e-this.constructTime}),(this.testResult.result.quality===0||this.testResult.result.rtt===0)&&u&&u.warn("NetworkFail",this.testResult.average),this.handleComplete("success",this.testResult.result,this.testResult.result.quality!==0)}render(){return this.activeDetector===this.currentDetector?q`
1215
+ `:q``}};h(re,"properties",{audioUrl:{type:String},activeDetector:String,handleComplete:Function,constructTime:{type:Number}});customElements.get("trtc-speaker-detector")||customElements.define("trtc-speaker-detector",re);var ne=class extends E{constructor(){super(),this.NETWORK_QUALITY={},this.currentDetector="network",this.detectorInfo={},this.count=15,this.timer=null,this.networkInfo=null,this.testResult={uplinkNetworkQualities:[],downlinkNetworkQualities:[],rttList:[],average:{uplinkNetworkQuality:0,downlinkNetworkQuality:0,rtt:0},result:{rtt:0,quality:0}},this._initializeTRTC(),this.isDownlink=!1,this.networkInfo&&this.networkInfo.downlinkUserId&&this.networkInfo.downlinkUserSig&&(this.isDownlink=!0),this.Enum={0:"0\uFF1A\u7F51\u7EDC\u72B6\u51B5\u672A\u77E5",1:"1\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u4F73",2:"2\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u597D",3:"3\uFF1A\u7F51\u7EDC\u72B6\u51B5\u4E00\u822C",4:"4\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u5DEE",5:"5\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u5DEE",6:"6\uFF1A\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00"},this.EnumEng={0:"0: unknown",1:"1: excellent",2:"2: good",3:"3: fair",4:"4: poor",5:"5: very poor",6:"6: disconnected"};let e=navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"en";this.isChinese=e.indexOf("zh")>-1,this.attachShadow({mode:"open"})}_initializeTRTC(){this.networkInfo=S.networkInfo,Object.defineProperty(S,"networkInfo",{set:e=>{this.networkInfo=e},get:()=>this.networkInfo})}firstUpdated(){}updated(e){e.has("activeDetector")&&this.activeDetector===this.currentDetector&&this.count!==0&&(this.count=15,this.getDetectorInfo())}async testUplinkNetworkQuality(){let{sdkAppId:e,uplinkTRTC:t,userId:i,userSig:A,roomId:o}=this.networkInfo;try{await t.exitRoom()}catch(s){}await t.enterRoom({roomId:o||8080,sdkAppId:e,userId:i,userSig:A,scene:"rtc"}),!this.hasStartLocalVideo&&await t.startLocalVideo({option:{profile:"480p"}}),this.setHasStartLocalVideo(),this.hasStartLocalVideo=!0,t.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{uplinkNetworkQuality:n,uplinkRTT:r}=s;this.testResult.uplinkNetworkQualities.push(n),this.testResult.rttList.push(r)})}async testDownlinkNetworkQuality(){let{sdkAppId:e,downlinkUserId:t,downlinkTRTC:i,downlinkUserSig:A,roomId:o}=this.networkInfo;try{await i.exitRoom()}catch(s){}await i.enterRoom({roomId:o||8080,sdkAppId:e,userId:t,userSig:A,scene:"rtc"}),i.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{downlinkNetworkQuality:n}=s;this.testResult.downlinkNetworkQualities.push(n)})}async getDetectorInfo(){let e=S.getSystem(),t=await S.isTRTCSupported(),i=S.getAPISupported();this.detectorInfo={system:e.OS,browser:`${e.browser.name} ${e.browser.version}`,TRTCSupport:t.result?"Yes":"No",screenMediaSupport:i.isScreenCaptureAPISupported?"Yes":"No"},this.timer=setInterval(()=>{this.count=this.count-1,this.requestUpdate(),this.count===0&&clearInterval(this.timer)},1e3),this.testUplinkNetworkQuality(),this.isDownlink&&this.testDownlinkNetworkQuality(),setTimeout(async()=>{this.testResult.uplinkNetworkQualities.length>0&&(this.testResult.average.uplinkNetworkQuality=Math.ceil(this.testResult.uplinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.uplinkNetworkQualities.length)),this.testResult.downlinkNetworkQualities.length>0&&(this.testResult.average.downlinkNetworkQuality=Math.ceil(this.testResult.downlinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.downlinkNetworkQualities.length)),this.testResult.rttList.length>0&&(this.testResult.average.rtt=Math.ceil(this.testResult.rttList.reduce((A,o)=>A+o,0)/this.testResult.rttList.length)),this.testResult.average.uplinkNetworkQuality===0||this.isDownlink&&this.testResult.average.downlinkNetworkQuality===0?this.testResult.result.quality=0:this.testResult.result.quality=Math.max(this.testResult.average.uplinkNetworkQuality,this.testResult.average.downlinkNetworkQuality),this.testResult.result.rtt=this.testResult.average.rtt,this.requestUpdate(),await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.networkInfo.uplinkTRTC.exitRoom(),this.isDownlink&&this.networkInfo.downlinkTRTC.exitRoom()},15*1e3)}disconnectedCallback(){this.timer&&clearInterval(this.timer),this.remove()}async handleSuccess(){this.hasStartLocalVideo&&await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.generateReport();let e=new Date().getTime();g&&g.kvStatManager.addSuccessEvent({key:591711,cost:e-this.constructTime}),(this.testResult.result.quality===0||this.testResult.result.rtt===0)&&u&&u.warn("NetworkFail",this.testResult.average),this.handleComplete("success",this.testResult.result,this.testResult.result.quality!==0)}render(){return this.activeDetector===this.currentDetector?q`
1216
1216
  <style>${f}</style>
1217
1217
  <div class="testing-body">
1218
1218
  <div class="testing-list">
@@ -1212,7 +1212,7 @@
1212
1212
  </div>
1213
1213
  </div>
1214
1214
  </div>
1215
- `:q``}};h(re,"properties",{audioUrl:{type:String},activeDetector:String,handleComplete:Function,constructTime:{type:Number}});customElements.get("trtc-speaker-detector")||customElements.define("trtc-speaker-detector",re);var ne=class extends E{constructor(){super(),this.NETWORK_QUALITY={},this.currentDetector="network",this.detectorInfo={},this.count=15,this.timer=null,this.networkInfo=null,this.testResult={uplinkNetworkQualities:[],downlinkNetworkQualities:[],rttList:[],average:{uplinkNetworkQuality:0,downlinkNetworkQuality:0,rtt:0},result:{rtt:0,quality:0}},this._initializeTRTC(),this.isDownlink=!1,this.networkInfo&&this.networkInfo.downlinkUserId&&this.networkInfo.downlinkUserSig&&(this.isDownlink=!0),this.Enum={0:"0\uFF1A\u7F51\u7EDC\u72B6\u51B5\u672A\u77E5",1:"1\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u4F73",2:"2\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u597D",3:"3\uFF1A\u7F51\u7EDC\u72B6\u51B5\u4E00\u822C",4:"4\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u5DEE",5:"5\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u5DEE",6:"6\uFF1A\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00"},this.EnumEng={0:"0: unknown",1:"1: excellent",2:"2: good",3:"3: fair",4:"4: poor",5:"5: very poor",6:"6: disconnected"};let e=navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"en";this.isChinese=e.indexOf("zh")>-1,this.attachShadow({mode:"open"})}_initializeTRTC(){this.networkInfo=S.networkInfo,Object.defineProperty(S,"networkInfo",{set:e=>{this.networkInfo=e},get:()=>this.networkInfo})}firstUpdated(){}updated(e){e.has("activeDetector")&&this.activeDetector===this.currentDetector&&this.count!==0&&(this.count=15,this.getDetectorInfo())}async testUplinkNetworkQuality(){let{sdkAppId:e,uplinkTRTC:t,userId:i,userSig:A,roomId:o}=this.networkInfo;try{await t.exitRoom()}catch(s){}await t.enterRoom({roomId:o||8080,sdkAppId:e,userId:i,userSig:A,scene:"rtc"}),!this.hasStartLocalVideo&&await t.startLocalVideo({option:{profile:"480p"}}),this.setHasStartLocalVideo(),this.hasStartLocalVideo=!0,t.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{uplinkNetworkQuality:n,uplinkRTT:r}=s;this.testResult.uplinkNetworkQualities.push(n),this.testResult.rttList.push(r)})}async testDownlinkNetworkQuality(){let{sdkAppId:e,downlinkUserId:t,downlinkTRTC:i,downlinkUserSig:A,roomId:o}=this.networkInfo;try{await i.exitRoom()}catch(s){}await i.enterRoom({roomId:o||8080,sdkAppId:e,userId:t,userSig:A,scene:"rtc"}),i.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{downlinkNetworkQuality:n}=s;this.testResult.downlinkNetworkQualities.push(n)})}async getDetectorInfo(){let e=S.getSystem(),t=await S.isTRTCSupported(),i=S.getAPISupported();this.detectorInfo={system:e.OS,browser:`${e.browser.name} ${e.browser.version}`,TRTCSupport:t.result?"Yes":"No",screenMediaSupport:i.isScreenCaptureAPISupported?"Yes":"No"},this.timer=setInterval(()=>{this.count=this.count-1,this.requestUpdate(),this.count===0&&clearInterval(this.timer)},1e3),this.testUplinkNetworkQuality(),this.isDownlink&&this.testDownlinkNetworkQuality(),setTimeout(async()=>{this.testResult.uplinkNetworkQualities.length>0&&(this.testResult.average.uplinkNetworkQuality=Math.ceil(this.testResult.uplinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.uplinkNetworkQualities.length)),this.testResult.downlinkNetworkQualities.length>0&&(this.testResult.average.downlinkNetworkQuality=Math.ceil(this.testResult.downlinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.downlinkNetworkQualities.length)),this.testResult.rttList.length>0&&(this.testResult.average.rtt=Math.ceil(this.testResult.rttList.reduce((A,o)=>A+o,0)/this.testResult.rttList.length)),this.testResult.average.uplinkNetworkQuality===0||this.isDownlink&&this.testResult.average.downlinkNetworkQuality===0?this.testResult.result.quality=0:this.testResult.result.quality=Math.max(this.testResult.average.uplinkNetworkQuality,this.testResult.average.downlinkNetworkQuality),this.testResult.result.rtt=this.testResult.average.rtt,this.requestUpdate(),await this.networkInfo.uplinkTRTC.stopLocalAudio(),this.networkInfo.uplinkTRTC.exitRoom(),this.isDownlink&&this.networkInfo.downlinkTRTC.exitRoom()},15*1e3)}disconnectedCallback(){this.timer&&clearInterval(this.timer),this.remove()}async handleSuccess(){this.hasStartLocalVideo&&await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.generateReport();let e=new Date().getTime();g&&g.kvStatManager.addSuccessEvent({key:591711,cost:e-this.constructTime}),(this.testResult.result.quality===0||this.testResult.result.rtt===0)&&m&&m.warn("NetworkFail",this.testResult.average),this.handleComplete("success",this.testResult.result,this.testResult.result.quality!==0)}render(){return this.activeDetector===this.currentDetector?q`
1215
+ `:q``}};h(re,"properties",{audioUrl:{type:String},activeDetector:String,handleComplete:Function,constructTime:{type:Number}});customElements.get("trtc-speaker-detector")||customElements.define("trtc-speaker-detector",re);var ne=class extends E{constructor(){super(),this.NETWORK_QUALITY={},this.currentDetector="network",this.detectorInfo={},this.count=15,this.timer=null,this.networkInfo=null,this.testResult={uplinkNetworkQualities:[],downlinkNetworkQualities:[],rttList:[],average:{uplinkNetworkQuality:0,downlinkNetworkQuality:0,rtt:0},result:{rtt:0,quality:0}},this._initializeTRTC(),this.isDownlink=!1,this.networkInfo&&this.networkInfo.downlinkUserId&&this.networkInfo.downlinkUserSig&&(this.isDownlink=!0),this.Enum={0:"0\uFF1A\u7F51\u7EDC\u72B6\u51B5\u672A\u77E5",1:"1\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u4F73",2:"2\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u597D",3:"3\uFF1A\u7F51\u7EDC\u72B6\u51B5\u4E00\u822C",4:"4\uFF1A\u7F51\u7EDC\u72B6\u51B5\u8F83\u5DEE",5:"5\uFF1A\u7F51\u7EDC\u72B6\u51B5\u6781\u5DEE",6:"6\uFF1A\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00"},this.EnumEng={0:"0: unknown",1:"1: excellent",2:"2: good",3:"3: fair",4:"4: poor",5:"5: very poor",6:"6: disconnected"};let e=navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"en";this.isChinese=e.indexOf("zh")>-1,this.attachShadow({mode:"open"})}_initializeTRTC(){this.networkInfo=S.networkInfo,Object.defineProperty(S,"networkInfo",{set:e=>{this.networkInfo=e},get:()=>this.networkInfo})}firstUpdated(){}updated(e){e.has("activeDetector")&&this.activeDetector===this.currentDetector&&this.count!==0&&(this.count=15,this.getDetectorInfo())}async testUplinkNetworkQuality(){let{sdkAppId:e,uplinkTRTC:t,userId:i,userSig:A,roomId:o}=this.networkInfo;try{await t.exitRoom()}catch(s){}await t.enterRoom({roomId:o||8080,sdkAppId:e,userId:i,userSig:A,scene:"rtc"}),!this.hasStartLocalVideo&&await t.startLocalVideo({option:{profile:"480p"}}),this.setHasStartLocalVideo(),this.hasStartLocalVideo=!0,t.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{uplinkNetworkQuality:n,uplinkRTT:r}=s;this.testResult.uplinkNetworkQualities.push(n),this.testResult.rttList.push(r)})}async testDownlinkNetworkQuality(){let{sdkAppId:e,downlinkUserId:t,downlinkTRTC:i,downlinkUserSig:A,roomId:o}=this.networkInfo;try{await i.exitRoom()}catch(s){}await i.enterRoom({roomId:o||8080,sdkAppId:e,userId:t,userSig:A,scene:"rtc"}),i.on(g.TRTC.EVENT.NETWORK_QUALITY,s=>{let{downlinkNetworkQuality:n}=s;this.testResult.downlinkNetworkQualities.push(n)})}async getDetectorInfo(){let e=S.getSystem(),t=await S.isTRTCSupported(),i=S.getAPISupported();this.detectorInfo={system:e.OS,browser:`${e.browser.name} ${e.browser.version}`,TRTCSupport:t.result?"Yes":"No",screenMediaSupport:i.isScreenCaptureAPISupported?"Yes":"No"},this.timer=setInterval(()=>{this.count=this.count-1,this.requestUpdate(),this.count===0&&clearInterval(this.timer)},1e3),this.testUplinkNetworkQuality(),this.isDownlink&&this.testDownlinkNetworkQuality(),setTimeout(async()=>{this.testResult.uplinkNetworkQualities.length>0&&(this.testResult.average.uplinkNetworkQuality=Math.ceil(this.testResult.uplinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.uplinkNetworkQualities.length)),this.testResult.downlinkNetworkQualities.length>0&&(this.testResult.average.downlinkNetworkQuality=Math.ceil(this.testResult.downlinkNetworkQualities.reduce((A,o)=>A+o,0)/this.testResult.downlinkNetworkQualities.length)),this.testResult.rttList.length>0&&(this.testResult.average.rtt=Math.ceil(this.testResult.rttList.reduce((A,o)=>A+o,0)/this.testResult.rttList.length)),this.testResult.average.uplinkNetworkQuality===0||this.isDownlink&&this.testResult.average.downlinkNetworkQuality===0?this.testResult.result.quality=0:this.testResult.result.quality=Math.max(this.testResult.average.uplinkNetworkQuality,this.testResult.average.downlinkNetworkQuality),this.testResult.result.rtt=this.testResult.average.rtt,this.requestUpdate(),await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.networkInfo.uplinkTRTC.exitRoom(),this.isDownlink&&this.networkInfo.downlinkTRTC.exitRoom()},15*1e3)}disconnectedCallback(){this.timer&&clearInterval(this.timer),this.remove()}async handleSuccess(){this.hasStartLocalVideo&&await this.networkInfo.uplinkTRTC.stopLocalVideo(),this.generateReport();let e=new Date().getTime();g&&g.kvStatManager.addSuccessEvent({key:591711,cost:e-this.constructTime}),(this.testResult.result.quality===0||this.testResult.result.rtt===0)&&m&&m.warn("NetworkFail",this.testResult.average),this.handleComplete("success",this.testResult.result,this.testResult.result.quality!==0)}render(){return this.activeDetector===this.currentDetector?q`
1216
1216
  <style>${f}</style>
1217
1217
  <div class="testing-body">
1218
1218
  <div class="testing-list">
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/device-detector",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x device detector plugin",
5
5
  "main": "./device-detector.esm.js",
6
6
  "author": "edwards <edwards@tencent.com>",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/basic-beauty",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x basic-beauty plugin",
5
5
  "main": "./basic-beauty.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/beauty",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x beauty plugin",
5
5
  "main": "./beauty.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/virtual-background",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x virtual background plugin",
5
5
  "main": "./virtual-background.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/watermark",
3
- "version": "5.7.2-beta.4",
3
+ "version": "5.8.0",
4
4
  "description": "TRTC Web SDK 5.x watermark plugin",
5
5
  "main": "./watermark.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",