trtc-sdk-v5 5.12.0-beta.9 → 5.12.1-beta.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/index.d.ts CHANGED
@@ -110,6 +110,13 @@ export declare class RtcError extends Error implements RTCErrorInterface {
110
110
  * @memberof RtcError
111
111
  */
112
112
  handler?: () => void;
113
+ /**
114
+ * Some errors will include a data property to help you handle exceptions.
115
+ * @since v5.12.0
116
+ * @readonly
117
+ * @memberof RtcError
118
+ */
119
+ data?: any;
113
120
  originError?: Error | DOMException | RtcError;
114
121
  constructor({ code, extraCode, message, messageParams, fnName, originError }: RTCErrorParams);
115
122
  static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.12.0-beta.9",
3
+ "version": "5.12.1-beta.1",
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.12.0-beta.9",
3
+ "version": "5.12.1-beta.1",
4
4
  "description": "TRTC Web SDK 5.x CDN streaming plugin",
5
5
  "main": "./cdn-streaming.esm.js",
6
6
  "module": "./cdn-streaming.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cross-room",
3
- "version": "5.12.0-beta.9",
3
+ "version": "5.12.1-beta.1",
4
4
  "description": "TRTC Web SDK 5.x Cross Room plugin",
5
5
  "main": "./cross-room.esm.js",
6
6
  "module": "./cross-room.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/custom-encryption",
3
- "version": "5.12.0-beta.9",
3
+ "version": "5.12.1-beta.1",
4
4
  "main": "./custom-encryption.esm.js",
5
5
  "module": "./custom-encryption.esm.js",
6
6
  "types": "./custom-encryption.esm.d.ts"
@@ -293,7 +293,7 @@ var __create=Object.create,__defProp=Object.defineProperty,__defProps=Object.def
293
293
  `:x``}
294
294
  </div>
295
295
  </div>
296
- `:x``}async handleClose(){this.isOpen=!1,this.handleReset(),this.requestUpdate("detectStage",this.detectStage),this.remove(),0!==Object.keys(this.completedResult).length&&(this.detectResult=this.completedResult),this.isCompleted=!0,this.triggerCompletedEvent()}handleReset(){this.detectStage=0,this.activeStep=0}setDetectStage(){this.detectStage=this.detectStage+1}async firstUpdated(){getComputedStyle(document.documentElement).getPropertyValue("font-size")}updated(){if(this.remind&&!this.isMobile){const t=this.shadowRoot.querySelector(".remind-text");if(!t)return;this.isChinese?t.innerHTML=e.cameraFailAttention:t.innerHTML=e.cameraFailAttentionEng}}handleRemindChange(e){this.remind=e.detail,this.requestUpdate()}getLabelClassName(e){const{completed:t,stepNameList:V}=this,i=t[V[e]]&&"success"===t[V[e]].type,n=t[V[e]]&&"error"===t[V[e]].type;let A="";return this.activeStep===e||i?A="active":n&&(A="error"),A}handleStep(e){const{completed:t,stepNameList:V}=this;t[V[e]]&&t[V[e]].completed&&(this.activeStep=e)}};__publicField(_DetectorUI,"properties",{detectStage:{type:Number,value:0},stepNameList:{type:Array},completed:{type:Object},activeStep:{type:Number},trtc:{type:Object},sdkAppId:{type:Number}}),__publicField(_DetectorUI,"cameraFailAttention",'你没有打开摄像头/麦克风的权限,请点击<svg width="1rem" height="1rem" ><circle cx="0.5rem" cy="0.5rem" r="0.4rem" stroke="red" stroke-width="0.1rem" fill="none" /><text x="0.5rem" y="0.79rem" font-size="0.7rem" text-anchor="middle" fill="red">i</text></svg>打开权限并且确保其他页面没有占用摄像头/麦克风'),__publicField(_DetectorUI,"cameraFailAttentionEng",'You didn\'t allow the permission to camera/microphone, please click<svg width="1rem" height="1rem" ><circle cx="0.5rem" cy="0.5rem" r="0.4rem" stroke="red" stroke-width="0.1rem" fill="none" /><text x="0.5rem" y="0.79rem" font-size="0.7rem" text-anchor="middle" fill="red">i</text></svg>to allow permission and make sure other pages are not using the camera/microphone ');var listener,instance,DetectorUI=_DetectorUI,deviceSeq=0,_DeviceDetector=class e{constructor(e){if(__publicField(this,"seq"),__publicField(this,"myDetector"),__publicField(this,"_core"),__publicField(this,"_log"),__publicField(this,"Name"),__publicField(this,"detectResult"),instance)return instance;deviceSeq+=1,this.seq=deviceSeq,this._core=e,this._log=e.log.createChild({id:`${this.getAlias()}${deviceSeq}`}),setLog(this._log),setCore(this._core),DetectorUI.registerTag(),this._log.info("created")}getName(){return e.Name}getAlias(){return"dd"}getGroup(){return"dd"}getValidateRule(e){switch(e){case"start":return startValidateRule(this._core);case"update":case"stop":return stopValidateRule(this._core)}}start(e){if(!instance)return setLanguage((null==e?void 0:e.language)||"auto"),new Promise(((t,V)=>{var i;e&&e.networkDetect&&e.networkDetect.downlinkUserId&&e.networkDetect.downlinkUserSig?sdk_default.networkInfo=__spreadProps(__spreadValues({},e.networkDetect),{uplinkTRTC:this._core.TRTC.create(),downlinkTRTC:this._core.TRTC.create()}):e&&e.networkDetect?sdk_default.networkInfo=__spreadProps(__spreadValues({},e.networkDetect),{uplinkTRTC:this._core.TRTC.create()}):sdk_default.networkInfo=null,sdk_default.mirror=!!(null==(i=null==e?void 0:e.cameraDetect)?void 0:i.mirror),sdk_default.allowSkip=!!this._core.utils.isUndefined(null==e?void 0:e.allowSkip)||!!(null==e?void 0:e.allowSkip),this.myDetector=document.createElement("detector-element"),document.body.appendChild(this.myDetector),listener=()=>{this.detectResult=this.myDetector.detectResult,t(this.detectResult)},this.myDetector.addEventListener("detectorCompleted",listener)}))}afterStart(){this._core.clearStarted(this,this.getGroup()),this.stop()}stop(){var e,t;this.myDetector&&(this.myDetector.remove(),null==(e=sdk_default.networkInfo)||e.uplinkTRTC.destroy(),null==(t=sdk_default.networkInfo)||t.downlinkTRTC.destroy(),sdk_default.networkInfo=null,this.myDetector.removeEventListener("detectorCompleted",listener),listener=()=>{}),instance=null,this._log.info("stop")}update(){}destroy(){clear(),this.stop()}};__publicField(_DeviceDetector,"Name","DeviceDetector");var DeviceDetector=_DeviceDetector,index_default=DeviceDetector;export{index_default as default};
296
+ `:x``}async handleClose(){this.isOpen=!1,this.handleReset(),this.requestUpdate("detectStage",this.detectStage),this.remove(),0!==Object.keys(this.completedResult).length&&(this.detectResult=this.completedResult),this.isCompleted=!0,this.triggerCompletedEvent()}handleReset(){this.detectStage=0,this.activeStep=0}setDetectStage(){this.detectStage=this.detectStage+1}async firstUpdated(){getComputedStyle(document.documentElement).getPropertyValue("font-size")}updated(){if(this.remind&&!this.isMobile){const t=this.shadowRoot.querySelector(".remind-text");if(!t)return;this.isChinese?t.innerHTML=e.cameraFailAttention:t.innerHTML=e.cameraFailAttentionEng}}handleRemindChange(e){this.remind=e.detail,this.requestUpdate()}getLabelClassName(e){const{completed:t,stepNameList:V}=this,i=t[V[e]]&&"success"===t[V[e]].type,n=t[V[e]]&&"error"===t[V[e]].type;let A="";return this.activeStep===e||i?A="active":n&&(A="error"),A}handleStep(e){const{completed:t,stepNameList:V}=this;t[V[e]]&&t[V[e]].completed&&(this.activeStep=e)}};__publicField(_DetectorUI,"properties",{detectStage:{type:Number,value:0},stepNameList:{type:Array},completed:{type:Object},activeStep:{type:Number},trtc:{type:Object},sdkAppId:{type:Number}}),__publicField(_DetectorUI,"cameraFailAttention",'你没有打开摄像头/麦克风的权限,请点击<svg width="1rem" height="1rem" ><circle cx="0.5rem" cy="0.5rem" r="0.4rem" stroke="red" stroke-width="0.1rem" fill="none" /><text x="0.5rem" y="0.79rem" font-size="0.7rem" text-anchor="middle" fill="red">i</text></svg>打开权限并且确保其他页面没有占用摄像头/麦克风'),__publicField(_DetectorUI,"cameraFailAttentionEng",'You didn\'t allow the permission to camera/microphone, please click<svg width="1rem" height="1rem" ><circle cx="0.5rem" cy="0.5rem" r="0.4rem" stroke="red" stroke-width="0.1rem" fill="none" /><text x="0.5rem" y="0.79rem" font-size="0.7rem" text-anchor="middle" fill="red">i</text></svg>to allow permission and make sure other pages are not using the camera/microphone ');var listener,instance,DetectorUI=_DetectorUI,deviceSeq=0,_DeviceDetector=class e{constructor(e){if(__publicField(this,"seq"),__publicField(this,"myDetector"),__publicField(this,"_core"),__publicField(this,"_log"),__publicField(this,"Name"),__publicField(this,"detectResult"),instance)return instance;deviceSeq+=1,this.seq=deviceSeq,this._core=e,this._log=e.log.createChild({id:`${this.getAlias()}${deviceSeq}`}),setLog(this._log),setCore(this._core),DetectorUI.registerTag(),this._log.info("created")}getName(){return e.Name}getAlias(){return"dd"}getGroup(){return"dd"}getValidateRule(e){switch(e){case"start":return startValidateRule(this._core);case"update":case"stop":return stopValidateRule(this._core)}}start(e){if(!instance)return setLanguage((null==e?void 0:e.language)||"auto"),new Promise(((t,V)=>{var i;e&&e.networkDetect&&e.networkDetect.downlinkUserId&&e.networkDetect.downlinkUserSig?sdk_default.networkInfo=__spreadProps(__spreadValues({},e.networkDetect),{uplinkTRTC:this._core.TRTC.create(),downlinkTRTC:this._core.TRTC.create()}):e&&e.networkDetect?sdk_default.networkInfo=__spreadProps(__spreadValues({},e.networkDetect),{uplinkTRTC:this._core.TRTC.create()}):sdk_default.networkInfo=null,sdk_default.mirror=!!(null==(i=null==e?void 0:e.cameraDetect)?void 0:i.mirror),sdk_default.allowSkip=!!this._core.utils.isUndefined(null==e?void 0:e.allowSkip)||!!(null==e?void 0:e.allowSkip),this.myDetector=document.createElement("detector-element"),document.body.appendChild(this.myDetector),listener=()=>{this.detectResult=this.myDetector.detectResult,t(this.detectResult)},this.myDetector.addEventListener("detectorCompleted",listener)}))}afterStart(){this._core.clearStarted(this,this.getGroup()),this.stop()}stop(){var e,t,V;this.myDetector&&(this.myDetector.remove(),null==(e=sdk_default.networkInfo)||e.uplinkTRTC.destroy(),null==(V=null==(t=sdk_default.networkInfo)?void 0:t.downlinkTRTC)||V.destroy(),sdk_default.networkInfo=null,this.myDetector.removeEventListener("detectorCompleted",listener),listener=()=>{}),instance=null,this._log.info("stop")}update(){}destroy(){clear(),this.stop()}};__publicField(_DeviceDetector,"Name","DeviceDetector");var DeviceDetector=_DeviceDetector,index_default=DeviceDetector;export{index_default as default};
297
297
  /*! Bundled license information:
298
298
 
299
299
  @lit/reactive-element/css-tag.js: