@4players/odin-common 8.0.2 → 8.0.4
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/mod.js +1 -1
- package/mod.mjs +1 -1
- package/package.json +1 -1
- package/plugin/api.d.ts +2 -1
- package/rpc/commands.d.ts +5 -0
- package/rpc/notifications.d.ts +68 -0
- package/schema/media.d.ts +11 -0
- package/schema/peer.d.ts +14 -0
- package/schema/room.d.ts +53 -0
package/mod.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Se=Object.create;var M=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Re=(t,e)=>{for(var r in e)M(t,r,{get:e[r],enumerable:!0})},Q=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of ke(e))!Pe.call(t,p)&&p!==r&&M(t,p,{get:()=>e[p],enumerable:!(s=ze(e,p))||s.enumerable});return t};var R=(t,e,r)=>(r=t!=null?Se(Le(t)):{},Q(e||!t||!t.__esModule?M(r,"default",{value:t,enumerable:!0}):r,t)),we=t=>Q(M({},"__esModule",{value:!0}),t);var ht={};Re(ht,{APM_DEFAULTS:()=>Tt,Backend:()=>le,ByteArraySchema:()=>y,CONNECTION_STATS_INITIAL:()=>xt,ChannelSet:()=>D,ChannelSetSchema:()=>q,DEFAULT_FORMATTER:()=>de,JITTER_STATS_INITIAL:()=>bt,JsonSchema:()=>_,LogFunctions:()=>pe,LogHandler:()=>$,LogLevelNames:()=>se,LogLevels:()=>G,LogSymbols:()=>ce,LogVerbosity:()=>C,Logger:()=>H,MainCommandsRpc:()=>je,MainNotificationSchema:()=>Me,MainNotificationsRpc:()=>Ne,MediaAudioPropertiesSchema:()=>te,MediaIdSchema:()=>h,MediaPropertiesSchema:()=>N,MediaSchema:()=>U,MediaVideoPropertiesSchema:()=>re,MessagePackRpcSchema:()=>_e,MessageReceivedSchema:()=>V,MinDBFS:()=>br,PRETTY_FORMATTER:()=>yt,PeerIdSchema:()=>v,PeerPositionSchema:()=>j,PeerSchema:()=>I,PeerUpdateSchema:()=>O,RoomCommandsRpc:()=>Fe,RoomNotificationSchema:()=>Ue,RoomNotificationsRpc:()=>Ie,RoomV1:()=>z,RoomV2:()=>oe,Selector:()=>K,Strand:()=>Y,TokenAudienceSchema:()=>X,TokenClaimsSchema:()=>Ae,TokenSubjectSchema:()=>ee,VAD_DEFAULTS:()=>vt,VideoCodec:()=>Z,WebRtcUpdateSchema:()=>w,abortableSleep:()=>Ye,assert:()=>F,debug:()=>gt,error:()=>lt,extendUrl:()=>et,fail:()=>W,failure:()=>x,find:()=>Je,fromBase64:()=>Oe,fromBase64Url:()=>Ee,fromBytes:()=>Ve,generateUUID:()=>rt,getLevelByName:()=>P,getLevelName:()=>L,getLogger:()=>k,info:()=>ft,isAudioCapable:()=>Ge,isBlinkBrowser:()=>ae,isElectronBrowser:()=>$e,isFailure:()=>ut,isFirefoxBrowser:()=>qe,isFunction:()=>it,isNull:()=>at,isNumber:()=>J,isObject:()=>st,isProperty:()=>ot,isSafariBrowser:()=>We,isSharedArrayBufferCapable:()=>He,isString:()=>ct,isSuccess:()=>dt,isUndefined:()=>pt,nextTick:()=>Qe,normalizeUrl:()=>Xe,oneOrMany:()=>A,sleep:()=>Ke,success:()=>f,toBytes:()=>De,toRaw:()=>Ze,unwrap:()=>b,unwrapOr:()=>B,validateUUID:()=>nt,warn:()=>mt});module.exports=we(ht);var u=require("zod"),y=u.z.custom(t=>t instanceof Uint8Array),Ce=u.z.union([u.z.string(),u.z.number(),u.z.boolean(),u.z.null()]),_=u.z.lazy(()=>u.z.union([Ce,u.z.array(_),u.z.record(_)])),_e=u.z.union([u.z.tuple([u.z.literal(0),u.z.number(),u.z.string(),u.z.unknown()]),u.z.tuple([u.z.literal(1),u.z.number(),u.z.nullable(u.z.string()),u.z.unknown()]),u.z.tuple([u.z.literal(2),u.z.string(),u.z.unknown()])]);var c=require("zod"),X=c.z.enum(["sfu","gateway"]),ee=c.z.enum(["connect","roomclose","roomupdate","roombanclient","roomsendmessage"]),Ae=c.z.object({uid:c.z.string(),cid:c.z.optional(c.z.string()),rid:A(c.z.string()).refine(t=>t.length>=1,{message:"missing rid"}),nsp:c.z.optional(c.z.string()),adr:c.z.optional(c.z.string()),aud:c.z.optional(A(X)),sub:c.z.optional(A(ee)),exp:c.z.optional(c.z.number()),nbf:c.z.optional(c.z.number()),ups:c.z.optional(c.z.string()),tgs:c.z.optional(A(c.z.string())),tsp:c.z.optional(c.z.number()),internal:c.z.optional(c.z.object({server:c.z.optional(c.z.string())}))});function A(t){return c.z.union([t.transform(e=>[e]),c.z.array(t)])}var n=R(require("zod"));var d=R(require("zod")),h=d.number(),te=d.object({kind:d.optional(d.literal("audio")),uid:d.optional(d.string()),customType:d.optional(d.string())}),re=d.object({kind:d.optional(d.literal("video")),codec:d.optional(d.string()),uid:d.optional(d.string()),customType:d.optional(d.string())}),N=d.union([te,re]),U=d.object({id:h,properties:N,paused:d.boolean()});var l=R(require("zod"));var v=l.number(),j=l.union([l.tuple([l.number(),l.number(),l.number()]),l.tuple([l.number(),l.number()])]),I=l.object({id:v,user_id:l.string(),user_data:y,medias:l.array(U)}),O=l.discriminatedUnion("kind",[l.object({kind:l.literal("UserDataChanged"),peer_id:v,user_data:y}),l.object({kind:l.literal("MediaStarted"),peer_id:v,media:U}),l.object({kind:l.literal("MediaStopped"),peer_id:v,media_id:h})]);var ne=R(require("zod")),D=class t{constructor(e=BigInt(0)){this.value=e}from(...e){let r=e.reduce((s,p)=>s|E(p),BigInt(0));return new t(r)}contains(e){return(this.value&E(e))!==BigInt(0)}insert(e){this.value|=E(e)}remove(e){this.value&=~E(e)}[Symbol.iterator](){let e=-1,r=new t(this.value);return{next(){for(;e<63;)if(e+=1,r.contains(e))return{value:e,done:!1};return{value:void 0,done:!0}}}}},q=ne.bigint().transform(t=>new D(t));function E(t){return BigInt(1)<<BigInt(t)}var z;(m=>(m.RoomIdSchema=n.string(),m.RoomSchema=n.object({id:m.RoomIdSchema,customer:n.string(),user_data:y,peers:n.array(I)}),m.RoomUpdateSchema=n.discriminatedUnion("kind",[n.object({kind:n.literal("Joined"),room:m.RoomSchema,media_ids:n.array(h),own_peer_id:v}),n.object({kind:n.literal("Left"),reason:n.enum(["RoomClosing","ServerClosing","PeerKicked"])}),n.object({kind:n.literal("UserDataChanged"),user_data:n.optional(y)}),n.object({kind:n.literal("PeerJoined"),peer:I}),n.object({kind:n.literal("PeerLeft"),peer_id:v})]),m.RoomUpdatesSchema=n.object({updates:n.array(m.RoomUpdateSchema)}),m.RoomStatusSchema=n.enum(["Joining","Joined","Closed"]),m.RoomStatusChangedSchema=n.object({status:m.RoomStatusSchema,message:n.optional(n.string())})))(z||={});var oe;(i=>(i.ParametersSchema=n.record(_),i.PeerProperties=n.object({user_data:y.optional(),tags:n.array(n.string()).optional(),audio_parameters:i.ParametersSchema.optional(),video_parameters:i.ParametersSchema.optional()}),i.PingSchema=n.object({Ping:n.object({id:n.number()})}),i.ChangeSelfSchema=n.object({ChangeSelf:i.PeerProperties.omit({tags:!0})}),i.SetAudioMaskSchema=n.object({SetAudioMask:n.object({peer_id:n.number(),mask:q})}),i.SendMessageSchema=n.object({SendMessage:n.object({peer_ids:n.number().array().default([]),message:y})}),i.CallSchema=i.PingSchema.or(i.ChangeSelfSchema).or(i.SetAudioMaskSchema).or(i.SendMessageSchema),i.PongSchema=n.object({Pong:n.object({id:n.number()})}),i.JoinedSchema=n.object({Joined:n.object({own_peer_id:n.number(),room_id:n.string(),customer:n.string()})}),i.LeftSchema=n.object({Left:n.object({reason:n.enum(["room_closing","server_closing","peer_kicked"])})}),i.PeerJoinedSchema=n.object({PeerJoined:i.PeerProperties.extend({peer_id:n.number(),user_id:n.string()})}),i.PeerLeftSchema=n.object({PeerLeft:n.object({peer_id:n.number()})}),i.PeerChangedSchema=n.object({PeerChanged:i.PeerProperties.extend({peer_id:n.number()})}),i.NewReconnectTokenSchema=n.object({NewReconnectToken:n.object({token:n.string()})}),i.MessageReceivedSchema=n.object({MessageReceived:n.object({sender_peer_id:n.number(),message:y})}),i.ErrorSchema=n.object({Error:n.object({message:y})}),i.EventSchema=i.PongSchema.or(i.JoinedSchema).or(i.LeftSchema).or(i.PeerJoinedSchema).or(i.PeerLeftSchema).or(i.PeerChangedSchema).or(i.NewReconnectTokenSchema).or(i.MessageReceivedSchema).or(i.ErrorSchema)))(oe||={});var ie=require("zod");var V=ie.z.object({sender_peer_id:v,message:y});var a=R(require("zod"));var w=a.discriminatedUnion("kind",[a.object({kind:a.literal("Sdp"),type:a.enum(["Answer","Offer"]),sdp:a.string(),media_map:a.array(a.tuple([h,a.string()]))}),a.object({kind:a.literal("Trickle"),candidate:a.string(),spd_mid:a.optional(a.string()),spd_mline_index:a.optional(a.number()),username_fragment:a.optional(a.union([a.string(),a.null()]))}),a.object({kind:a.literal("TrickleFinished")})]);var o=require("zod");var je={Hello:{request:o.z.object({stream:o.z.literal("main")}),response:o.z.null()},JoinRoom:{request:o.z.object({token:o.z.string(),room_id:z.RoomIdSchema,user_data:y,position:j}),response:o.z.object({peer_id:v,stream_id:o.z.optional(o.z.number()),token:o.z.optional(o.z.string())})},WebRtcUpdate:{request:w,response:o.z.null()},RequestReconnectToken:{request:o.z.object({peer_id:o.z.optional(v)}),response:o.z.string()},Ping:{request:o.z.object({}),response:o.z.null()}},Fe={Hello:{request:o.z.object({stream:o.z.literal("room"),token:o.z.string(),room_id:o.z.string(),user_data:y,position:j}),response:o.z.null()},UpdatePeer:{request:o.z.object({user_data:y}),response:o.z.null()},StartMedia:{request:o.z.object({media_id:h,properties:N}),response:o.z.null()},StopMedia:{request:o.z.object({media_id:h}),response:o.z.null()},PauseMedia:{request:o.z.object({media_id:h}),response:o.z.null()},ResumeMedia:{request:o.z.object({media_id:h}),response:o.z.null()},SetPeerPosition:{request:o.z.object({position:j}),response:o.z.null()},SendMessage:{request:o.z.object({target_peer_ids:o.z.optional(o.z.array(v)),message:y}),response:o.z.null()}};var T=R(require("zod"));var Me=T.object({name:T.literal("WebRtcUpdate"),properties:w}),Ne={WebRtcUpdate:w},Ue=T.union([T.object({name:T.literal("RoomStatusChanged"),properties:z.RoomStatusChangedSchema}),T.object({name:T.literal("RoomUpdated"),properties:z.RoomUpdatesSchema}),T.object({name:T.literal("PeerUpdated"),properties:O}),T.object({name:T.literal("MessageReceived"),properties:V})]),Ie={RoomStatusChanged:z.RoomStatusChangedSchema,RoomUpdated:z.RoomUpdatesSchema,PeerUpdated:O,MessageReceived:V};function F(t,e){t||W(e)}function W(t){throw new Error(t)}function f(t){return{type:"Success",value:t}}function x(t){return{type:"Failure",reason:t}}function b(t){return t.type==="Failure"&&W(t.reason),t.value}function B(t,e){return t.type==="Success"?t.value:e}function Oe(t){try{let e=atob(t),r=Uint8Array.from(e,p=>p.codePointAt(0)),s=new TextDecoder("utf8");return f(s.decode(r))}catch(e){return x(String(e))}}function Ee(t){try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),r=Uint8Array.from(e,p=>p.codePointAt(0)),s=new TextDecoder("utf8");return f(s.decode(r))}catch(e){return x(String(e))}}function De(t){try{F(t!==void 0,"undefined cannot be converted to byte array"),F(t!==null,"null cannot be converted to byte array");let e=JSON.stringify(t),r=new TextEncoder;return f(r.encode(e))}catch(e){return x(String(e))}}function Ve(t){try{F(t.length>0,"empty byte array cannot be converted to value");let e=new TextDecoder().decode(t),r=JSON.parse(e);return f(r)}catch(e){return x(String(e))}}var Be=["VP8","VP9","AV1","H264"],Z=class{constructor(e){this.codec=e}channels=0;clockRate=9e4;isValid(){return Be.includes(this.codec)}isSupported(){if(typeof RTCRtpReceiver>"u"||typeof RTCRtpReceiver.getCapabilities>"u")return null;let e=B(this.getMimeType(),"").toLowerCase(),r=new Set(B(this.getSdpFmtpLine(),"").split(";").map(s=>s.trim().toLowerCase()));return RTCRtpReceiver.getCapabilities("video")?.codecs?.find(s=>{let p=s.mimeType.toLowerCase(),g=new Set((s.sdpFmtpLine??"").split(";").map(m=>m.trim().toLowerCase()));if(e!==p||r.size!==g.size)return!1;for(let m of r)if(!g.has(m))return!1;return!0})??null}getPayloadType(){switch(this.codec){case"VP8":return f(96);case"VP9":return f(98);case"AV1":return f(41);case"H264":return f(102);default:return x("invalid video codec")}}getMimeType(){switch(this.codec){case"VP8":return f("video/VP8");case"VP9":return f("video/VP9");case"AV1":return f("video/AV1");case"H264":return f("video/H264");default:return x("invalid video codec")}}getSdpFmtpLine(){switch(this.codec){case"VP8":return f("");case"VP9":return f("profile-id=2");case"AV1":return f("level-idx=5;profile=0;tier=0");case"H264":return f("level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f");default:return x("invalid video codec")}}};function Je(t,e){for(let r of t)if(e(r))return r}function Ge(){return typeof AudioContext<"u"&&typeof Worker<"u"}function He(){return typeof SharedArrayBuffer<"u"}function ae(){return/(apple)?webkit\/537\.36/i.test(globalThis.navigator.userAgent)}function $e(){return/electron/i.test(globalThis.navigator.userAgent)}function qe(){return/firefox|iceweasel|fxios/i.test(globalThis.navigator.userAgent)}function We(){return ae()?!1:/safari|applewebkit/i.test(globalThis.navigator.userAgent)}function Ze(t){return JSON.parse(JSON.stringify(t))}var K=class t{constructor(e){this._Generators=e;this._Futures=e.map(t.addIndex)}_Futures;async next(){let[e,r]=await Promise.race(this._Futures);return this._Futures[r]=t.addIndex(this._Generators[r],r),e}static async addIndex(e,r){return[await e(),r]}};function Ke(t,e){return t<=0?Promise.resolve(e):new Promise(r=>setTimeout(()=>r(e),t))}function Ye(t,e){return e.aborted?Promise.resolve("aborted"):new Promise(r=>{let s=()=>r("aborted");e.addEventListener("abort",s,{once:!0}),setTimeout(()=>{e.removeEventListener("abort",s),r(void 0)},t)})}function Qe(){return new Promise(t=>setTimeout(t,0))}var Y=class{_Tasks=[];_Running=!1;_Values;constructor(...e){this._Values=e}enqueue(e){return new Promise((r,s)=>{let p=async()=>{try{let g=await e(...this._Values);r(g)}catch(g){s(g)}};this._Tasks.push(p),this._Running||this.execute()})}async execute(){for(this._Running=!0;;){let e=this._Tasks.shift();if(e===void 0)break;await e()}this._Running=!1}};function Xe(t){let e=t.trim();t.indexOf("://")===-1&&(e=`https://${e}`);try{return f(new URL(e))}catch(r){return x(String(r))}}function et(t,e){let r=t.pathname;r.endsWith("/")===!1&&(r+="/");try{return f(new URL(r+e,t))}catch(s){return x(String(s))}}var tt=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function rt(){return crypto.randomUUID()}function nt(t){return tt.test(t)}function ot(t,e){return e in t}function it(t){return typeof t=="function"}function at(t){return typeof t=="object"&&t===null}function J(t){return typeof t=="number"}function st(t){return typeof t=="object"}function ct(t){return typeof t=="string"}function pt(t){return typeof t>"u"}function ut(t){return t.type==="Failure"}function dt(t){return t.type==="Success"}var C=(g=>(g[g.NONE=0]="NONE",g[g.ERROR=1]="ERROR",g[g.WARN=2]="WARN",g[g.INFO=3]="INFO",g[g.DEBUG=4]="DEBUG",g))(C||{}),G=Object.values(C).filter(t=>!isNaN(Number(t))),se=Object.keys(C).filter(t=>isNaN(Number(t))),ce={0:"\u26AB",1:"\u{1F534}",2:"\u{1F7E1}",3:"\u{1F535}",4:"\u{1F7E3}"},pe={0:console.log,1:console.error,2:console.warn,3:console.info,4:console.debug};function P(t){let e=C[t];return e===void 0?x(`invalid log level name '${t}'; valid names are: ${se.join(", ")}`):f(e)}function L(t){let e=C[t];return e===void 0?x(`invalid log level ${t}; valid levels are: ${G[0]}-${G[G.length-1]}`):f(e)}var S="default",ue=new Map;function k(t=S){let e=ue.get(t);return e||(e=new H("WARN",t)),e}function lt(t,...e){return t instanceof Function?k(S).error(t,...e):k(S).error(t,...e)}function mt(t,...e){return t instanceof Function?k(S).warn(t,...e):k(S).warn(t,...e)}function ft(t,...e){return t instanceof Function?k(S).info(t,...e):k(S).info(t,...e)}function gt(t,...e){return t instanceof Function?k(S).debug(t,...e):k(S).debug(t,...e)}var H=class{name;_Level;_Handlers;constructor(e,r,s){this.name=r??S,J(e)?this._Level=b(P(b(L(e)))):this._Level=b(P(e)),this._Handlers=s?.handlers||[new $(e)],ue.set(this.name,this)}get level(){return this._Level}set level(e){this.levelName=b(L(e))}get levelName(){return b(L(this._Level))}set levelName(e){this._Level=b(P(e)),this._Handlers.forEach(r=>r.level=this._Level)}get handlers(){return this._Handlers}addHandler(e){this._Handlers.push(e)}removeHandler(e){let r=this._Handlers.indexOf(e);r!==-1&&this._Handlers.splice(r,1)}log(e,r,...s){if(this.level<e)return r instanceof Function?void 0:r;let p,g;return r instanceof Function?(p=r(),g=this.asString(p)):g=this.asString(r),this._Handlers.forEach(m=>{m.handle({date:new Date,level:e,levelName:b(L(e)),logger:this.name,message:g,args:s})}),r instanceof Function?p:r}error(e,...r){return this.log(1,e,...r)}warn(e,...r){return this.log(2,e,...r)}info(e,...r){return this.log(3,e,...r)}debug(e,...r){return this.log(4,e,...r)}asString(e,r=!1){return typeof e=="string"?r?`"${e}"`:e:e===null||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||typeof e>"u"||typeof e=="symbol"?String(e):e instanceof Error?e.stack:typeof e=="object"?`{${Object.entries(e).map(([s,p])=>`"${s}":${this.asString(p,!0)}`).join(",")}}`:"undefined"}},de=({message:t})=>t,yt=t=>{let e=`[${t.date.toISOString()}]`,r=`[${t.levelName}]`,s=t.logger!==S?`[${t.logger}] `:"",p=ce[t.level];return`${e} ${p} ${r.padEnd(7," ")} ${s}${t.message}`},$=class{_Level;_FormatterFn;constructor(e,r=de){J(e)?this._Level=b(P(b(L(e)))):this._Level=b(P(e)),this._FormatterFn=r}get level(){return this._Level}set level(e){this.levelName=b(L(e))}get levelName(){return b(L(this._Level))}set levelName(e){this._Level=b(P(e))}handle(e){this._Level<e.level||this.log(this._FormatterFn(e),e)}log(e,r){pe[r.level](e,...r.args)}};var br=-758.596,le;(e=>{let t;(m=>(m[m.InvalidPassword=-1]="InvalidPassword",m[m.Unknown=0]="Unknown",m[m.Unencrypted=1]="Unencrypted",m[m.Encrypted=2]="Encrypted"))(t=e.PeerCipherStatus||={})})(le||={});var xt={bytesSent:0,bytesReceived:0,packetsSent:0,packetsReceived:0,rtt:0,packetLoss:0},bt={packetsBuffered:0,packetsSeen:0,packetsProcessed:0,packetsTooEarly:0,packetsTooLate:0,packetsDropped:0,packetsInvalid:0,packetsRepeated:0,packetsLost:0},vt={voiceActivity:{attackThreshold:.9,releaseThreshold:.8},volumeGate:{attackThreshold:-30,releaseThreshold:-40}},Tt={echoCanceller:!0,highPassFilter:!1,noiseSuppression:"Moderate",transientSuppressor:!1,gainController:!0};0&&(module.exports={APM_DEFAULTS,Backend,ByteArraySchema,CONNECTION_STATS_INITIAL,ChannelSet,ChannelSetSchema,DEFAULT_FORMATTER,JITTER_STATS_INITIAL,JsonSchema,LogFunctions,LogHandler,LogLevelNames,LogLevels,LogSymbols,LogVerbosity,Logger,MainCommandsRpc,MainNotificationSchema,MainNotificationsRpc,MediaAudioPropertiesSchema,MediaIdSchema,MediaPropertiesSchema,MediaSchema,MediaVideoPropertiesSchema,MessagePackRpcSchema,MessageReceivedSchema,MinDBFS,PRETTY_FORMATTER,PeerIdSchema,PeerPositionSchema,PeerSchema,PeerUpdateSchema,RoomCommandsRpc,RoomNotificationSchema,RoomNotificationsRpc,RoomV1,RoomV2,Selector,Strand,TokenAudienceSchema,TokenClaimsSchema,TokenSubjectSchema,VAD_DEFAULTS,VideoCodec,WebRtcUpdateSchema,abortableSleep,assert,debug,error,extendUrl,fail,failure,find,fromBase64,fromBase64Url,fromBytes,generateUUID,getLevelByName,getLevelName,getLogger,info,isAudioCapable,isBlinkBrowser,isElectronBrowser,isFailure,isFirefoxBrowser,isFunction,isNull,isNumber,isObject,isProperty,isSafariBrowser,isSharedArrayBufferCapable,isString,isSuccess,isUndefined,nextTick,normalizeUrl,oneOrMany,sleep,success,toBytes,toRaw,unwrap,unwrapOr,validateUUID,warn});
|
|
1
|
+
var Se=Object.create;var M=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Re=(t,e)=>{for(var r in e)M(t,r,{get:e[r],enumerable:!0})},Q=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of ke(e))!Pe.call(t,u)&&u!==r&&M(t,u,{get:()=>e[u],enumerable:!(s=ze(e,u))||s.enumerable});return t};var R=(t,e,r)=>(r=t!=null?Se(Le(t)):{},Q(e||!t||!t.__esModule?M(r,"default",{value:t,enumerable:!0}):r,t)),we=t=>Q(M({},"__esModule",{value:!0}),t);var ht={};Re(ht,{APM_DEFAULTS:()=>Tt,Backend:()=>le,ByteArraySchema:()=>y,CONNECTION_STATS_INITIAL:()=>xt,ChannelSet:()=>D,ChannelSetSchema:()=>q,DEFAULT_FORMATTER:()=>de,JITTER_STATS_INITIAL:()=>bt,JsonSchema:()=>_,LogFunctions:()=>pe,LogHandler:()=>$,LogLevelNames:()=>se,LogLevels:()=>G,LogSymbols:()=>ce,LogVerbosity:()=>C,Logger:()=>H,MainCommandsRpc:()=>je,MainNotificationSchema:()=>Me,MainNotificationsRpc:()=>Ne,MediaAudioPropertiesSchema:()=>te,MediaIdSchema:()=>h,MediaPropertiesSchema:()=>N,MediaSchema:()=>U,MediaVideoPropertiesSchema:()=>re,MessagePackRpcSchema:()=>_e,MessageReceivedSchema:()=>V,MinDBFS:()=>br,PRETTY_FORMATTER:()=>yt,PeerIdSchema:()=>v,PeerPositionSchema:()=>j,PeerSchema:()=>I,PeerUpdateSchema:()=>O,RoomCommandsRpc:()=>Fe,RoomNotificationSchema:()=>Ue,RoomNotificationsRpc:()=>Ie,RoomV1:()=>z,RoomV2:()=>oe,Selector:()=>K,Strand:()=>Y,TokenAudienceSchema:()=>X,TokenClaimsSchema:()=>Ae,TokenSubjectSchema:()=>ee,VAD_DEFAULTS:()=>vt,VideoCodec:()=>Z,WebRtcUpdateSchema:()=>w,abortableSleep:()=>Ye,assert:()=>F,debug:()=>gt,error:()=>lt,extendUrl:()=>et,fail:()=>W,failure:()=>x,find:()=>Je,fromBase64:()=>Oe,fromBase64Url:()=>Ee,fromBytes:()=>Ve,generateUUID:()=>rt,getLevelByName:()=>P,getLevelName:()=>L,getLogger:()=>k,info:()=>ft,isAudioCapable:()=>Ge,isBlinkBrowser:()=>ae,isElectronBrowser:()=>$e,isFailure:()=>ut,isFirefoxBrowser:()=>qe,isFunction:()=>it,isNull:()=>at,isNumber:()=>J,isObject:()=>st,isProperty:()=>ot,isSafariBrowser:()=>We,isSharedArrayBufferCapable:()=>He,isString:()=>ct,isSuccess:()=>dt,isUndefined:()=>pt,nextTick:()=>Qe,normalizeUrl:()=>Xe,oneOrMany:()=>A,sleep:()=>Ke,success:()=>f,toBytes:()=>De,toRaw:()=>Ze,unwrap:()=>b,unwrapOr:()=>B,validateUUID:()=>nt,warn:()=>mt});module.exports=we(ht);var d=require("zod"),y=d.z.custom(t=>t instanceof Uint8Array),Ce=d.z.union([d.z.string(),d.z.number(),d.z.boolean(),d.z.null()]),_=d.z.lazy(()=>d.z.union([Ce,d.z.array(_),d.z.record(_)])),_e=d.z.union([d.z.tuple([d.z.literal(0),d.z.number(),d.z.string(),d.z.unknown()]),d.z.tuple([d.z.literal(1),d.z.number(),d.z.nullable(d.z.string()),d.z.unknown()]),d.z.tuple([d.z.literal(2),d.z.string(),d.z.unknown()])]);var c=require("zod"),X=c.z.enum(["sfu","gateway"]),ee=c.z.enum(["connect","roomclose","roomupdate","roombanclient","roomsendmessage"]),Ae=c.z.object({uid:c.z.string(),cid:c.z.optional(c.z.string()),rid:A(c.z.string()).refine(t=>t.length>=1,{message:"missing rid"}),nsp:c.z.optional(c.z.string()),adr:c.z.optional(c.z.string()),aud:c.z.optional(A(X)),sub:c.z.optional(A(ee)),exp:c.z.optional(c.z.number()),nbf:c.z.optional(c.z.number()),ups:c.z.optional(c.z.string()),tgs:c.z.optional(A(c.z.string())),tsp:c.z.optional(c.z.number()),internal:c.z.optional(c.z.object({server:c.z.optional(c.z.string())}))});function A(t){return c.z.union([t.transform(e=>[e]),c.z.array(t)])}var n=R(require("zod"));var p=R(require("zod")),h=p.number(),te=p.object({kind:p.optional(p.literal("audio")),uid:p.optional(p.string()),customType:p.optional(p.string())}),re=p.object({kind:p.optional(p.literal("video")),codec:p.optional(p.string()),uid:p.optional(p.string()),customType:p.optional(p.string()),id:p.optional(p.string())}),N=p.union([te,re]),U=p.object({id:h,properties:N,paused:p.boolean()});var l=R(require("zod"));var v=l.number(),j=l.union([l.tuple([l.number(),l.number(),l.number()]),l.tuple([l.number(),l.number()])]),I=l.object({id:v,user_id:l.string(),user_data:y,medias:l.array(U)}),O=l.discriminatedUnion("kind",[l.object({kind:l.literal("UserDataChanged"),peer_id:v,user_data:y}),l.object({kind:l.literal("MediaStarted"),peer_id:v,media:U}),l.object({kind:l.literal("MediaStopped"),peer_id:v,media_id:h})]);var ne=R(require("zod")),D=class t{constructor(e=BigInt(0)){this.value=e}from(...e){let r=e.reduce((s,u)=>s|E(u),BigInt(0));return new t(r)}contains(e){return(this.value&E(e))!==BigInt(0)}insert(e){this.value|=E(e)}remove(e){this.value&=~E(e)}[Symbol.iterator](){let e=-1,r=new t(this.value);return{next(){for(;e<63;)if(e+=1,r.contains(e))return{value:e,done:!1};return{value:void 0,done:!0}}}}},q=ne.bigint().transform(t=>new D(t));function E(t){return BigInt(1)<<BigInt(t)}var z;(m=>(m.RoomIdSchema=n.string(),m.RoomSchema=n.object({id:m.RoomIdSchema,customer:n.string(),user_data:y,peers:n.array(I)}),m.RoomUpdateSchema=n.discriminatedUnion("kind",[n.object({kind:n.literal("Joined"),room:m.RoomSchema,media_ids:n.array(h),own_peer_id:v}),n.object({kind:n.literal("Left"),reason:n.enum(["RoomClosing","ServerClosing","PeerKicked"])}),n.object({kind:n.literal("UserDataChanged"),user_data:n.optional(y)}),n.object({kind:n.literal("PeerJoined"),peer:I}),n.object({kind:n.literal("PeerLeft"),peer_id:v})]),m.RoomUpdatesSchema=n.object({updates:n.array(m.RoomUpdateSchema)}),m.RoomStatusSchema=n.enum(["Joining","Joined","Closed"]),m.RoomStatusChangedSchema=n.object({status:m.RoomStatusSchema,message:n.optional(n.string())})))(z||={});var oe;(i=>(i.ParametersSchema=n.record(_),i.PeerProperties=n.object({user_data:y.optional(),tags:n.array(n.string()).optional(),audio_parameters:i.ParametersSchema.optional(),video_parameters:i.ParametersSchema.optional()}),i.PingSchema=n.object({Ping:n.object({id:n.number()})}),i.ChangeSelfSchema=n.object({ChangeSelf:i.PeerProperties.omit({tags:!0})}),i.SetAudioMaskSchema=n.object({SetAudioMask:n.object({peer_id:n.number(),mask:q})}),i.SendMessageSchema=n.object({SendMessage:n.object({peer_ids:n.number().array().default([]),message:y})}),i.CallSchema=i.PingSchema.or(i.ChangeSelfSchema).or(i.SetAudioMaskSchema).or(i.SendMessageSchema),i.PongSchema=n.object({Pong:n.object({id:n.number()})}),i.JoinedSchema=n.object({Joined:n.object({own_peer_id:n.number(),room_id:n.string(),customer:n.string()})}),i.LeftSchema=n.object({Left:n.object({reason:n.enum(["room_closing","server_closing","peer_kicked"])})}),i.PeerJoinedSchema=n.object({PeerJoined:i.PeerProperties.extend({peer_id:n.number(),user_id:n.string()})}),i.PeerLeftSchema=n.object({PeerLeft:n.object({peer_id:n.number()})}),i.PeerChangedSchema=n.object({PeerChanged:i.PeerProperties.extend({peer_id:n.number()})}),i.NewReconnectTokenSchema=n.object({NewReconnectToken:n.object({token:n.string()})}),i.MessageReceivedSchema=n.object({MessageReceived:n.object({sender_peer_id:n.number(),message:y})}),i.ErrorSchema=n.object({Error:n.object({message:y})}),i.EventSchema=i.PongSchema.or(i.JoinedSchema).or(i.LeftSchema).or(i.PeerJoinedSchema).or(i.PeerLeftSchema).or(i.PeerChangedSchema).or(i.NewReconnectTokenSchema).or(i.MessageReceivedSchema).or(i.ErrorSchema)))(oe||={});var ie=require("zod");var V=ie.z.object({sender_peer_id:v,message:y});var a=R(require("zod"));var w=a.discriminatedUnion("kind",[a.object({kind:a.literal("Sdp"),type:a.enum(["Answer","Offer"]),sdp:a.string(),media_map:a.array(a.tuple([h,a.string()]))}),a.object({kind:a.literal("Trickle"),candidate:a.string(),spd_mid:a.optional(a.string()),spd_mline_index:a.optional(a.number()),username_fragment:a.optional(a.union([a.string(),a.null()]))}),a.object({kind:a.literal("TrickleFinished")})]);var o=require("zod");var je={Hello:{request:o.z.object({stream:o.z.literal("main")}),response:o.z.null()},JoinRoom:{request:o.z.object({token:o.z.string(),room_id:z.RoomIdSchema,user_data:y,position:j}),response:o.z.object({peer_id:v,stream_id:o.z.optional(o.z.number()),token:o.z.optional(o.z.string())})},WebRtcUpdate:{request:w,response:o.z.null()},RequestReconnectToken:{request:o.z.object({peer_id:o.z.optional(v)}),response:o.z.string()},Ping:{request:o.z.object({}),response:o.z.null()}},Fe={Hello:{request:o.z.object({stream:o.z.literal("room"),token:o.z.string(),room_id:o.z.string(),user_data:y,position:j}),response:o.z.null()},UpdatePeer:{request:o.z.object({user_data:y}),response:o.z.null()},StartMedia:{request:o.z.object({media_id:h,properties:N}),response:o.z.null()},StopMedia:{request:o.z.object({media_id:h}),response:o.z.null()},PauseMedia:{request:o.z.object({media_id:h}),response:o.z.null()},ResumeMedia:{request:o.z.object({media_id:h}),response:o.z.null()},SetPeerPosition:{request:o.z.object({position:j}),response:o.z.null()},SendMessage:{request:o.z.object({target_peer_ids:o.z.optional(o.z.array(v)),message:y}),response:o.z.null()}};var T=R(require("zod"));var Me=T.object({name:T.literal("WebRtcUpdate"),properties:w}),Ne={WebRtcUpdate:w},Ue=T.union([T.object({name:T.literal("RoomStatusChanged"),properties:z.RoomStatusChangedSchema}),T.object({name:T.literal("RoomUpdated"),properties:z.RoomUpdatesSchema}),T.object({name:T.literal("PeerUpdated"),properties:O}),T.object({name:T.literal("MessageReceived"),properties:V})]),Ie={RoomStatusChanged:z.RoomStatusChangedSchema,RoomUpdated:z.RoomUpdatesSchema,PeerUpdated:O,MessageReceived:V};function F(t,e){t||W(e)}function W(t){throw new Error(t)}function f(t){return{type:"Success",value:t}}function x(t){return{type:"Failure",reason:t}}function b(t){return t.type==="Failure"&&W(t.reason),t.value}function B(t,e){return t.type==="Success"?t.value:e}function Oe(t){try{let e=atob(t),r=Uint8Array.from(e,u=>u.codePointAt(0)),s=new TextDecoder("utf8");return f(s.decode(r))}catch(e){return x(String(e))}}function Ee(t){try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),r=Uint8Array.from(e,u=>u.codePointAt(0)),s=new TextDecoder("utf8");return f(s.decode(r))}catch(e){return x(String(e))}}function De(t){try{F(t!==void 0,"undefined cannot be converted to byte array"),F(t!==null,"null cannot be converted to byte array");let e=JSON.stringify(t),r=new TextEncoder;return f(r.encode(e))}catch(e){return x(String(e))}}function Ve(t){try{F(t.length>0,"empty byte array cannot be converted to value");let e=new TextDecoder().decode(t),r=JSON.parse(e);return f(r)}catch(e){return x(String(e))}}var Be=["VP8","VP9","AV1","H264"],Z=class{constructor(e){this.codec=e}channels=0;clockRate=9e4;isValid(){return Be.includes(this.codec)}isSupported(){if(typeof RTCRtpReceiver>"u"||typeof RTCRtpReceiver.getCapabilities>"u")return null;let e=B(this.getMimeType(),"").toLowerCase(),r=new Set(B(this.getSdpFmtpLine(),"").split(";").map(s=>s.trim().toLowerCase()));return RTCRtpReceiver.getCapabilities("video")?.codecs?.find(s=>{let u=s.mimeType.toLowerCase(),g=new Set((s.sdpFmtpLine??"").split(";").map(m=>m.trim().toLowerCase()));if(e!==u||r.size!==g.size)return!1;for(let m of r)if(!g.has(m))return!1;return!0})??null}getPayloadType(){switch(this.codec){case"VP8":return f(96);case"VP9":return f(98);case"AV1":return f(41);case"H264":return f(102);default:return x("invalid video codec")}}getMimeType(){switch(this.codec){case"VP8":return f("video/VP8");case"VP9":return f("video/VP9");case"AV1":return f("video/AV1");case"H264":return f("video/H264");default:return x("invalid video codec")}}getSdpFmtpLine(){switch(this.codec){case"VP8":return f("");case"VP9":return f("profile-id=2");case"AV1":return f("level-idx=5;profile=0;tier=0");case"H264":return f("level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f");default:return x("invalid video codec")}}};function Je(t,e){for(let r of t)if(e(r))return r}function Ge(){return typeof AudioContext<"u"&&typeof Worker<"u"}function He(){return typeof SharedArrayBuffer<"u"}function ae(){return/(apple)?webkit\/537\.36/i.test(globalThis.navigator.userAgent)}function $e(){return/electron/i.test(globalThis.navigator.userAgent)}function qe(){return/firefox|iceweasel|fxios/i.test(globalThis.navigator.userAgent)}function We(){return ae()?!1:/safari|applewebkit/i.test(globalThis.navigator.userAgent)}function Ze(t){return JSON.parse(JSON.stringify(t))}var K=class t{constructor(e){this._Generators=e;this._Futures=e.map(t.addIndex)}_Futures;async next(){let[e,r]=await Promise.race(this._Futures);return this._Futures[r]=t.addIndex(this._Generators[r],r),e}static async addIndex(e,r){return[await e(),r]}};function Ke(t,e){return t<=0?Promise.resolve(e):new Promise(r=>setTimeout(()=>r(e),t))}function Ye(t,e){return e.aborted?Promise.resolve("aborted"):new Promise(r=>{let s=()=>r("aborted");e.addEventListener("abort",s,{once:!0}),setTimeout(()=>{e.removeEventListener("abort",s),r(void 0)},t)})}function Qe(){return new Promise(t=>setTimeout(t,0))}var Y=class{_Tasks=[];_Running=!1;_Values;constructor(...e){this._Values=e}enqueue(e){return new Promise((r,s)=>{let u=async()=>{try{let g=await e(...this._Values);r(g)}catch(g){s(g)}};this._Tasks.push(u),this._Running||this.execute()})}async execute(){for(this._Running=!0;;){let e=this._Tasks.shift();if(e===void 0)break;await e()}this._Running=!1}};function Xe(t){let e=t.trim();t.indexOf("://")===-1&&(e=`https://${e}`);try{return f(new URL(e))}catch(r){return x(String(r))}}function et(t,e){let r=t.pathname;r.endsWith("/")===!1&&(r+="/");try{return f(new URL(r+e,t))}catch(s){return x(String(s))}}var tt=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function rt(){return crypto.randomUUID()}function nt(t){return tt.test(t)}function ot(t,e){return e in t}function it(t){return typeof t=="function"}function at(t){return typeof t=="object"&&t===null}function J(t){return typeof t=="number"}function st(t){return typeof t=="object"}function ct(t){return typeof t=="string"}function pt(t){return typeof t>"u"}function ut(t){return t.type==="Failure"}function dt(t){return t.type==="Success"}var C=(g=>(g[g.NONE=0]="NONE",g[g.ERROR=1]="ERROR",g[g.WARN=2]="WARN",g[g.INFO=3]="INFO",g[g.DEBUG=4]="DEBUG",g))(C||{}),G=Object.values(C).filter(t=>!isNaN(Number(t))),se=Object.keys(C).filter(t=>isNaN(Number(t))),ce={0:"\u26AB",1:"\u{1F534}",2:"\u{1F7E1}",3:"\u{1F535}",4:"\u{1F7E3}"},pe={0:console.log,1:console.error,2:console.warn,3:console.info,4:console.debug};function P(t){let e=C[t];return e===void 0?x(`invalid log level name '${t}'; valid names are: ${se.join(", ")}`):f(e)}function L(t){let e=C[t];return e===void 0?x(`invalid log level ${t}; valid levels are: ${G[0]}-${G[G.length-1]}`):f(e)}var S="default",ue=new Map;function k(t=S){let e=ue.get(t);return e||(e=new H("WARN",t)),e}function lt(t,...e){return t instanceof Function?k(S).error(t,...e):k(S).error(t,...e)}function mt(t,...e){return t instanceof Function?k(S).warn(t,...e):k(S).warn(t,...e)}function ft(t,...e){return t instanceof Function?k(S).info(t,...e):k(S).info(t,...e)}function gt(t,...e){return t instanceof Function?k(S).debug(t,...e):k(S).debug(t,...e)}var H=class{name;_Level;_Handlers;constructor(e,r,s){this.name=r??S,J(e)?this._Level=b(P(b(L(e)))):this._Level=b(P(e)),this._Handlers=s?.handlers||[new $(e)],ue.set(this.name,this)}get level(){return this._Level}set level(e){this.levelName=b(L(e))}get levelName(){return b(L(this._Level))}set levelName(e){this._Level=b(P(e)),this._Handlers.forEach(r=>r.level=this._Level)}get handlers(){return this._Handlers}addHandler(e){this._Handlers.push(e)}removeHandler(e){let r=this._Handlers.indexOf(e);r!==-1&&this._Handlers.splice(r,1)}log(e,r,...s){if(this.level<e)return r instanceof Function?void 0:r;let u,g;return r instanceof Function?(u=r(),g=this.asString(u)):g=this.asString(r),this._Handlers.forEach(m=>{m.handle({date:new Date,level:e,levelName:b(L(e)),logger:this.name,message:g,args:s})}),r instanceof Function?u:r}error(e,...r){return this.log(1,e,...r)}warn(e,...r){return this.log(2,e,...r)}info(e,...r){return this.log(3,e,...r)}debug(e,...r){return this.log(4,e,...r)}asString(e,r=!1){return typeof e=="string"?r?`"${e}"`:e:e===null||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||typeof e>"u"||typeof e=="symbol"?String(e):e instanceof Error?e.stack:typeof e=="object"?`{${Object.entries(e).map(([s,u])=>`"${s}":${this.asString(u,!0)}`).join(",")}}`:"undefined"}},de=({message:t})=>t,yt=t=>{let e=`[${t.date.toISOString()}]`,r=`[${t.levelName}]`,s=t.logger!==S?`[${t.logger}] `:"",u=ce[t.level];return`${e} ${u} ${r.padEnd(7," ")} ${s}${t.message}`},$=class{_Level;_FormatterFn;constructor(e,r=de){J(e)?this._Level=b(P(b(L(e)))):this._Level=b(P(e)),this._FormatterFn=r}get level(){return this._Level}set level(e){this.levelName=b(L(e))}get levelName(){return b(L(this._Level))}set levelName(e){this._Level=b(P(e))}handle(e){this._Level<e.level||this.log(this._FormatterFn(e),e)}log(e,r){pe[r.level](e,...r.args)}};var br=-758.596,le;(e=>{let t;(m=>(m[m.InvalidPassword=-1]="InvalidPassword",m[m.Unknown=0]="Unknown",m[m.Unencrypted=1]="Unencrypted",m[m.Encrypted=2]="Encrypted"))(t=e.PeerCipherStatus||={})})(le||={});var xt={bytesSent:0,bytesReceived:0,packetsSent:0,packetsReceived:0,rtt:0,packetLoss:0},bt={packetsBuffered:0,packetsSeen:0,packetsProcessed:0,packetsTooEarly:0,packetsTooLate:0,packetsDropped:0,packetsInvalid:0,packetsRepeated:0,packetsLost:0},vt={voiceActivity:{attackThreshold:.9,releaseThreshold:.8},volumeGate:{attackThreshold:-30,releaseThreshold:-40}},Tt={echoCanceller:!0,highPassFilter:!1,noiseSuppression:"Moderate",transientSuppressor:!1,gainController:!0};0&&(module.exports={APM_DEFAULTS,Backend,ByteArraySchema,CONNECTION_STATS_INITIAL,ChannelSet,ChannelSetSchema,DEFAULT_FORMATTER,JITTER_STATS_INITIAL,JsonSchema,LogFunctions,LogHandler,LogLevelNames,LogLevels,LogSymbols,LogVerbosity,Logger,MainCommandsRpc,MainNotificationSchema,MainNotificationsRpc,MediaAudioPropertiesSchema,MediaIdSchema,MediaPropertiesSchema,MediaSchema,MediaVideoPropertiesSchema,MessagePackRpcSchema,MessageReceivedSchema,MinDBFS,PRETTY_FORMATTER,PeerIdSchema,PeerPositionSchema,PeerSchema,PeerUpdateSchema,RoomCommandsRpc,RoomNotificationSchema,RoomNotificationsRpc,RoomV1,RoomV2,Selector,Strand,TokenAudienceSchema,TokenClaimsSchema,TokenSubjectSchema,VAD_DEFAULTS,VideoCodec,WebRtcUpdateSchema,abortableSleep,assert,debug,error,extendUrl,fail,failure,find,fromBase64,fromBase64Url,fromBytes,generateUUID,getLevelByName,getLevelName,getLogger,info,isAudioCapable,isBlinkBrowser,isElectronBrowser,isFailure,isFirefoxBrowser,isFunction,isNull,isNumber,isObject,isProperty,isSafariBrowser,isSharedArrayBufferCapable,isString,isSuccess,isUndefined,nextTick,normalizeUrl,oneOrMany,sleep,success,toBytes,toRaw,unwrap,unwrapOr,validateUUID,warn});
|
package/mod.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as l}from"zod";var y=l.custom(t=>t instanceof Uint8Array),se=l.union([l.string(),l.number(),l.boolean(),l.null()]),C=l.lazy(()=>l.union([se,l.array(C),l.record(C)])),ke=l.union([l.tuple([l.literal(0),l.number(),l.string(),l.unknown()]),l.tuple([l.literal(1),l.number(),l.nullable(l.string()),l.unknown()]),l.tuple([l.literal(2),l.string(),l.unknown()])]);import{z as s}from"zod";var ce=s.enum(["sfu","gateway"]),pe=s.enum(["connect","roomclose","roomupdate","roombanclient","roomsendmessage"]),Re=s.object({uid:s.string(),cid:s.optional(s.string()),rid:_(s.string()).refine(t=>t.length>=1,{message:"missing rid"}),nsp:s.optional(s.string()),adr:s.optional(s.string()),aud:s.optional(_(ce)),sub:s.optional(_(pe)),exp:s.optional(s.number()),nbf:s.optional(s.number()),ups:s.optional(s.string()),tgs:s.optional(_(s.string())),tsp:s.optional(s.number()),internal:s.optional(s.object({server:s.optional(s.string())}))});function _(t){return s.union([t.transform(e=>[e]),s.array(t)])}import*as r from"zod";import*as p from"zod";var h=p.number(),ue=p.object({kind:p.optional(p.literal("audio")),uid:p.optional(p.string()),customType:p.optional(p.string())}),de=p.object({kind:p.optional(p.literal("video")),codec:p.optional(p.string()),uid:p.optional(p.string()),customType:p.optional(p.string())}),M=p.union([ue,de]),N=p.object({id:h,properties:M,paused:p.boolean()});import*as u from"zod";var T=u.number(),A=u.union([u.tuple([u.number(),u.number(),u.number()]),u.tuple([u.number(),u.number()])]),U=u.object({id:T,user_id:u.string(),user_data:y,medias:u.array(N)}),I=u.discriminatedUnion("kind",[u.object({kind:u.literal("UserDataChanged"),peer_id:T,user_data:y}),u.object({kind:u.literal("MediaStarted"),peer_id:T,media:N}),u.object({kind:u.literal("MediaStopped"),peer_id:T,media_id:h})]);import*as H from"zod";var O=class t{constructor(e=BigInt(0)){this.value=e}from(...e){let n=e.reduce((c,g)=>c|j(g),BigInt(0));return new t(n)}contains(e){return(this.value&j(e))!==BigInt(0)}insert(e){this.value|=j(e)}remove(e){this.value&=~j(e)}[Symbol.iterator](){let e=-1,n=new t(this.value);return{next(){for(;e<63;)if(e+=1,n.contains(e))return{value:e,done:!1};return{value:void 0,done:!0}}}}},$=H.bigint().transform(t=>new O(t));function j(t){return BigInt(1)<<BigInt(t)}var z;(d=>(d.RoomIdSchema=r.string(),d.RoomSchema=r.object({id:d.RoomIdSchema,customer:r.string(),user_data:y,peers:r.array(U)}),d.RoomUpdateSchema=r.discriminatedUnion("kind",[r.object({kind:r.literal("Joined"),room:d.RoomSchema,media_ids:r.array(h),own_peer_id:T}),r.object({kind:r.literal("Left"),reason:r.enum(["RoomClosing","ServerClosing","PeerKicked"])}),r.object({kind:r.literal("UserDataChanged"),user_data:r.optional(y)}),r.object({kind:r.literal("PeerJoined"),peer:U}),r.object({kind:r.literal("PeerLeft"),peer_id:T})]),d.RoomUpdatesSchema=r.object({updates:r.array(d.RoomUpdateSchema)}),d.RoomStatusSchema=r.enum(["Joining","Joined","Closed"]),d.RoomStatusChangedSchema=r.object({status:d.RoomStatusSchema,message:r.optional(r.string())})))(z||={});var le;(i=>(i.ParametersSchema=r.record(C),i.PeerProperties=r.object({user_data:y.optional(),tags:r.array(r.string()).optional(),audio_parameters:i.ParametersSchema.optional(),video_parameters:i.ParametersSchema.optional()}),i.PingSchema=r.object({Ping:r.object({id:r.number()})}),i.ChangeSelfSchema=r.object({ChangeSelf:i.PeerProperties.omit({tags:!0})}),i.SetAudioMaskSchema=r.object({SetAudioMask:r.object({peer_id:r.number(),mask:$})}),i.SendMessageSchema=r.object({SendMessage:r.object({peer_ids:r.number().array().default([]),message:y})}),i.CallSchema=i.PingSchema.or(i.ChangeSelfSchema).or(i.SetAudioMaskSchema).or(i.SendMessageSchema),i.PongSchema=r.object({Pong:r.object({id:r.number()})}),i.JoinedSchema=r.object({Joined:r.object({own_peer_id:r.number(),room_id:r.string(),customer:r.string()})}),i.LeftSchema=r.object({Left:r.object({reason:r.enum(["room_closing","server_closing","peer_kicked"])})}),i.PeerJoinedSchema=r.object({PeerJoined:i.PeerProperties.extend({peer_id:r.number(),user_id:r.string()})}),i.PeerLeftSchema=r.object({PeerLeft:r.object({peer_id:r.number()})}),i.PeerChangedSchema=r.object({PeerChanged:i.PeerProperties.extend({peer_id:r.number()})}),i.NewReconnectTokenSchema=r.object({NewReconnectToken:r.object({token:r.string()})}),i.MessageReceivedSchema=r.object({MessageReceived:r.object({sender_peer_id:r.number(),message:y})}),i.ErrorSchema=r.object({Error:r.object({message:y})}),i.EventSchema=i.PongSchema.or(i.JoinedSchema).or(i.LeftSchema).or(i.PeerJoinedSchema).or(i.PeerLeftSchema).or(i.PeerChangedSchema).or(i.NewReconnectTokenSchema).or(i.MessageReceivedSchema).or(i.ErrorSchema)))(le||={});import{z as me}from"zod";var E=me.object({sender_peer_id:T,message:y});import*as a from"zod";var R=a.discriminatedUnion("kind",[a.object({kind:a.literal("Sdp"),type:a.enum(["Answer","Offer"]),sdp:a.string(),media_map:a.array(a.tuple([h,a.string()]))}),a.object({kind:a.literal("Trickle"),candidate:a.string(),spd_mid:a.optional(a.string()),spd_mline_index:a.optional(a.number()),username_fragment:a.optional(a.union([a.string(),a.null()]))}),a.object({kind:a.literal("TrickleFinished")})]);import{z as o}from"zod";var Ye={Hello:{request:o.object({stream:o.literal("main")}),response:o.null()},JoinRoom:{request:o.object({token:o.string(),room_id:z.RoomIdSchema,user_data:y,position:A}),response:o.object({peer_id:T,stream_id:o.optional(o.number()),token:o.optional(o.string())})},WebRtcUpdate:{request:R,response:o.null()},RequestReconnectToken:{request:o.object({peer_id:o.optional(T)}),response:o.string()},Ping:{request:o.object({}),response:o.null()}},Qe={Hello:{request:o.object({stream:o.literal("room"),token:o.string(),room_id:o.string(),user_data:y,position:A}),response:o.null()},UpdatePeer:{request:o.object({user_data:y}),response:o.null()},StartMedia:{request:o.object({media_id:h,properties:M}),response:o.null()},StopMedia:{request:o.object({media_id:h}),response:o.null()},PauseMedia:{request:o.object({media_id:h}),response:o.null()},ResumeMedia:{request:o.object({media_id:h}),response:o.null()},SetPeerPosition:{request:o.object({position:A}),response:o.null()},SendMessage:{request:o.object({target_peer_ids:o.optional(o.array(T)),message:y}),response:o.null()}};import*as b from"zod";var ot=b.object({name:b.literal("WebRtcUpdate"),properties:R}),it={WebRtcUpdate:R},at=b.union([b.object({name:b.literal("RoomStatusChanged"),properties:z.RoomStatusChangedSchema}),b.object({name:b.literal("RoomUpdated"),properties:z.RoomUpdatesSchema}),b.object({name:b.literal("PeerUpdated"),properties:I}),b.object({name:b.literal("MessageReceived"),properties:E})]),st={RoomStatusChanged:z.RoomStatusChangedSchema,RoomUpdated:z.RoomUpdatesSchema,PeerUpdated:I,MessageReceived:E};function F(t,e){t||q(e)}function q(t){throw new Error(t)}function m(t){return{type:"Success",value:t}}function x(t){return{type:"Failure",reason:t}}function v(t){return t.type==="Failure"&&q(t.reason),t.value}function D(t,e){return t.type==="Success"?t.value:e}function dt(t){try{let e=atob(t),n=Uint8Array.from(e,g=>g.codePointAt(0)),c=new TextDecoder("utf8");return m(c.decode(n))}catch(e){return x(String(e))}}function lt(t){try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),n=Uint8Array.from(e,g=>g.codePointAt(0)),c=new TextDecoder("utf8");return m(c.decode(n))}catch(e){return x(String(e))}}function gt(t){try{F(t!==void 0,"undefined cannot be converted to byte array"),F(t!==null,"null cannot be converted to byte array");let e=JSON.stringify(t),n=new TextEncoder;return m(n.encode(e))}catch(e){return x(String(e))}}function yt(t){try{F(t.length>0,"empty byte array cannot be converted to value");let e=new TextDecoder().decode(t),n=JSON.parse(e);return m(n)}catch(e){return x(String(e))}}var fe=["VP8","VP9","AV1","H264"],W=class{constructor(e){this.codec=e}channels=0;clockRate=9e4;isValid(){return fe.includes(this.codec)}isSupported(){if(typeof RTCRtpReceiver>"u"||typeof RTCRtpReceiver.getCapabilities>"u")return null;let e=D(this.getMimeType(),"").toLowerCase(),n=new Set(D(this.getSdpFmtpLine(),"").split(";").map(c=>c.trim().toLowerCase()));return RTCRtpReceiver.getCapabilities("video")?.codecs?.find(c=>{let g=c.mimeType.toLowerCase(),f=new Set((c.sdpFmtpLine??"").split(";").map(d=>d.trim().toLowerCase()));if(e!==g||n.size!==f.size)return!1;for(let d of n)if(!f.has(d))return!1;return!0})??null}getPayloadType(){switch(this.codec){case"VP8":return m(96);case"VP9":return m(98);case"AV1":return m(41);case"H264":return m(102);default:return x("invalid video codec")}}getMimeType(){switch(this.codec){case"VP8":return m("video/VP8");case"VP9":return m("video/VP9");case"AV1":return m("video/AV1");case"H264":return m("video/H264");default:return x("invalid video codec")}}getSdpFmtpLine(){switch(this.codec){case"VP8":return m("");case"VP9":return m("profile-id=2");case"AV1":return m("level-idx=5;profile=0;tier=0");case"H264":return m("level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f");default:return x("invalid video codec")}}};function Tt(t,e){for(let n of t)if(e(n))return n}function St(){return typeof AudioContext<"u"&&typeof Worker<"u"}function zt(){return typeof SharedArrayBuffer<"u"}function ge(){return/(apple)?webkit\/537\.36/i.test(globalThis.navigator.userAgent)}function kt(){return/electron/i.test(globalThis.navigator.userAgent)}function Lt(){return/firefox|iceweasel|fxios/i.test(globalThis.navigator.userAgent)}function Pt(){return ge()?!1:/safari|applewebkit/i.test(globalThis.navigator.userAgent)}function wt(t){return JSON.parse(JSON.stringify(t))}var Z=class t{constructor(e){this._Generators=e;this._Futures=e.map(t.addIndex)}_Futures;async next(){let[e,n]=await Promise.race(this._Futures);return this._Futures[n]=t.addIndex(this._Generators[n],n),e}static async addIndex(e,n){return[await e(),n]}};function At(t,e){return t<=0?Promise.resolve(e):new Promise(n=>setTimeout(()=>n(e),t))}function jt(t,e){return e.aborted?Promise.resolve("aborted"):new Promise(n=>{let c=()=>n("aborted");e.addEventListener("abort",c,{once:!0}),setTimeout(()=>{e.removeEventListener("abort",c),n(void 0)},t)})}function Ft(){return new Promise(t=>setTimeout(t,0))}var K=class{_Tasks=[];_Running=!1;_Values;constructor(...e){this._Values=e}enqueue(e){return new Promise((n,c)=>{let g=async()=>{try{let f=await e(...this._Values);n(f)}catch(f){c(f)}};this._Tasks.push(g),this._Running||this.execute()})}async execute(){for(this._Running=!0;;){let e=this._Tasks.shift();if(e===void 0)break;await e()}this._Running=!1}};function It(t){let e=t.trim();t.indexOf("://")===-1&&(e=`https://${e}`);try{return m(new URL(e))}catch(n){return x(String(n))}}function Ot(t,e){let n=t.pathname;n.endsWith("/")===!1&&(n+="/");try{return m(new URL(n+e,t))}catch(c){return x(String(c))}}var ye=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Dt(){return crypto.randomUUID()}function Vt(t){return ye.test(t)}function Jt(t,e){return e in t}function Gt(t){return typeof t=="function"}function Ht(t){return typeof t=="object"&&t===null}function V(t){return typeof t=="number"}function $t(t){return typeof t=="object"}function qt(t){return typeof t=="string"}function Wt(t){return typeof t>"u"}function Zt(t){return t.type==="Failure"}function Kt(t){return t.type==="Success"}var w=(f=>(f[f.NONE=0]="NONE",f[f.ERROR=1]="ERROR",f[f.WARN=2]="WARN",f[f.INFO=3]="INFO",f[f.DEBUG=4]="DEBUG",f))(w||{}),B=Object.values(w).filter(t=>!isNaN(Number(t))),xe=Object.keys(w).filter(t=>isNaN(Number(t))),be={0:"\u26AB",1:"\u{1F534}",2:"\u{1F7E1}",3:"\u{1F535}",4:"\u{1F7E3}"},ve={0:console.log,1:console.error,2:console.warn,3:console.info,4:console.debug};function P(t){let e=w[t];return e===void 0?x(`invalid log level name '${t}'; valid names are: ${xe.join(", ")}`):m(e)}function L(t){let e=w[t];return e===void 0?x(`invalid log level ${t}; valid levels are: ${B[0]}-${B[B.length-1]}`):m(e)}var S="default",Y=new Map;function k(t=S){let e=Y.get(t);return e||(e=new J("WARN",t)),e}function er(t,...e){return t instanceof Function?k(S).error(t,...e):k(S).error(t,...e)}function tr(t,...e){return t instanceof Function?k(S).warn(t,...e):k(S).warn(t,...e)}function rr(t,...e){return t instanceof Function?k(S).info(t,...e):k(S).info(t,...e)}function nr(t,...e){return t instanceof Function?k(S).debug(t,...e):k(S).debug(t,...e)}var J=class{name;_Level;_Handlers;constructor(e,n,c){this.name=n??S,V(e)?this._Level=v(P(v(L(e)))):this._Level=v(P(e)),this._Handlers=c?.handlers||[new G(e)],Y.set(this.name,this)}get level(){return this._Level}set level(e){this.levelName=v(L(e))}get levelName(){return v(L(this._Level))}set levelName(e){this._Level=v(P(e)),this._Handlers.forEach(n=>n.level=this._Level)}get handlers(){return this._Handlers}addHandler(e){this._Handlers.push(e)}removeHandler(e){let n=this._Handlers.indexOf(e);n!==-1&&this._Handlers.splice(n,1)}log(e,n,...c){if(this.level<e)return n instanceof Function?void 0:n;let g,f;return n instanceof Function?(g=n(),f=this.asString(g)):f=this.asString(n),this._Handlers.forEach(d=>{d.handle({date:new Date,level:e,levelName:v(L(e)),logger:this.name,message:f,args:c})}),n instanceof Function?g:n}error(e,...n){return this.log(1,e,...n)}warn(e,...n){return this.log(2,e,...n)}info(e,...n){return this.log(3,e,...n)}debug(e,...n){return this.log(4,e,...n)}asString(e,n=!1){return typeof e=="string"?n?`"${e}"`:e:e===null||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||typeof e>"u"||typeof e=="symbol"?String(e):e instanceof Error?e.stack:typeof e=="object"?`{${Object.entries(e).map(([c,g])=>`"${c}":${this.asString(g,!0)}`).join(",")}}`:"undefined"}},Te=({message:t})=>t,or=t=>{let e=`[${t.date.toISOString()}]`,n=`[${t.levelName}]`,c=t.logger!==S?`[${t.logger}] `:"",g=be[t.level];return`${e} ${g} ${n.padEnd(7," ")} ${c}${t.message}`},G=class{_Level;_FormatterFn;constructor(e,n=Te){V(e)?this._Level=v(P(v(L(e)))):this._Level=v(P(e)),this._FormatterFn=n}get level(){return this._Level}set level(e){this.levelName=v(L(e))}get levelName(){return v(L(this._Level))}set levelName(e){this._Level=v(P(e))}handle(e){this._Level<e.level||this.log(this._FormatterFn(e),e)}log(e,n){ve[n.level](e,...n.args)}};var ar=-758.596,he;(e=>{let t;(d=>(d[d.InvalidPassword=-1]="InvalidPassword",d[d.Unknown=0]="Unknown",d[d.Unencrypted=1]="Unencrypted",d[d.Encrypted=2]="Encrypted"))(t=e.PeerCipherStatus||={})})(he||={});var sr={bytesSent:0,bytesReceived:0,packetsSent:0,packetsReceived:0,rtt:0,packetLoss:0},cr={packetsBuffered:0,packetsSeen:0,packetsProcessed:0,packetsTooEarly:0,packetsTooLate:0,packetsDropped:0,packetsInvalid:0,packetsRepeated:0,packetsLost:0},pr={voiceActivity:{attackThreshold:.9,releaseThreshold:.8},volumeGate:{attackThreshold:-30,releaseThreshold:-40}},ur={echoCanceller:!0,highPassFilter:!1,noiseSuppression:"Moderate",transientSuppressor:!1,gainController:!0};export{ur as APM_DEFAULTS,he as Backend,y as ByteArraySchema,sr as CONNECTION_STATS_INITIAL,O as ChannelSet,$ as ChannelSetSchema,Te as DEFAULT_FORMATTER,cr as JITTER_STATS_INITIAL,C as JsonSchema,ve as LogFunctions,G as LogHandler,xe as LogLevelNames,B as LogLevels,be as LogSymbols,w as LogVerbosity,J as Logger,Ye as MainCommandsRpc,ot as MainNotificationSchema,it as MainNotificationsRpc,ue as MediaAudioPropertiesSchema,h as MediaIdSchema,M as MediaPropertiesSchema,N as MediaSchema,de as MediaVideoPropertiesSchema,ke as MessagePackRpcSchema,E as MessageReceivedSchema,ar as MinDBFS,or as PRETTY_FORMATTER,T as PeerIdSchema,A as PeerPositionSchema,U as PeerSchema,I as PeerUpdateSchema,Qe as RoomCommandsRpc,at as RoomNotificationSchema,st as RoomNotificationsRpc,z as RoomV1,le as RoomV2,Z as Selector,K as Strand,ce as TokenAudienceSchema,Re as TokenClaimsSchema,pe as TokenSubjectSchema,pr as VAD_DEFAULTS,W as VideoCodec,R as WebRtcUpdateSchema,jt as abortableSleep,F as assert,nr as debug,er as error,Ot as extendUrl,q as fail,x as failure,Tt as find,dt as fromBase64,lt as fromBase64Url,yt as fromBytes,Dt as generateUUID,P as getLevelByName,L as getLevelName,k as getLogger,rr as info,St as isAudioCapable,ge as isBlinkBrowser,kt as isElectronBrowser,Zt as isFailure,Lt as isFirefoxBrowser,Gt as isFunction,Ht as isNull,V as isNumber,$t as isObject,Jt as isProperty,Pt as isSafariBrowser,zt as isSharedArrayBufferCapable,qt as isString,Kt as isSuccess,Wt as isUndefined,Ft as nextTick,It as normalizeUrl,_ as oneOrMany,At as sleep,m as success,gt as toBytes,wt as toRaw,v as unwrap,D as unwrapOr,Vt as validateUUID,tr as warn};
|
|
1
|
+
import{z as l}from"zod";var y=l.custom(t=>t instanceof Uint8Array),se=l.union([l.string(),l.number(),l.boolean(),l.null()]),C=l.lazy(()=>l.union([se,l.array(C),l.record(C)])),ke=l.union([l.tuple([l.literal(0),l.number(),l.string(),l.unknown()]),l.tuple([l.literal(1),l.number(),l.nullable(l.string()),l.unknown()]),l.tuple([l.literal(2),l.string(),l.unknown()])]);import{z as s}from"zod";var ce=s.enum(["sfu","gateway"]),pe=s.enum(["connect","roomclose","roomupdate","roombanclient","roomsendmessage"]),Re=s.object({uid:s.string(),cid:s.optional(s.string()),rid:_(s.string()).refine(t=>t.length>=1,{message:"missing rid"}),nsp:s.optional(s.string()),adr:s.optional(s.string()),aud:s.optional(_(ce)),sub:s.optional(_(pe)),exp:s.optional(s.number()),nbf:s.optional(s.number()),ups:s.optional(s.string()),tgs:s.optional(_(s.string())),tsp:s.optional(s.number()),internal:s.optional(s.object({server:s.optional(s.string())}))});function _(t){return s.union([t.transform(e=>[e]),s.array(t)])}import*as r from"zod";import*as c from"zod";var h=c.number(),ue=c.object({kind:c.optional(c.literal("audio")),uid:c.optional(c.string()),customType:c.optional(c.string())}),de=c.object({kind:c.optional(c.literal("video")),codec:c.optional(c.string()),uid:c.optional(c.string()),customType:c.optional(c.string()),id:c.optional(c.string())}),M=c.union([ue,de]),N=c.object({id:h,properties:M,paused:c.boolean()});import*as u from"zod";var T=u.number(),A=u.union([u.tuple([u.number(),u.number(),u.number()]),u.tuple([u.number(),u.number()])]),U=u.object({id:T,user_id:u.string(),user_data:y,medias:u.array(N)}),I=u.discriminatedUnion("kind",[u.object({kind:u.literal("UserDataChanged"),peer_id:T,user_data:y}),u.object({kind:u.literal("MediaStarted"),peer_id:T,media:N}),u.object({kind:u.literal("MediaStopped"),peer_id:T,media_id:h})]);import*as H from"zod";var O=class t{constructor(e=BigInt(0)){this.value=e}from(...e){let n=e.reduce((p,g)=>p|j(g),BigInt(0));return new t(n)}contains(e){return(this.value&j(e))!==BigInt(0)}insert(e){this.value|=j(e)}remove(e){this.value&=~j(e)}[Symbol.iterator](){let e=-1,n=new t(this.value);return{next(){for(;e<63;)if(e+=1,n.contains(e))return{value:e,done:!1};return{value:void 0,done:!0}}}}},$=H.bigint().transform(t=>new O(t));function j(t){return BigInt(1)<<BigInt(t)}var z;(d=>(d.RoomIdSchema=r.string(),d.RoomSchema=r.object({id:d.RoomIdSchema,customer:r.string(),user_data:y,peers:r.array(U)}),d.RoomUpdateSchema=r.discriminatedUnion("kind",[r.object({kind:r.literal("Joined"),room:d.RoomSchema,media_ids:r.array(h),own_peer_id:T}),r.object({kind:r.literal("Left"),reason:r.enum(["RoomClosing","ServerClosing","PeerKicked"])}),r.object({kind:r.literal("UserDataChanged"),user_data:r.optional(y)}),r.object({kind:r.literal("PeerJoined"),peer:U}),r.object({kind:r.literal("PeerLeft"),peer_id:T})]),d.RoomUpdatesSchema=r.object({updates:r.array(d.RoomUpdateSchema)}),d.RoomStatusSchema=r.enum(["Joining","Joined","Closed"]),d.RoomStatusChangedSchema=r.object({status:d.RoomStatusSchema,message:r.optional(r.string())})))(z||={});var le;(i=>(i.ParametersSchema=r.record(C),i.PeerProperties=r.object({user_data:y.optional(),tags:r.array(r.string()).optional(),audio_parameters:i.ParametersSchema.optional(),video_parameters:i.ParametersSchema.optional()}),i.PingSchema=r.object({Ping:r.object({id:r.number()})}),i.ChangeSelfSchema=r.object({ChangeSelf:i.PeerProperties.omit({tags:!0})}),i.SetAudioMaskSchema=r.object({SetAudioMask:r.object({peer_id:r.number(),mask:$})}),i.SendMessageSchema=r.object({SendMessage:r.object({peer_ids:r.number().array().default([]),message:y})}),i.CallSchema=i.PingSchema.or(i.ChangeSelfSchema).or(i.SetAudioMaskSchema).or(i.SendMessageSchema),i.PongSchema=r.object({Pong:r.object({id:r.number()})}),i.JoinedSchema=r.object({Joined:r.object({own_peer_id:r.number(),room_id:r.string(),customer:r.string()})}),i.LeftSchema=r.object({Left:r.object({reason:r.enum(["room_closing","server_closing","peer_kicked"])})}),i.PeerJoinedSchema=r.object({PeerJoined:i.PeerProperties.extend({peer_id:r.number(),user_id:r.string()})}),i.PeerLeftSchema=r.object({PeerLeft:r.object({peer_id:r.number()})}),i.PeerChangedSchema=r.object({PeerChanged:i.PeerProperties.extend({peer_id:r.number()})}),i.NewReconnectTokenSchema=r.object({NewReconnectToken:r.object({token:r.string()})}),i.MessageReceivedSchema=r.object({MessageReceived:r.object({sender_peer_id:r.number(),message:y})}),i.ErrorSchema=r.object({Error:r.object({message:y})}),i.EventSchema=i.PongSchema.or(i.JoinedSchema).or(i.LeftSchema).or(i.PeerJoinedSchema).or(i.PeerLeftSchema).or(i.PeerChangedSchema).or(i.NewReconnectTokenSchema).or(i.MessageReceivedSchema).or(i.ErrorSchema)))(le||={});import{z as me}from"zod";var E=me.object({sender_peer_id:T,message:y});import*as a from"zod";var R=a.discriminatedUnion("kind",[a.object({kind:a.literal("Sdp"),type:a.enum(["Answer","Offer"]),sdp:a.string(),media_map:a.array(a.tuple([h,a.string()]))}),a.object({kind:a.literal("Trickle"),candidate:a.string(),spd_mid:a.optional(a.string()),spd_mline_index:a.optional(a.number()),username_fragment:a.optional(a.union([a.string(),a.null()]))}),a.object({kind:a.literal("TrickleFinished")})]);import{z as o}from"zod";var Ye={Hello:{request:o.object({stream:o.literal("main")}),response:o.null()},JoinRoom:{request:o.object({token:o.string(),room_id:z.RoomIdSchema,user_data:y,position:A}),response:o.object({peer_id:T,stream_id:o.optional(o.number()),token:o.optional(o.string())})},WebRtcUpdate:{request:R,response:o.null()},RequestReconnectToken:{request:o.object({peer_id:o.optional(T)}),response:o.string()},Ping:{request:o.object({}),response:o.null()}},Qe={Hello:{request:o.object({stream:o.literal("room"),token:o.string(),room_id:o.string(),user_data:y,position:A}),response:o.null()},UpdatePeer:{request:o.object({user_data:y}),response:o.null()},StartMedia:{request:o.object({media_id:h,properties:M}),response:o.null()},StopMedia:{request:o.object({media_id:h}),response:o.null()},PauseMedia:{request:o.object({media_id:h}),response:o.null()},ResumeMedia:{request:o.object({media_id:h}),response:o.null()},SetPeerPosition:{request:o.object({position:A}),response:o.null()},SendMessage:{request:o.object({target_peer_ids:o.optional(o.array(T)),message:y}),response:o.null()}};import*as b from"zod";var ot=b.object({name:b.literal("WebRtcUpdate"),properties:R}),it={WebRtcUpdate:R},at=b.union([b.object({name:b.literal("RoomStatusChanged"),properties:z.RoomStatusChangedSchema}),b.object({name:b.literal("RoomUpdated"),properties:z.RoomUpdatesSchema}),b.object({name:b.literal("PeerUpdated"),properties:I}),b.object({name:b.literal("MessageReceived"),properties:E})]),st={RoomStatusChanged:z.RoomStatusChangedSchema,RoomUpdated:z.RoomUpdatesSchema,PeerUpdated:I,MessageReceived:E};function F(t,e){t||q(e)}function q(t){throw new Error(t)}function m(t){return{type:"Success",value:t}}function x(t){return{type:"Failure",reason:t}}function v(t){return t.type==="Failure"&&q(t.reason),t.value}function D(t,e){return t.type==="Success"?t.value:e}function dt(t){try{let e=atob(t),n=Uint8Array.from(e,g=>g.codePointAt(0)),p=new TextDecoder("utf8");return m(p.decode(n))}catch(e){return x(String(e))}}function lt(t){try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),n=Uint8Array.from(e,g=>g.codePointAt(0)),p=new TextDecoder("utf8");return m(p.decode(n))}catch(e){return x(String(e))}}function gt(t){try{F(t!==void 0,"undefined cannot be converted to byte array"),F(t!==null,"null cannot be converted to byte array");let e=JSON.stringify(t),n=new TextEncoder;return m(n.encode(e))}catch(e){return x(String(e))}}function yt(t){try{F(t.length>0,"empty byte array cannot be converted to value");let e=new TextDecoder().decode(t),n=JSON.parse(e);return m(n)}catch(e){return x(String(e))}}var fe=["VP8","VP9","AV1","H264"],W=class{constructor(e){this.codec=e}channels=0;clockRate=9e4;isValid(){return fe.includes(this.codec)}isSupported(){if(typeof RTCRtpReceiver>"u"||typeof RTCRtpReceiver.getCapabilities>"u")return null;let e=D(this.getMimeType(),"").toLowerCase(),n=new Set(D(this.getSdpFmtpLine(),"").split(";").map(p=>p.trim().toLowerCase()));return RTCRtpReceiver.getCapabilities("video")?.codecs?.find(p=>{let g=p.mimeType.toLowerCase(),f=new Set((p.sdpFmtpLine??"").split(";").map(d=>d.trim().toLowerCase()));if(e!==g||n.size!==f.size)return!1;for(let d of n)if(!f.has(d))return!1;return!0})??null}getPayloadType(){switch(this.codec){case"VP8":return m(96);case"VP9":return m(98);case"AV1":return m(41);case"H264":return m(102);default:return x("invalid video codec")}}getMimeType(){switch(this.codec){case"VP8":return m("video/VP8");case"VP9":return m("video/VP9");case"AV1":return m("video/AV1");case"H264":return m("video/H264");default:return x("invalid video codec")}}getSdpFmtpLine(){switch(this.codec){case"VP8":return m("");case"VP9":return m("profile-id=2");case"AV1":return m("level-idx=5;profile=0;tier=0");case"H264":return m("level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f");default:return x("invalid video codec")}}};function Tt(t,e){for(let n of t)if(e(n))return n}function St(){return typeof AudioContext<"u"&&typeof Worker<"u"}function zt(){return typeof SharedArrayBuffer<"u"}function ge(){return/(apple)?webkit\/537\.36/i.test(globalThis.navigator.userAgent)}function kt(){return/electron/i.test(globalThis.navigator.userAgent)}function Lt(){return/firefox|iceweasel|fxios/i.test(globalThis.navigator.userAgent)}function Pt(){return ge()?!1:/safari|applewebkit/i.test(globalThis.navigator.userAgent)}function wt(t){return JSON.parse(JSON.stringify(t))}var Z=class t{constructor(e){this._Generators=e;this._Futures=e.map(t.addIndex)}_Futures;async next(){let[e,n]=await Promise.race(this._Futures);return this._Futures[n]=t.addIndex(this._Generators[n],n),e}static async addIndex(e,n){return[await e(),n]}};function At(t,e){return t<=0?Promise.resolve(e):new Promise(n=>setTimeout(()=>n(e),t))}function jt(t,e){return e.aborted?Promise.resolve("aborted"):new Promise(n=>{let p=()=>n("aborted");e.addEventListener("abort",p,{once:!0}),setTimeout(()=>{e.removeEventListener("abort",p),n(void 0)},t)})}function Ft(){return new Promise(t=>setTimeout(t,0))}var K=class{_Tasks=[];_Running=!1;_Values;constructor(...e){this._Values=e}enqueue(e){return new Promise((n,p)=>{let g=async()=>{try{let f=await e(...this._Values);n(f)}catch(f){p(f)}};this._Tasks.push(g),this._Running||this.execute()})}async execute(){for(this._Running=!0;;){let e=this._Tasks.shift();if(e===void 0)break;await e()}this._Running=!1}};function It(t){let e=t.trim();t.indexOf("://")===-1&&(e=`https://${e}`);try{return m(new URL(e))}catch(n){return x(String(n))}}function Ot(t,e){let n=t.pathname;n.endsWith("/")===!1&&(n+="/");try{return m(new URL(n+e,t))}catch(p){return x(String(p))}}var ye=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Dt(){return crypto.randomUUID()}function Vt(t){return ye.test(t)}function Jt(t,e){return e in t}function Gt(t){return typeof t=="function"}function Ht(t){return typeof t=="object"&&t===null}function V(t){return typeof t=="number"}function $t(t){return typeof t=="object"}function qt(t){return typeof t=="string"}function Wt(t){return typeof t>"u"}function Zt(t){return t.type==="Failure"}function Kt(t){return t.type==="Success"}var w=(f=>(f[f.NONE=0]="NONE",f[f.ERROR=1]="ERROR",f[f.WARN=2]="WARN",f[f.INFO=3]="INFO",f[f.DEBUG=4]="DEBUG",f))(w||{}),B=Object.values(w).filter(t=>!isNaN(Number(t))),xe=Object.keys(w).filter(t=>isNaN(Number(t))),be={0:"\u26AB",1:"\u{1F534}",2:"\u{1F7E1}",3:"\u{1F535}",4:"\u{1F7E3}"},ve={0:console.log,1:console.error,2:console.warn,3:console.info,4:console.debug};function P(t){let e=w[t];return e===void 0?x(`invalid log level name '${t}'; valid names are: ${xe.join(", ")}`):m(e)}function L(t){let e=w[t];return e===void 0?x(`invalid log level ${t}; valid levels are: ${B[0]}-${B[B.length-1]}`):m(e)}var S="default",Y=new Map;function k(t=S){let e=Y.get(t);return e||(e=new J("WARN",t)),e}function er(t,...e){return t instanceof Function?k(S).error(t,...e):k(S).error(t,...e)}function tr(t,...e){return t instanceof Function?k(S).warn(t,...e):k(S).warn(t,...e)}function rr(t,...e){return t instanceof Function?k(S).info(t,...e):k(S).info(t,...e)}function nr(t,...e){return t instanceof Function?k(S).debug(t,...e):k(S).debug(t,...e)}var J=class{name;_Level;_Handlers;constructor(e,n,p){this.name=n??S,V(e)?this._Level=v(P(v(L(e)))):this._Level=v(P(e)),this._Handlers=p?.handlers||[new G(e)],Y.set(this.name,this)}get level(){return this._Level}set level(e){this.levelName=v(L(e))}get levelName(){return v(L(this._Level))}set levelName(e){this._Level=v(P(e)),this._Handlers.forEach(n=>n.level=this._Level)}get handlers(){return this._Handlers}addHandler(e){this._Handlers.push(e)}removeHandler(e){let n=this._Handlers.indexOf(e);n!==-1&&this._Handlers.splice(n,1)}log(e,n,...p){if(this.level<e)return n instanceof Function?void 0:n;let g,f;return n instanceof Function?(g=n(),f=this.asString(g)):f=this.asString(n),this._Handlers.forEach(d=>{d.handle({date:new Date,level:e,levelName:v(L(e)),logger:this.name,message:f,args:p})}),n instanceof Function?g:n}error(e,...n){return this.log(1,e,...n)}warn(e,...n){return this.log(2,e,...n)}info(e,...n){return this.log(3,e,...n)}debug(e,...n){return this.log(4,e,...n)}asString(e,n=!1){return typeof e=="string"?n?`"${e}"`:e:e===null||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||typeof e>"u"||typeof e=="symbol"?String(e):e instanceof Error?e.stack:typeof e=="object"?`{${Object.entries(e).map(([p,g])=>`"${p}":${this.asString(g,!0)}`).join(",")}}`:"undefined"}},Te=({message:t})=>t,or=t=>{let e=`[${t.date.toISOString()}]`,n=`[${t.levelName}]`,p=t.logger!==S?`[${t.logger}] `:"",g=be[t.level];return`${e} ${g} ${n.padEnd(7," ")} ${p}${t.message}`},G=class{_Level;_FormatterFn;constructor(e,n=Te){V(e)?this._Level=v(P(v(L(e)))):this._Level=v(P(e)),this._FormatterFn=n}get level(){return this._Level}set level(e){this.levelName=v(L(e))}get levelName(){return v(L(this._Level))}set levelName(e){this._Level=v(P(e))}handle(e){this._Level<e.level||this.log(this._FormatterFn(e),e)}log(e,n){ve[n.level](e,...n.args)}};var ar=-758.596,he;(e=>{let t;(d=>(d[d.InvalidPassword=-1]="InvalidPassword",d[d.Unknown=0]="Unknown",d[d.Unencrypted=1]="Unencrypted",d[d.Encrypted=2]="Encrypted"))(t=e.PeerCipherStatus||={})})(he||={});var sr={bytesSent:0,bytesReceived:0,packetsSent:0,packetsReceived:0,rtt:0,packetLoss:0},cr={packetsBuffered:0,packetsSeen:0,packetsProcessed:0,packetsTooEarly:0,packetsTooLate:0,packetsDropped:0,packetsInvalid:0,packetsRepeated:0,packetsLost:0},pr={voiceActivity:{attackThreshold:.9,releaseThreshold:.8},volumeGate:{attackThreshold:-30,releaseThreshold:-40}},ur={echoCanceller:!0,highPassFilter:!1,noiseSuppression:"Moderate",transientSuppressor:!1,gainController:!0};export{ur as APM_DEFAULTS,he as Backend,y as ByteArraySchema,sr as CONNECTION_STATS_INITIAL,O as ChannelSet,$ as ChannelSetSchema,Te as DEFAULT_FORMATTER,cr as JITTER_STATS_INITIAL,C as JsonSchema,ve as LogFunctions,G as LogHandler,xe as LogLevelNames,B as LogLevels,be as LogSymbols,w as LogVerbosity,J as Logger,Ye as MainCommandsRpc,ot as MainNotificationSchema,it as MainNotificationsRpc,ue as MediaAudioPropertiesSchema,h as MediaIdSchema,M as MediaPropertiesSchema,N as MediaSchema,de as MediaVideoPropertiesSchema,ke as MessagePackRpcSchema,E as MessageReceivedSchema,ar as MinDBFS,or as PRETTY_FORMATTER,T as PeerIdSchema,A as PeerPositionSchema,U as PeerSchema,I as PeerUpdateSchema,Qe as RoomCommandsRpc,at as RoomNotificationSchema,st as RoomNotificationsRpc,z as RoomV1,le as RoomV2,Z as Selector,K as Strand,ce as TokenAudienceSchema,Re as TokenClaimsSchema,pe as TokenSubjectSchema,pr as VAD_DEFAULTS,W as VideoCodec,R as WebRtcUpdateSchema,jt as abortableSleep,F as assert,nr as debug,er as error,Ot as extendUrl,q as fail,x as failure,Tt as find,dt as fromBase64,lt as fromBase64Url,yt as fromBytes,Dt as generateUUID,P as getLevelByName,L as getLevelName,k as getLogger,rr as info,St as isAudioCapable,ge as isBlinkBrowser,kt as isElectronBrowser,Zt as isFailure,Lt as isFirefoxBrowser,Gt as isFunction,Ht as isNull,V as isNumber,$t as isObject,Jt as isProperty,Pt as isSafariBrowser,zt as isSharedArrayBufferCapable,qt as isString,Kt as isSuccess,Wt as isUndefined,Ft as nextTick,It as normalizeUrl,_ as oneOrMany,At as sleep,m as success,gt as toBytes,wt as toRaw,v as unwrap,D as unwrapOr,Vt as validateUUID,tr as warn};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4players/odin-common",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "A collection of commonly used type definitions and utility functions across ODIN web projects",
|
|
5
5
|
"author": "Josho Bleicker <josho.bleicker@4players.io> (https://www.4players.io)",
|
|
6
6
|
"homepage": "https://www.4players.io",
|
package/plugin/api.d.ts
CHANGED
|
@@ -120,8 +120,9 @@ export declare namespace Backend {
|
|
|
120
120
|
audioCapture?: AudioCapture;
|
|
121
121
|
}
|
|
122
122
|
interface VideoPlayback extends Media {
|
|
123
|
-
readonly
|
|
123
|
+
readonly id: string;
|
|
124
124
|
readonly uid: UID;
|
|
125
|
+
readonly mediaStream?: MediaStream;
|
|
125
126
|
}
|
|
126
127
|
type PlaybackVolume = [number, number];
|
|
127
128
|
type CaptureVolume = 'muted' | number;
|
package/rpc/commands.d.ts
CHANGED
|
@@ -158,12 +158,15 @@ export declare const RoomCommandsRpc: {
|
|
|
158
158
|
codec: z.ZodOptional<z.ZodString>;
|
|
159
159
|
uid: z.ZodOptional<z.ZodString>;
|
|
160
160
|
customType: z.ZodOptional<z.ZodString>;
|
|
161
|
+
id: z.ZodOptional<z.ZodString>;
|
|
161
162
|
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
id?: string | undefined;
|
|
162
164
|
codec?: string | undefined;
|
|
163
165
|
uid?: string | undefined;
|
|
164
166
|
kind?: "video" | undefined;
|
|
165
167
|
customType?: string | undefined;
|
|
166
168
|
}, {
|
|
169
|
+
id?: string | undefined;
|
|
167
170
|
codec?: string | undefined;
|
|
168
171
|
uid?: string | undefined;
|
|
169
172
|
kind?: "video" | undefined;
|
|
@@ -175,6 +178,7 @@ export declare const RoomCommandsRpc: {
|
|
|
175
178
|
kind?: "audio" | undefined;
|
|
176
179
|
customType?: string | undefined;
|
|
177
180
|
} | {
|
|
181
|
+
id?: string | undefined;
|
|
178
182
|
codec?: string | undefined;
|
|
179
183
|
uid?: string | undefined;
|
|
180
184
|
kind?: "video" | undefined;
|
|
@@ -187,6 +191,7 @@ export declare const RoomCommandsRpc: {
|
|
|
187
191
|
kind?: "audio" | undefined;
|
|
188
192
|
customType?: string | undefined;
|
|
189
193
|
} | {
|
|
194
|
+
id?: string | undefined;
|
|
190
195
|
codec?: string | undefined;
|
|
191
196
|
uid?: string | undefined;
|
|
192
197
|
kind?: "video" | undefined;
|
package/rpc/notifications.d.ts
CHANGED
|
@@ -175,12 +175,15 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
175
175
|
codec: z.ZodOptional<z.ZodString>;
|
|
176
176
|
uid: z.ZodOptional<z.ZodString>;
|
|
177
177
|
customType: z.ZodOptional<z.ZodString>;
|
|
178
|
+
id: z.ZodOptional<z.ZodString>;
|
|
178
179
|
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
id?: string | undefined;
|
|
179
181
|
codec?: string | undefined;
|
|
180
182
|
uid?: string | undefined;
|
|
181
183
|
kind?: "video" | undefined;
|
|
182
184
|
customType?: string | undefined;
|
|
183
185
|
}, {
|
|
186
|
+
id?: string | undefined;
|
|
184
187
|
codec?: string | undefined;
|
|
185
188
|
uid?: string | undefined;
|
|
186
189
|
kind?: "video" | undefined;
|
|
@@ -195,6 +198,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
195
198
|
kind?: "audio" | undefined;
|
|
196
199
|
customType?: string | undefined;
|
|
197
200
|
} | {
|
|
201
|
+
id?: string | undefined;
|
|
198
202
|
codec?: string | undefined;
|
|
199
203
|
uid?: string | undefined;
|
|
200
204
|
kind?: "video" | undefined;
|
|
@@ -208,6 +212,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
208
212
|
kind?: "audio" | undefined;
|
|
209
213
|
customType?: string | undefined;
|
|
210
214
|
} | {
|
|
215
|
+
id?: string | undefined;
|
|
211
216
|
codec?: string | undefined;
|
|
212
217
|
uid?: string | undefined;
|
|
213
218
|
kind?: "video" | undefined;
|
|
@@ -226,6 +231,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
226
231
|
kind?: "audio" | undefined;
|
|
227
232
|
customType?: string | undefined;
|
|
228
233
|
} | {
|
|
234
|
+
id?: string | undefined;
|
|
229
235
|
codec?: string | undefined;
|
|
230
236
|
uid?: string | undefined;
|
|
231
237
|
kind?: "video" | undefined;
|
|
@@ -244,6 +250,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
244
250
|
kind?: "audio" | undefined;
|
|
245
251
|
customType?: string | undefined;
|
|
246
252
|
} | {
|
|
253
|
+
id?: string | undefined;
|
|
247
254
|
codec?: string | undefined;
|
|
248
255
|
uid?: string | undefined;
|
|
249
256
|
kind?: "video" | undefined;
|
|
@@ -267,6 +274,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
267
274
|
kind?: "audio" | undefined;
|
|
268
275
|
customType?: string | undefined;
|
|
269
276
|
} | {
|
|
277
|
+
id?: string | undefined;
|
|
270
278
|
codec?: string | undefined;
|
|
271
279
|
uid?: string | undefined;
|
|
272
280
|
kind?: "video" | undefined;
|
|
@@ -290,6 +298,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
290
298
|
kind?: "audio" | undefined;
|
|
291
299
|
customType?: string | undefined;
|
|
292
300
|
} | {
|
|
301
|
+
id?: string | undefined;
|
|
293
302
|
codec?: string | undefined;
|
|
294
303
|
uid?: string | undefined;
|
|
295
304
|
kind?: "video" | undefined;
|
|
@@ -318,6 +327,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
318
327
|
kind?: "audio" | undefined;
|
|
319
328
|
customType?: string | undefined;
|
|
320
329
|
} | {
|
|
330
|
+
id?: string | undefined;
|
|
321
331
|
codec?: string | undefined;
|
|
322
332
|
uid?: string | undefined;
|
|
323
333
|
kind?: "video" | undefined;
|
|
@@ -346,6 +356,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
346
356
|
kind?: "audio" | undefined;
|
|
347
357
|
customType?: string | undefined;
|
|
348
358
|
} | {
|
|
359
|
+
id?: string | undefined;
|
|
349
360
|
codec?: string | undefined;
|
|
350
361
|
uid?: string | undefined;
|
|
351
362
|
kind?: "video" | undefined;
|
|
@@ -399,12 +410,15 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
399
410
|
codec: z.ZodOptional<z.ZodString>;
|
|
400
411
|
uid: z.ZodOptional<z.ZodString>;
|
|
401
412
|
customType: z.ZodOptional<z.ZodString>;
|
|
413
|
+
id: z.ZodOptional<z.ZodString>;
|
|
402
414
|
}, "strip", z.ZodTypeAny, {
|
|
415
|
+
id?: string | undefined;
|
|
403
416
|
codec?: string | undefined;
|
|
404
417
|
uid?: string | undefined;
|
|
405
418
|
kind?: "video" | undefined;
|
|
406
419
|
customType?: string | undefined;
|
|
407
420
|
}, {
|
|
421
|
+
id?: string | undefined;
|
|
408
422
|
codec?: string | undefined;
|
|
409
423
|
uid?: string | undefined;
|
|
410
424
|
kind?: "video" | undefined;
|
|
@@ -419,6 +433,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
419
433
|
kind?: "audio" | undefined;
|
|
420
434
|
customType?: string | undefined;
|
|
421
435
|
} | {
|
|
436
|
+
id?: string | undefined;
|
|
422
437
|
codec?: string | undefined;
|
|
423
438
|
uid?: string | undefined;
|
|
424
439
|
kind?: "video" | undefined;
|
|
@@ -432,6 +447,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
432
447
|
kind?: "audio" | undefined;
|
|
433
448
|
customType?: string | undefined;
|
|
434
449
|
} | {
|
|
450
|
+
id?: string | undefined;
|
|
435
451
|
codec?: string | undefined;
|
|
436
452
|
uid?: string | undefined;
|
|
437
453
|
kind?: "video" | undefined;
|
|
@@ -450,6 +466,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
450
466
|
kind?: "audio" | undefined;
|
|
451
467
|
customType?: string | undefined;
|
|
452
468
|
} | {
|
|
469
|
+
id?: string | undefined;
|
|
453
470
|
codec?: string | undefined;
|
|
454
471
|
uid?: string | undefined;
|
|
455
472
|
kind?: "video" | undefined;
|
|
@@ -468,6 +485,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
468
485
|
kind?: "audio" | undefined;
|
|
469
486
|
customType?: string | undefined;
|
|
470
487
|
} | {
|
|
488
|
+
id?: string | undefined;
|
|
471
489
|
codec?: string | undefined;
|
|
472
490
|
uid?: string | undefined;
|
|
473
491
|
kind?: "video" | undefined;
|
|
@@ -489,6 +507,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
489
507
|
kind?: "audio" | undefined;
|
|
490
508
|
customType?: string | undefined;
|
|
491
509
|
} | {
|
|
510
|
+
id?: string | undefined;
|
|
492
511
|
codec?: string | undefined;
|
|
493
512
|
uid?: string | undefined;
|
|
494
513
|
kind?: "video" | undefined;
|
|
@@ -510,6 +529,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
510
529
|
kind?: "audio" | undefined;
|
|
511
530
|
customType?: string | undefined;
|
|
512
531
|
} | {
|
|
532
|
+
id?: string | undefined;
|
|
513
533
|
codec?: string | undefined;
|
|
514
534
|
uid?: string | undefined;
|
|
515
535
|
kind?: "video" | undefined;
|
|
@@ -546,6 +566,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
546
566
|
kind?: "audio" | undefined;
|
|
547
567
|
customType?: string | undefined;
|
|
548
568
|
} | {
|
|
569
|
+
id?: string | undefined;
|
|
549
570
|
codec?: string | undefined;
|
|
550
571
|
uid?: string | undefined;
|
|
551
572
|
kind?: "video" | undefined;
|
|
@@ -576,6 +597,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
576
597
|
kind?: "audio" | undefined;
|
|
577
598
|
customType?: string | undefined;
|
|
578
599
|
} | {
|
|
600
|
+
id?: string | undefined;
|
|
579
601
|
codec?: string | undefined;
|
|
580
602
|
uid?: string | undefined;
|
|
581
603
|
kind?: "video" | undefined;
|
|
@@ -606,6 +628,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
606
628
|
kind?: "audio" | undefined;
|
|
607
629
|
customType?: string | undefined;
|
|
608
630
|
} | {
|
|
631
|
+
id?: string | undefined;
|
|
609
632
|
codec?: string | undefined;
|
|
610
633
|
uid?: string | undefined;
|
|
611
634
|
kind?: "video" | undefined;
|
|
@@ -636,6 +659,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
636
659
|
kind?: "audio" | undefined;
|
|
637
660
|
customType?: string | undefined;
|
|
638
661
|
} | {
|
|
662
|
+
id?: string | undefined;
|
|
639
663
|
codec?: string | undefined;
|
|
640
664
|
uid?: string | undefined;
|
|
641
665
|
kind?: "video" | undefined;
|
|
@@ -669,6 +693,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
669
693
|
kind?: "audio" | undefined;
|
|
670
694
|
customType?: string | undefined;
|
|
671
695
|
} | {
|
|
696
|
+
id?: string | undefined;
|
|
672
697
|
codec?: string | undefined;
|
|
673
698
|
uid?: string | undefined;
|
|
674
699
|
kind?: "video" | undefined;
|
|
@@ -699,6 +724,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
699
724
|
kind?: "audio" | undefined;
|
|
700
725
|
customType?: string | undefined;
|
|
701
726
|
} | {
|
|
727
|
+
id?: string | undefined;
|
|
702
728
|
codec?: string | undefined;
|
|
703
729
|
uid?: string | undefined;
|
|
704
730
|
kind?: "video" | undefined;
|
|
@@ -732,6 +758,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
732
758
|
kind?: "audio" | undefined;
|
|
733
759
|
customType?: string | undefined;
|
|
734
760
|
} | {
|
|
761
|
+
id?: string | undefined;
|
|
735
762
|
codec?: string | undefined;
|
|
736
763
|
uid?: string | undefined;
|
|
737
764
|
kind?: "video" | undefined;
|
|
@@ -762,6 +789,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
762
789
|
kind?: "audio" | undefined;
|
|
763
790
|
customType?: string | undefined;
|
|
764
791
|
} | {
|
|
792
|
+
id?: string | undefined;
|
|
765
793
|
codec?: string | undefined;
|
|
766
794
|
uid?: string | undefined;
|
|
767
795
|
kind?: "video" | undefined;
|
|
@@ -810,12 +838,15 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
810
838
|
codec: z.ZodOptional<z.ZodString>;
|
|
811
839
|
uid: z.ZodOptional<z.ZodString>;
|
|
812
840
|
customType: z.ZodOptional<z.ZodString>;
|
|
841
|
+
id: z.ZodOptional<z.ZodString>;
|
|
813
842
|
}, "strip", z.ZodTypeAny, {
|
|
843
|
+
id?: string | undefined;
|
|
814
844
|
codec?: string | undefined;
|
|
815
845
|
uid?: string | undefined;
|
|
816
846
|
kind?: "video" | undefined;
|
|
817
847
|
customType?: string | undefined;
|
|
818
848
|
}, {
|
|
849
|
+
id?: string | undefined;
|
|
819
850
|
codec?: string | undefined;
|
|
820
851
|
uid?: string | undefined;
|
|
821
852
|
kind?: "video" | undefined;
|
|
@@ -830,6 +861,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
830
861
|
kind?: "audio" | undefined;
|
|
831
862
|
customType?: string | undefined;
|
|
832
863
|
} | {
|
|
864
|
+
id?: string | undefined;
|
|
833
865
|
codec?: string | undefined;
|
|
834
866
|
uid?: string | undefined;
|
|
835
867
|
kind?: "video" | undefined;
|
|
@@ -843,6 +875,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
843
875
|
kind?: "audio" | undefined;
|
|
844
876
|
customType?: string | undefined;
|
|
845
877
|
} | {
|
|
878
|
+
id?: string | undefined;
|
|
846
879
|
codec?: string | undefined;
|
|
847
880
|
uid?: string | undefined;
|
|
848
881
|
kind?: "video" | undefined;
|
|
@@ -858,6 +891,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
858
891
|
kind?: "audio" | undefined;
|
|
859
892
|
customType?: string | undefined;
|
|
860
893
|
} | {
|
|
894
|
+
id?: string | undefined;
|
|
861
895
|
codec?: string | undefined;
|
|
862
896
|
uid?: string | undefined;
|
|
863
897
|
kind?: "video" | undefined;
|
|
@@ -875,6 +909,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
875
909
|
kind?: "audio" | undefined;
|
|
876
910
|
customType?: string | undefined;
|
|
877
911
|
} | {
|
|
912
|
+
id?: string | undefined;
|
|
878
913
|
codec?: string | undefined;
|
|
879
914
|
uid?: string | undefined;
|
|
880
915
|
kind?: "video" | undefined;
|
|
@@ -911,6 +946,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
911
946
|
kind?: "audio" | undefined;
|
|
912
947
|
customType?: string | undefined;
|
|
913
948
|
} | {
|
|
949
|
+
id?: string | undefined;
|
|
914
950
|
codec?: string | undefined;
|
|
915
951
|
uid?: string | undefined;
|
|
916
952
|
kind?: "video" | undefined;
|
|
@@ -939,6 +975,7 @@ export declare const RoomNotificationSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
939
975
|
kind?: "audio" | undefined;
|
|
940
976
|
customType?: string | undefined;
|
|
941
977
|
} | {
|
|
978
|
+
id?: string | undefined;
|
|
942
979
|
codec?: string | undefined;
|
|
943
980
|
uid?: string | undefined;
|
|
944
981
|
kind?: "video" | undefined;
|
|
@@ -1019,12 +1056,15 @@ export declare const RoomNotificationsRpc: {
|
|
|
1019
1056
|
codec: z.ZodOptional<z.ZodString>;
|
|
1020
1057
|
uid: z.ZodOptional<z.ZodString>;
|
|
1021
1058
|
customType: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1022
1060
|
}, "strip", z.ZodTypeAny, {
|
|
1061
|
+
id?: string | undefined;
|
|
1023
1062
|
codec?: string | undefined;
|
|
1024
1063
|
uid?: string | undefined;
|
|
1025
1064
|
kind?: "video" | undefined;
|
|
1026
1065
|
customType?: string | undefined;
|
|
1027
1066
|
}, {
|
|
1067
|
+
id?: string | undefined;
|
|
1028
1068
|
codec?: string | undefined;
|
|
1029
1069
|
uid?: string | undefined;
|
|
1030
1070
|
kind?: "video" | undefined;
|
|
@@ -1039,6 +1079,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1039
1079
|
kind?: "audio" | undefined;
|
|
1040
1080
|
customType?: string | undefined;
|
|
1041
1081
|
} | {
|
|
1082
|
+
id?: string | undefined;
|
|
1042
1083
|
codec?: string | undefined;
|
|
1043
1084
|
uid?: string | undefined;
|
|
1044
1085
|
kind?: "video" | undefined;
|
|
@@ -1052,6 +1093,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1052
1093
|
kind?: "audio" | undefined;
|
|
1053
1094
|
customType?: string | undefined;
|
|
1054
1095
|
} | {
|
|
1096
|
+
id?: string | undefined;
|
|
1055
1097
|
codec?: string | undefined;
|
|
1056
1098
|
uid?: string | undefined;
|
|
1057
1099
|
kind?: "video" | undefined;
|
|
@@ -1070,6 +1112,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1070
1112
|
kind?: "audio" | undefined;
|
|
1071
1113
|
customType?: string | undefined;
|
|
1072
1114
|
} | {
|
|
1115
|
+
id?: string | undefined;
|
|
1073
1116
|
codec?: string | undefined;
|
|
1074
1117
|
uid?: string | undefined;
|
|
1075
1118
|
kind?: "video" | undefined;
|
|
@@ -1088,6 +1131,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1088
1131
|
kind?: "audio" | undefined;
|
|
1089
1132
|
customType?: string | undefined;
|
|
1090
1133
|
} | {
|
|
1134
|
+
id?: string | undefined;
|
|
1091
1135
|
codec?: string | undefined;
|
|
1092
1136
|
uid?: string | undefined;
|
|
1093
1137
|
kind?: "video" | undefined;
|
|
@@ -1111,6 +1155,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1111
1155
|
kind?: "audio" | undefined;
|
|
1112
1156
|
customType?: string | undefined;
|
|
1113
1157
|
} | {
|
|
1158
|
+
id?: string | undefined;
|
|
1114
1159
|
codec?: string | undefined;
|
|
1115
1160
|
uid?: string | undefined;
|
|
1116
1161
|
kind?: "video" | undefined;
|
|
@@ -1134,6 +1179,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1134
1179
|
kind?: "audio" | undefined;
|
|
1135
1180
|
customType?: string | undefined;
|
|
1136
1181
|
} | {
|
|
1182
|
+
id?: string | undefined;
|
|
1137
1183
|
codec?: string | undefined;
|
|
1138
1184
|
uid?: string | undefined;
|
|
1139
1185
|
kind?: "video" | undefined;
|
|
@@ -1162,6 +1208,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1162
1208
|
kind?: "audio" | undefined;
|
|
1163
1209
|
customType?: string | undefined;
|
|
1164
1210
|
} | {
|
|
1211
|
+
id?: string | undefined;
|
|
1165
1212
|
codec?: string | undefined;
|
|
1166
1213
|
uid?: string | undefined;
|
|
1167
1214
|
kind?: "video" | undefined;
|
|
@@ -1190,6 +1237,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1190
1237
|
kind?: "audio" | undefined;
|
|
1191
1238
|
customType?: string | undefined;
|
|
1192
1239
|
} | {
|
|
1240
|
+
id?: string | undefined;
|
|
1193
1241
|
codec?: string | undefined;
|
|
1194
1242
|
uid?: string | undefined;
|
|
1195
1243
|
kind?: "video" | undefined;
|
|
@@ -1243,12 +1291,15 @@ export declare const RoomNotificationsRpc: {
|
|
|
1243
1291
|
codec: z.ZodOptional<z.ZodString>;
|
|
1244
1292
|
uid: z.ZodOptional<z.ZodString>;
|
|
1245
1293
|
customType: z.ZodOptional<z.ZodString>;
|
|
1294
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1246
1295
|
}, "strip", z.ZodTypeAny, {
|
|
1296
|
+
id?: string | undefined;
|
|
1247
1297
|
codec?: string | undefined;
|
|
1248
1298
|
uid?: string | undefined;
|
|
1249
1299
|
kind?: "video" | undefined;
|
|
1250
1300
|
customType?: string | undefined;
|
|
1251
1301
|
}, {
|
|
1302
|
+
id?: string | undefined;
|
|
1252
1303
|
codec?: string | undefined;
|
|
1253
1304
|
uid?: string | undefined;
|
|
1254
1305
|
kind?: "video" | undefined;
|
|
@@ -1263,6 +1314,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1263
1314
|
kind?: "audio" | undefined;
|
|
1264
1315
|
customType?: string | undefined;
|
|
1265
1316
|
} | {
|
|
1317
|
+
id?: string | undefined;
|
|
1266
1318
|
codec?: string | undefined;
|
|
1267
1319
|
uid?: string | undefined;
|
|
1268
1320
|
kind?: "video" | undefined;
|
|
@@ -1276,6 +1328,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1276
1328
|
kind?: "audio" | undefined;
|
|
1277
1329
|
customType?: string | undefined;
|
|
1278
1330
|
} | {
|
|
1331
|
+
id?: string | undefined;
|
|
1279
1332
|
codec?: string | undefined;
|
|
1280
1333
|
uid?: string | undefined;
|
|
1281
1334
|
kind?: "video" | undefined;
|
|
@@ -1294,6 +1347,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1294
1347
|
kind?: "audio" | undefined;
|
|
1295
1348
|
customType?: string | undefined;
|
|
1296
1349
|
} | {
|
|
1350
|
+
id?: string | undefined;
|
|
1297
1351
|
codec?: string | undefined;
|
|
1298
1352
|
uid?: string | undefined;
|
|
1299
1353
|
kind?: "video" | undefined;
|
|
@@ -1312,6 +1366,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1312
1366
|
kind?: "audio" | undefined;
|
|
1313
1367
|
customType?: string | undefined;
|
|
1314
1368
|
} | {
|
|
1369
|
+
id?: string | undefined;
|
|
1315
1370
|
codec?: string | undefined;
|
|
1316
1371
|
uid?: string | undefined;
|
|
1317
1372
|
kind?: "video" | undefined;
|
|
@@ -1333,6 +1388,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1333
1388
|
kind?: "audio" | undefined;
|
|
1334
1389
|
customType?: string | undefined;
|
|
1335
1390
|
} | {
|
|
1391
|
+
id?: string | undefined;
|
|
1336
1392
|
codec?: string | undefined;
|
|
1337
1393
|
uid?: string | undefined;
|
|
1338
1394
|
kind?: "video" | undefined;
|
|
@@ -1354,6 +1410,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1354
1410
|
kind?: "audio" | undefined;
|
|
1355
1411
|
customType?: string | undefined;
|
|
1356
1412
|
} | {
|
|
1413
|
+
id?: string | undefined;
|
|
1357
1414
|
codec?: string | undefined;
|
|
1358
1415
|
uid?: string | undefined;
|
|
1359
1416
|
kind?: "video" | undefined;
|
|
@@ -1390,6 +1447,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1390
1447
|
kind?: "audio" | undefined;
|
|
1391
1448
|
customType?: string | undefined;
|
|
1392
1449
|
} | {
|
|
1450
|
+
id?: string | undefined;
|
|
1393
1451
|
codec?: string | undefined;
|
|
1394
1452
|
uid?: string | undefined;
|
|
1395
1453
|
kind?: "video" | undefined;
|
|
@@ -1420,6 +1478,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1420
1478
|
kind?: "audio" | undefined;
|
|
1421
1479
|
customType?: string | undefined;
|
|
1422
1480
|
} | {
|
|
1481
|
+
id?: string | undefined;
|
|
1423
1482
|
codec?: string | undefined;
|
|
1424
1483
|
uid?: string | undefined;
|
|
1425
1484
|
kind?: "video" | undefined;
|
|
@@ -1450,6 +1509,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1450
1509
|
kind?: "audio" | undefined;
|
|
1451
1510
|
customType?: string | undefined;
|
|
1452
1511
|
} | {
|
|
1512
|
+
id?: string | undefined;
|
|
1453
1513
|
codec?: string | undefined;
|
|
1454
1514
|
uid?: string | undefined;
|
|
1455
1515
|
kind?: "video" | undefined;
|
|
@@ -1480,6 +1540,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1480
1540
|
kind?: "audio" | undefined;
|
|
1481
1541
|
customType?: string | undefined;
|
|
1482
1542
|
} | {
|
|
1543
|
+
id?: string | undefined;
|
|
1483
1544
|
codec?: string | undefined;
|
|
1484
1545
|
uid?: string | undefined;
|
|
1485
1546
|
kind?: "video" | undefined;
|
|
@@ -1526,12 +1587,15 @@ export declare const RoomNotificationsRpc: {
|
|
|
1526
1587
|
codec: z.ZodOptional<z.ZodString>;
|
|
1527
1588
|
uid: z.ZodOptional<z.ZodString>;
|
|
1528
1589
|
customType: z.ZodOptional<z.ZodString>;
|
|
1590
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1529
1591
|
}, "strip", z.ZodTypeAny, {
|
|
1592
|
+
id?: string | undefined;
|
|
1530
1593
|
codec?: string | undefined;
|
|
1531
1594
|
uid?: string | undefined;
|
|
1532
1595
|
kind?: "video" | undefined;
|
|
1533
1596
|
customType?: string | undefined;
|
|
1534
1597
|
}, {
|
|
1598
|
+
id?: string | undefined;
|
|
1535
1599
|
codec?: string | undefined;
|
|
1536
1600
|
uid?: string | undefined;
|
|
1537
1601
|
kind?: "video" | undefined;
|
|
@@ -1546,6 +1610,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1546
1610
|
kind?: "audio" | undefined;
|
|
1547
1611
|
customType?: string | undefined;
|
|
1548
1612
|
} | {
|
|
1613
|
+
id?: string | undefined;
|
|
1549
1614
|
codec?: string | undefined;
|
|
1550
1615
|
uid?: string | undefined;
|
|
1551
1616
|
kind?: "video" | undefined;
|
|
@@ -1559,6 +1624,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1559
1624
|
kind?: "audio" | undefined;
|
|
1560
1625
|
customType?: string | undefined;
|
|
1561
1626
|
} | {
|
|
1627
|
+
id?: string | undefined;
|
|
1562
1628
|
codec?: string | undefined;
|
|
1563
1629
|
uid?: string | undefined;
|
|
1564
1630
|
kind?: "video" | undefined;
|
|
@@ -1574,6 +1640,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1574
1640
|
kind?: "audio" | undefined;
|
|
1575
1641
|
customType?: string | undefined;
|
|
1576
1642
|
} | {
|
|
1643
|
+
id?: string | undefined;
|
|
1577
1644
|
codec?: string | undefined;
|
|
1578
1645
|
uid?: string | undefined;
|
|
1579
1646
|
kind?: "video" | undefined;
|
|
@@ -1591,6 +1658,7 @@ export declare const RoomNotificationsRpc: {
|
|
|
1591
1658
|
kind?: "audio" | undefined;
|
|
1592
1659
|
customType?: string | undefined;
|
|
1593
1660
|
} | {
|
|
1661
|
+
id?: string | undefined;
|
|
1594
1662
|
codec?: string | undefined;
|
|
1595
1663
|
uid?: string | undefined;
|
|
1596
1664
|
kind?: "video" | undefined;
|
package/schema/media.d.ts
CHANGED
|
@@ -20,12 +20,15 @@ export declare const MediaVideoPropertiesSchema: z.ZodObject<{
|
|
|
20
20
|
codec: z.ZodOptional<z.ZodString>;
|
|
21
21
|
uid: z.ZodOptional<z.ZodString>;
|
|
22
22
|
customType: z.ZodOptional<z.ZodString>;
|
|
23
|
+
id: z.ZodOptional<z.ZodString>;
|
|
23
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
id?: string | undefined;
|
|
24
26
|
codec?: string | undefined;
|
|
25
27
|
uid?: string | undefined;
|
|
26
28
|
kind?: "video" | undefined;
|
|
27
29
|
customType?: string | undefined;
|
|
28
30
|
}, {
|
|
31
|
+
id?: string | undefined;
|
|
29
32
|
codec?: string | undefined;
|
|
30
33
|
uid?: string | undefined;
|
|
31
34
|
kind?: "video" | undefined;
|
|
@@ -49,12 +52,15 @@ export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
49
52
|
codec: z.ZodOptional<z.ZodString>;
|
|
50
53
|
uid: z.ZodOptional<z.ZodString>;
|
|
51
54
|
customType: z.ZodOptional<z.ZodString>;
|
|
55
|
+
id: z.ZodOptional<z.ZodString>;
|
|
52
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
id?: string | undefined;
|
|
53
58
|
codec?: string | undefined;
|
|
54
59
|
uid?: string | undefined;
|
|
55
60
|
kind?: "video" | undefined;
|
|
56
61
|
customType?: string | undefined;
|
|
57
62
|
}, {
|
|
63
|
+
id?: string | undefined;
|
|
58
64
|
codec?: string | undefined;
|
|
59
65
|
uid?: string | undefined;
|
|
60
66
|
kind?: "video" | undefined;
|
|
@@ -80,12 +86,15 @@ export declare const MediaSchema: z.ZodObject<{
|
|
|
80
86
|
codec: z.ZodOptional<z.ZodString>;
|
|
81
87
|
uid: z.ZodOptional<z.ZodString>;
|
|
82
88
|
customType: z.ZodOptional<z.ZodString>;
|
|
89
|
+
id: z.ZodOptional<z.ZodString>;
|
|
83
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
id?: string | undefined;
|
|
84
92
|
codec?: string | undefined;
|
|
85
93
|
uid?: string | undefined;
|
|
86
94
|
kind?: "video" | undefined;
|
|
87
95
|
customType?: string | undefined;
|
|
88
96
|
}, {
|
|
97
|
+
id?: string | undefined;
|
|
89
98
|
codec?: string | undefined;
|
|
90
99
|
uid?: string | undefined;
|
|
91
100
|
kind?: "video" | undefined;
|
|
@@ -100,6 +109,7 @@ export declare const MediaSchema: z.ZodObject<{
|
|
|
100
109
|
kind?: "audio" | undefined;
|
|
101
110
|
customType?: string | undefined;
|
|
102
111
|
} | {
|
|
112
|
+
id?: string | undefined;
|
|
103
113
|
codec?: string | undefined;
|
|
104
114
|
uid?: string | undefined;
|
|
105
115
|
kind?: "video" | undefined;
|
|
@@ -113,6 +123,7 @@ export declare const MediaSchema: z.ZodObject<{
|
|
|
113
123
|
kind?: "audio" | undefined;
|
|
114
124
|
customType?: string | undefined;
|
|
115
125
|
} | {
|
|
126
|
+
id?: string | undefined;
|
|
116
127
|
codec?: string | undefined;
|
|
117
128
|
uid?: string | undefined;
|
|
118
129
|
kind?: "video" | undefined;
|
package/schema/peer.d.ts
CHANGED
|
@@ -26,12 +26,15 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
26
26
|
codec: z.ZodOptional<z.ZodString>;
|
|
27
27
|
uid: z.ZodOptional<z.ZodString>;
|
|
28
28
|
customType: z.ZodOptional<z.ZodString>;
|
|
29
|
+
id: z.ZodOptional<z.ZodString>;
|
|
29
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
id?: string | undefined;
|
|
30
32
|
codec?: string | undefined;
|
|
31
33
|
uid?: string | undefined;
|
|
32
34
|
kind?: "video" | undefined;
|
|
33
35
|
customType?: string | undefined;
|
|
34
36
|
}, {
|
|
37
|
+
id?: string | undefined;
|
|
35
38
|
codec?: string | undefined;
|
|
36
39
|
uid?: string | undefined;
|
|
37
40
|
kind?: "video" | undefined;
|
|
@@ -46,6 +49,7 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
46
49
|
kind?: "audio" | undefined;
|
|
47
50
|
customType?: string | undefined;
|
|
48
51
|
} | {
|
|
52
|
+
id?: string | undefined;
|
|
49
53
|
codec?: string | undefined;
|
|
50
54
|
uid?: string | undefined;
|
|
51
55
|
kind?: "video" | undefined;
|
|
@@ -59,6 +63,7 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
59
63
|
kind?: "audio" | undefined;
|
|
60
64
|
customType?: string | undefined;
|
|
61
65
|
} | {
|
|
66
|
+
id?: string | undefined;
|
|
62
67
|
codec?: string | undefined;
|
|
63
68
|
uid?: string | undefined;
|
|
64
69
|
kind?: "video" | undefined;
|
|
@@ -77,6 +82,7 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
77
82
|
kind?: "audio" | undefined;
|
|
78
83
|
customType?: string | undefined;
|
|
79
84
|
} | {
|
|
85
|
+
id?: string | undefined;
|
|
80
86
|
codec?: string | undefined;
|
|
81
87
|
uid?: string | undefined;
|
|
82
88
|
kind?: "video" | undefined;
|
|
@@ -95,6 +101,7 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
95
101
|
kind?: "audio" | undefined;
|
|
96
102
|
customType?: string | undefined;
|
|
97
103
|
} | {
|
|
104
|
+
id?: string | undefined;
|
|
98
105
|
codec?: string | undefined;
|
|
99
106
|
uid?: string | undefined;
|
|
100
107
|
kind?: "video" | undefined;
|
|
@@ -137,12 +144,15 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
137
144
|
codec: z.ZodOptional<z.ZodString>;
|
|
138
145
|
uid: z.ZodOptional<z.ZodString>;
|
|
139
146
|
customType: z.ZodOptional<z.ZodString>;
|
|
147
|
+
id: z.ZodOptional<z.ZodString>;
|
|
140
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
id?: string | undefined;
|
|
141
150
|
codec?: string | undefined;
|
|
142
151
|
uid?: string | undefined;
|
|
143
152
|
kind?: "video" | undefined;
|
|
144
153
|
customType?: string | undefined;
|
|
145
154
|
}, {
|
|
155
|
+
id?: string | undefined;
|
|
146
156
|
codec?: string | undefined;
|
|
147
157
|
uid?: string | undefined;
|
|
148
158
|
kind?: "video" | undefined;
|
|
@@ -157,6 +167,7 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
157
167
|
kind?: "audio" | undefined;
|
|
158
168
|
customType?: string | undefined;
|
|
159
169
|
} | {
|
|
170
|
+
id?: string | undefined;
|
|
160
171
|
codec?: string | undefined;
|
|
161
172
|
uid?: string | undefined;
|
|
162
173
|
kind?: "video" | undefined;
|
|
@@ -170,6 +181,7 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
170
181
|
kind?: "audio" | undefined;
|
|
171
182
|
customType?: string | undefined;
|
|
172
183
|
} | {
|
|
184
|
+
id?: string | undefined;
|
|
173
185
|
codec?: string | undefined;
|
|
174
186
|
uid?: string | undefined;
|
|
175
187
|
kind?: "video" | undefined;
|
|
@@ -185,6 +197,7 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
185
197
|
kind?: "audio" | undefined;
|
|
186
198
|
customType?: string | undefined;
|
|
187
199
|
} | {
|
|
200
|
+
id?: string | undefined;
|
|
188
201
|
codec?: string | undefined;
|
|
189
202
|
uid?: string | undefined;
|
|
190
203
|
kind?: "video" | undefined;
|
|
@@ -202,6 +215,7 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
202
215
|
kind?: "audio" | undefined;
|
|
203
216
|
customType?: string | undefined;
|
|
204
217
|
} | {
|
|
218
|
+
id?: string | undefined;
|
|
205
219
|
codec?: string | undefined;
|
|
206
220
|
uid?: string | undefined;
|
|
207
221
|
kind?: "video" | undefined;
|
package/schema/room.d.ts
CHANGED
|
@@ -29,12 +29,15 @@ export declare namespace RoomV1 {
|
|
|
29
29
|
codec: z.ZodOptional<z.ZodString>;
|
|
30
30
|
uid: z.ZodOptional<z.ZodString>;
|
|
31
31
|
customType: z.ZodOptional<z.ZodString>;
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
id?: string | undefined;
|
|
33
35
|
codec?: string | undefined;
|
|
34
36
|
uid?: string | undefined;
|
|
35
37
|
kind?: "video" | undefined;
|
|
36
38
|
customType?: string | undefined;
|
|
37
39
|
}, {
|
|
40
|
+
id?: string | undefined;
|
|
38
41
|
codec?: string | undefined;
|
|
39
42
|
uid?: string | undefined;
|
|
40
43
|
kind?: "video" | undefined;
|
|
@@ -49,6 +52,7 @@ export declare namespace RoomV1 {
|
|
|
49
52
|
kind?: "audio" | undefined;
|
|
50
53
|
customType?: string | undefined;
|
|
51
54
|
} | {
|
|
55
|
+
id?: string | undefined;
|
|
52
56
|
codec?: string | undefined;
|
|
53
57
|
uid?: string | undefined;
|
|
54
58
|
kind?: "video" | undefined;
|
|
@@ -62,6 +66,7 @@ export declare namespace RoomV1 {
|
|
|
62
66
|
kind?: "audio" | undefined;
|
|
63
67
|
customType?: string | undefined;
|
|
64
68
|
} | {
|
|
69
|
+
id?: string | undefined;
|
|
65
70
|
codec?: string | undefined;
|
|
66
71
|
uid?: string | undefined;
|
|
67
72
|
kind?: "video" | undefined;
|
|
@@ -80,6 +85,7 @@ export declare namespace RoomV1 {
|
|
|
80
85
|
kind?: "audio" | undefined;
|
|
81
86
|
customType?: string | undefined;
|
|
82
87
|
} | {
|
|
88
|
+
id?: string | undefined;
|
|
83
89
|
codec?: string | undefined;
|
|
84
90
|
uid?: string | undefined;
|
|
85
91
|
kind?: "video" | undefined;
|
|
@@ -98,6 +104,7 @@ export declare namespace RoomV1 {
|
|
|
98
104
|
kind?: "audio" | undefined;
|
|
99
105
|
customType?: string | undefined;
|
|
100
106
|
} | {
|
|
107
|
+
id?: string | undefined;
|
|
101
108
|
codec?: string | undefined;
|
|
102
109
|
uid?: string | undefined;
|
|
103
110
|
kind?: "video" | undefined;
|
|
@@ -121,6 +128,7 @@ export declare namespace RoomV1 {
|
|
|
121
128
|
kind?: "audio" | undefined;
|
|
122
129
|
customType?: string | undefined;
|
|
123
130
|
} | {
|
|
131
|
+
id?: string | undefined;
|
|
124
132
|
codec?: string | undefined;
|
|
125
133
|
uid?: string | undefined;
|
|
126
134
|
kind?: "video" | undefined;
|
|
@@ -144,6 +152,7 @@ export declare namespace RoomV1 {
|
|
|
144
152
|
kind?: "audio" | undefined;
|
|
145
153
|
customType?: string | undefined;
|
|
146
154
|
} | {
|
|
155
|
+
id?: string | undefined;
|
|
147
156
|
codec?: string | undefined;
|
|
148
157
|
uid?: string | undefined;
|
|
149
158
|
kind?: "video" | undefined;
|
|
@@ -182,12 +191,15 @@ export declare namespace RoomV1 {
|
|
|
182
191
|
codec: z.ZodOptional<z.ZodString>;
|
|
183
192
|
uid: z.ZodOptional<z.ZodString>;
|
|
184
193
|
customType: z.ZodOptional<z.ZodString>;
|
|
194
|
+
id: z.ZodOptional<z.ZodString>;
|
|
185
195
|
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
id?: string | undefined;
|
|
186
197
|
codec?: string | undefined;
|
|
187
198
|
uid?: string | undefined;
|
|
188
199
|
kind?: "video" | undefined;
|
|
189
200
|
customType?: string | undefined;
|
|
190
201
|
}, {
|
|
202
|
+
id?: string | undefined;
|
|
191
203
|
codec?: string | undefined;
|
|
192
204
|
uid?: string | undefined;
|
|
193
205
|
kind?: "video" | undefined;
|
|
@@ -202,6 +214,7 @@ export declare namespace RoomV1 {
|
|
|
202
214
|
kind?: "audio" | undefined;
|
|
203
215
|
customType?: string | undefined;
|
|
204
216
|
} | {
|
|
217
|
+
id?: string | undefined;
|
|
205
218
|
codec?: string | undefined;
|
|
206
219
|
uid?: string | undefined;
|
|
207
220
|
kind?: "video" | undefined;
|
|
@@ -215,6 +228,7 @@ export declare namespace RoomV1 {
|
|
|
215
228
|
kind?: "audio" | undefined;
|
|
216
229
|
customType?: string | undefined;
|
|
217
230
|
} | {
|
|
231
|
+
id?: string | undefined;
|
|
218
232
|
codec?: string | undefined;
|
|
219
233
|
uid?: string | undefined;
|
|
220
234
|
kind?: "video" | undefined;
|
|
@@ -233,6 +247,7 @@ export declare namespace RoomV1 {
|
|
|
233
247
|
kind?: "audio" | undefined;
|
|
234
248
|
customType?: string | undefined;
|
|
235
249
|
} | {
|
|
250
|
+
id?: string | undefined;
|
|
236
251
|
codec?: string | undefined;
|
|
237
252
|
uid?: string | undefined;
|
|
238
253
|
kind?: "video" | undefined;
|
|
@@ -251,6 +266,7 @@ export declare namespace RoomV1 {
|
|
|
251
266
|
kind?: "audio" | undefined;
|
|
252
267
|
customType?: string | undefined;
|
|
253
268
|
} | {
|
|
269
|
+
id?: string | undefined;
|
|
254
270
|
codec?: string | undefined;
|
|
255
271
|
uid?: string | undefined;
|
|
256
272
|
kind?: "video" | undefined;
|
|
@@ -274,6 +290,7 @@ export declare namespace RoomV1 {
|
|
|
274
290
|
kind?: "audio" | undefined;
|
|
275
291
|
customType?: string | undefined;
|
|
276
292
|
} | {
|
|
293
|
+
id?: string | undefined;
|
|
277
294
|
codec?: string | undefined;
|
|
278
295
|
uid?: string | undefined;
|
|
279
296
|
kind?: "video" | undefined;
|
|
@@ -297,6 +314,7 @@ export declare namespace RoomV1 {
|
|
|
297
314
|
kind?: "audio" | undefined;
|
|
298
315
|
customType?: string | undefined;
|
|
299
316
|
} | {
|
|
317
|
+
id?: string | undefined;
|
|
300
318
|
codec?: string | undefined;
|
|
301
319
|
uid?: string | undefined;
|
|
302
320
|
kind?: "video" | undefined;
|
|
@@ -325,6 +343,7 @@ export declare namespace RoomV1 {
|
|
|
325
343
|
kind?: "audio" | undefined;
|
|
326
344
|
customType?: string | undefined;
|
|
327
345
|
} | {
|
|
346
|
+
id?: string | undefined;
|
|
328
347
|
codec?: string | undefined;
|
|
329
348
|
uid?: string | undefined;
|
|
330
349
|
kind?: "video" | undefined;
|
|
@@ -353,6 +372,7 @@ export declare namespace RoomV1 {
|
|
|
353
372
|
kind?: "audio" | undefined;
|
|
354
373
|
customType?: string | undefined;
|
|
355
374
|
} | {
|
|
375
|
+
id?: string | undefined;
|
|
356
376
|
codec?: string | undefined;
|
|
357
377
|
uid?: string | undefined;
|
|
358
378
|
kind?: "video" | undefined;
|
|
@@ -406,12 +426,15 @@ export declare namespace RoomV1 {
|
|
|
406
426
|
codec: z.ZodOptional<z.ZodString>;
|
|
407
427
|
uid: z.ZodOptional<z.ZodString>;
|
|
408
428
|
customType: z.ZodOptional<z.ZodString>;
|
|
429
|
+
id: z.ZodOptional<z.ZodString>;
|
|
409
430
|
}, "strip", z.ZodTypeAny, {
|
|
431
|
+
id?: string | undefined;
|
|
410
432
|
codec?: string | undefined;
|
|
411
433
|
uid?: string | undefined;
|
|
412
434
|
kind?: "video" | undefined;
|
|
413
435
|
customType?: string | undefined;
|
|
414
436
|
}, {
|
|
437
|
+
id?: string | undefined;
|
|
415
438
|
codec?: string | undefined;
|
|
416
439
|
uid?: string | undefined;
|
|
417
440
|
kind?: "video" | undefined;
|
|
@@ -426,6 +449,7 @@ export declare namespace RoomV1 {
|
|
|
426
449
|
kind?: "audio" | undefined;
|
|
427
450
|
customType?: string | undefined;
|
|
428
451
|
} | {
|
|
452
|
+
id?: string | undefined;
|
|
429
453
|
codec?: string | undefined;
|
|
430
454
|
uid?: string | undefined;
|
|
431
455
|
kind?: "video" | undefined;
|
|
@@ -439,6 +463,7 @@ export declare namespace RoomV1 {
|
|
|
439
463
|
kind?: "audio" | undefined;
|
|
440
464
|
customType?: string | undefined;
|
|
441
465
|
} | {
|
|
466
|
+
id?: string | undefined;
|
|
442
467
|
codec?: string | undefined;
|
|
443
468
|
uid?: string | undefined;
|
|
444
469
|
kind?: "video" | undefined;
|
|
@@ -457,6 +482,7 @@ export declare namespace RoomV1 {
|
|
|
457
482
|
kind?: "audio" | undefined;
|
|
458
483
|
customType?: string | undefined;
|
|
459
484
|
} | {
|
|
485
|
+
id?: string | undefined;
|
|
460
486
|
codec?: string | undefined;
|
|
461
487
|
uid?: string | undefined;
|
|
462
488
|
kind?: "video" | undefined;
|
|
@@ -475,6 +501,7 @@ export declare namespace RoomV1 {
|
|
|
475
501
|
kind?: "audio" | undefined;
|
|
476
502
|
customType?: string | undefined;
|
|
477
503
|
} | {
|
|
504
|
+
id?: string | undefined;
|
|
478
505
|
codec?: string | undefined;
|
|
479
506
|
uid?: string | undefined;
|
|
480
507
|
kind?: "video" | undefined;
|
|
@@ -496,6 +523,7 @@ export declare namespace RoomV1 {
|
|
|
496
523
|
kind?: "audio" | undefined;
|
|
497
524
|
customType?: string | undefined;
|
|
498
525
|
} | {
|
|
526
|
+
id?: string | undefined;
|
|
499
527
|
codec?: string | undefined;
|
|
500
528
|
uid?: string | undefined;
|
|
501
529
|
kind?: "video" | undefined;
|
|
@@ -517,6 +545,7 @@ export declare namespace RoomV1 {
|
|
|
517
545
|
kind?: "audio" | undefined;
|
|
518
546
|
customType?: string | undefined;
|
|
519
547
|
} | {
|
|
548
|
+
id?: string | undefined;
|
|
520
549
|
codec?: string | undefined;
|
|
521
550
|
uid?: string | undefined;
|
|
522
551
|
kind?: "video" | undefined;
|
|
@@ -565,12 +594,15 @@ export declare namespace RoomV1 {
|
|
|
565
594
|
codec: z.ZodOptional<z.ZodString>;
|
|
566
595
|
uid: z.ZodOptional<z.ZodString>;
|
|
567
596
|
customType: z.ZodOptional<z.ZodString>;
|
|
597
|
+
id: z.ZodOptional<z.ZodString>;
|
|
568
598
|
}, "strip", z.ZodTypeAny, {
|
|
599
|
+
id?: string | undefined;
|
|
569
600
|
codec?: string | undefined;
|
|
570
601
|
uid?: string | undefined;
|
|
571
602
|
kind?: "video" | undefined;
|
|
572
603
|
customType?: string | undefined;
|
|
573
604
|
}, {
|
|
605
|
+
id?: string | undefined;
|
|
574
606
|
codec?: string | undefined;
|
|
575
607
|
uid?: string | undefined;
|
|
576
608
|
kind?: "video" | undefined;
|
|
@@ -585,6 +617,7 @@ export declare namespace RoomV1 {
|
|
|
585
617
|
kind?: "audio" | undefined;
|
|
586
618
|
customType?: string | undefined;
|
|
587
619
|
} | {
|
|
620
|
+
id?: string | undefined;
|
|
588
621
|
codec?: string | undefined;
|
|
589
622
|
uid?: string | undefined;
|
|
590
623
|
kind?: "video" | undefined;
|
|
@@ -598,6 +631,7 @@ export declare namespace RoomV1 {
|
|
|
598
631
|
kind?: "audio" | undefined;
|
|
599
632
|
customType?: string | undefined;
|
|
600
633
|
} | {
|
|
634
|
+
id?: string | undefined;
|
|
601
635
|
codec?: string | undefined;
|
|
602
636
|
uid?: string | undefined;
|
|
603
637
|
kind?: "video" | undefined;
|
|
@@ -616,6 +650,7 @@ export declare namespace RoomV1 {
|
|
|
616
650
|
kind?: "audio" | undefined;
|
|
617
651
|
customType?: string | undefined;
|
|
618
652
|
} | {
|
|
653
|
+
id?: string | undefined;
|
|
619
654
|
codec?: string | undefined;
|
|
620
655
|
uid?: string | undefined;
|
|
621
656
|
kind?: "video" | undefined;
|
|
@@ -634,6 +669,7 @@ export declare namespace RoomV1 {
|
|
|
634
669
|
kind?: "audio" | undefined;
|
|
635
670
|
customType?: string | undefined;
|
|
636
671
|
} | {
|
|
672
|
+
id?: string | undefined;
|
|
637
673
|
codec?: string | undefined;
|
|
638
674
|
uid?: string | undefined;
|
|
639
675
|
kind?: "video" | undefined;
|
|
@@ -657,6 +693,7 @@ export declare namespace RoomV1 {
|
|
|
657
693
|
kind?: "audio" | undefined;
|
|
658
694
|
customType?: string | undefined;
|
|
659
695
|
} | {
|
|
696
|
+
id?: string | undefined;
|
|
660
697
|
codec?: string | undefined;
|
|
661
698
|
uid?: string | undefined;
|
|
662
699
|
kind?: "video" | undefined;
|
|
@@ -680,6 +717,7 @@ export declare namespace RoomV1 {
|
|
|
680
717
|
kind?: "audio" | undefined;
|
|
681
718
|
customType?: string | undefined;
|
|
682
719
|
} | {
|
|
720
|
+
id?: string | undefined;
|
|
683
721
|
codec?: string | undefined;
|
|
684
722
|
uid?: string | undefined;
|
|
685
723
|
kind?: "video" | undefined;
|
|
@@ -708,6 +746,7 @@ export declare namespace RoomV1 {
|
|
|
708
746
|
kind?: "audio" | undefined;
|
|
709
747
|
customType?: string | undefined;
|
|
710
748
|
} | {
|
|
749
|
+
id?: string | undefined;
|
|
711
750
|
codec?: string | undefined;
|
|
712
751
|
uid?: string | undefined;
|
|
713
752
|
kind?: "video" | undefined;
|
|
@@ -736,6 +775,7 @@ export declare namespace RoomV1 {
|
|
|
736
775
|
kind?: "audio" | undefined;
|
|
737
776
|
customType?: string | undefined;
|
|
738
777
|
} | {
|
|
778
|
+
id?: string | undefined;
|
|
739
779
|
codec?: string | undefined;
|
|
740
780
|
uid?: string | undefined;
|
|
741
781
|
kind?: "video" | undefined;
|
|
@@ -789,12 +829,15 @@ export declare namespace RoomV1 {
|
|
|
789
829
|
codec: z.ZodOptional<z.ZodString>;
|
|
790
830
|
uid: z.ZodOptional<z.ZodString>;
|
|
791
831
|
customType: z.ZodOptional<z.ZodString>;
|
|
832
|
+
id: z.ZodOptional<z.ZodString>;
|
|
792
833
|
}, "strip", z.ZodTypeAny, {
|
|
834
|
+
id?: string | undefined;
|
|
793
835
|
codec?: string | undefined;
|
|
794
836
|
uid?: string | undefined;
|
|
795
837
|
kind?: "video" | undefined;
|
|
796
838
|
customType?: string | undefined;
|
|
797
839
|
}, {
|
|
840
|
+
id?: string | undefined;
|
|
798
841
|
codec?: string | undefined;
|
|
799
842
|
uid?: string | undefined;
|
|
800
843
|
kind?: "video" | undefined;
|
|
@@ -809,6 +852,7 @@ export declare namespace RoomV1 {
|
|
|
809
852
|
kind?: "audio" | undefined;
|
|
810
853
|
customType?: string | undefined;
|
|
811
854
|
} | {
|
|
855
|
+
id?: string | undefined;
|
|
812
856
|
codec?: string | undefined;
|
|
813
857
|
uid?: string | undefined;
|
|
814
858
|
kind?: "video" | undefined;
|
|
@@ -822,6 +866,7 @@ export declare namespace RoomV1 {
|
|
|
822
866
|
kind?: "audio" | undefined;
|
|
823
867
|
customType?: string | undefined;
|
|
824
868
|
} | {
|
|
869
|
+
id?: string | undefined;
|
|
825
870
|
codec?: string | undefined;
|
|
826
871
|
uid?: string | undefined;
|
|
827
872
|
kind?: "video" | undefined;
|
|
@@ -840,6 +885,7 @@ export declare namespace RoomV1 {
|
|
|
840
885
|
kind?: "audio" | undefined;
|
|
841
886
|
customType?: string | undefined;
|
|
842
887
|
} | {
|
|
888
|
+
id?: string | undefined;
|
|
843
889
|
codec?: string | undefined;
|
|
844
890
|
uid?: string | undefined;
|
|
845
891
|
kind?: "video" | undefined;
|
|
@@ -858,6 +904,7 @@ export declare namespace RoomV1 {
|
|
|
858
904
|
kind?: "audio" | undefined;
|
|
859
905
|
customType?: string | undefined;
|
|
860
906
|
} | {
|
|
907
|
+
id?: string | undefined;
|
|
861
908
|
codec?: string | undefined;
|
|
862
909
|
uid?: string | undefined;
|
|
863
910
|
kind?: "video" | undefined;
|
|
@@ -879,6 +926,7 @@ export declare namespace RoomV1 {
|
|
|
879
926
|
kind?: "audio" | undefined;
|
|
880
927
|
customType?: string | undefined;
|
|
881
928
|
} | {
|
|
929
|
+
id?: string | undefined;
|
|
882
930
|
codec?: string | undefined;
|
|
883
931
|
uid?: string | undefined;
|
|
884
932
|
kind?: "video" | undefined;
|
|
@@ -900,6 +948,7 @@ export declare namespace RoomV1 {
|
|
|
900
948
|
kind?: "audio" | undefined;
|
|
901
949
|
customType?: string | undefined;
|
|
902
950
|
} | {
|
|
951
|
+
id?: string | undefined;
|
|
903
952
|
codec?: string | undefined;
|
|
904
953
|
uid?: string | undefined;
|
|
905
954
|
kind?: "video" | undefined;
|
|
@@ -936,6 +985,7 @@ export declare namespace RoomV1 {
|
|
|
936
985
|
kind?: "audio" | undefined;
|
|
937
986
|
customType?: string | undefined;
|
|
938
987
|
} | {
|
|
988
|
+
id?: string | undefined;
|
|
939
989
|
codec?: string | undefined;
|
|
940
990
|
uid?: string | undefined;
|
|
941
991
|
kind?: "video" | undefined;
|
|
@@ -966,6 +1016,7 @@ export declare namespace RoomV1 {
|
|
|
966
1016
|
kind?: "audio" | undefined;
|
|
967
1017
|
customType?: string | undefined;
|
|
968
1018
|
} | {
|
|
1019
|
+
id?: string | undefined;
|
|
969
1020
|
codec?: string | undefined;
|
|
970
1021
|
uid?: string | undefined;
|
|
971
1022
|
kind?: "video" | undefined;
|
|
@@ -996,6 +1047,7 @@ export declare namespace RoomV1 {
|
|
|
996
1047
|
kind?: "audio" | undefined;
|
|
997
1048
|
customType?: string | undefined;
|
|
998
1049
|
} | {
|
|
1050
|
+
id?: string | undefined;
|
|
999
1051
|
codec?: string | undefined;
|
|
1000
1052
|
uid?: string | undefined;
|
|
1001
1053
|
kind?: "video" | undefined;
|
|
@@ -1026,6 +1078,7 @@ export declare namespace RoomV1 {
|
|
|
1026
1078
|
kind?: "audio" | undefined;
|
|
1027
1079
|
customType?: string | undefined;
|
|
1028
1080
|
} | {
|
|
1081
|
+
id?: string | undefined;
|
|
1029
1082
|
codec?: string | undefined;
|
|
1030
1083
|
uid?: string | undefined;
|
|
1031
1084
|
kind?: "video" | undefined;
|