trtc-sdk-v5 5.8.5-beta.7 → 5.8.5-ktv.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 +3 -2
- package/package.json +1 -1
- package/plugins/cdn-streaming/cdn-streaming.esm.js +1 -1
- package/plugins/cdn-streaming/cdn-streaming.iife.js +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/chorus/chorus.esm.d.ts +13 -0
- package/plugins/chorus/chorus.esm.js +23 -0
- package/plugins/chorus/chorus.iife.js +23 -0
- package/plugins/chorus/package.json +30 -0
- package/plugins/cross-room/cross-room.esm.js +1 -1
- package/plugins/cross-room/cross-room.iife.js +1 -1
- package/plugins/cross-room/package.json +1 -1
- package/plugins/device-detector/device-detector.esm.js +21 -21
- package/plugins/device-detector/device-detector.iife.js +20 -20
- package/plugins/device-detector/package.json +1 -1
- package/plugins/video-effect/basic-beauty/basic-beauty.esm.js +2 -2
- package/plugins/video-effect/basic-beauty/basic-beauty.iife.js +2 -2
- package/plugins/video-effect/basic-beauty/package.json +1 -1
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/plugins/video-effect/watermark/watermark.esm.js +1 -1
- package/plugins/video-effect/watermark/watermark.iife.js +1 -1
- package/trtc.esm.js +34 -34
- package/trtc.js +1 -1
- package/plugins/debug/debug-dialog.esm.js +0 -126
- package/plugins/debug/debug-dialog.js +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rtc-plugin/chorus",
|
|
3
|
+
"version": "5.8.5-ktv.1",
|
|
4
|
+
"description": "TRTC Web SDK 5.x Chorus plugin",
|
|
5
|
+
"main": "./chorus.esm.js",
|
|
6
|
+
"author": "rychouwei <rychouwei@tencent.com>",
|
|
7
|
+
"module": "./chorus.esm.js",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git@github.com:LiteAVSDK/TRTC_Web.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-30-advanced-chorus-link.html",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"webrtc",
|
|
15
|
+
"TRTC",
|
|
16
|
+
"rtc",
|
|
17
|
+
"call",
|
|
18
|
+
"video call",
|
|
19
|
+
"audio call",
|
|
20
|
+
"javascript",
|
|
21
|
+
"video",
|
|
22
|
+
"audio",
|
|
23
|
+
"camera",
|
|
24
|
+
"microphone",
|
|
25
|
+
"live streaming",
|
|
26
|
+
"real-time communication",
|
|
27
|
+
"chorus"
|
|
28
|
+
],
|
|
29
|
+
"types": "./chorus.esm.d.ts"
|
|
30
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty,w=Object.defineProperties,G=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var O=(i,e,r)=>e in i?x(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,y=(i,e)=>{for(var r in e||(e={}))W.call(e,r)&&O(i,r,e[r]);if(C)for(var r of C(e))F.call(e,r)&&O(i,r,e[r]);return i},A=(i,e)=>w(i,H(e));var I=(i,e,r,o)=>{for(var t=o>1?void 0:o?G(e,r):e,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(o?n(e,r,t):n(t))||t);return o&&t&&x(e,r,t),t};var b=(i,e,r)=>(O(i,typeof e!="symbol"?e+"":e,r),r);var N={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},
|
|
1
|
+
var x=Object.defineProperty,w=Object.defineProperties,G=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var O=(i,e,r)=>e in i?x(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,y=(i,e)=>{for(var r in e||(e={}))W.call(e,r)&&O(i,r,e[r]);if(C)for(var r of C(e))F.call(e,r)&&O(i,r,e[r]);return i},A=(i,e)=>w(i,H(e));var I=(i,e,r,o)=>{for(var t=o>1?void 0:o?G(e,r):e,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(o?n(e,r,t):n(t))||t);return o&&t&&x(e,r,t),t};var b=(i,e,r)=>(O(i,typeof e!="symbol"?e+"":e,r),r);var N={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},_={name:"option",required:!0,properties:A(y({},N.properties),{userId:{type:"string"}})},k={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:A(y({},_.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},L={name:"option",properties:y({},N.properties)};var p=i=>typeof i=="function";var K=0,j=1,V=2;function q({retryFunction:i,settings:e,onError:r,onRetrying:o,onRetryFailed:t,onRetrySuccess:a,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=K,g=async(D,E)=>{let M=n||this;try{let R=await i.apply(M,d);s>0&&a&&a.call(this,s),s=0,D(R)}catch(R){let h=()=>{clearTimeout(l),s=0,c=V,E(R)},U=()=>{c!==V&&s<(p(m)?m():m)?(s++,c=j,p(o)&&o.call(this,s,h),l=window.setTimeout(()=>{l=-1,g(D,E)},p(u)?u(s):u)):(h(),p(t)&&t.call(this,R))};p(r)?r.call(this,{error:R,retry:U,reject:E,retryFuncArgs:d,retriedCount:s}):U()}};return new Promise(g)}}var B=q;var S=new WeakMap;function P({settings:i={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:o}){return function(t,a,n){let d=B({retryFunction:n.value,settings:i,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var g;(g=S.get(t))!=null&&g.has(a)?u():s(m)},s,l):(c=S.get(t))!=null&&c.has(a)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=S.get(t))!=null&&s.has(a)&&(S.get(t).get(a).stopRetry=u)},onRetryFailed:o});return n.value=function(...m){let u=S.get(t);return u?u.set(a,{args:m}):S.set(t,new Map([[a,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=S.get(t))==null?void 0:s.delete(a)})},n}}var T=class T{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return T.Name}getAlias(){return"crs-r"}getGroup(e){var o;let r=(e==null?void 0:e.userId)||((o=e==null?void 0:e.updateList)==null?void 0:o[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return _;case"update":return k;case"stop":return L}}async start({roomId:e,strRoomId:r,userId:o}){let{RtcError:t,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:a.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:o,localRoomId:o?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:a.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});o||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,a=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(a.data.data.expectSeq)return this.updateSeq=a.data.data.expectSeq,this.update({updateList:e});if(a.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:a.data.code,message:a.data.message});if(((n=a.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:o.UNKNOWN_ERROR,message:a.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let o=e||r;if(o)await this.doStop(o);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(T,"Name","CrossRoom"),I([P({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry start: ${i}`)}})],T.prototype,"start",1),I([P({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry update: ${i}`)}})],T.prototype,"update",1);var f=T;var ne=f;export{f as CrossRoom,ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var CrossRoom=(()=>{var y=Object.defineProperty,H=Object.defineProperties,N=Object.getOwnPropertyDescriptor,W=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var I=(o,e,r)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,E=(o,e)=>{for(var r in e||(e={}))k.call(e,r)&&I(o,r,e[r]);if(x)for(var r of x(e))K.call(e,r)&&I(o,r,e[r]);return o},
|
|
1
|
+
"use strict";var CrossRoom=(()=>{var y=Object.defineProperty,H=Object.defineProperties,N=Object.getOwnPropertyDescriptor,W=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var I=(o,e,r)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,E=(o,e)=>{for(var r in e||(e={}))k.call(e,r)&&I(o,r,e[r]);if(x)for(var r of x(e))K.call(e,r)&&I(o,r,e[r]);return o},_=(o,e)=>H(o,W(e));var j=(o,e)=>{for(var r in e)y(o,r,{get:e[r],enumerable:!0})},q=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of F(e))!k.call(o,t)&&t!==r&&y(o,t,{get:()=>e[t],enumerable:!(a=N(e,t))||a.enumerable});return o};var X=o=>q(y({},"__esModule",{value:!0}),o),P=(o,e,r,a)=>{for(var t=a>1?void 0:a?N(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(t=(a?n(e,r,t):n(t))||t);return a&&t&&y(e,r,t),t};var b=(o,e,r)=>(I(o,typeof e!="symbol"?e+"":e,r),r);var $={};j($,{CrossRoom:()=>O,default:()=>z});var L={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},f={name:"option",required:!0,properties:_(E({},L.properties),{userId:{type:"string"}})},V={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:_(E({},f.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},B={name:"option",properties:E({},L.properties)};var p=o=>typeof o=="function";var Y=0,v=1,M=2;function J({retryFunction:o,settings:e,onError:r,onRetrying:a,onRetryFailed:t,onRetrySuccess:i,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=Y,g=async(h,A)=>{let G=n||this;try{let R=await o.apply(G,d);s>0&&i&&i.call(this,s),s=0,h(R)}catch(R){let U=()=>{clearTimeout(l),s=0,c=M,A(R)},C=()=>{c!==M&&s<(p(m)?m():m)?(s++,c=v,p(a)&&a.call(this,s,U),l=window.setTimeout(()=>{l=-1,g(h,A)},p(u)?u(s):u)):(U(),p(t)&&t.call(this,R))};p(r)?r.call(this,{error:R,retry:C,reject:A,retryFuncArgs:d,retriedCount:s}):C()}};return new Promise(g)}}var w=J;var S=new WeakMap;function D({settings:o={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:a}){return function(t,i,n){let d=w({retryFunction:n.value,settings:o,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var g;(g=S.get(t))!=null&&g.has(i)?u():s(m)},s,l):(c=S.get(t))!=null&&c.has(i)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=S.get(t))!=null&&s.has(i)&&(S.get(t).get(i).stopRetry=u)},onRetryFailed:a});return n.value=function(...m){let u=S.get(t);return u?u.set(i,{args:m}):S.set(t,new Map([[i,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=S.get(t))==null?void 0:s.delete(i)})},n}}var T=class T{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return T.Name}getAlias(){return"crs-r"}getGroup(e){var a;let r=(e==null?void 0:e.userId)||((a=e==null?void 0:e.updateList)==null?void 0:a[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return f;case"update":return V;case"stop":return B}}async start({roomId:e,strRoomId:r,userId:a}){let{RtcError:t,ErrorCode:i}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:i.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:a,localRoomId:a?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:i.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});a||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,i=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(i.data.data.expectSeq)return this.updateSeq=i.data.data.expectSeq,this.update({updateList:e});if(i.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:i.data.code,message:i.data.message});if(((n=i.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:a.UNKNOWN_ERROR,message:i.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let a=e||r;if(a)await this.doStop(a);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(T,"Name","CrossRoom"),P([D({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry start: ${o}`)}})],T.prototype,"start",1),P([D({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry update: ${o}`)}})],T.prototype,"update",1);var O=T;var z=O;return X($);})().default;
|