trtc-sdk-v5 5.12.0-beta.8 → 5.12.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/assets/mediapipe/vision.js +5 -6
- package/index.d.ts +7 -0
- package/package.json +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/cross-room/package.json +1 -1
- package/plugins/custom-encryption/package.json +1 -1
- package/plugins/device-detector/device-detector.esm.js +1 -1
- package/plugins/device-detector/device-detector.umd.js +1 -1
- package/plugins/device-detector/package.json +1 -1
- package/plugins/small-stream-auto-switcher/package.json +1 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-effect/basic-beauty/package.json +1 -1
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/video-mixer/package.json +1 -1
- package/plugins/video-effect/video-mixer/video-mixer.esm.js +1 -1
- package/plugins/video-effect/video-mixer/video-mixer.umd.js +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/virtual-background/virtual-background.esm.js +1 -1
- package/plugins/video-effect/virtual-background/virtual-background.umd.js +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/plugins/voice-changer/package.json +1 -1
- package/trtc.esm.js +30 -30
- package/trtc.js +1 -1
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
|
@@ -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)
|
|
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:
|