bl-trtc-callkit-vue 1.1.2 → 1.1.3

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.
@@ -1,6 +1,6 @@
1
1
  (function() {
2
2
  const style = document.createElement('style');
3
- style.textContent = `@charset "UTF-8";.callkit-wrapper[data-v-fc651f6b]{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999;background-color:#000c}.callkit-wrapper .bottom-controls[data-v-fc651f6b]{position:fixed;left:0;right:0;bottom:78px;display:flex;justify-content:space-evenly}.callkit-wrapper .operation-btn[data-v-fc651f6b]{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:1rem;cursor:pointer}.callkit-wrapper .operation-btn img[data-v-fc651f6b]{width:64px;height:64px;margin-bottom:12px}.callkit-wrapper .equipment-btn img[data-v-fc651f6b]{border-radius:50%;padding:12px;box-sizing:border-box}.callkit-wrapper .equipment-btn--open img[data-v-fc651f6b]{background:#fff}.callkit-wrapper .equipment-btn--close img[data-v-fc651f6b]{background:#000c}.local-video[data-v-fc651f6b]{position:absolute;top:16px;right:16px;width:120px;height:160px;border-radius:8px;overflow:hidden;background:#000;z-index:1001;box-shadow:0 6px 18px #00000073;transition:transform .18s ease,opacity .18s ease}@media(max-width:600px){.local-video[data-v-fc651f6b]{width:90px;height:120px;top:12px;right:12px}}.player-container[data-v-fc651f6b]{display:grid;width:100%;min-height:100px;gap:10px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));justify-items:center;max-height:100vh;box-sizing:border-box;padding:10px}.player-container .remote[data-v-fc651f6b]{width:auto;max-width:100%;max-height:100%;background:#000;position:relative;border-radius:6px;overflow:hidden;object-fit:contain}.player-container.single[data-v-fc651f6b]{display:flex;align-items:center;justify-content:center;height:100vh;padding:0}.player-container.single .remote[data-v-fc651f6b]{width:auto;max-width:100%;max-height:100%;margin:0}@media(max-width:600px){.player-container[data-v-fc651f6b]{grid-template-columns:repeat(2,1fr)}}.callkit-enter-from[data-v-fc651f6b]{opacity:0;transform:translateY(-20px) scale(.98)}.callkit-enter-active[data-v-fc651f6b]{transition:all .24s ease}.callkit-leave-to[data-v-fc651f6b]{opacity:0;transform:translateY(-20px) scale(.98)}.callkit-leave-active[data-v-fc651f6b]{transition:all .2s ease}.call-label[data-v-fc651f6b]{position:absolute;top:14%;left:0;right:0;text-align:center;color:#fff;font-size:24px;font-weight:600}
3
+ style.textContent = `@charset "UTF-8";.callkit-wrapper[data-v-a8e04866]{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999;background-color:#000c}.callkit-wrapper .bottom-controls[data-v-a8e04866]{position:fixed;left:0;right:0;bottom:78px;display:flex;justify-content:space-evenly}.callkit-wrapper .operation-btn[data-v-a8e04866]{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:1rem;cursor:pointer}.callkit-wrapper .operation-btn img[data-v-a8e04866]{width:64px;height:64px;margin-bottom:12px}.callkit-wrapper .equipment-btn img[data-v-a8e04866]{border-radius:50%;padding:12px;box-sizing:border-box}.callkit-wrapper .equipment-btn--open img[data-v-a8e04866]{background:#fff}.callkit-wrapper .equipment-btn--close img[data-v-a8e04866]{background:#000c}.local-video[data-v-a8e04866]{position:absolute;top:16px;right:16px;width:120px;height:160px;border-radius:8px;overflow:hidden;background:#000;z-index:1001;box-shadow:0 6px 18px #00000073;transition:transform .18s ease,opacity .18s ease}@media(max-width:600px){.local-video[data-v-a8e04866]{width:90px;height:120px;top:12px;right:12px}}.player-container[data-v-a8e04866]{display:grid;width:100%;min-height:100px;gap:10px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));justify-items:center;max-height:100vh;box-sizing:border-box;padding:10px}.player-container .remote[data-v-a8e04866]{width:auto;max-width:100%;max-height:100%;background:#000;position:relative;border-radius:6px;overflow:hidden;object-fit:contain}.player-container.single[data-v-a8e04866]{display:flex;align-items:center;justify-content:center;height:100vh;padding:0}.player-container.single .remote[data-v-a8e04866]{width:auto;max-width:100%;max-height:100%;margin:0}@media(max-width:600px){.player-container[data-v-a8e04866]{grid-template-columns:repeat(2,1fr)}}.callkit-enter-from[data-v-a8e04866]{opacity:0;transform:translateY(-20px) scale(.98)}.callkit-enter-active[data-v-a8e04866]{transition:all .24s ease}.callkit-leave-to[data-v-a8e04866]{opacity:0;transform:translateY(-20px) scale(.98)}.callkit-leave-active[data-v-a8e04866]{transition:all .2s ease}.call-label[data-v-a8e04866]{position:absolute;top:14%;left:0;right:0;text-align:center;color:#fff;font-size:24px;font-weight:600}
4
4
  `;
5
5
  document.head.appendChild(style);
6
6
  })();
@@ -85,8 +85,8 @@ function LG() {
85
85
  }, zi = y, wr = Ze, Mt = function(e, t) {
86
86
  return arguments.length < 2 ? (i = zi[e], wr(i) ? i : void 0) : zi[e] && zi[e][t];
87
87
  var i;
88
- }, St = X({}.isPrototypeOf), Qr = y.navigator, Dr = Qr && Qr.userAgent, li = Dr ? String(Dr) : "", Nr = y, ue = li, Te = Nr.process, Ue = Nr.Deno, ze = Te && Te.versions || Ue && Ue.version, Ve = ze && ze.v8;
89
- Ve && (V = (L = Ve.split("."))[0] > 0 && L[0] < 4 ? 1 : +(L[0] + L[1])), !V && ue && (!(L = ue.match(/Edge\/(\d+)/)) || L[1] >= 74) && (L = ue.match(/Chrome\/(\d+)/)) && (V = +L[1]);
88
+ }, St = X({}.isPrototypeOf), Qr = y.navigator, Dr = Qr && Qr.userAgent, li = Dr ? String(Dr) : "", Nr = y, ue = li, Te = Nr.process, He = Nr.Deno, Je = Te && Te.versions || He && He.version, Be = Je && Je.v8;
89
+ Be && (V = (L = Be.split("."))[0] > 0 && L[0] < 4 ? 1 : +(L[0] + L[1])), !V && ue && (!(L = ue.match(/Edge\/(\d+)/)) || L[1] >= 74) && (L = ue.match(/Chrome\/(\d+)/)) && (V = +L[1]);
90
90
  var It = V, rl = It, Nn = S, Ss = y.String, Cu = !!Object.getOwnPropertySymbols && !Nn(function() {
91
91
  var e = /* @__PURE__ */ Symbol("symbol detection");
92
92
  return !Ss(e) || !(Object(e) instanceof Symbol) || !Symbol.sham && rl && rl < 41;
@@ -4095,20 +4095,20 @@ a=extmap-allow-mixed`) !== -1) {
4095
4095
  r.encryption === 1 ? x = new TextEncoder().encode(r.uin) : r.encryption === 2 && (x = new Uint8Array(16)), x && (C = (function(G, he) {
4096
4096
  let H = G.length, Z = (H + 1 + ic + rc) % 8;
4097
4097
  Z && (Z = 8 - Z);
4098
- let de = H + 1 + ic + rc + Z, pe = new Uint8Array(de), Ne = 0, Ae = new Uint8Array(8), Ge = new Uint8Array(8), Pe = new Uint8Array(8), Be = 0;
4099
- Ae[0] = 248 & Math.floor(256 * Math.random()) | Z, Be = 1;
4100
- for (let vt = 0; vt < Z; vt++) Ae[Be] = 255 & Math.floor(256 * Math.random()), Be += 1;
4101
- for (let vt = 0; vt < ic; ) if (Be < 8 && (Ae[Be] = 255 & Math.floor(256 * Math.random()), Be += 1, vt += 1), Be === 8) {
4102
- Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Be = 0;
4098
+ let de = H + 1 + ic + rc + Z, pe = new Uint8Array(de), Ne = 0, Ae = new Uint8Array(8), Ge = new Uint8Array(8), Pe = new Uint8Array(8), Ve = 0;
4099
+ Ae[0] = 248 & Math.floor(256 * Math.random()) | Z, Ve = 1;
4100
+ for (let vt = 0; vt < Z; vt++) Ae[Ve] = 255 & Math.floor(256 * Math.random()), Ve += 1;
4101
+ for (let vt = 0; vt < ic; ) if (Ve < 8 && (Ae[Ve] = 255 & Math.floor(256 * Math.random()), Ve += 1, vt += 1), Ve === 8) {
4102
+ Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Ve = 0;
4103
4103
  for (let ft = 0; ft < 8; ft++) Pe[ft] = pe[Ne - 8 + ft];
4104
4104
  }
4105
4105
  let st = 0;
4106
- for (; st < H; ) if (Be < 8 && (Ae[Be] = G[st], Be += 1, st += 1), Be === 8) {
4107
- Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Be = 0;
4106
+ for (; st < H; ) if (Ve < 8 && (Ae[Ve] = G[st], Ve += 1, st += 1), Ve === 8) {
4107
+ Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Ve = 0;
4108
4108
  for (let vt = 0; vt < 8; vt++) Pe[vt] = pe[Ne - 8 + vt];
4109
4109
  }
4110
- for (let vt = 0; vt < rc; ) if (Be < 8 && (Ae[Be] = 0, Be += 1, vt += 1), Be === 8) {
4111
- Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Be = 0;
4110
+ for (let vt = 0; vt < rc; ) if (Ve < 8 && (Ae[Ve] = 0, Ve += 1, vt += 1), Ve === 8) {
4111
+ Ng(Ae, he, Ge, Pe, pe, Ne), Ne += 8, Ve = 0;
4112
4112
  for (let ft = 0; ft < 8; ft++) Pe[ft] = pe[Ne - 8 + ft];
4113
4113
  }
4114
4114
  return pe;
@@ -5000,7 +5000,7 @@ a=extmap-allow-mixed`) !== -1) {
5000
5000
  get smallVideo() {
5001
5001
  return !!(8 & this.mediaType);
5002
5002
  }
5003
- }, HC = ((e) => (e.String = "string", e.Number = "number", e.Boolean = "boolean", e.Array = "array", e.Object = "object", e))(HC || {}), T0 = ((e) => (e.H264 = "h264", e.H265 = "h265", e.VP8 = "vp8", e.VP9 = "vp9", e.AV1 = "av1", e))(T0 || {}), WC = ((e) => (e[e.ENCRYPT_AND_DECRYPT = 0] = "ENCRYPT_AND_DECRYPT", e[e.DUMP = 1] = "DUMP", e[e.SEI = 2] = "SEI", e[e.ENCODE_AND_DECODE = 3] = "ENCODE_AND_DECODE", e))(WC || {}), GC = ((e) => (e[e.ENCRYPT_AND_DECRYPT = 0] = "ENCRYPT_AND_DECRYPT", e[e.NTP_TO_AUDIO_FRAME = 1] = "NTP_TO_AUDIO_FRAME", e[e.DUMP = 2] = "DUMP", e[e.ENCODE_AND_DECODE = 3] = "ENCODE_AND_DECODE", e))(GC || {}), jC = ((e) => (e.WebRTC = "webrtc", e.WebCodecs = "webcodecs", e.WebAssembly = "webassembly", e))(jC || {}), zC = ((Nt = zC || {})[Nt.SUCCESS = 0] = "SUCCESS", Nt[Nt.FAILED = 1] = "FAILED", Nt[Nt.WEBCODEC_INIT = 2] = "WEBCODEC_INIT", Nt[Nt.WEBCODEC_CONFIG_NOT_SUPPORT = 3] = "WEBCODEC_CONFIG_NOT_SUPPORT", Nt[Nt.WEBCODEC_DECODER_ERROR = 4] = "WEBCODEC_DECODER_ERROR", Nt[Nt.WEBCODEC_TRACK_MUTE = 5] = "WEBCODEC_TRACK_MUTE", Nt[Nt.WASM_INIT = 6] = "WASM_INIT", Nt[Nt.WASM_WEBGL_UNAVALIABLE = 7] = "WASM_WEBGL_UNAVALIABLE", Nt[Nt.WASM_DECODER_ERROR = 8] = "WASM_DECODER_ERROR", Nt[Nt.WASM_TRACK_MUTE = 9] = "WASM_TRACK_MUTE", Nt[Nt.TEST = 10] = "TEST", Nt[Nt.RENDER_2D_ERROR = 11] = "RENDER_2D_ERROR", Nt), KC = ((e) => (e.NONE = "", e.DETAIL = "detail", e.MOTION = "motion", e.TEXT = "text", e))(KC || {}), JC = ((e) => (e.INTERVAL = "interval", e.TIMEOUT = "timeout", e.RAF = "raf", e.RIC = "ric", e.INTERVAL_IN_WORKER = "intervalInWorker", e))(JC || {}), YC = ((e) => (e.CANVAS = "canvas", e.API = "api", e))(YC || {}), qC = ((e) => (e[e.NONE = 0] = "NONE", e[e.MICROPHONE = 1] = "MICROPHONE", e[e.CAMERA = 2] = "CAMERA", e[e.BOTH = 3] = "BOTH", e))(qC || {}), XC = ((e) => (e.CAMERA = "camera", e.MICROPHONE = "microphone", e))(XC || {}), S0 = ((e) => (e[e.none = 0] = "none", e[e.horizontal = 1] = "horizontal", e[e.vertical = 2] = "vertical", e))(S0 || {}), Fe = { AVOID_REPEATED_CALL: "AVOID_REPEATED_CALL", INVALID_PARAMETER_REQUIRED: "INVALID_PARAMETER_REQUIRED", INVALID_PARAMETER_TYPE: "INVALID_PARAMETER_TYPE", INVALID_PARAMETER_EMPTY: "INVALID_PARAMETER_EMPTY", INVALID_PARAMETER_INSTANCE: "INVALID_PARAMETER_INSTANCE", INVALID_PARAMETER_RANGE: "INVALID_PARAMETER_RANGE", INVALID_PARAMETER_MIN: "INVALID_PARAMETER_MIN", INVALID_PARAMETER_MAX: "INVALID_PARAMETER_MAX", INVALID_PARAMETER_STREAMTYPE: "INVALID_PARAMETER_STREAMTYPE", API_CALL_TIMEOUT: "API_CALL_TIMEOUT", SIGNAL_CHANNEL_RECONNECTION_FAILED: "SIGNAL_CHANNEL_RECONNECTION_FAILED", SIGNAL_CHANNEL_SETUP_FAILED: "SIGNAL_CHANNEL_SETUP_FAILED", ERROR_MESSAGE: "ERROR_MESSAGE", EXCHANGE_SDP_TIMEOUT: "EXCHANGE_SDP_TIMEOUT", DOWNLINK_RECONNECTION_FAILED: "DOWNLINK_RECONNECTION_FAILED", EXCHANGE_SDP_FAILED: "EXCHANGE_SDP_FAILED", UPDATE_OFFER_TIMEOUT: "UPDATE_OFFER_TIMEOUT", UPLINK_RECONNECTION_FAILED: "UPLINK_RECONNECTION_FAILED", INVALID_RECORDID: "INVALID_RECORDID", INVALID_PURE_AUDIO: "INVALID_PURE_AUDIO", INVALID_STREAMID: "INVALID_STREAMID", INVALID_USER_DEFINE_RECORDID: "INVALID_USER_DEFINE_RECORDID", INVALID_USER_DEFINE_PUSH_ARGS: "INVALID_USER_DEFINE_PUSH_ARGS", INVALID_PROXY: "INVALID_PROXY", INVALID_JOIN: "INVALID_JOIN", INVALID_ROOMID_STRING: "INVALID_ROOMID_STRING", INVALID_ROOMID_INTEGER: "INVALID_ROOMID_INTEGER", INVALID_SIGNAL_CHANNEL: "INVALID_SIGNAL_CHANNEL", JOIN_ROOM_TIMEOUT: "JOIN_ROOM_TIMEOUT", JOIN_ROOM_FAILED: "JOIN_ROOM_FAILED", REJOIN_ROOM_FAILED: "REJOIN_ROOM_FAILED", INVALID_DESTROY: "INVALID_DESTROY", INVALID_PUBLISH: "INVALID_PUBLISH", INVALID_UNPUBLISH: "INVALID_UNPUBLISH", INVALID_AUDIENCE: "INVALID_AUDIENCE", INVALID_INITIALIZE: "INVALID_INITIALIZE", INVALID_DUPLICATE_PUBLISHING: "INVALID_DUPLICATE_PUBLISHING", INVALID_SUBSCRIBE_UNDEFINED: "INVALID_SUBSCRIBE_UNDEFINED", INVALID_SUBSCRIBE_LOCAL: "INVALID_SUBSCRIBE_LOCAL", INVALID_REMOTE_STREAM: "INVALID_REMOTE_STREAM", SUBSCRIBE_FAILED: "SUBSCRIBE_FAILED", INVALID_ROLE: "INVALID_ROLE", INVALID_PARAMETER_SWITCH_ROLE: "INVALID_PARAMETER_SWITCH_ROLE", INVALID_OPERATION_SWITCH_ROLE: "INVALID_OPERATION_SWITCH_ROLE", SWITCH_ROLE_TIMEOUT: "SWITCH_ROLE_TIMEOUT", SWITCH_ROLE_FAILED: "SWITCH_ROLE_FAILED", CLIENT_BANNED: "CLIENT_BANNED", INVALID_OPERATION_START_PUBLISH_CDN: "INVALID_OPERATION_START_PUBLISH_CDN", INVALID_OPERATION_STOP_PUBLISH_CDN: "INVALID_OPERATION_STOP_PUBLISH_CDN", INVALID_STREAM_ID: "INVALID_STREAM_ID", START_PUBLISH_CDN_FAILED: "START_PUBLISH_CDN_FAILED", STOP_PUBLISH_CDN_FAILED: "STOP_PUBLISH_CDN_FAILED", START_MIX_TRANSCODE: "START_MIX_TRANSCODE", STOP_MIX_TRANSCODE: "STOP_MIX_TRANSCODE", INVALID_AUDIO_VOLUME: "INVALID_AUDIO_VOLUME", ENABLE_SMALL_STREAM_PUBLISHED: "ENABLE_SMALL_STREAM_PUBLISHED", DISABLE_SMALL_STREAM_PUBLISHED: "DISABLE_SMALL_STREAM_PUBLISHED", NOT_SUPPORTED_SMALL_STREAM: "NOT_SUPPORTED_SMALL_STREAM", INVALID_SMALL_STREAM_PROFILE: "INVALID_SMALL_STREAM_PROFILE", INVALID_PARAMETER_REMOTE_STREAM: "INVALID_PARAMETER_REMOTE_STREAM", INVALID_OPERATION_CHANGE_SMALL: "INVALID_OPERATION_CHANGE_SMALL", REMOTE_NOT_PUBLISH_SMALL_STREAM: "REMOTE_NOT_PUBLISH_SMALL_STREAM", INVALID_SWITCH_DEVICE: "INVALID_SWITCH_DEVICE", INVALID_SWITCH_DEVICE_PUBLISHING: "INVALID_SWITCH_DEVICE_PUBLISHING", INVALID_REPLACE_TRACK: "INVALID_REPLACE_TRACK", INVALID_INITIALIZE_LOCAL_STREAM: "INVALID_INITIALIZE_LOCAL_STREAM", INVALID_ADD_TRACK_REPETITIVE: "INVALID_ADD_TRACK_REPETITIVE", INVALID_ADD_TRACK_REMOVING: "INVALID_ADD_TRACK_REMOVING", INVALID_ADD_TRACK_PUBLISHING: "INVALID_ADD_TRACK_PUBLISHING", INVALID_STREAM_INITIALIZED: "INVALID_STREAM_INITIALIZED", INVALID_ADD_TRACK_NUMBER: "INVALID_ADD_TRACK_NUMBER", INVALID_REMOVE_AUDIO_TRACK: "INVALID_REMOVE_AUDIO_TRACK", INVALID_REMOVE_AUDIO_ADDING: "INVALID_REMOVE_AUDIO_ADDING", INVALID_REMOVE_AUDIO_ON: "INVALID_REMOVE_AUDIO_ON", INVALID_REMOVE_TRACK_PUBLISHING: "INVALID_REMOVE_TRACK_PUBLISHING", INVALID_REMOVE_TRACK_NOT_TRACK: "INVALID_REMOVE_TRACK_NOT_TRACK", INVALID_REMOVE_TRACK_NUMBER: "INVALID_REMOVE_TRACK_NUMBER", INVALID_REPLACE_TRACK_NO_TRACK: "INVALID_REPLACE_TRACK_NO_TRACK", REPEAT_JOIN: "REPEAT_JOIN", CLIENT_DESTROYED: "CLIENT_DESTROYED", NOT_BUG_PACKAGE: "NOT_BUG_PACKAGE", START_MIX_TRANSCODE_FAILED: "START_MIX_TRANSCODE_FAILED", STOP_MIX_TRANSCODE_FAILED: "STOP_MIX_TRANSCODE_FAILED", MIX_TRANSCODE_NOT_STARTED: "MIX_TRANSCODE_NOT_STARTED", CANNOT_LESS_THAN_ZERO: "CANNOT_LESS_THAN_ZERO", MIX_PARAMS_VIDEO_FRAMERATE: "MIX_PARAMS_VIDEO_FRAMERATE", MIX_PARAMS_VIDEO_GOP: "MIX_PARAMS_VIDEO_GOP", MIX_PARAMS_AUDIO_BITRATE: "MIX_PARAMS_AUDIO_BITRATE", MIX_PARAMS_USER_Z_ORDER: "MIX_PARAMS_USER_Z_ORDER", MIX_PARAMS_NOT_SELF: "MIX_PARAMS_NOT_SELF", MIX_PARAMS_USER_STREAM: "MIX_PARAMS_USER_STREAM", INVALID_PLAY: "INVALID_PLAY", INVALID_ELEMENT_ID: "INVALID_ELEMENT_ID", INVALID_ELEMENT_ID_TYPE: "INVALID_ELEMENT_ID_TYPE", PLAY_FAILED: "PLAY_FAILED", INVALID_USERID: "INVALID_USERID", INVALID_CREATE_STREAM_SOURCE: "INVALID_CREATE_STREAM_SOURCE", INVALID_CREATE_STREAM_SCREEN: "INVALID_CREATE_STREAM_SCREEN", INVALID_CREATE_STREAM_AUDIO: "INVALID_CREATE_STREAM_AUDIO", INVALID_CREATE_STREAM_SCREEN_AUDIO: "INVALID_CREATE_STREAM_SCREEN_AUDIO", NOT_SUPPORTED_HTTP: "NOT_SUPPORTED_HTTP", NOT_SUPPORTED_WEBRTC: "NOT_SUPPORTED_WEBRTC", NOT_SUPPORTED_PROFILE: "NOT_SUPPORTED_PROFILE", NOT_SUPPORTED_MEDIA: "NOT_SUPPORTED_MEDIA", NOT_SUPPORTED_H264ENCODE: "NOT_SUPPORTED_H264ENCODE", NOT_SUPPORTED_H264DECODE: "NOT_SUPPORTED_H264DECODE", NOT_SUPPORTED_TRACK: "NOT_SUPPORTED_TRACK", NOT_SUPPORTED_SWITCH_DEVICE: "NOT_SUPPORTED_SWITCH_DEVICE", NOT_SUPPORTED_CAPTURE: "NOT_SUPPORTED_CAPTURE", NOT_SUPPORTED_AUX: "NOT_SUPPORTED_AUX", MICROPHONE_NOT_FOUND: "MICROPHONE_NOT_FOUND", CAMERA_NOT_FOUND: "CAMERA_NOT_FOUND", SIGNAL_RESPONSE_FAILED: "SIGNAL_RESPONSE_FAILED", CATCH_HANDLER_ERROR: "CATCH_HANDLER_ERROR", API_NOT_EXIST: "API_NOT_EXIST", CONNECTION_CLOSED: "CONNECTION_CLOSED", SUBSCRIBE_ALL_FALSE: "SUBSCRIBE_ALL_FALSE", SEI_NOT_SUPPORT: "SEI_NOT_SUPPORT", SEI_DISABLED: "SEI_DISABLED", SEI_BEFORE_PUBLISH: "SEI_BEFORE_PUBLISH", SEI_NOT_VIDEO: "SEI_NOT_VIDEO", CALL_FREQUENCY_LIMIT: "CALL_FREQUENCY_LIMIT", CONNECTION_ABORTED: "CONNECTION_ABORTED", API_CALL_ABORTED: "API_CALL_ABORTED", DUPLICATE_AUX: "DUPLICATE_AUX" }, Ir = { AVOID_REPEATED_CALL: (e) => "previous ".concat(e.name, "() is ongoing, please avoid repeated calls."), INVALID_PARAMETER_REQUIRED(e) {
5003
+ }, HC = ((e) => (e.String = "string", e.Number = "number", e.Boolean = "boolean", e.Array = "array", e.Object = "object", e))(HC || {}), T0 = ((e) => (e.H264 = "h264", e.H265 = "h265", e.VP8 = "vp8", e.VP9 = "vp9", e.AV1 = "av1", e))(T0 || {}), WC = ((e) => (e[e.ENCRYPT_AND_DECRYPT = 0] = "ENCRYPT_AND_DECRYPT", e[e.DUMP = 1] = "DUMP", e[e.SEI = 2] = "SEI", e[e.ENCODE_AND_DECODE = 3] = "ENCODE_AND_DECODE", e))(WC || {}), GC = ((e) => (e[e.ENCRYPT_AND_DECRYPT = 0] = "ENCRYPT_AND_DECRYPT", e[e.NTP_TO_AUDIO_FRAME = 1] = "NTP_TO_AUDIO_FRAME", e[e.DUMP = 2] = "DUMP", e[e.ENCODE_AND_DECODE = 3] = "ENCODE_AND_DECODE", e))(GC || {}), jC = ((e) => (e.WebRTC = "webrtc", e.WebCodecs = "webcodecs", e.WebAssembly = "webassembly", e))(jC || {}), zC = ((Nt = zC || {})[Nt.SUCCESS = 0] = "SUCCESS", Nt[Nt.FAILED = 1] = "FAILED", Nt[Nt.WEBCODEC_INIT = 2] = "WEBCODEC_INIT", Nt[Nt.WEBCODEC_CONFIG_NOT_SUPPORT = 3] = "WEBCODEC_CONFIG_NOT_SUPPORT", Nt[Nt.WEBCODEC_DECODER_ERROR = 4] = "WEBCODEC_DECODER_ERROR", Nt[Nt.WEBCODEC_TRACK_MUTE = 5] = "WEBCODEC_TRACK_MUTE", Nt[Nt.WASM_INIT = 6] = "WASM_INIT", Nt[Nt.WASM_WEBGL_UNAVALIABLE = 7] = "WASM_WEBGL_UNAVALIABLE", Nt[Nt.WASM_DECODER_ERROR = 8] = "WASM_DECODER_ERROR", Nt[Nt.WASM_TRACK_MUTE = 9] = "WASM_TRACK_MUTE", Nt[Nt.TEST = 10] = "TEST", Nt[Nt.RENDER_2D_ERROR = 11] = "RENDER_2D_ERROR", Nt), KC = ((e) => (e.NONE = "", e.DETAIL = "detail", e.MOTION = "motion", e.TEXT = "text", e))(KC || {}), JC = ((e) => (e.INTERVAL = "interval", e.TIMEOUT = "timeout", e.RAF = "raf", e.RIC = "ric", e.INTERVAL_IN_WORKER = "intervalInWorker", e))(JC || {}), YC = ((e) => (e.CANVAS = "canvas", e.API = "api", e))(YC || {}), qC = ((e) => (e[e.NONE = 0] = "NONE", e[e.MICROPHONE = 1] = "MICROPHONE", e[e.CAMERA = 2] = "CAMERA", e[e.BOTH = 3] = "BOTH", e))(qC || {}), XC = ((e) => (e.CAMERA = "camera", e.MICROPHONE = "microphone", e))(XC || {}), S0 = ((e) => (e[e.none = 0] = "none", e[e.horizontal = 1] = "horizontal", e[e.vertical = 2] = "vertical", e))(S0 || {}), Ue = { AVOID_REPEATED_CALL: "AVOID_REPEATED_CALL", INVALID_PARAMETER_REQUIRED: "INVALID_PARAMETER_REQUIRED", INVALID_PARAMETER_TYPE: "INVALID_PARAMETER_TYPE", INVALID_PARAMETER_EMPTY: "INVALID_PARAMETER_EMPTY", INVALID_PARAMETER_INSTANCE: "INVALID_PARAMETER_INSTANCE", INVALID_PARAMETER_RANGE: "INVALID_PARAMETER_RANGE", INVALID_PARAMETER_MIN: "INVALID_PARAMETER_MIN", INVALID_PARAMETER_MAX: "INVALID_PARAMETER_MAX", INVALID_PARAMETER_STREAMTYPE: "INVALID_PARAMETER_STREAMTYPE", API_CALL_TIMEOUT: "API_CALL_TIMEOUT", SIGNAL_CHANNEL_RECONNECTION_FAILED: "SIGNAL_CHANNEL_RECONNECTION_FAILED", SIGNAL_CHANNEL_SETUP_FAILED: "SIGNAL_CHANNEL_SETUP_FAILED", ERROR_MESSAGE: "ERROR_MESSAGE", EXCHANGE_SDP_TIMEOUT: "EXCHANGE_SDP_TIMEOUT", DOWNLINK_RECONNECTION_FAILED: "DOWNLINK_RECONNECTION_FAILED", EXCHANGE_SDP_FAILED: "EXCHANGE_SDP_FAILED", UPDATE_OFFER_TIMEOUT: "UPDATE_OFFER_TIMEOUT", UPLINK_RECONNECTION_FAILED: "UPLINK_RECONNECTION_FAILED", INVALID_RECORDID: "INVALID_RECORDID", INVALID_PURE_AUDIO: "INVALID_PURE_AUDIO", INVALID_STREAMID: "INVALID_STREAMID", INVALID_USER_DEFINE_RECORDID: "INVALID_USER_DEFINE_RECORDID", INVALID_USER_DEFINE_PUSH_ARGS: "INVALID_USER_DEFINE_PUSH_ARGS", INVALID_PROXY: "INVALID_PROXY", INVALID_JOIN: "INVALID_JOIN", INVALID_ROOMID_STRING: "INVALID_ROOMID_STRING", INVALID_ROOMID_INTEGER: "INVALID_ROOMID_INTEGER", INVALID_SIGNAL_CHANNEL: "INVALID_SIGNAL_CHANNEL", JOIN_ROOM_TIMEOUT: "JOIN_ROOM_TIMEOUT", JOIN_ROOM_FAILED: "JOIN_ROOM_FAILED", REJOIN_ROOM_FAILED: "REJOIN_ROOM_FAILED", INVALID_DESTROY: "INVALID_DESTROY", INVALID_PUBLISH: "INVALID_PUBLISH", INVALID_UNPUBLISH: "INVALID_UNPUBLISH", INVALID_AUDIENCE: "INVALID_AUDIENCE", INVALID_INITIALIZE: "INVALID_INITIALIZE", INVALID_DUPLICATE_PUBLISHING: "INVALID_DUPLICATE_PUBLISHING", INVALID_SUBSCRIBE_UNDEFINED: "INVALID_SUBSCRIBE_UNDEFINED", INVALID_SUBSCRIBE_LOCAL: "INVALID_SUBSCRIBE_LOCAL", INVALID_REMOTE_STREAM: "INVALID_REMOTE_STREAM", SUBSCRIBE_FAILED: "SUBSCRIBE_FAILED", INVALID_ROLE: "INVALID_ROLE", INVALID_PARAMETER_SWITCH_ROLE: "INVALID_PARAMETER_SWITCH_ROLE", INVALID_OPERATION_SWITCH_ROLE: "INVALID_OPERATION_SWITCH_ROLE", SWITCH_ROLE_TIMEOUT: "SWITCH_ROLE_TIMEOUT", SWITCH_ROLE_FAILED: "SWITCH_ROLE_FAILED", CLIENT_BANNED: "CLIENT_BANNED", INVALID_OPERATION_START_PUBLISH_CDN: "INVALID_OPERATION_START_PUBLISH_CDN", INVALID_OPERATION_STOP_PUBLISH_CDN: "INVALID_OPERATION_STOP_PUBLISH_CDN", INVALID_STREAM_ID: "INVALID_STREAM_ID", START_PUBLISH_CDN_FAILED: "START_PUBLISH_CDN_FAILED", STOP_PUBLISH_CDN_FAILED: "STOP_PUBLISH_CDN_FAILED", START_MIX_TRANSCODE: "START_MIX_TRANSCODE", STOP_MIX_TRANSCODE: "STOP_MIX_TRANSCODE", INVALID_AUDIO_VOLUME: "INVALID_AUDIO_VOLUME", ENABLE_SMALL_STREAM_PUBLISHED: "ENABLE_SMALL_STREAM_PUBLISHED", DISABLE_SMALL_STREAM_PUBLISHED: "DISABLE_SMALL_STREAM_PUBLISHED", NOT_SUPPORTED_SMALL_STREAM: "NOT_SUPPORTED_SMALL_STREAM", INVALID_SMALL_STREAM_PROFILE: "INVALID_SMALL_STREAM_PROFILE", INVALID_PARAMETER_REMOTE_STREAM: "INVALID_PARAMETER_REMOTE_STREAM", INVALID_OPERATION_CHANGE_SMALL: "INVALID_OPERATION_CHANGE_SMALL", REMOTE_NOT_PUBLISH_SMALL_STREAM: "REMOTE_NOT_PUBLISH_SMALL_STREAM", INVALID_SWITCH_DEVICE: "INVALID_SWITCH_DEVICE", INVALID_SWITCH_DEVICE_PUBLISHING: "INVALID_SWITCH_DEVICE_PUBLISHING", INVALID_REPLACE_TRACK: "INVALID_REPLACE_TRACK", INVALID_INITIALIZE_LOCAL_STREAM: "INVALID_INITIALIZE_LOCAL_STREAM", INVALID_ADD_TRACK_REPETITIVE: "INVALID_ADD_TRACK_REPETITIVE", INVALID_ADD_TRACK_REMOVING: "INVALID_ADD_TRACK_REMOVING", INVALID_ADD_TRACK_PUBLISHING: "INVALID_ADD_TRACK_PUBLISHING", INVALID_STREAM_INITIALIZED: "INVALID_STREAM_INITIALIZED", INVALID_ADD_TRACK_NUMBER: "INVALID_ADD_TRACK_NUMBER", INVALID_REMOVE_AUDIO_TRACK: "INVALID_REMOVE_AUDIO_TRACK", INVALID_REMOVE_AUDIO_ADDING: "INVALID_REMOVE_AUDIO_ADDING", INVALID_REMOVE_AUDIO_ON: "INVALID_REMOVE_AUDIO_ON", INVALID_REMOVE_TRACK_PUBLISHING: "INVALID_REMOVE_TRACK_PUBLISHING", INVALID_REMOVE_TRACK_NOT_TRACK: "INVALID_REMOVE_TRACK_NOT_TRACK", INVALID_REMOVE_TRACK_NUMBER: "INVALID_REMOVE_TRACK_NUMBER", INVALID_REPLACE_TRACK_NO_TRACK: "INVALID_REPLACE_TRACK_NO_TRACK", REPEAT_JOIN: "REPEAT_JOIN", CLIENT_DESTROYED: "CLIENT_DESTROYED", NOT_BUG_PACKAGE: "NOT_BUG_PACKAGE", START_MIX_TRANSCODE_FAILED: "START_MIX_TRANSCODE_FAILED", STOP_MIX_TRANSCODE_FAILED: "STOP_MIX_TRANSCODE_FAILED", MIX_TRANSCODE_NOT_STARTED: "MIX_TRANSCODE_NOT_STARTED", CANNOT_LESS_THAN_ZERO: "CANNOT_LESS_THAN_ZERO", MIX_PARAMS_VIDEO_FRAMERATE: "MIX_PARAMS_VIDEO_FRAMERATE", MIX_PARAMS_VIDEO_GOP: "MIX_PARAMS_VIDEO_GOP", MIX_PARAMS_AUDIO_BITRATE: "MIX_PARAMS_AUDIO_BITRATE", MIX_PARAMS_USER_Z_ORDER: "MIX_PARAMS_USER_Z_ORDER", MIX_PARAMS_NOT_SELF: "MIX_PARAMS_NOT_SELF", MIX_PARAMS_USER_STREAM: "MIX_PARAMS_USER_STREAM", INVALID_PLAY: "INVALID_PLAY", INVALID_ELEMENT_ID: "INVALID_ELEMENT_ID", INVALID_ELEMENT_ID_TYPE: "INVALID_ELEMENT_ID_TYPE", PLAY_FAILED: "PLAY_FAILED", INVALID_USERID: "INVALID_USERID", INVALID_CREATE_STREAM_SOURCE: "INVALID_CREATE_STREAM_SOURCE", INVALID_CREATE_STREAM_SCREEN: "INVALID_CREATE_STREAM_SCREEN", INVALID_CREATE_STREAM_AUDIO: "INVALID_CREATE_STREAM_AUDIO", INVALID_CREATE_STREAM_SCREEN_AUDIO: "INVALID_CREATE_STREAM_SCREEN_AUDIO", NOT_SUPPORTED_HTTP: "NOT_SUPPORTED_HTTP", NOT_SUPPORTED_WEBRTC: "NOT_SUPPORTED_WEBRTC", NOT_SUPPORTED_PROFILE: "NOT_SUPPORTED_PROFILE", NOT_SUPPORTED_MEDIA: "NOT_SUPPORTED_MEDIA", NOT_SUPPORTED_H264ENCODE: "NOT_SUPPORTED_H264ENCODE", NOT_SUPPORTED_H264DECODE: "NOT_SUPPORTED_H264DECODE", NOT_SUPPORTED_TRACK: "NOT_SUPPORTED_TRACK", NOT_SUPPORTED_SWITCH_DEVICE: "NOT_SUPPORTED_SWITCH_DEVICE", NOT_SUPPORTED_CAPTURE: "NOT_SUPPORTED_CAPTURE", NOT_SUPPORTED_AUX: "NOT_SUPPORTED_AUX", MICROPHONE_NOT_FOUND: "MICROPHONE_NOT_FOUND", CAMERA_NOT_FOUND: "CAMERA_NOT_FOUND", SIGNAL_RESPONSE_FAILED: "SIGNAL_RESPONSE_FAILED", CATCH_HANDLER_ERROR: "CATCH_HANDLER_ERROR", API_NOT_EXIST: "API_NOT_EXIST", CONNECTION_CLOSED: "CONNECTION_CLOSED", SUBSCRIBE_ALL_FALSE: "SUBSCRIBE_ALL_FALSE", SEI_NOT_SUPPORT: "SEI_NOT_SUPPORT", SEI_DISABLED: "SEI_DISABLED", SEI_BEFORE_PUBLISH: "SEI_BEFORE_PUBLISH", SEI_NOT_VIDEO: "SEI_NOT_VIDEO", CALL_FREQUENCY_LIMIT: "CALL_FREQUENCY_LIMIT", CONNECTION_ABORTED: "CONNECTION_ABORTED", API_CALL_ABORTED: "API_CALL_ABORTED", DUPLICATE_AUX: "DUPLICATE_AUX" }, Ir = { AVOID_REPEATED_CALL: (e) => "previous ".concat(e.name, "() is ongoing, please avoid repeated calls."), INVALID_PARAMETER_REQUIRED(e) {
5004
5004
  let { key: t, rule: i, fnName: r, value: n } = e;
5005
5005
  return "'".concat(t || i.name, "' is a required param when calling ").concat(r, "(), received: ").concat(n, ".");
5006
5006
  }, INVALID_PARAMETER_TYPE(e) {
@@ -5066,7 +5066,7 @@ a=extmap-allow-mixed`) !== -1) {
5066
5066
  }
5067
5067
  return {};
5068
5068
  };
5069
- function He(e) {
5069
+ function Fe(e) {
5070
5070
  let { key: t, data: i, link: r, addDocLink: n = !0 } = e, s = "", o = "", l = "";
5071
5071
  xt(Ir[t]) ? s = Ir[t](i) : dt(Ir[t]) && (s = Ir[t]);
5072
5072
  let { TRTC_ERROR_INFO: c, TRTC_ERROR_LINK: h } = xB();
@@ -5081,7 +5081,7 @@ a=extmap-allow-mixed`) !== -1) {
5081
5081
  Refer to: `.concat(QC("en", l), `
5082
5082
  `)), _;
5083
5083
  }
5084
- var Je, tt, ZC = Qt(FF(), 1), $C = class {
5084
+ var Ke, tt, ZC = Qt(FF(), 1), $C = class {
5085
5085
  constructor() {
5086
5086
  let e = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
5087
5087
  m(this, "countMap", /* @__PURE__ */ new Map()), m(this, "distributionMap", /* @__PURE__ */ new Map()), m(this, "version"), m(this, "log", fe.createLogger({ id: "kv" })), e && ($.on("102", (t) => {
@@ -5167,7 +5167,7 @@ Refer to: `.concat(QC("en", l), `
5167
5167
  let r = te.UNKNOWN;
5168
5168
  i && (rt(i) ? r = i : (!j(i.extraCode) || !j(i.code)) && (r = i.extraCode || i.code)), this.addEnum({ key: t, value: 0, useUV: !1 }), this.addEnum({ key: t, value: Math.abs(r), useUV: !1 });
5169
5169
  }
5170
- }, e2 = ((Je = e2 || {})[Je.enterRoom = 500700] = "enterRoom", Je[Je.exitRoom = 500701] = "exitRoom", Je[Je.switchRole = 500702] = "switchRole", Je[Je.destroy = 500703] = "destroy", Je[Je.startLocalAudio = 500704] = "startLocalAudio", Je[Je.updateLocalAudio = 500705] = "updateLocalAudio", Je[Je.stopLocalAudio = 500706] = "stopLocalAudio", Je[Je.startLocalVideo = 500707] = "startLocalVideo", Je[Je.updateLocalVideo = 500708] = "updateLocalVideo", Je[Je.stopLocalVideo = 500709] = "stopLocalVideo", Je[Je.startScreenShare = 500710] = "startScreenShare", Je[Je.updateScreenShare = 500711] = "updateScreenShare", Je[Je.stopScreenShare = 500712] = "stopScreenShare", Je[Je.startRemoteVideo = 500713] = "startRemoteVideo", Je[Je.updateRemoteVideo = 500714] = "updateRemoteVideo", Je[Je.stopRemoteVideo = 500715] = "stopRemoteVideo", Je[Je.muteRemoteAudio = 500716] = "muteRemoteAudio", Je[Je.setRemoteAudioVolume = 500717] = "setRemoteAudioVolume", Je[Je.use = 500718] = "use", Je[Je.switchRoom = 500719] = "switchRoom", Je[Je.getPermissions = 500720] = "getPermissions", Je[Je.sendSEIMessage = 5e5] = "sendSEIMessage", Je[Je.sendCustomMessage = 500001] = "sendCustomMessage", Je), t2 = ((e) => (e[e.AudioMixer = 550700] = "AudioMixer", e[e.AIDenoiser = 551700] = "AIDenoiser", e[e.VirtualBackground = 570700] = "VirtualBackground", e[e.Beauty = 571700] = "Beauty", e[e.Watermark = 572700] = "Watermark", e[e.BasicBeauty = 574700] = "BasicBeauty", e[e.FaceDetector = 575700] = "FaceDetector", e[e.CDNStreaming = 590700] = "CDNStreaming", e[e.DeviceDetector = 591700] = "DeviceDetector", e[e.Debug = 592700] = "Debug", e[e.SmallStreamAutoSwitcher = 593700] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594700] = "VideoMixer", e[e.AudioProcessor = 595700] = "AudioProcessor", e[e.LEBPlayer = 596700] = "LEBPlayer", e[e.RealtimeTranscriber = 597700] = "RealtimeTranscriber", e))(t2 || {}), i2 = ((e) => (e[e.AudioMixer = 550701] = "AudioMixer", e[e.AIDenoiser = 551701] = "AIDenoiser", e[e.VirtualBackground = 570701] = "VirtualBackground", e[e.Beauty = 571701] = "Beauty", e[e.Watermark = 572701] = "Watermark", e[e.BasicBeauty = 574701] = "BasicBeauty", e[e.FaceDetector = 575701] = "FaceDetector", e[e.CDNStreaming = 590701] = "CDNStreaming", e[e.DeviceDetector = 591701] = "DeviceDetector", e[e.Debug = 592701] = "Debug", e[e.SmallStreamAutoSwitcher = 593701] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594701] = "VideoMixer", e[e.AudioProcessor = 595701] = "AudioProcessor", e[e.LEBPlayer = 596701] = "LEBPlayer", e[e.RealtimeTranscriber = 597701] = "RealtimeTranscriber", e))(i2 || {}), r2 = ((e) => (e[e.AudioMixer = 550702] = "AudioMixer", e[e.AIDenoiser = 551702] = "AIDenoiser", e[e.VirtualBackground = 570702] = "VirtualBackground", e[e.Beauty = 571702] = "Beauty", e[e.Watermark = 572702] = "Watermark", e[e.BasicBeauty = 574702] = "BasicBeauty", e[e.FaceDetector = 575702] = "FaceDetector", e[e.CDNStreaming = 590702] = "CDNStreaming", e[e.DeviceDetector = 591702] = "DeviceDetector", e[e.Debug = 592702] = "Debug", e[e.SmallStreamAutoSwitcher = 593702] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594702] = "VideoMixer", e[e.AudioProcessor = 595702] = "AudioProcessor", e[e.LEBPlayer = 596702] = "LEBPlayer", e[e.RealtimeTranscriber = 597702] = "RealtimeTranscriber", e))(r2 || {}), n2 = ((tt = n2 || {})[tt.DECODER_TYPE = 514700] = "DECODER_TYPE", tt[tt.DECODER_HW_SW = 514701] = "DECODER_HW_SW", tt[tt.DECODE_RESULT = 514702] = "DECODE_RESULT", tt[tt.DECODE_FAILED_OS = 514703] = "DECODE_FAILED_OS", tt[tt.DOWNGRADE_RESULT = 514704] = "DOWNGRADE_RESULT", tt[tt.DOWNGRADE_WEBCODECS_VIDEO = 514705] = "DOWNGRADE_WEBCODECS_VIDEO", tt[tt.DOWNGRADE_WEBCODECS_2D = 514706] = "DOWNGRADE_WEBCODECS_2D", tt[tt.DOWNGRADE_WASM_WEGBL = 514707] = "DOWNGRADE_WASM_WEGBL", tt[tt.DOWNGRADE_WASM_VIDEO = 514708] = "DOWNGRADE_WASM_VIDEO", tt[tt.DOWNGRADE_WASM_2D = 514709] = "DOWNGRADE_WASM_2D", tt[tt.DECODE_H264_RESULT = 514710] = "DECODE_H264_RESULT", tt[tt.DECODE_H265_RESULT = 514711] = "DECODE_H265_RESULT", tt[tt.DECODE_VP8_RESULT = 514712] = "DECODE_VP8_RESULT", tt[tt.DECODE_CAPABILITIES = 514713] = "DECODE_CAPABILITIES", tt[tt.H264_PROFILE_LEVEL_ID_HIGH = 514714] = "H264_PROFILE_LEVEL_ID_HIGH", tt[tt.H264_PROFILE_LEVEL_ID_MAIN = 514715] = "H264_PROFILE_LEVEL_ID_MAIN", tt[tt.RENDER_FREEZE_RATE = 514850] = "RENDER_FREEZE_RATE", tt[tt.DATA_FREEZE_RATE = 514851] = "DATA_FREEZE_RATE", tt[tt.VIDEO_CONSUME_RENDER_RATE = 514852] = "VIDEO_CONSUME_RENDER_RATE", tt), UB = new $C(!0), Ac = new $C(!1), le = UB, Qe = { result: !1, detail: { isBrowserSupported: !1, isWebRTCSupported: !1, isWebCodecsSupported: !1, isMediaDevicesSupported: !1, isScreenShareSupported: !1, isSmallStreamSupported: !1, isH264EncodeSupported: !1, isVp8EncodeSupported: !1, isH265EncodeSupported: !1, isH264DecodeSupported: !1, isVp8DecodeSupported: !1, isH265DecodeSupported: !1 } }, VB = /* @__PURE__ */ new Map([[lt, ["Firefox", Yg]], [mc, ["Edg", Xg]], [Dh, ["Chrome", h0]], [$t, ["Safari", qs]], [Fr, ["TBS", $g]], [Zn, ["XWEB", e0]], [Js && Ks, ["WeChat", t0]], [Sh, ["QQ(Win)", i0]], [_c, ["QQ(Mobile)", gc]], [fc, ["QQ(Mobile X5)", gc]], [Ih, ["QQ(Mac)", r0]], [Rh, ["QQ(iPad)", n0]], [Ah, ["MI", a0]], [bh, ["HW", l0]], [Ch, ["Samsung", c0]], [Ec, ["OPPO", u0]], [kh, ["VIVO", d0]], [Ro, ["EDGE", qg]], [yh, ["SogouMobile", Qg]], [Th, ["Sogou", Zg]]]);
5170
+ }, e2 = ((Ke = e2 || {})[Ke.enterRoom = 500700] = "enterRoom", Ke[Ke.exitRoom = 500701] = "exitRoom", Ke[Ke.switchRole = 500702] = "switchRole", Ke[Ke.destroy = 500703] = "destroy", Ke[Ke.startLocalAudio = 500704] = "startLocalAudio", Ke[Ke.updateLocalAudio = 500705] = "updateLocalAudio", Ke[Ke.stopLocalAudio = 500706] = "stopLocalAudio", Ke[Ke.startLocalVideo = 500707] = "startLocalVideo", Ke[Ke.updateLocalVideo = 500708] = "updateLocalVideo", Ke[Ke.stopLocalVideo = 500709] = "stopLocalVideo", Ke[Ke.startScreenShare = 500710] = "startScreenShare", Ke[Ke.updateScreenShare = 500711] = "updateScreenShare", Ke[Ke.stopScreenShare = 500712] = "stopScreenShare", Ke[Ke.startRemoteVideo = 500713] = "startRemoteVideo", Ke[Ke.updateRemoteVideo = 500714] = "updateRemoteVideo", Ke[Ke.stopRemoteVideo = 500715] = "stopRemoteVideo", Ke[Ke.muteRemoteAudio = 500716] = "muteRemoteAudio", Ke[Ke.setRemoteAudioVolume = 500717] = "setRemoteAudioVolume", Ke[Ke.use = 500718] = "use", Ke[Ke.switchRoom = 500719] = "switchRoom", Ke[Ke.getPermissions = 500720] = "getPermissions", Ke[Ke.sendSEIMessage = 5e5] = "sendSEIMessage", Ke[Ke.sendCustomMessage = 500001] = "sendCustomMessage", Ke), t2 = ((e) => (e[e.AudioMixer = 550700] = "AudioMixer", e[e.AIDenoiser = 551700] = "AIDenoiser", e[e.VirtualBackground = 570700] = "VirtualBackground", e[e.Beauty = 571700] = "Beauty", e[e.Watermark = 572700] = "Watermark", e[e.BasicBeauty = 574700] = "BasicBeauty", e[e.FaceDetector = 575700] = "FaceDetector", e[e.CDNStreaming = 590700] = "CDNStreaming", e[e.DeviceDetector = 591700] = "DeviceDetector", e[e.Debug = 592700] = "Debug", e[e.SmallStreamAutoSwitcher = 593700] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594700] = "VideoMixer", e[e.AudioProcessor = 595700] = "AudioProcessor", e[e.LEBPlayer = 596700] = "LEBPlayer", e[e.RealtimeTranscriber = 597700] = "RealtimeTranscriber", e))(t2 || {}), i2 = ((e) => (e[e.AudioMixer = 550701] = "AudioMixer", e[e.AIDenoiser = 551701] = "AIDenoiser", e[e.VirtualBackground = 570701] = "VirtualBackground", e[e.Beauty = 571701] = "Beauty", e[e.Watermark = 572701] = "Watermark", e[e.BasicBeauty = 574701] = "BasicBeauty", e[e.FaceDetector = 575701] = "FaceDetector", e[e.CDNStreaming = 590701] = "CDNStreaming", e[e.DeviceDetector = 591701] = "DeviceDetector", e[e.Debug = 592701] = "Debug", e[e.SmallStreamAutoSwitcher = 593701] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594701] = "VideoMixer", e[e.AudioProcessor = 595701] = "AudioProcessor", e[e.LEBPlayer = 596701] = "LEBPlayer", e[e.RealtimeTranscriber = 597701] = "RealtimeTranscriber", e))(i2 || {}), r2 = ((e) => (e[e.AudioMixer = 550702] = "AudioMixer", e[e.AIDenoiser = 551702] = "AIDenoiser", e[e.VirtualBackground = 570702] = "VirtualBackground", e[e.Beauty = 571702] = "Beauty", e[e.Watermark = 572702] = "Watermark", e[e.BasicBeauty = 574702] = "BasicBeauty", e[e.FaceDetector = 575702] = "FaceDetector", e[e.CDNStreaming = 590702] = "CDNStreaming", e[e.DeviceDetector = 591702] = "DeviceDetector", e[e.Debug = 592702] = "Debug", e[e.SmallStreamAutoSwitcher = 593702] = "SmallStreamAutoSwitcher", e[e.VideoMixer = 594702] = "VideoMixer", e[e.AudioProcessor = 595702] = "AudioProcessor", e[e.LEBPlayer = 596702] = "LEBPlayer", e[e.RealtimeTranscriber = 597702] = "RealtimeTranscriber", e))(r2 || {}), n2 = ((tt = n2 || {})[tt.DECODER_TYPE = 514700] = "DECODER_TYPE", tt[tt.DECODER_HW_SW = 514701] = "DECODER_HW_SW", tt[tt.DECODE_RESULT = 514702] = "DECODE_RESULT", tt[tt.DECODE_FAILED_OS = 514703] = "DECODE_FAILED_OS", tt[tt.DOWNGRADE_RESULT = 514704] = "DOWNGRADE_RESULT", tt[tt.DOWNGRADE_WEBCODECS_VIDEO = 514705] = "DOWNGRADE_WEBCODECS_VIDEO", tt[tt.DOWNGRADE_WEBCODECS_2D = 514706] = "DOWNGRADE_WEBCODECS_2D", tt[tt.DOWNGRADE_WASM_WEGBL = 514707] = "DOWNGRADE_WASM_WEGBL", tt[tt.DOWNGRADE_WASM_VIDEO = 514708] = "DOWNGRADE_WASM_VIDEO", tt[tt.DOWNGRADE_WASM_2D = 514709] = "DOWNGRADE_WASM_2D", tt[tt.DECODE_H264_RESULT = 514710] = "DECODE_H264_RESULT", tt[tt.DECODE_H265_RESULT = 514711] = "DECODE_H265_RESULT", tt[tt.DECODE_VP8_RESULT = 514712] = "DECODE_VP8_RESULT", tt[tt.DECODE_CAPABILITIES = 514713] = "DECODE_CAPABILITIES", tt[tt.H264_PROFILE_LEVEL_ID_HIGH = 514714] = "H264_PROFILE_LEVEL_ID_HIGH", tt[tt.H264_PROFILE_LEVEL_ID_MAIN = 514715] = "H264_PROFILE_LEVEL_ID_MAIN", tt[tt.RENDER_FREEZE_RATE = 514850] = "RENDER_FREEZE_RATE", tt[tt.DATA_FREEZE_RATE = 514851] = "DATA_FREEZE_RATE", tt[tt.VIDEO_CONSUME_RENDER_RATE = 514852] = "VIDEO_CONSUME_RENDER_RATE", tt), UB = new $C(!0), Ac = new $C(!1), le = UB, Qe = { result: !1, detail: { isBrowserSupported: !1, isWebRTCSupported: !1, isWebCodecsSupported: !1, isMediaDevicesSupported: !1, isScreenShareSupported: !1, isSmallStreamSupported: !1, isH264EncodeSupported: !1, isVp8EncodeSupported: !1, isH265EncodeSupported: !1, isH264DecodeSupported: !1, isVp8DecodeSupported: !1, isH265DecodeSupported: !1 } }, VB = /* @__PURE__ */ new Map([[lt, ["Firefox", Yg]], [mc, ["Edg", Xg]], [Dh, ["Chrome", h0]], [$t, ["Safari", qs]], [Fr, ["TBS", $g]], [Zn, ["XWEB", e0]], [Js && Ks, ["WeChat", t0]], [Sh, ["QQ(Win)", i0]], [_c, ["QQ(Mobile)", gc]], [fc, ["QQ(Mobile X5)", gc]], [Ih, ["QQ(Mac)", r0]], [Rh, ["QQ(iPad)", n0]], [Ah, ["MI", a0]], [bh, ["HW", l0]], [Ch, ["Samsung", c0]], [Ec, ["OPPO", u0]], [kh, ["VIVO", d0]], [Ro, ["EDGE", qg]], [yh, ["SogouMobile", Qg]], [Th, ["Sogou", Zg]]]);
5171
5171
  function FB() {
5172
5172
  let e = VB.get(!0);
5173
5173
  return { browserName: e ? e[0] : "unknown", browserVersion: e ? e[1] : "unknown" };
@@ -5182,7 +5182,7 @@ Refer to: `.concat(QC("en", l), `
5182
5182
  return e.filter((t) => t in navigator.mediaDevices).length === e.length;
5183
5183
  }, s2 = !1;
5184
5184
  function Zs() {
5185
- return location.protocol === "http:" && !Xs && (s2 || fe.error(He({ key: Fe.NOT_SUPPORTED_HTTP })), s2 = !0, !0);
5185
+ return location.protocol === "http:" && !Xs && (s2 || fe.error(Fe({ key: Ue.NOT_SUPPORTED_HTTP })), s2 = !0, !0);
5186
5186
  }
5187
5187
  var A0 = function() {
5188
5188
  return window?.OffscreenCanvas && window?.MediaStreamTrackProcessor && window?.MediaStreamTrackGenerator;
@@ -5240,14 +5240,14 @@ Refer to: `.concat(QC("en", l), `
5240
5240
  try {
5241
5241
  Ne = yield new Promise((Ge, Pe) => P(null, null, function* () {
5242
5242
  try {
5243
- let Be = new VideoEncoder({ output: (vt) => {
5243
+ let Ve = new VideoEncoder({ output: (vt) => {
5244
5244
  Ge(vt), Ae.encodeSupported = !0;
5245
5245
  }, error: Pe });
5246
- Be.configure(pe.encodeConfig), Z();
5246
+ Ve.configure(pe.encodeConfig), Z();
5247
5247
  let st = new VideoFrame(B, { timestamp: 0 });
5248
- Be.encode(st, { keyFrame: !0 }), st.close(), yield Be.flush(), Be.close();
5249
- } catch (Be) {
5250
- Pe(Be);
5248
+ Ve.encode(st, { keyFrame: !0 }), st.close(), yield Ve.flush(), Ve.close();
5249
+ } catch (Ve) {
5250
+ Pe(Ve);
5251
5251
  }
5252
5252
  }));
5253
5253
  } catch (Ge) {
@@ -5256,12 +5256,12 @@ Refer to: `.concat(QC("en", l), `
5256
5256
  try {
5257
5257
  yield new Promise((Ge, Pe) => P(null, null, function* () {
5258
5258
  try {
5259
- let Be = new VideoDecoder({ output: (st) => {
5259
+ let Ve = new VideoDecoder({ output: (st) => {
5260
5260
  Ae.decodeSupported = !0, Ge(0), st.close();
5261
5261
  }, error: Pe });
5262
- Be.configure(pe.decodeConfig), Be.decode(Ne), yield Be.flush(), Be.close();
5263
- } catch (Be) {
5264
- Pe(Be);
5262
+ Ve.configure(pe.decodeConfig), Ve.decode(Ne), yield Ve.flush(), Ve.close();
5263
+ } catch (Ve) {
5264
+ Pe(Ve);
5265
5265
  }
5266
5266
  }));
5267
5267
  } catch (Ge) {
@@ -5309,8 +5309,8 @@ Refer to: `.concat(QC("en", l), `
5309
5309
  Ae.addEventListener("icecandidate", (ft) => Ge.addIceCandidate(ft.candidate)), Ge.addEventListener("icecandidate", (ft) => Ae.addIceCandidate(ft.candidate)), Ae.addTrack(Ne.getVideoTracks()[0], Ne);
5310
5310
  let Pe = yield Ae.createOffer();
5311
5311
  yield Ae.setLocalDescription(Pe), yield Ge.setRemoteDescription(Pe);
5312
- let Be = yield Ge.createAnswer(), st = ZC.default.parse(Be.sdp), vt = st.media[0].rtp.findIndex((ft) => ft.codec === "H264");
5313
- st.media[0].rtp = [st.media[0].rtp[vt]], st.media[0].fmtp = st.media[0].fmtp.filter((ft) => ft.payload === st.media[0].rtp[0].payload), st.media[0].rtcpFb && (st.media[0].rtcpFb = st.media[0].rtcpFb.filter((ft) => ft.payload === st.media[0].rtp[0].payload)), Be.sdp = ZC.default.write(st), yield Ge.setLocalDescription(Be), yield Ae.setRemoteDescription(Be), de = setInterval(() => P(null, null, function* () {
5312
+ let Ve = yield Ge.createAnswer(), st = ZC.default.parse(Ve.sdp), vt = st.media[0].rtp.findIndex((ft) => ft.codec === "H264");
5313
+ st.media[0].rtp = [st.media[0].rtp[vt]], st.media[0].fmtp = st.media[0].fmtp.filter((ft) => ft.payload === st.media[0].rtp[0].payload), st.media[0].rtcpFb && (st.media[0].rtcpFb = st.media[0].rtcpFb.filter((ft) => ft.payload === st.media[0].rtp[0].payload)), Ve.sdp = ZC.default.write(st), yield Ge.setLocalDescription(Ve), yield Ae.setRemoteDescription(Ve), de = setInterval(() => P(null, null, function* () {
5314
5314
  Y.encode && Y.decode && (G(), B(Y));
5315
5315
  let [ft, fa] = yield Promise.all([Ae.getSenders()[0].getStats(), Ge.getReceivers()[0].getStats()]);
5316
5316
  Y.encode || ft.forEach((Mi) => {
@@ -5847,7 +5847,7 @@ Refer to: `.concat(QC("en", l), `
5847
5847
  this._playSuccessResolve = e, this.element.play().then(e, t);
5848
5848
  });
5849
5849
  } catch (e) {
5850
- let t = He({ key: Fe.PLAY_FAILED, data: { media: this.kind, error: e } });
5850
+ let t = Fe({ key: Ue.PLAY_FAILED, data: { media: this.kind, error: e } });
5851
5851
  if (this._log.warn(e), t.includes("NotAllowedError")) throw this.isInAutoPlayFailedState = !0, new me({ code: te.PLAY_NOT_ALLOWED, message: t });
5852
5852
  }
5853
5853
  });
@@ -7076,7 +7076,7 @@ Refer to: `.concat(QC("en", l), `
7076
7076
  }), t.audio && Bc(), s;
7077
7077
  } catch (s) {
7078
7078
  let { message: o } = s;
7079
- throw s.name === "NotFoundError" && (e.video && r && r.length === 0 && (o = He({ key: Fe.CAMERA_NOT_FOUND })), e.audio && i && i.length === 0 && (o = He({ key: Fe.MICROPHONE_NOT_FOUND }))), new me({ code: te.INITIALIZE_FAILED, name: s.name, message: o, constraint: s.constraint });
7079
+ throw s.name === "NotFoundError" && (e.video && r && r.length === 0 && (o = Fe({ key: Ue.CAMERA_NOT_FOUND })), e.audio && i && i.length === 0 && (o = Fe({ key: Ue.MICROPHONE_NOT_FOUND }))), new me({ code: te.INITIALIZE_FAILED, name: s.name, message: o, constraint: s.constraint });
7080
7080
  }
7081
7081
  });
7082
7082
  }, settings: { retries: 3, timeout: 500 }, onError: (e) => {
@@ -10326,26 +10326,26 @@ void main() {
10326
10326
  function ap(e) {
10327
10327
  let { rule: t, value: i, key: r, fnName: n, className: s } = e;
10328
10328
  if (j(i)) {
10329
- if (t.required) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_REQUIRED, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10329
+ if (t.required) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_REQUIRED, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10330
10330
  if (j(t.defaultValue)) return;
10331
10331
  i = t.defaultValue;
10332
10332
  }
10333
10333
  if (Array.isArray(t.type)) {
10334
10334
  let c = !1;
10335
10335
  for (let h = 0; h < t.type.length; h++) t.type[h] === null && i === null && (c = !0), xt(t.type[h]) && i instanceof t.type[h] && (c = !0), dt(t.type[h]) && Zt(i) === t.type[h].toLowerCase() && (c = !0);
10336
- if (!c) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_TYPE, data: { key: r, rule: { type: t.type.map((h) => ac(h) ? uh(h) : dt(h) ? h : Zt(h)) }, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10337
- } else if (!j(t.type) && Zt(i) !== t.type) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_TYPE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10336
+ if (!c) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_TYPE, data: { key: r, rule: { type: t.type.map((h) => ac(h) ? uh(h) : dt(h) ? h : Zt(h)) }, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10337
+ } else if (!j(t.type) && Zt(i) !== t.type) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_TYPE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10338
10338
  if (t.allowEmpty === !1) {
10339
10339
  let c = rt(i) && (i === 0 || Number.isNaN(i)), h = dt(i) && i.trim() === "";
10340
- if (c || h) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_EMPTY, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10340
+ if (c || h) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_EMPTY, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10341
10341
  }
10342
- if (t.notLessThanZero && rt(i) && i < 0) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.CANNOT_LESS_THAN_ZERO, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10343
- if (!j(t.min) && rt(i) && i < t.min) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_MIN, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10344
- if (!j(t.max) && rt(i) && i > t.max) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_MAX, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10342
+ if (t.notLessThanZero && rt(i) && i < 0) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.CANNOT_LESS_THAN_ZERO, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10343
+ if (!j(t.min) && rt(i) && i < t.min) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_MIN, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10344
+ if (!j(t.max) && rt(i) && i > t.max) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_MAX, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10345
10345
  if (dt(t.instanceOf)) {
10346
- if (!i || i._name !== t.instanceOf) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_INSTANCE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10347
- } else if (xt(t.instanceOf) && !(i instanceof t.instanceOf)) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_INSTANCE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10348
- if (t.values && !t.values.includes(i)) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PARAMETER_RANGE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10346
+ if (!i || i._name !== t.instanceOf) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_INSTANCE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10347
+ } else if (xt(t.instanceOf) && !(i instanceof t.instanceOf)) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_INSTANCE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10348
+ if (t.values && !t.values.includes(i)) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PARAMETER_RANGE, data: { key: r, rule: t, fnName: n, value: i }, link: { className: s, fnName: n } }) });
10349
10349
  let { properties: o } = t;
10350
10350
  er(o) && Ur(i) && Object.keys(o).forEach((c) => {
10351
10351
  ap.call(this, { rule: o[c], value: i && i[c], key: "".concat(r, ".").concat(c), fnName: n, className: s });
@@ -10517,7 +10517,7 @@ void main() {
10517
10517
  }), function() {
10518
10518
  let l = o.get(this);
10519
10519
  for (var c = arguments.length, h = new Array(c), _ = 0; _ < c; _++) h[_] = arguments[_];
10520
- if (l || (l = { callCountInSecond: 0, timestamp: 0, totalSizeInSecond: 0 }, o.set(this, l)), l.timestamp === 0 ? l.timestamp = Date.now() : Date.now() - l.timestamp > 1e3 && (l.timestamp = Date.now(), l.callCountInSecond = 0, l.totalSizeInSecond = 0), r && (l.totalSizeInSecond += r(...h)), l.timestamp !== 0 && Date.now() - l.timestamp < 1e3 && (l.callCountInSecond >= t || l.totalSizeInSecond > i)) throw new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.CALL_FREQUENCY_LIMIT, data: { isTimes: l.callCountInSecond >= t, isSize: l.totalSizeInSecond > i, name: s, timesInSecond: t, maxSizeInSecond: i } }) });
10520
+ if (l || (l = { callCountInSecond: 0, timestamp: 0, totalSizeInSecond: 0 }, o.set(this, l)), l.timestamp === 0 ? l.timestamp = Date.now() : Date.now() - l.timestamp > 1e3 && (l.timestamp = Date.now(), l.callCountInSecond = 0, l.totalSizeInSecond = 0), r && (l.totalSizeInSecond += r(...h)), l.timestamp !== 0 && Date.now() - l.timestamp < 1e3 && (l.callCountInSecond >= t || l.totalSizeInSecond > i)) throw new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.CALL_FREQUENCY_LIMIT, data: { isTimes: l.callCountInSecond >= t, isSize: l.totalSizeInSecond > i, name: s, timesInSecond: t, maxSizeInSecond: i } }) });
10521
10521
  l.callCountInSecond++, n.call(this, ...h);
10522
10522
  };
10523
10523
  });
@@ -11060,13 +11060,13 @@ void main() {
11060
11060
  return new Promise((pe, Ne) => {
11061
11061
  let Ae = null;
11062
11062
  oc([Jk((Ge) => Z.count[0] = Ge + 1, (Ge) => {
11063
- let { error: Pe, retry: Be, retriedCount: st, retryFuncArgs: vt } = Ge;
11064
- Z.msg[0] = Pe.message, Ae || (st >= 1 && (vt[0] = os(de, "config", D.MAIN, !0)), Be());
11063
+ let { error: Pe, retry: Ve, retriedCount: st, retryFuncArgs: vt } = Ge;
11064
+ Z.msg[0] = Pe.message, Ae || (st >= 1 && (vt[0] = os(de, "config", D.MAIN, !0)), Ve());
11065
11065
  })(os(de, "config", D.MAIN), H, { get timeout() {
11066
11066
  return 1e3 * yo(2 + Z.count[0]);
11067
11067
  } }), Jk((Ge) => Z.count[1] = Ge + 1, (Ge) => {
11068
- let { error: Pe, retry: Be, retriedCount: st, retryFuncArgs: vt } = Ge;
11069
- Z.msg[1] = Pe.message, Ae || (st >= 2 && (vt[0] = os(de, "config", D.BACKUP, !0)), Be());
11068
+ let { error: Pe, retry: Ve, retriedCount: st, retryFuncArgs: vt } = Ge;
11069
+ Z.msg[1] = Pe.message, Ae || (st >= 2 && (vt[0] = os(de, "config", D.BACKUP, !0)), Ve());
11070
11070
  })(os(de, "config", D.BACKUP), H, { get timeout() {
11071
11071
  return 1e3 * yo(2 + Z.count[1]);
11072
11072
  } })]).then((Ge) => {
@@ -11080,8 +11080,8 @@ void main() {
11080
11080
  try {
11081
11081
  let Ne = performance.getEntriesByType("resource"), Ae = os(H, "config", D.MAIN), Ge = os(H, "config", D.BACKUP);
11082
11082
  for (let Pe of Ne) if (Pe.startTime >= de && (Pe.name === Ae || Pe.name === Ge) && Pe.transferSize > 0) {
11083
- let Be = Pe.name === Ae ? D.MAIN : D.BACKUP, st = Math.round(Pe.duration), vt = Math.round(Pe.domainLookupStart - Pe.startTime), ft = Pe.redirectStart > 0 ? Math.round(Pe.redirectEnd - Pe.redirectStart) : 0, fa = Pe.fetchStart > 0 ? Math.round(Pe.domainLookupStart - Pe.fetchStart) : 0, Mi = Math.round(Pe.domainLookupEnd - Pe.domainLookupStart), qw = Math.round(Pe.requestStart - Pe.secureConnectionStart), Xw = Math.round(Pe.secureConnectionStart - Pe.connectStart), Qw = Math.round(Pe.responseStart - Pe.requestStart), Zw = Math.round(Pe.responseEnd - Pe.responseStart), bG = [Mi, qw, Xw, Qw, Zw];
11084
- ct.uploadEvent({ log: "stat-schedule-net:".concat(st, "(").concat(vt, "(").concat(ft, "->").concat(fa, ")->").concat(bG.join("->"), ") ").concat(Be), userId: Z }), pe = Me(ve({}, pe), { totalCost: st, local: vt, dns: Mi, tcp: Xw, tls: qw, request: Qw, response: Zw });
11083
+ let Ve = Pe.name === Ae ? D.MAIN : D.BACKUP, st = Math.round(Pe.duration), vt = Math.round(Pe.domainLookupStart - Pe.startTime), ft = Pe.redirectStart > 0 ? Math.round(Pe.redirectEnd - Pe.redirectStart) : 0, fa = Pe.fetchStart > 0 ? Math.round(Pe.domainLookupStart - Pe.fetchStart) : 0, Mi = Math.round(Pe.domainLookupEnd - Pe.domainLookupStart), qw = Math.round(Pe.requestStart - Pe.secureConnectionStart), Xw = Math.round(Pe.secureConnectionStart - Pe.connectStart), Qw = Math.round(Pe.responseStart - Pe.requestStart), Zw = Math.round(Pe.responseEnd - Pe.responseStart), bG = [Mi, qw, Xw, Qw, Zw];
11084
+ ct.uploadEvent({ log: "stat-schedule-net:".concat(st, "(").concat(vt, "(").concat(ft, "->").concat(fa, ")->").concat(bG.join("->"), ") ").concat(Ve), userId: Z }), pe = Me(ve({}, pe), { totalCost: st, local: vt, dns: Mi, tcp: Xw, tls: qw, request: Qw, response: Zw });
11085
11085
  break;
11086
11086
  }
11087
11087
  } catch (Ne) {
@@ -11091,7 +11091,7 @@ void main() {
11091
11091
  })(Number(r), i, Y);
11092
11092
  return Ev = G, { isCached: !1, result: G, detailCost: he };
11093
11093
  } catch (b) {
11094
- let C = Jt(b) ? b[0] : b, x = rt(C.code) ? C.code : 0, B = "schedule failed".concat(C.message ? ": ".concat(C.message) : ""), Y = new me({ code: te.SCHEDULE_FAILED, extraCode: x, message: He({ key: Fe.JOIN_ROOM_FAILED, data: { error: B, code: x } }) });
11094
+ let C = Jt(b) ? b[0] : b, x = rt(C.code) ? C.code : 0, B = "schedule failed".concat(C.message ? ": ".concat(C.message) : ""), Y = new me({ code: te.SCHEDULE_FAILED, extraCode: x, message: Fe({ key: Ue.JOIN_ROOM_FAILED, data: { error: B, code: x } }) });
11095
11095
  throw fe.error(B, x), Y;
11096
11096
  }
11097
11097
  })();
@@ -12212,7 +12212,7 @@ void main() {
12212
12212
  }
12213
12213
  call(e, t) {
12214
12214
  return P(this, null, function* () {
12215
- return xt(this[e]) ? this[e](t) : Promise.reject(new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.API_NOT_EXIST, data: { name: e } }) }));
12215
+ return xt(this[e]) ? this[e](t) : Promise.reject(new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.API_NOT_EXIST, data: { name: e } }) }));
12216
12216
  });
12217
12217
  }
12218
12218
  enableAudioFrameEvent(e) {
@@ -12306,7 +12306,7 @@ void main() {
12306
12306
  }
12307
12307
  }, gp = new _W(), pw = 0, ru = /* @__PURE__ */ new Set(), ii = null;
12308
12308
  Kb(sw), E0.checkStorage();
12309
- var Ke = class bn extends WF.EventEmitter {
12309
+ var ze = class bn extends WF.EventEmitter {
12310
12310
  constructor(t, i) {
12311
12311
  super(), m(this, "_room"), m(this, "_eventListened", /* @__PURE__ */ new Set()), m(this, "_localVideoTrack", null), m(this, "_localAudioTrack", null), m(this, "_localScreenTrack", null), m(this, "_localScreenAudioTrack", null), m(this, "_localVideoConfig", null), m(this, "_localScreenConfig", null), m(this, "_localAudioConfig", null), m(this, "_remoteVideoConfigMap", /* @__PURE__ */ new Map()), m(this, "_remoteAudioConfigMap", /* @__PURE__ */ new Map()), m(this, "_remoteAudioVolumeMap", /* @__PURE__ */ new Map()), m(this, "_remoteAudioMuteMap", /* @__PURE__ */ new Map()), m(this, "_mediaTrackMap", /* @__PURE__ */ new WeakMap()), m(this, "_log", fe.createLogger({ id: "t".concat(++pw) })), m(this, "_plugins", /* @__PURE__ */ new Map()), m(this, "_networkQuality", null), m(this, "_speakerId"), m(this, "enterRoomParams"), m(this, "_enableAutoSwitchWhenRecapturing", !0), m(this, "_autoSubscribeDataChannel", !1), this._room = new t(ve({ logger: this._log, frameWorkType: bn.frameWorkType }, i)), this._room.videoDecodeFallbackType = i.videoDecodeFallback, At(i.enableAutoSwitchWhenRecapturing) && (this._enableAutoSwitchWhenRecapturing = i.enableAutoSwitchWhenRecapturing), this._log.info("create() ".concat(JSON.stringify(i, (r, n) => r === "plugins" ? n.map((s) => s.Name) : n))), Object.defineProperties(this, { dumpAudio: { enumerable: !1, value(r) {
12312
12312
  return this._room.audioManager.dump(r);
@@ -12332,7 +12332,7 @@ void main() {
12332
12332
  try {
12333
12333
  return s.apply(r, l);
12334
12334
  } catch (h) {
12335
- let _ = He({ key: Fe.CATCH_HANDLER_ERROR, data: { name: n, event: l[0] }, addDocLink: !1 });
12335
+ let _ = Fe({ key: Ue.CATCH_HANDLER_ERROR, data: { name: n, event: l[0] }, addDocLink: !1 });
12336
12336
  return fe.warn("".concat(_, `
12337
12337
 
12338
12338
  `).concat(h.stack)), !1;
@@ -13127,23 +13127,23 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13127
13127
  }
13128
13128
  }
13129
13129
  };
13130
- m(Ke, "VERSION", sw), m(Ke, "_loggerManager", fe), m(Ke, "EVENT", Se), m(Ke, "ERROR_CODE", we), m(Ke, "TYPE", eu), m(Ke, "frameWorkType", 30), _e([wt({ replaceArg: (e) => ({ argIndex: 0, value: { name: "plugin" in e ? e.plugin.Name : e.Name, assetsPath: "assetsPath" in e ? e?.assetsPath : "default" } }) })], Ke.prototype, "use"), _e([vi(ti.TRTC.enterRoom), la("room", (e, t) => {
13130
+ m(ze, "VERSION", sw), m(ze, "_loggerManager", fe), m(ze, "EVENT", Se), m(ze, "ERROR_CODE", we), m(ze, "TYPE", eu), m(ze, "frameWorkType", 30), _e([wt({ replaceArg: (e) => ({ argIndex: 0, value: { name: "plugin" in e ? e.plugin.Name : e.Name, assetsPath: "assetsPath" in e ? e?.assetsPath : "default" } }) })], ze.prototype, "use"), _e([vi(ti.TRTC.enterRoom), la("room", (e, t) => {
13131
13131
  let [i] = e, [r] = t;
13132
13132
  return (i.roomId || i.strRoomId) === (r.roomId || r.strRoomId) && i.userId === r.userId && i.sdkAppId === r.sdkAppId;
13133
13133
  }), mt((e) => function(t) {
13134
13134
  return this._log.setUserId(t.userId), this._log.setSdkAppId(t.sdkAppId), e.call(this, t);
13135
- }), wt()], Ke.prototype, "enterRoom"), _e([wt()], Ke.prototype, "exitRoom"), _e([vi(ti.TRTC.switchRoom), wt(), Wc()], Ke.prototype, "switchRoom"), _e([vi(ti.TRTC.switchRole), Bo("room", { merge: (e, t) => t }), wt()], Ke.prototype, "switchRole"), _e([wt()], Ke.prototype, "destroy"), _e([vi(ti.TRTC.startLocalAudio), la("audio", (e, t) => {
13135
+ }), wt()], ze.prototype, "enterRoom"), _e([wt()], ze.prototype, "exitRoom"), _e([vi(ti.TRTC.switchRoom), wt(), Wc()], ze.prototype, "switchRoom"), _e([vi(ti.TRTC.switchRole), Bo("room", { merge: (e, t) => t }), wt()], ze.prototype, "switchRole"), _e([wt()], ze.prototype, "destroy"), _e([vi(ti.TRTC.startLocalAudio), la("audio", (e, t) => {
13136
13136
  let [i] = e, [r] = t;
13137
13137
  var n, s;
13138
13138
  return ((n = i?.option) == null ? void 0 : n.microphoneId) === ((s = r?.option) == null ? void 0 : s.microphoneId);
13139
- }), wt()], Ke.prototype, "startLocalAudio"), _e([vi(ti.TRTC.updateLocalAudio), Bo("audio", { debounce: { delay: 200, getKey: () => "".concat(pw, "-localAudio"), isNeedToDebounce: (e) => {
13139
+ }), wt()], ze.prototype, "startLocalAudio"), _e([vi(ti.TRTC.updateLocalAudio), Bo("audio", { debounce: { delay: 200, getKey: () => "".concat(pw, "-localAudio"), isNeedToDebounce: (e) => {
13140
13140
  var t;
13141
13141
  return !j((t = e.option) == null ? void 0 : t.captureVolume);
13142
- } } }), wt()], Ke.prototype, "updateLocalAudio"), _e([ca("audio"), wt()], Ke.prototype, "stopLocalAudio"), _e([vi(ti.TRTC.startLocalVideo), la("video", (e, t) => {
13142
+ } } }), wt()], ze.prototype, "updateLocalAudio"), _e([ca("audio"), wt()], ze.prototype, "stopLocalAudio"), _e([vi(ti.TRTC.startLocalVideo), la("video", (e, t) => {
13143
13143
  let [i] = e, [r] = t;
13144
13144
  var n, s;
13145
13145
  return ((n = i?.option) == null ? void 0 : n.cameraId) === ((s = r?.option) == null ? void 0 : s.cameraId);
13146
- }), wt()], Ke.prototype, "startLocalVideo"), _e([vi(ti.TRTC.updateLocalVideo), Bo("video"), wt()], Ke.prototype, "updateLocalVideo"), _e([ca("video"), wt()], Ke.prototype, "stopLocalVideo"), _e([vi(ti.TRTC.startScreenShare), la("screen", () => !0), wt()], Ke.prototype, "startScreenShare"), _e([vi(ti.TRTC.updateScreenShare), Bo("screen"), wt()], Ke.prototype, "updateScreenShare"), _e([wt()], Ke.prototype, "stopScreenShare"), _e([vi(ti.TRTC.startRemoteVideo), la((e) => "v".concat(e.userId).concat(e.streamType), () => !0), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], Ke.prototype, "startRemoteVideo"), _e([vi(ti.TRTC.updateRemoteVideo), Bo((e) => "v".concat(e.userId).concat(e.streamType)), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], Ke.prototype, "updateRemoteVideo"), _e([vi(ti.TRTC.stopRemoteVideo), mt((e) => function(t) {
13146
+ }), wt()], ze.prototype, "startLocalVideo"), _e([vi(ti.TRTC.updateLocalVideo), Bo("video"), wt()], ze.prototype, "updateLocalVideo"), _e([ca("video"), wt()], ze.prototype, "stopLocalVideo"), _e([vi(ti.TRTC.startScreenShare), la("screen", () => !0), wt()], ze.prototype, "startScreenShare"), _e([vi(ti.TRTC.updateScreenShare), Bo("screen"), wt()], ze.prototype, "updateScreenShare"), _e([wt()], ze.prototype, "stopScreenShare"), _e([vi(ti.TRTC.startRemoteVideo), la((e) => "v".concat(e.userId).concat(e.streamType), () => !0), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], ze.prototype, "startRemoteVideo"), _e([vi(ti.TRTC.updateRemoteVideo), Bo((e) => "v".concat(e.userId).concat(e.streamType)), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], ze.prototype, "updateRemoteVideo"), _e([vi(ti.TRTC.stopRemoteVideo), mt((e) => function(t) {
13147
13147
  return P(this, null, function* () {
13148
13148
  if (t.userId === "*") {
13149
13149
  let i = [];
@@ -13155,7 +13155,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13155
13155
  }
13156
13156
  return e.call(this, t);
13157
13157
  });
13158
- }), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], Ke.prototype, "stopRemoteVideo"), _e([ca((e) => "v".concat(e.userId).concat(e.streamType))], Ke.prototype, "_stopRemoteVideo"), _e([vi(...ti.TRTC.muteRemoteAudio), wt({ getRemoteId: (e) => e })], Ke.prototype, "muteRemoteAudio"), _e([aw(...ti.TRTC.setRemoteAudioVolume), (function(e, t) {
13158
+ }), wt({ getRemoteId: (e) => "".concat(e.userId, "_").concat(e.streamType) })], ze.prototype, "stopRemoteVideo"), _e([ca((e) => "v".concat(e.userId).concat(e.streamType))], ze.prototype, "_stopRemoteVideo"), _e([vi(...ti.TRTC.muteRemoteAudio), wt({ getRemoteId: (e) => e })], ze.prototype, "muteRemoteAudio"), _e([aw(...ti.TRTC.setRemoteAudioVolume), (function(e, t) {
13159
13159
  return mt((i, r) => function() {
13160
13160
  for (var n = arguments.length, s = new Array(n), o = 0; o < n; o++) s[o] = arguments[o];
13161
13161
  let l = Ho.get(this);
@@ -13177,23 +13177,23 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13177
13177
  l.set(c, _);
13178
13178
  }
13179
13179
  });
13180
- })(200, (e) => e), wt({ getRemoteId: (e) => e })], Ke.prototype, "setRemoteAudioVolume"), _e([Cv("start"), ia((e) => {
13180
+ })(200, (e) => e), wt({ getRemoteId: (e) => e })], ze.prototype, "setRemoteAudioVolume"), _e([Cv("start"), ia((e) => {
13181
13181
  var t;
13182
13182
  return (t = e.afterStart) == null ? void 0 : t.call(e);
13183
- }), la((e, t) => e.disableRandomCall ? null : e.getAlias() + e.getGroup(t)), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => t2[e.getName()], ignoreLog: (e) => e.getName() === "Debug", ignoreErrorLog: (e) => e.getName() === "AudioProcessor" })], Ke.prototype, "startPlugin"), _e([Cv("update"), Bo((e, t) => e.disableRandomCall ? null : e.getAlias() + e.getGroup(t), { merge: (e, t) => (pn(e[1], t[1]), e) }), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => i2[e.getName()] })], Ke.prototype, "updatePlugin"), _e([Cv("stop"), ca((e, t) => {
13183
+ }), la((e, t) => e.disableRandomCall ? null : e.getAlias() + e.getGroup(t)), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => t2[e.getName()], ignoreLog: (e) => e.getName() === "Debug", ignoreErrorLog: (e) => e.getName() === "AudioProcessor" })], ze.prototype, "startPlugin"), _e([Cv("update"), Bo((e, t) => e.disableRandomCall ? null : e.getAlias() + e.getGroup(t), { merge: (e, t) => (pn(e[1], t[1]), e) }), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => i2[e.getName()] })], ze.prototype, "updatePlugin"), _e([Cv("stop"), ca((e, t) => {
13184
13184
  if (e.disableRandomCall) return null;
13185
13185
  let i = e.getGroup(t), r = e.getAlias();
13186
13186
  return i === "*" ? new RegExp("".concat(r, ".*")) : r + i;
13187
- }), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => r2[e.getName()] })], Ke.prototype, "stopPlugin"), _e([aw(...ti.TRTC.enableAudioVolumeEvaluation)], Ke.prototype, "enableAudioVolumeEvaluation"), _e([wt()], Ke.prototype, "getVideoSnapshot"), _e([wt()], Ke.prototype, "_setCurrentSpeaker"), _e([la((e) => "a".concat(e.userId), () => !0)], Ke.prototype, "_startRemoteAudio"), _e([mt((e) => function(t) {
13187
+ }), wt({ replaceArg: (e) => ({ argIndex: 0, value: e.getName() }), getKVReportKey: (e) => r2[e.getName()] })], ze.prototype, "stopPlugin"), _e([aw(...ti.TRTC.enableAudioVolumeEvaluation)], ze.prototype, "enableAudioVolumeEvaluation"), _e([wt()], ze.prototype, "getVideoSnapshot"), _e([wt()], ze.prototype, "_setCurrentSpeaker"), _e([la((e) => "a".concat(e.userId), () => !0)], ze.prototype, "_startRemoteAudio"), _e([mt((e) => function(t) {
13188
13188
  return P(this, null, function* () {
13189
13189
  return t.userId === "*" ? Promise.all([...this._room.remotePublishedUserMap.values()].map((i) => this._stopRemoteAudio(Me(ve({}, t), { userId: i.userId })).catch(() => {
13190
13190
  }))) : e.call(this, t);
13191
13191
  });
13192
- }), ca((e) => "a".concat(e.userId))], Ke.prototype, "_stopRemoteAudio"), _e([ca("room")], Ke.prototype, "_exitRoom"), _e([ca("screen")], Ke.prototype, "_stopScreenShare"), _e([vi(...ti.TRTC.sendSEIMessage), Nk({ timesInSecond: 30, maxSizeInSecond: 8e3, getSize: function() {
13192
+ }), ca((e) => "a".concat(e.userId))], ze.prototype, "_stopRemoteAudio"), _e([ca("room")], ze.prototype, "_exitRoom"), _e([ca("screen")], ze.prototype, "_stopScreenShare"), _e([vi(...ti.TRTC.sendSEIMessage), Nk({ timesInSecond: 30, maxSizeInSecond: 8e3, getSize: function() {
13193
13193
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
13194
13194
  return t[0].byteLength;
13195
- } })], Ke.prototype, "sendSEIMessage"), _e([vi(ti.TRTC.sendCustomMessage), Nk({ timesInSecond: 30, maxSizeInSecond: 8e3, getSize: (e) => e.data.byteLength })], Ke.prototype, "sendCustomMessage"), _e([ua()], Ke, "create"), _e([vi(ti.TRTC.create)], Ke, "_create"), _e([ua()], Ke, "setLogLevel"), _e([ua()], Ke, "isSupported"), _e([ua(), wt()], Ke, "getPermissions"), _e([ua()], Ke, "getCameraList"), _e([ua()], Ke, "getMicrophoneList"), _e([ua()], Ke, "getSpeakerList");
13196
- var vp = Ke, gW = class {
13195
+ } })], ze.prototype, "sendSEIMessage"), _e([vi(ti.TRTC.sendCustomMessage), Nk({ timesInSecond: 30, maxSizeInSecond: 8e3, getSize: (e) => e.data.byteLength })], ze.prototype, "sendCustomMessage"), _e([ua()], ze, "create"), _e([vi(ti.TRTC.create)], ze, "_create"), _e([ua()], ze, "setLogLevel"), _e([ua()], ze, "isSupported"), _e([ua(), wt()], ze, "getPermissions"), _e([ua()], ze, "getCameraList"), _e([ua()], ze, "getMicrophoneList"), _e([ua()], ze, "getSpeakerList");
13196
+ var vp = ze, gW = class {
13197
13197
  constructor() {
13198
13198
  m(this, "_set", /* @__PURE__ */ new Set()), $.on(ie.LEAVE_SUCCESS, this.delete, this), $.on(ie.SWITCH_ROOM_SUCCESS, this.handleSwitchRoomSuccess, this);
13199
13199
  }
@@ -13336,7 +13336,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13336
13336
  case br.CHANNEL_SETUP_RESULT:
13337
13337
  if (i.code === 0) this._signalInfo.clientIp = n.clientIp, this._signalInfo.signalIp = n.signalInnerIp, n.svrTime && Gb(n.svrTime - (/* @__PURE__ */ new Date()).getTime()), this._log.info("ChannelSetup Success ".concat(Le() - this._connectStartTime)), le.addSuccessEvent({ key: 521701, cost: Le() - this._connectStartTime }), this._connectStartTime = -1, this.emit(mw, { signalInfo: this._signalInfo });
13338
13338
  else {
13339
- let c = new me({ code: te.SIGNAL_CHANNEL_SETUP_FAILED, extraCode: i.code, message: He({ key: Fe.SIGNAL_CHANNEL_SETUP_FAILED, data: { errorCode: i.code, errorMsg: i.message } }) });
13339
+ let c = new me({ code: te.SIGNAL_CHANNEL_SETUP_FAILED, extraCode: i.code, message: Fe({ key: Ue.SIGNAL_CHANNEL_SETUP_FAILED, data: { errorCode: i.code, errorMsg: i.message } }) });
13340
13340
  this._log.error("".concat(i.code, ", ").concat(i.message)), this.close(), le.addFailedEvent({ key: 521701, error: c }), this.emit(Ep, c);
13341
13341
  }
13342
13342
  break;
@@ -13395,7 +13395,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13395
13395
  this.once(yp, _);
13396
13396
  let f = setTimeout(() => {
13397
13397
  this.off(n, T), this.off(yp, _);
13398
- let C = new me({ code: te.API_CALL_TIMEOUT, message: He({ key: Fe.API_CALL_TIMEOUT, data: { commandDesc: s, command: t } }) });
13398
+ let C = new me({ code: te.API_CALL_TIMEOUT, message: Fe({ key: Ue.API_CALL_TIMEOUT, data: { commandDesc: s, command: t } }) });
13399
13399
  o && this._log.warn(C), h(C);
13400
13400
  }, r), T = (C) => {
13401
13401
  C.data.seq === b && (clearTimeout(f), this.off(n, T), this.off(yp, _), l && (C.data.receiveTime = Date.now()), c(C));
@@ -13545,7 +13545,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13545
13545
  o.state === "CONNECTED" && (clearTimeout(s), n(), e());
13546
13546
  }, r = (o) => {
13547
13547
  let { room: l } = o;
13548
- l === this._room && (clearTimeout(s), n(), t(new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.CONNECTION_ABORTED, data: "leave room" }) })));
13548
+ l === this._room && (clearTimeout(s), n(), t(new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.CONNECTION_ABORTED, data: "leave room" }) })));
13549
13549
  }, n = () => {
13550
13550
  $.off(ie.LEAVE_SUCCESS, r, this), this._emitter.off("connection-state-changed", i, this);
13551
13551
  }, s = setTimeout(() => {
@@ -13575,7 +13575,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13575
13575
  if (this._reconnectionTimer !== -1) return this._log.warn("reconnect() is reconnecting, ignore"), -1;
13576
13576
  if (this._reconnectionCount >= go()) {
13577
13577
  this._log.warn("SDK has tried reconnect for ".concat(this._reconnectionCount, " times, but all failed, please check your network")), this.stopReconnection();
13578
- let e = new me({ code: this._isUplink ? te.UPLINK_RECONNECTION_FAILED : te.DOWNLINK_RECONNECTION_FAILED, message: He({ key: this._isUplink ? Fe.UPLINK_RECONNECTION_FAILED : Fe.DOWNLINK_RECONNECTION_FAILED }) });
13578
+ let e = new me({ code: this._isUplink ? te.UPLINK_RECONNECTION_FAILED : te.DOWNLINK_RECONNECTION_FAILED, message: Fe({ key: this._isUplink ? Ue.UPLINK_RECONNECTION_FAILED : Ue.DOWNLINK_RECONNECTION_FAILED }) });
13579
13579
  return this.emitConnectionStateChangedEvent("DISCONNECTED"), this._emitter.emit("error", e), -1;
13580
13580
  }
13581
13581
  return this._signalChannel.isConnected ? (this._reconnectionCount += 1, this._log.warn("reconnect() trying [".concat(this._reconnectionCount, "]")), 1) : (this._log.warn("reconnect() signal channel is not connected, suspend reconnection until signal is connected"), this._signalChannel.once(nu, this.reconnect, this), -1);
@@ -13763,7 +13763,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13763
13763
  return t === "subscribe_change" && (r = { audio: i.audio, bigVideo: i.video, auxVideo: i.auxiliary, smallVideo: i.smallVideo, srcTinyId: this.tinyId }, n = Vv, s = We.SUBSCRIBE_CHANGE_RESULT), this._signalChannel.sendWaitForResponse({ command: n, data: r, responseCommand: s, timeout: 1e4 }).then((o) => {
13764
13764
  let { data: l } = o;
13765
13765
  if (l.code !== 0) {
13766
- let c = new me({ code: l.code, message: He({ key: Fe.ERROR_MESSAGE, data: { type: t, message: l.message } }) });
13766
+ let c = new me({ code: l.code, message: Fe({ key: Ue.ERROR_MESSAGE, data: { type: t, message: l.message } }) });
13767
13767
  throw this._log.error(c), c;
13768
13768
  }
13769
13769
  });
@@ -13787,7 +13787,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13787
13787
  this._isSDPExchanging = !0, yield this.createOffer(), this._log.info("createOffer success, sending offer");
13788
13788
  let { type: i, sdp: r } = this._peerConnection.localDescription, n = { type: i, sdp: r, srcUserId: this.userId, srcTinyId: this.tinyId, audio: t.audio, bigVideo: t.video, auxVideo: t.auxiliary, smallVideo: t.smallVideo }, s = yield this._signalChannel.sendWaitForResponse({ command: Ew, commandDesc: "exchange sdp", data: n, responseCommand: We.SUBSCRIBE_RESULT, timeout: l1 });
13789
13789
  if (!this._peerConnection) {
13790
- let o = new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.CONNECTION_CLOSED }) });
13790
+ let o = new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.CONNECTION_CLOSED }) });
13791
13791
  throw this._log.warn(o), o;
13792
13792
  }
13793
13793
  yield this.onSubscribeResult(s), this._isSDPExchanging = !1;
@@ -13838,9 +13838,9 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13838
13838
  onSubscribeResult(t) {
13839
13839
  return P(this, null, function* () {
13840
13840
  let { code: i, message: r = "" } = t && t.data || {}, { type: n, sdp: s } = t && t.data && t.data.data || {};
13841
- if (i === sh) throw new me({ code: te.NOT_SUPPORTED_H264, message: He({ key: Fe.NOT_SUPPORTED_H264DECODE }) });
13841
+ if (i === sh) throw new me({ code: te.NOT_SUPPORTED_H264, message: Fe({ key: Ue.NOT_SUPPORTED_H264DECODE }) });
13842
13842
  try {
13843
- if (i !== 0) throw new me({ code: i, message: He({ key: Fe.EXCHANGE_SDP_FAILED, data: { errMsg: r } }) });
13843
+ if (i !== 0) throw new me({ code: i, message: Fe({ key: Ue.EXCHANGE_SDP_FAILED, data: { errMsg: r } }) });
13844
13844
  this._log.debug("accept remote answer: ".concat(s)), yield this.setAnswer({ type: n, sdp: s }), this.updateSSRC(s);
13845
13845
  } catch (o) {
13846
13846
  throw this._log.error(o), o;
@@ -13910,7 +13910,7 @@ CPU core: `).concat(navigator.hardwareConcurrency, ", GPU: ").concat(Co());
13910
13910
  for (var t = arguments.length, i = new Array(t), r = 0; r < t; r++) i[r] = arguments[r];
13911
13911
  return new Promise((n, s) => {
13912
13912
  let o = (l) => {
13913
- this._emitter.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.CONNECTION_ABORTED, data: l }) }));
13913
+ this._emitter.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.CONNECTION_ABORTED, data: l }) }));
13914
13914
  };
13915
13915
  this._emitter.on("closed", o), e.apply(this, i).then(n, s).finally(() => {
13916
13916
  this._emitter.off("closed", o);
@@ -14371,14 +14371,14 @@ b=`.concat(r, ":").concat(i, `\r
14371
14371
  return this.ssrc;
14372
14372
  }
14373
14373
  checkPublishResultCode(t, i) {
14374
- if (t !== 0) throw t === sh ? (this._log.error(Ir.NOT_SUPPORTED_H264ENCODE), new me({ code: te.NOT_SUPPORTED_H264, message: He({ key: Fe.NOT_SUPPORTED_H264ENCODE }) })) : new me({ code: te.UNKNOWN, message: He({ key: Fe.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.PUBLISH_RESULT, code: t, message: i } }) });
14374
+ if (t !== 0) throw t === sh ? (this._log.error(Ir.NOT_SUPPORTED_H264ENCODE), new me({ code: te.NOT_SUPPORTED_H264, message: Fe({ key: Ue.NOT_SUPPORTED_H264ENCODE }) })) : new me({ code: te.UNKNOWN, message: Fe({ key: Ue.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.PUBLISH_RESULT, code: t, message: i } }) });
14375
14375
  }
14376
14376
  };
14377
14377
  _e([mt((e) => function() {
14378
14378
  for (var t = arguments.length, i = new Array(t), r = 0; r < t; r++) i[r] = arguments[r];
14379
14379
  return new Promise((n, s) => {
14380
14380
  let o = (l) => {
14381
- this._emitter.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.CONNECTION_ABORTED, data: l }) }));
14381
+ this._emitter.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.CONNECTION_ABORTED, data: l }) }));
14382
14382
  };
14383
14383
  this._emitter.on("closed", o), e.apply(this, i).then(n, s).finally(() => {
14384
14384
  this._emitter.off("closed", o);
@@ -14405,16 +14405,16 @@ b=`.concat(r, ":").concat(i, `\r
14405
14405
  c[Ae].bytesSent = f.bytesSent, c[Ae].packetsSent = f.packetsSent, c[Ae].framesEncoded = f.framesEncoded, j(f.keyFramesEncoded) || (c[Ae].keyFramesEncoded = f.keyFramesEncoded), j(f.nackCount) || (c[Ae].nackCount = f.nackCount), j(f.pliCount) || (c[Ae].pliCount = f.pliCount), j(f.retransmittedPacketsSent) || (c[Ae].retransmittedPacketsSent = f.retransmittedPacketsSent), j(f.totalEncodeTime) || (c[Ae].totalEncodeTime = f.totalEncodeTime), j(f.totalPacketSendDelay) || (c[Ae].totalPacketSendDelay = f.totalPacketSendDelay);
14406
14406
  let Pe = 0;
14407
14407
  if (!j(f.qpSum) && !j(f.framesEncoded) && f.framesEncoded > 0) {
14408
- let Be = f.qpSum, st = f.framesEncoded, vt = Ae === D.VIDEO ? this._prevQpSum : this._prevAuxQpSum, ft = Ae === D.VIDEO ? ((b = (T = e.localMainVideoTrack) == null ? void 0 : T.stat) == null ? void 0 : b.framesEncoded) || 0 : ((x = (C = e.localAuxVideoTrack) == null ? void 0 : C.stat) == null ? void 0 : x.framesEncoded) || 0;
14409
- if (st > ft && Be > vt) {
14410
- let fa = Be - vt, Mi = st - ft;
14408
+ let Ve = f.qpSum, st = f.framesEncoded, vt = Ae === D.VIDEO ? this._prevQpSum : this._prevAuxQpSum, ft = Ae === D.VIDEO ? ((b = (T = e.localMainVideoTrack) == null ? void 0 : T.stat) == null ? void 0 : b.framesEncoded) || 0 : ((x = (C = e.localAuxVideoTrack) == null ? void 0 : C.stat) == null ? void 0 : x.framesEncoded) || 0;
14409
+ if (st > ft && Ve > vt) {
14410
+ let fa = Ve - vt, Mi = st - ft;
14411
14411
  Pe = Math.round(fa / Mi), Pe > 35 && this._log.warn("".concat(Ae === D.AUXILIARY ? "aux " : "", "video encoder QP is high: ").concat(Pe, ", resolution: ").concat(f.frameWidth, "x").concat(f.frameHeight, ", codec: ").concat(e.videoCodec, ", "));
14412
14412
  }
14413
- Ae === D.VIDEO ? this._prevQpSum = Be : Ae === D.AUXILIARY && (this._prevAuxQpSum = Be);
14413
+ Ae === D.VIDEO ? this._prevQpSum = Ve : Ae === D.AUXILIARY && (this._prevAuxQpSum = Ve);
14414
14414
  }
14415
14415
  if (!j(f.encoderImplementation) && (Ae === D.VIDEO && this._prevEncoderImplementation !== f.encoderImplementation || Ae === D.AUXILIARY && this._prevAuxEncoderImpl !== f.encoderImplementation)) {
14416
- let Be = 2, st = this._prevEncoderImplementation;
14417
- Ae === D.AUXILIARY && (Be = 7, st = this._prevAuxEncoderImpl), $.emit("262", { userId: e.userId, streamType: Be, prevImplementation: st, implementation: f.encoderImplementation, codec: e.videoCodec, isHWCodec: f.powerEfficientEncoder }), this[Ae === D.VIDEO ? "_prevEncoderImplementation" : "_prevAuxEncoderImpl"] = f.encoderImplementation, Ge?.log.info("encoderImplementation change to ".concat(f.encoderImplementation, "(").concat(e.videoCodec, ") HWEncoder: ").concat(f.powerEfficientEncoder));
14416
+ let Ve = 2, st = this._prevEncoderImplementation;
14417
+ Ae === D.AUXILIARY && (Ve = 7, st = this._prevAuxEncoderImpl), $.emit("262", { userId: e.userId, streamType: Ve, prevImplementation: st, implementation: f.encoderImplementation, codec: e.videoCodec, isHWCodec: f.powerEfficientEncoder }), this[Ae === D.VIDEO ? "_prevEncoderImplementation" : "_prevAuxEncoderImpl"] = f.encoderImplementation, Ge?.log.info("encoderImplementation change to ".concat(f.encoderImplementation, "(").concat(e.videoCodec, ") HWEncoder: ").concat(f.powerEfficientEncoder));
14418
14418
  }
14419
14419
  f.ssrc === _.video ? !j(f.qualityLimitationReason) && f.bytesSent !== 0 && this._prevQualityLimitationReason !== f.qualityLimitationReason && (Ge?.log.info("qualityLimitationReason change to ".concat(f.qualityLimitationReason)), $.emit("263", { userId: e.userId, reason: f.qualityLimitationReason, prevReason: this._prevQualityLimitationReason, streamType: 2, isQosClearFirst: (B = e.localMainVideoTrack) == null ? void 0 : B.isQosClearFirst }), this._prevQualityLimitationReason = f.qualityLimitationReason) : f.ssrc === _.auxiliary && !j(f.qualityLimitationReason) && f.bytesSent !== 0 && this._prevAuxQualityLimitationReason !== f.qualityLimitationReason && (this._log.info("aux qualityLimitationReason change to ".concat(f.qualityLimitationReason)), $.emit("263", { userId: e.userId, reason: f.qualityLimitationReason, prevReason: this._prevAuxQualityLimitationReason, streamType: 7, isQosClearFirst: (Y = e.localAuxVideoTrack) == null ? void 0 : Y.isQosClearFirst }), this._prevAuxQualityLimitationReason = f.qualityLimitationReason);
14420
14420
  } else c.audio.bytesSent = f.bytesSent, c.audio.packetsSent = f.packetsSent;
@@ -14595,11 +14595,11 @@ b=`.concat(r, ":").concat(i, `\r
14595
14595
  if (H.msg_video_status && Z.msg_video_status) {
14596
14596
  let de = Z.msg_video_status;
14597
14597
  H.msg_video_status = H.msg_video_status.filter((pe) => de.find((Ne) => Ne.uint32_video_stream_type === pe.uint32_video_stream_type)), H.msg_video_status.forEach((pe) => {
14598
- let Ne = de.find((Mi) => Mi.uint32_video_stream_type === pe.uint32_video_stream_type), Ae = Ne.uint32_video_receive, Ge = Ne.uint32_video_origin_lost, Pe = Ne.uint32_video_codec_bitrate, Be = Ne.uint32_video_receive_fps, st = Ne.uint32_video_dec_fps;
14598
+ let Ne = de.find((Mi) => Mi.uint32_video_stream_type === pe.uint32_video_stream_type), Ae = Ne.uint32_video_receive, Ge = Ne.uint32_video_origin_lost, Pe = Ne.uint32_video_codec_bitrate, Ve = Ne.uint32_video_receive_fps, st = Ne.uint32_video_dec_fps;
14599
14599
  pe.uint32_video_origin_lost = this.getDifferenceValue(Ge, pe.uint32_video_origin_lost), pe.uint32_video_receive = this.getDifferenceValue(Ae, pe.uint32_video_receive) + pe.uint32_video_origin_lost;
14600
14600
  let vt = this.getDifferenceValue(Pe, pe.uint32_video_codec_bitrate);
14601
14601
  pe.uint32_video_codec_bitrate = Math.round(8 * vt / C);
14602
- let ft = this.getDifferenceValue(Be, pe.uint32_video_receive_fps);
14602
+ let ft = this.getDifferenceValue(Ve, pe.uint32_video_receive_fps);
14603
14603
  pe.uint32_video_receive_fps = Math.round(ft / C), pe.uint32_video_dec_fps = Math.round(this.getDifferenceValue(st, pe.uint32_video_dec_fps) / C);
14604
14604
  let fa = this.getDifferenceValue(Ne.uint32_video_cache_ms_count, pe.uint32_video_cache_ms_count);
14605
14605
  delete pe.uint32_video_cache_ms_count, pe.uint32_video_cache_ms = Math.floor(1e3 * this.getDifferenceValue(Ne.uint32_video_cache_ms, pe.uint32_video_cache_ms) / fa) || 0;
@@ -16324,10 +16324,10 @@ void main() {
16324
16324
  });
16325
16325
  }
16326
16326
  checkDestroy() {
16327
- if (this.isDestroyed) throw new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.CLIENT_DESTROYED, data: { funName: "join" } }) });
16327
+ if (this.isDestroyed) throw new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.CLIENT_DESTROYED, data: { funName: "join" } }) });
16328
16328
  }
16329
16329
  destroy() {
16330
- if (this.isJoined) throw this._log.warn(Ir.INVALID_DESTROY), new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.INVALID_DESTROY }) });
16330
+ if (this.isJoined) throw this._log.warn(Ir.INVALID_DESTROY), new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.INVALID_DESTROY }) });
16331
16331
  this._log.info("destroy room"), this.audioManager.destroy(), this.videoManager.destroy(), this.keyPointManager.destroy(), this.callDurationCalculator.destroy(), this.badCaseDetector.destroy(), this.isDestroyed = !0, $.emit(ie.ROOM_DESTROY, { room: this });
16332
16332
  }
16333
16333
  schedule(e, t) {
@@ -16759,7 +16759,7 @@ offer: `).concat(i?.sdp)), r;
16759
16759
  o.state === "CONNECTED" && (clearTimeout(s), n(), e());
16760
16760
  }, r = (o) => {
16761
16761
  let { room: l } = o;
16762
- l === this._room && (clearTimeout(s), n(), t(new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.CONNECTION_ABORTED, data: "leave room" }) })));
16762
+ l === this._room && (clearTimeout(s), n(), t(new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.CONNECTION_ABORTED, data: "leave room" }) })));
16763
16763
  }, n = () => {
16764
16764
  $.off(ie.LEAVE_SUCCESS, r, this), this.off(ha.CONNECTION_STATE_CHANGED, i, this);
16765
16765
  }, s = setTimeout(() => {
@@ -17316,7 +17316,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
17316
17316
  var o, l, c, h, _, f, T;
17317
17317
  if (!i.singlePC) return;
17318
17318
  if (i.installEvents(), i.installTrackMuteEvents(r, n), n && (n.retryEncodeFailed = i.onVideoEncodeFailed.bind(i)), yield i.singlePC.waitForPeerConnectionConnected(), r && (i._publishingLocalAudioTrack = r), n) {
17319
- if (!i.singlePC.isH264EncodeSupported && !i.singlePC.isVP8EncodeSupported) throw new me({ code: te.NOT_SUPPORTED_H264, message: He({ key: Fe.NOT_SUPPORTED_H264ENCODE }) });
17319
+ if (!i.singlePC.isH264EncodeSupported && !i.singlePC.isVP8EncodeSupported) throw new me({ code: te.NOT_SUPPORTED_H264, message: Fe({ key: Ue.NOT_SUPPORTED_H264ENCODE }) });
17320
17320
  i.singlePC.isUsingH264 && !i.singlePC.isH264EncodeSupported && i.singlePC.isVP8EncodeSupported && (i._log.warn("h264 encoder not supported"), yield i.singlePC.switchVideoEncoder("vp8")), Ut && wh() === 115 && n.profile.width * n.profile.height <= 230400 && (i._log.warn("fallback video to defaultBigVideoProfile: ".concat(JSON.stringify(Yl))), n.setProfile(Yl), yield n.applyProfile()), i._publishingLocalVideoTrack = n;
17321
17321
  }
17322
17322
  let b;
@@ -17584,7 +17584,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
17584
17584
  return this.ssrc;
17585
17585
  }
17586
17586
  checkPublishResultCode(e, t) {
17587
- if (e !== 0) throw e === sh ? (this._log.error(Ir.NOT_SUPPORTED_H264ENCODE), new me({ code: te.NOT_SUPPORTED_H264, message: He({ key: Fe.NOT_SUPPORTED_H264ENCODE }) })) : new me({ code: te.UNKNOWN, message: He({ key: Fe.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.PUBLISH_RESULT, code: e, message: t } }) });
17587
+ if (e !== 0) throw e === sh ? (this._log.error(Ir.NOT_SUPPORTED_H264ENCODE), new me({ code: te.NOT_SUPPORTED_H264, message: Fe({ key: Ue.NOT_SUPPORTED_H264ENCODE }) })) : new me({ code: te.UNKNOWN, message: Fe({ key: Ue.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.PUBLISH_RESULT, code: e, message: t } }) });
17588
17588
  }
17589
17589
  onSinglePCReconnected() {
17590
17590
  return P(this, null, function* () {
@@ -17777,7 +17777,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
17777
17777
  return e === "subscribe_change" && (i = { audio: t.audio, bigVideo: t.video, auxVideo: t.auxiliary, smallVideo: t.smallVideo, customData: t.datachannel, srcTinyId: this.tinyId }, r = Vv, n = We.SUBSCRIBE_CHANGE_RESULT), this._signalChannel.sendWaitForResponseWithRetry({ command: r, data: i, responseCommand: n, timeout: 1e4, retries: 3 }).then((s) => {
17778
17778
  let { data: o } = s;
17779
17779
  if (o.code !== 0) {
17780
- let l = new me({ code: o.code, message: He({ key: Fe.ERROR_MESSAGE, data: { type: e, message: o.message } }) });
17780
+ let l = new me({ code: o.code, message: Fe({ key: Ue.ERROR_MESSAGE, data: { type: e, message: o.message } }) });
17781
17781
  throw this._log.error(l), l;
17782
17782
  }
17783
17783
  });
@@ -17882,7 +17882,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
17882
17882
  for (var t = arguments.length, i = new Array(t), r = 0; r < t; r++) i[r] = arguments[r];
17883
17883
  return new Promise((n, s) => {
17884
17884
  let o = (l) => {
17885
- this.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.CONNECTION_ABORTED, data: l }) }));
17885
+ this.off("closed", o), s(new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.CONNECTION_ABORTED, data: l }) }));
17886
17886
  };
17887
17887
  this.on("closed", o), e.apply(this, i).then(n, s).finally(() => {
17888
17888
  this.off("closed", o);
@@ -18041,7 +18041,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18041
18041
  this._log.debug("join room signal data: ".concat(JSON.stringify(T)));
18042
18042
  let b = 5e3;
18043
18043
  (f = this.scheduleResult.config) != null && f.enterRoomTimeout && this.scheduleResult.config.enterRoomTimeout >= 1 && (b = 1e3 * this.scheduleResult.config.enterRoomTimeout), this._joinTimeout = window.setTimeout(() => {
18044
- r(new me({ code: te.JOIN_ROOM_FAILED, message: He({ key: Fe.JOIN_ROOM_TIMEOUT }) }));
18044
+ r(new me({ code: te.JOIN_ROOM_FAILED, message: Fe({ key: Ue.JOIN_ROOM_TIMEOUT }) }));
18045
18045
  }, b), $.emit(ie.JOIN_SEND_CMD, { room: this }), this.signalChannel.send(this.singlePC ? VW : IW, T), this.signalChannel.once(We.JOIN_ROOM_RESULT, (C) => P(this, null, function* () {
18046
18046
  this.clearJoinTimeout();
18047
18047
  let { code: x, message: B, data: Y, tinyId: G } = C.data;
@@ -18049,7 +18049,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18049
18049
  var he;
18050
18050
  (he = this.singlePC) == null || he.connect(Me(ve({}, Y.ability), { useVp8: Y.ability.useVp8 || !!e.useVp8, useH265: Y.ability.useH265 && !!e.useH265 })).catch(() => {
18051
18051
  });
18052
- }), i()) : (this._log.error("Join room failed result: ".concat(x, " error: ").concat(B)), r(new me({ code: te.JOIN_ROOM_FAILED, extraCode: x, message: He({ key: Fe.JOIN_ROOM_FAILED, data: { error: B, code: x } }) })));
18052
+ }), i()) : (this._log.error("Join room failed result: ".concat(x, " error: ").concat(B)), r(new me({ code: te.JOIN_ROOM_FAILED, extraCode: x, message: Fe({ key: Ue.JOIN_ROOM_FAILED, data: { error: B, code: x } }) })));
18053
18053
  }));
18054
18054
  }));
18055
18055
  }
@@ -18068,7 +18068,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18068
18068
  this.singlePC.on(ha.CONNECTION_STATE_CHANGED, i), this.checkConnectionsToReconnect(), this.uplinkConnection instanceof bp && !this.uplinkConnection.getIsReconnecting() && this.uplinkConnection.startReconnection();
18069
18069
  }
18070
18070
  } catch (e) {
18071
- this._log.warn("reJoin fail ".concat(e)), this.reset(), ct.logFailedEvent({ userId: this.userId, eventType: ui.REJOIN, error: e }), this.emit("error", new me({ code: te.JOIN_ROOM_FAILED, message: He({ key: Fe.REJOIN_ROOM_FAILED, data: { roomId: this.joinParams.roomId } }) }));
18071
+ this._log.warn("reJoin fail ".concat(e)), this.reset(), ct.logFailedEvent({ userId: this.userId, eventType: ui.REJOIN, error: e }), this.emit("error", new me({ code: te.JOIN_ROOM_FAILED, message: Fe({ key: Ue.REJOIN_ROOM_FAILED, data: { roomId: this.joinParams.roomId } }) }));
18072
18072
  }
18073
18073
  else this._log.warn("reJoin abort");
18074
18074
  });
@@ -18228,7 +18228,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18228
18228
  let { userId: o, srcTinyId: l, role: c, fromType: h } = s;
18229
18229
  return { userId: o, tinyId: l, role: c, fromType: h };
18230
18230
  });
18231
- throw He({ key: Fe.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.USER_LIST_RES, code: r, message: n } });
18231
+ throw Fe({ key: Ue.SIGNAL_RESPONSE_FAILED, data: { signalResponse: We.USER_LIST_RES, code: r, message: n } });
18232
18232
  }) : Promise.reject("not connected");
18233
18233
  }
18234
18234
  getAllConnections() {
@@ -18266,7 +18266,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18266
18266
  });
18267
18267
  }
18268
18268
  destroy() {
18269
- this.isDestroyed || (this.signalChannel && (this._log.info("destroying SignalChannel"), this.signalChannel.close(), this.signalChannel = null), super.destroy(), this._joinReject && (this._joinReject(new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.CLIENT_DESTROYED, data: { funName: "join" } }) })), this.clearJoinTimeout(), this.reset()), this.removeAllListeners(), this.healthDetector.destroy(), pt.clearTask(this._audioVolumeIntervalId));
18269
+ this.isDestroyed || (this.signalChannel && (this._log.info("destroying SignalChannel"), this.signalChannel.close(), this.signalChannel = null), super.destroy(), this._joinReject && (this._joinReject(new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.CLIENT_DESTROYED, data: { funName: "join" } }) })), this.clearJoinTimeout(), this.reset()), this.removeAllListeners(), this.healthDetector.destroy(), pt.clearTask(this._audioVolumeIntervalId));
18270
18270
  }
18271
18271
  switchRole(e) {
18272
18272
  return P(this, null, function* () {
@@ -18277,10 +18277,10 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18277
18277
  let t = { command: xW, data: { role: e === "anchor" ? 20 : 21, privateMapKey: this.privateMapKey, latencyLevel: this.latencyLevel }, responseCommand: We.SWITCH_ROLE_RES, retries: 1 };
18278
18278
  return this._log.info("switchRole signal data: ".concat(JSON.stringify(t.data))), this.signalChannel.sendWaitForResponseWithRetry(t).then((i) => {
18279
18279
  let { code: r, message: n } = i.data;
18280
- if (r !== 0) throw new me({ code: te.SWITCH_ROLE_FAILED, message: He({ key: Fe.SWITCH_ROLE_FAILED, data: { message: n, code: r } }) });
18280
+ if (r !== 0) throw new me({ code: te.SWITCH_ROLE_FAILED, message: Fe({ key: Ue.SWITCH_ROLE_FAILED, data: { message: n, code: r } }) });
18281
18281
  this.role = e;
18282
18282
  }).catch((i) => {
18283
- throw i instanceof me && i.getCode() === te.API_CALL_TIMEOUT && (i = new me({ code: te.SWITCH_ROLE_FAILED, message: He({ key: Fe.SWITCH_ROLE_TIMEOUT }) })), this._log.error(i), i;
18283
+ throw i instanceof me && i.getCode() === te.API_CALL_TIMEOUT && (i = new me({ code: te.SWITCH_ROLE_FAILED, message: Fe({ key: Ue.SWITCH_ROLE_TIMEOUT }) })), this._log.error(i), i;
18284
18284
  });
18285
18285
  }
18286
18286
  subscribeDataChannel() {
@@ -18387,7 +18387,7 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18387
18387
  $.emit(ie.SUBSCRIBE_SUCCESS, { room: this, streamType: s, remotePublishedUser: n });
18388
18388
  } catch (o) {
18389
18389
  let l = o instanceof me ? o.getCode() : te.UNKNOWN, c = o;
18390
- throw o instanceof me ? l === te.REMOTE_STREAM_NOT_EXIST && (c = new me({ code: te.API_CALL_ABORTED, message: He({ key: Fe.API_CALL_ABORTED, data: { message: o.message, userId: r, streamType: s } }) }), this._log.warn(c)) : (c = new me({ code: l, message: He({ key: Fe.SUBSCRIBE_FAILED, data: { message: o.message, userId: r, streamType: s } }) }), this._log.error(c)), c;
18390
+ throw o instanceof me ? l === te.REMOTE_STREAM_NOT_EXIST && (c = new me({ code: te.API_CALL_ABORTED, message: Fe({ key: Ue.API_CALL_ABORTED, data: { message: o.message, userId: r, streamType: s } }) }), this._log.warn(c)) : (c = new me({ code: l, message: Fe({ key: Ue.SUBSCRIBE_FAILED, data: { message: o.message, userId: r, streamType: s } }) }), this._log.error(c)), c;
18391
18391
  }
18392
18392
  });
18393
18393
  }
@@ -18604,16 +18604,16 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18604
18604
  this._businessInfo = e.businessInfo;
18605
18605
  let t = {};
18606
18606
  if (Yw(e.businessInfo) && (t = JSON.parse(e.businessInfo)), !ma(e.pureAudioPushMode)) {
18607
- if (!Number.isInteger(Number(e.pureAudioPushMode))) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_PURE_AUDIO }) });
18607
+ if (!Number.isInteger(Number(e.pureAudioPushMode))) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_PURE_AUDIO }) });
18608
18608
  this._pureAudioPushMode = e.pureAudioPushMode, t.Str_uc_params || (t.Str_uc_params = {}), t.Str_uc_params.pure_audio_push_mod = this._pureAudioPushMode;
18609
18609
  }
18610
18610
  if (!ma(e.userDefineRecordId)) {
18611
18611
  let i = /^[A-Za-z0-9_-]{1,64}$/gi;
18612
- if (e.userDefineRecordId.match(i) === null) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_USER_DEFINE_RECORDID }) });
18612
+ if (e.userDefineRecordId.match(i) === null) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_USER_DEFINE_RECORDID }) });
18613
18613
  t.Str_uc_params || (t.Str_uc_params = {}), t.Str_uc_params.userdefine_record_id = e.userDefineRecordId;
18614
18614
  }
18615
18615
  if (!ma(e.userDefinePushArgs)) {
18616
- if (!(Yw(e.userDefinePushArgs) && String(e.userDefinePushArgs) && String(e.userDefinePushArgs).length <= 256)) throw new me({ code: te.INVALID_PARAMETER, message: He({ key: Fe.INVALID_USER_DEFINE_PUSH_ARGS }) });
18616
+ if (!(Yw(e.userDefinePushArgs) && String(e.userDefinePushArgs) && String(e.userDefinePushArgs).length <= 256)) throw new me({ code: te.INVALID_PARAMETER, message: Fe({ key: Ue.INVALID_USER_DEFINE_PUSH_ARGS }) });
18617
18617
  t.Str_uc_params || (t.Str_uc_params = {}), t.Str_uc_params.userdefine_push_args = e.userDefinePushArgs;
18618
18618
  }
18619
18619
  AG(t) || (this._businessInfo = JSON.stringify(t));
@@ -18708,8 +18708,8 @@ next answer: `).concat(this.filterSDPDirection(t))), this._log.warn("offer: ".co
18708
18708
  return function(i, r, n) {
18709
18709
  return P(this, null, function* () {
18710
18710
  let s = String(i.roomId || i.strRoomId);
18711
- if (this.userId = i.userId, this.sdkAppId = i.sdkAppId, this.userSig = i.userSig, this._log.setSdkAppId(this.sdkAppId), this._log.setUserId(this.userId), this.scene = r, i.privateMapKey = i.privateMapKey || "", this.isJoined) throw new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.INVALID_JOIN }) });
18712
- if (this.checkDestroy(), t.isJoined({ userId: this.userId, roomId: s, sdkAppId: this.sdkAppId, room: this })) throw new me({ code: te.INVALID_OPERATION, message: He({ key: Fe.REPEAT_JOIN, data: this.userId }) });
18711
+ if (this.userId = i.userId, this.sdkAppId = i.sdkAppId, this.userSig = i.userSig, this._log.setSdkAppId(this.sdkAppId), this._log.setUserId(this.userId), this.scene = r, i.privateMapKey = i.privateMapKey || "", this.isJoined) throw new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.INVALID_JOIN }) });
18712
+ if (this.checkDestroy(), t.isJoined({ userId: this.userId, roomId: s, sdkAppId: this.sdkAppId, room: this })) throw new me({ code: te.INVALID_OPERATION, message: Fe({ key: Ue.REPEAT_JOIN, data: this.userId }) });
18713
18713
  t.add({ room: this, roomId: s }), this.role = i.role === 21 ? "audience" : "anchor", this._log.info("Join() => joining room: ".concat(s, " useStringRoomId: ").concat(this.useStringRoomId, " scene: ").concat(this.scene, " role: ").concat(this.role)), $.emit(ie.JOIN_START, { room: this, roomId: s, params: i });
18714
18714
  let o = xr.getEnv();
18715
18715
  o || (o = Bs.QCLOUD, this.proxy_ws && (this.proxy_ws.startsWith(_g.OLD_CLOUD_LADDER) ? o = Bs.OLD_CLOUD_LADDER : this.proxy_ws.startsWith(_g.WEBRTC) && (o = Bs.WEBRTC))), ct.setConfig({ env: o, sdkAppId: String(this.sdkAppId), userId: this.userId, roomId: s }), Ic.checkSystemRequirementsInternal(n).then((l) => {
@@ -19762,15 +19762,15 @@ var ut = at(function(a, u) {
19762
19762
  var N = S.SHA512 = v.extend({ _doReset: function() {
19763
19763
  this._hash = new I.init([new y.init(1779033703, 4089235720), new y.init(3144134277, 2227873595), new y.init(1013904242, 4271175723), new y.init(2773480762, 1595750129), new y.init(1359893119, 2917565137), new y.init(2600822924, 725511199), new y.init(528734635, 4215389547), new y.init(1541459225, 327033209)]);
19764
19764
  }, _doProcessBlock: function(A, O) {
19765
- for (var M = this._hash.words, w = M[0], U = M[1], L = M[2], V = M[3], F = M[4], q = M[5], K = M[6], z = M[7], J = w.high, X = w.low, W = U.high, Q = U.low, ge = L.high, ne = L.low, ye = V.high, Ce = V.low, xe = F.high, je = F.low, ke = q.high, et = q.low, Dt = K.high, oe = K.low, se = z.high, ae = z.low, ce = J, Ct = X, oi = W, Ze = Q, ji = ge, gt = ne, zi = ye, wr = Ce, Mt = xe, St = je, Qr = ke, Dr = et, li = Dt, Nr = oe, ue = se, Te = ae, Ue = 0; Ue < 80; Ue++) {
19766
- var ze = k[Ue];
19767
- if (Ue < 16) var Ve = ze.high = 0 | A[O + 2 * Ue], It = ze.low = 0 | A[O + 2 * Ue + 1];
19765
+ for (var M = this._hash.words, w = M[0], U = M[1], L = M[2], V = M[3], F = M[4], q = M[5], K = M[6], z = M[7], J = w.high, X = w.low, W = U.high, Q = U.low, ge = L.high, ne = L.low, ye = V.high, Ce = V.low, xe = F.high, je = F.low, ke = q.high, et = q.low, Dt = K.high, oe = K.low, se = z.high, ae = z.low, ce = J, Ct = X, oi = W, Ze = Q, ji = ge, gt = ne, zi = ye, wr = Ce, Mt = xe, St = je, Qr = ke, Dr = et, li = Dt, Nr = oe, ue = se, Te = ae, He = 0; He < 80; He++) {
19766
+ var Je = k[He];
19767
+ if (He < 16) var Be = Je.high = 0 | A[O + 2 * He], It = Je.low = 0 | A[O + 2 * He + 1];
19768
19768
  else {
19769
- var rl = k[Ue - 15], Nn = rl.high, Ss = rl.low, Cu = (Nn >>> 1 | Ss << 31) ^ (Nn >>> 8 | Ss << 24) ^ Nn >>> 7, nl = (Ss >>> 1 | Nn << 31) ^ (Ss >>> 8 | Nn << 24) ^ (Ss >>> 7 | Nn << 25), ku = k[Ue - 2], Pn = ku.high, Is = ku.low, rm = (Pn >>> 19 | Is << 13) ^ (Pn << 3 | Is >>> 29) ^ Pn >>> 6, Ua = (Is >>> 19 | Pn << 13) ^ (Is << 3 | Pn >>> 29) ^ (Is >>> 6 | Pn << 26), wu = k[Ue - 7], On = wu.high, nm = wu.low, Du = k[Ue - 16], sm = Du.high, wi = Du.low;
19770
- Ve = (Ve = (Ve = Cu + On + ((It = nl + nm) >>> 0 < nl >>> 0 ? 1 : 0)) + rm + ((It += Ua) >>> 0 < Ua >>> 0 ? 1 : 0)) + sm + ((It += wi) >>> 0 < wi >>> 0 ? 1 : 0), ze.high = Ve, ze.low = It;
19769
+ var rl = k[He - 15], Nn = rl.high, Ss = rl.low, Cu = (Nn >>> 1 | Ss << 31) ^ (Nn >>> 8 | Ss << 24) ^ Nn >>> 7, nl = (Ss >>> 1 | Nn << 31) ^ (Ss >>> 8 | Nn << 24) ^ (Ss >>> 7 | Nn << 25), ku = k[He - 2], Pn = ku.high, Is = ku.low, rm = (Pn >>> 19 | Is << 13) ^ (Pn << 3 | Is >>> 29) ^ Pn >>> 6, Ua = (Is >>> 19 | Pn << 13) ^ (Is << 3 | Pn >>> 29) ^ (Is >>> 6 | Pn << 26), wu = k[He - 7], On = wu.high, nm = wu.low, Du = k[He - 16], sm = Du.high, wi = Du.low;
19770
+ Be = (Be = (Be = Cu + On + ((It = nl + nm) >>> 0 < nl >>> 0 ? 1 : 0)) + rm + ((It += Ua) >>> 0 < Ua >>> 0 ? 1 : 0)) + sm + ((It += wi) >>> 0 < wi >>> 0 ? 1 : 0), Je.high = Be, Je.low = It;
19771
19771
  }
19772
- var Zr, am = Mt & Qr ^ ~Mt & li, Mn = St & Dr ^ ~St & Nr, sl = ce & oi ^ ce & ji ^ oi & ji, al = Ct & Ze ^ Ct & gt ^ Ze & gt, ol = (ce >>> 28 | Ct << 4) ^ (ce << 30 | Ct >>> 2) ^ (ce << 25 | Ct >>> 7), Nu = (Ct >>> 28 | ce << 4) ^ (Ct << 30 | ce >>> 2) ^ (Ct << 25 | ce >>> 7), Pu = (Mt >>> 14 | St << 18) ^ (Mt >>> 18 | St << 14) ^ (Mt << 23 | St >>> 9), Ou = (St >>> 14 | Mt << 18) ^ (St >>> 18 | Mt << 14) ^ (St << 23 | Mt >>> 9), Mu = R[Ue], ll = Mu.high, Lu = Mu.low, Rs = ue + Pu + ((Zr = Te + Ou) >>> 0 < Te >>> 0 ? 1 : 0), cl = Nu + al;
19773
- ue = li, Te = Nr, li = Qr, Nr = Dr, Qr = Mt, Dr = St, Mt = zi + (Rs = (Rs = (Rs = Rs + am + ((Zr += Mn) >>> 0 < Mn >>> 0 ? 1 : 0)) + ll + ((Zr += Lu) >>> 0 < Lu >>> 0 ? 1 : 0)) + Ve + ((Zr += It) >>> 0 < It >>> 0 ? 1 : 0)) + ((St = wr + Zr | 0) >>> 0 < wr >>> 0 ? 1 : 0) | 0, zi = ji, wr = gt, ji = oi, gt = Ze, oi = ce, Ze = Ct, ce = Rs + (ol + sl + (cl >>> 0 < Nu >>> 0 ? 1 : 0)) + ((Ct = Zr + cl | 0) >>> 0 < Zr >>> 0 ? 1 : 0) | 0;
19772
+ var Zr, am = Mt & Qr ^ ~Mt & li, Mn = St & Dr ^ ~St & Nr, sl = ce & oi ^ ce & ji ^ oi & ji, al = Ct & Ze ^ Ct & gt ^ Ze & gt, ol = (ce >>> 28 | Ct << 4) ^ (ce << 30 | Ct >>> 2) ^ (ce << 25 | Ct >>> 7), Nu = (Ct >>> 28 | ce << 4) ^ (Ct << 30 | ce >>> 2) ^ (Ct << 25 | ce >>> 7), Pu = (Mt >>> 14 | St << 18) ^ (Mt >>> 18 | St << 14) ^ (Mt << 23 | St >>> 9), Ou = (St >>> 14 | Mt << 18) ^ (St >>> 18 | Mt << 14) ^ (St << 23 | Mt >>> 9), Mu = R[He], ll = Mu.high, Lu = Mu.low, Rs = ue + Pu + ((Zr = Te + Ou) >>> 0 < Te >>> 0 ? 1 : 0), cl = Nu + al;
19773
+ ue = li, Te = Nr, li = Qr, Nr = Dr, Qr = Mt, Dr = St, Mt = zi + (Rs = (Rs = (Rs = Rs + am + ((Zr += Mn) >>> 0 < Mn >>> 0 ? 1 : 0)) + ll + ((Zr += Lu) >>> 0 < Lu >>> 0 ? 1 : 0)) + Be + ((Zr += It) >>> 0 < It >>> 0 ? 1 : 0)) + ((St = wr + Zr | 0) >>> 0 < wr >>> 0 ? 1 : 0) | 0, zi = ji, wr = gt, ji = oi, gt = Ze, oi = ce, Ze = Ct, ce = Rs + (ol + sl + (cl >>> 0 < Nu >>> 0 ? 1 : 0)) + ((Ct = Zr + cl | 0) >>> 0 < Zr >>> 0 ? 1 : 0) | 0;
19774
19774
  }
19775
19775
  X = w.low = X + Ct, w.high = J + ce + (X >>> 0 < Ct >>> 0 ? 1 : 0), Q = U.low = Q + Ze, U.high = W + oi + (Q >>> 0 < Ze >>> 0 ? 1 : 0), ne = L.low = ne + gt, L.high = ge + ji + (ne >>> 0 < gt >>> 0 ? 1 : 0), Ce = V.low = Ce + wr, V.high = ye + zi + (Ce >>> 0 < wr >>> 0 ? 1 : 0), je = F.low = je + St, F.high = xe + Mt + (je >>> 0 < St >>> 0 ? 1 : 0), et = q.low = et + Dr, q.high = ke + Qr + (et >>> 0 < Dr >>> 0 ? 1 : 0), oe = K.low = oe + Nr, K.high = Dt + li + (oe >>> 0 < Nr >>> 0 ? 1 : 0), ae = z.low = ae + Te, z.high = se + ue + (ae >>> 0 < Te >>> 0 ? 1 : 0);
19776
19776
  }, _doFinalize: function() {
@@ -22587,8 +22587,7 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22587
22587
  function w(ue, Te) {
22588
22588
  try {
22589
22589
  M("notify", { type: ue, text: Te });
22590
- } catch (Ue) {
22591
- console.warn("emit notify failed", Ue);
22590
+ } catch {
22592
22591
  }
22593
22592
  }
22594
22593
  const U = $w({
@@ -22612,8 +22611,8 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22612
22611
  w("error", "进入房间失败: " + ue);
22613
22612
  }
22614
22613
  }
22615
- async function z({ userId: ue, sdkAppId: Te, sdkSecretKey: Ue, profile: ze } = {}) {
22616
- p.value = ue || `user_${Math.floor(Math.random() * 900 + 100)}`, v.value = Te || v.value, g.value = Ue || g.value, ze && !F.includes(ze) ? (w("warn", `视频分辨率设置错误,仅支持 ${F.join("、")},已使用默认值 1440p`), V.value = "1440p") : V.value = ze || "1440p", await K();
22614
+ async function z({ userId: ue, sdkAppId: Te, sdkSecretKey: He, profile: Je } = {}) {
22615
+ p.value = ue || `user_${Math.floor(Math.random() * 900 + 100)}`, v.value = Te || v.value, g.value = He || g.value, Je && !F.includes(Je) ? (w("warn", `视频分辨率设置错误,仅支持 ${F.join("、")},已使用默认值 1440p`), V.value = "1440p") : V.value = Je || "1440p", await K();
22617
22616
  }
22618
22617
  function J() {
22619
22618
  E.value = !0;
@@ -22677,18 +22676,17 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22677
22676
  try {
22678
22677
  let ue = null;
22679
22678
  typeof O.getLocalStats == "function" && (ue = await O.getLocalStats());
22680
- let Te = !1, Ue = "";
22679
+ let Te = !1, He = "";
22681
22680
  if (ue) {
22682
- const ze = ue.uplinkKbps ?? ue.sendKbps ?? ue.txKbps ?? null, Ve = ue.uplinkPacketLostRate ?? ue.packetLostRate ?? ue.sendPacketLostRate ?? null;
22683
- Ue = `uplink:${ze ?? "n/a"}kbps loss:${Ve ?? "n/a"}`, (ze !== null && ze < 300 || Ve !== null && Ve > 0.05) && (Te = !0);
22681
+ const Je = ue.uplinkKbps ?? ue.sendKbps ?? ue.txKbps ?? null, Be = ue.uplinkPacketLostRate ?? ue.packetLostRate ?? ue.sendPacketLostRate ?? null;
22682
+ He = `uplink:${Je ?? "n/a"}kbps loss:${Be ?? "n/a"}`, (Je !== null && Je < 300 || Be !== null && Be > 0.05) && (Te = !0);
22684
22683
  } else if (typeof O.getNetworkQuality == "function") {
22685
- const ze = await O.getNetworkQuality(), Ve = ze.uplinkQuality ?? ze.upQuality ?? null;
22686
- Ue = `uplinkQuality:${Ve ?? "n/a"}`, Ve !== null && Ve >= 4 && (Te = !0);
22684
+ const Je = await O.getNetworkQuality(), Be = Je.uplinkQuality ?? Je.upQuality ?? null;
22685
+ He = `uplinkQuality:${Be ?? "n/a"}`, Be !== null && Be >= 4 && (Te = !0);
22687
22686
  } else
22688
22687
  return;
22689
- Te && !L.value ? (L.value = !0, w("warn", `网络不稳定:${Ue},已切换到低清 360p`), await ye("360p")) : !Te && L.value && (L.value = !1, w("info", `网络已恢复:${Ue},恢复到高清`), await ye("1440p"));
22690
- } catch (ue) {
22691
- console.warn("checkNetworkQuality error", ue);
22688
+ Te && !L.value ? (L.value = !0, w("warn", `网络不稳定:${He},已切换到低清 360p`), await ye("360p")) : !Te && L.value && (L.value = !1, w("info", `网络已恢复:${He},恢复到 ${V.value}`), await ye(V.value));
22689
+ } catch {
22692
22690
  }
22693
22691
  }
22694
22692
  function je() {
@@ -22726,22 +22724,22 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22726
22724
  }
22727
22725
  function ce(ue) {
22728
22726
  console.log("🚀 ~ 远端视频尺寸变化 ~ event:", ue);
22729
- const { userId: Te, streamType: Ue, newHeight: ze, newWidth: Ve } = ue, It = `${Te}_${Ue}`;
22730
- ze > 0 && Ve > 0 && (S[It] = Ve / ze);
22727
+ const { userId: Te, streamType: He, newHeight: Je, newWidth: Be } = ue, It = `${Te}_${He}`;
22728
+ Je > 0 && Be > 0 && (S[It] = Be / Je);
22731
22729
  }
22732
22730
  async function Ct(ue) {
22733
22731
  console.log("🚀 ~ 远端用户发布了视频 ~ event:", ue);
22734
- const { userId: Te, streamType: Ue } = ue, ze = `${Te}_${Ue}`;
22732
+ const { userId: Te, streamType: He } = ue, Je = `${Te}_${He}`;
22735
22733
  try {
22736
- if (Ue === Bt.TYPE.STREAM_TYPE_MAIN) {
22737
- y.value.push(ze), await tD(), await O.startRemoteVideo({ userId: Te, streamType: Ue, view: ze });
22734
+ if (He === Bt.TYPE.STREAM_TYPE_MAIN) {
22735
+ y.value.push(Je), await tD(), await O.startRemoteVideo({ userId: Te, streamType: He, view: Je });
22738
22736
  try {
22739
22737
  await O.startRemoteAudio({ userId: Te });
22740
22738
  } catch {
22741
22739
  }
22742
22740
  await Dt();
22743
22741
  } else {
22744
- y.value.push(ze), await tD(), O.startRemoteVideo({ userId: Te, streamType: Ue, view: ze });
22742
+ y.value.push(Je), await tD(), O.startRemoteVideo({ userId: Te, streamType: He, view: Je });
22745
22743
  try {
22746
22744
  await O.startRemoteAudio({ userId: Te });
22747
22745
  } catch {
@@ -22749,41 +22747,39 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22749
22747
  }
22750
22748
  setTimeout(() => {
22751
22749
  try {
22752
- const Ve = document.getElementById(ze);
22753
- if (Ve) {
22754
- const It = Ve.querySelector("video");
22755
- It && It.videoWidth > 0 && It.videoHeight > 0 && (S[ze] = It.videoWidth / It.videoHeight);
22750
+ const Be = document.getElementById(Je);
22751
+ if (Be) {
22752
+ const It = Be.querySelector("video");
22753
+ It && It.videoWidth > 0 && It.videoHeight > 0 && (S[Je] = It.videoWidth / It.videoHeight);
22756
22754
  }
22757
- } catch (Ve) {
22758
- console.warn("Failed to get video element:", Ve);
22755
+ } catch {
22759
22756
  }
22760
22757
  }, 1e3);
22761
- } catch (Ve) {
22762
- console.log("🚀 ~ handleRemoteVideoAvailable ~ error:", Ve), w("error", "远端视频订阅失败:" + Ve);
22758
+ } catch (Be) {
22759
+ console.log("🚀 ~ handleRemoteVideoAvailable ~ error:", Be), w("error", "远端视频订阅失败:" + Be);
22763
22760
  }
22764
22761
  }
22765
22762
  async function oi(ue) {
22766
22763
  console.log("🚀 ~ 远端用户停止发布视频 ~ event:", ue);
22767
- const { userId: Te, streamType: Ue } = ue, ze = `${Te}_${Ue}`;
22764
+ const { userId: Te, streamType: He } = ue, Je = `${Te}_${He}`;
22768
22765
  try {
22769
- await O.stopRemoteVideo({ userId: Te, streamType: Ue });
22766
+ await O.stopRemoteVideo({ userId: Te, streamType: He });
22770
22767
  } catch {
22771
22768
  }
22772
- const Ve = y.value.indexOf(ze);
22773
- Ve !== -1 && y.value.splice(Ve, 1), delete S[ze];
22769
+ const Be = y.value.indexOf(Je);
22770
+ Be !== -1 && y.value.splice(Be, 1), delete S[Je];
22774
22771
  }
22775
22772
  async function Ze(ue) {
22776
22773
  console.log("🚀 ~ 异步订阅音频 ~ event:", ue);
22777
22774
  const { userId: Te } = ue;
22778
22775
  try {
22779
22776
  await O.startRemoteAudio({ userId: Te });
22780
- } catch (Ue) {
22781
- console.warn("startRemoteAudio fail", Ue);
22777
+ } catch {
22782
22778
  }
22783
22779
  }
22784
22780
  function ji(ue) {
22785
22781
  const { userId: Te } = ue;
22786
- if (console.log("🚀 ~ 远端用户进入/退出", Te), !I.value.includes(Te)) {
22782
+ if (!I.value.includes(Te)) {
22787
22783
  I.value.push(Te), w("info", `用户 ${Te} 进入房间`);
22788
22784
  try {
22789
22785
  M("remote-user-status-change", {
@@ -22791,14 +22787,12 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22791
22787
  action: "enter",
22792
22788
  userList: [...I.value]
22793
22789
  });
22794
- } catch (Ue) {
22795
- console.warn("emit remote-user-status-change failed", Ue);
22790
+ } catch {
22796
22791
  }
22797
22792
  }
22798
22793
  }
22799
22794
  async function gt(ue) {
22800
22795
  const { userId: Te } = ue;
22801
- console.log("🚀 ~ 远端用户退出房间", Te);
22802
22796
  try {
22803
22797
  await O.stopRemoteAudio({ userId: Te });
22804
22798
  } catch {
@@ -22811,51 +22805,47 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22811
22805
  await O.stopRemoteVideo({ userId: Te, streamType: Bt.TYPE.STREAM_TYPE_SUB });
22812
22806
  } catch {
22813
22807
  }
22814
- ["main", "screen", "sub"].forEach((ze) => {
22815
- const Ve = `${Te}_${ze}`, It = y.value.indexOf(Ve);
22816
- It !== -1 && y.value.splice(It, 1), delete S[Ve];
22808
+ ["main", "screen", "sub"].forEach((Je) => {
22809
+ const Be = `${Te}_${Je}`, It = y.value.indexOf(Be);
22810
+ It !== -1 && y.value.splice(It, 1), delete S[Be];
22817
22811
  });
22818
- const Ue = I.value.indexOf(Te);
22819
- Ue !== -1 && I.value.splice(Ue, 1), w("info", `用户 ${Te} 离开房间`);
22812
+ const He = I.value.indexOf(Te);
22813
+ He !== -1 && I.value.splice(He, 1), w("info", `用户 ${Te} 离开房间`);
22820
22814
  try {
22821
22815
  M("remote-user-status-change", {
22822
22816
  userId: Te,
22823
22817
  action: "exit",
22824
22818
  userList: [...I.value]
22825
22819
  });
22826
- } catch (ze) {
22827
- console.warn("emit remote-user-status-change failed", ze);
22820
+ } catch {
22828
22821
  }
22829
22822
  try {
22830
- const ze = I.value.length;
22831
- R.value && ze === 0 && k.value === Te && (w("info", "对方已离开,正在自动结束本地通话"), await St());
22832
- } catch (ze) {
22833
- console.warn("auto hangup on remote exit failed", ze);
22823
+ const Je = I.value.length;
22824
+ R.value && Je === 0 && k.value === Te && (w("info", "对方已离开,正在自动结束本地通话"), await St());
22825
+ } catch {
22834
22826
  }
22835
22827
  }
22836
22828
  async function zi(ue, Te = 1) {
22837
22829
  console.log("🚀 ~ 发送自定义信令(广播) ~ payload, cmdId:", ue, Te);
22838
22830
  try {
22839
- const ze = new TextEncoder().encode(JSON.stringify(ue)).buffer;
22840
- await O.sendCustomMessage({ cmdId: Te, data: ze });
22841
- } catch (Ue) {
22842
- console.warn("发送自定义信令(广播)", Ue), w("error", "发送信令失败:" + Ue);
22831
+ const Je = new TextEncoder().encode(JSON.stringify(ue)).buffer;
22832
+ await O.sendCustomMessage({ cmdId: Te, data: Je });
22833
+ } catch (He) {
22834
+ w("error", "发送信令失败:" + He);
22843
22835
  }
22844
22836
  }
22845
22837
  async function wr(ue) {
22846
- console.log("🚀 ~ 收到自定义消息", ue);
22847
22838
  let Te = null;
22848
22839
  if (ue.data instanceof ArrayBuffer ? (Te = ue.data, ue.userId || ue.from) : ue.message && ue.message.data ? (Te = ue.message.data, ue.userId || ue.message.userId) : (ue.userId && ue.cmdId && ue.data || ue.userId && ue.data instanceof ArrayBuffer) && (Te = ue.data, ue.userId), !!Te)
22849
22840
  try {
22850
- const ze = new TextDecoder().decode(new Uint8Array(Te)), Ve = JSON.parse(ze);
22851
- if (console.log("🚀 ~ 收到自定义消息内容", Ve), !Ve || !Ve.type) return;
22852
- Ve.type === "incoming_call" && Ve.to === p.value ? (A.value = { from: Ve.from, callId: Ve.callId }, E.value = !0, N.value = Ve.from) : Ve.type === "call_response" && Ve.to === p.value ? Ve.accept ? (w("info", `用户 ${Ve.from} 接听了呼叫`), await Q(), await ne(), R.value = !0, N.value = Ve.from) : (w("info", `用户 ${Ve.from} 拒绝了呼叫`), X()) : Ve.type === "hangup_call" && Ve.to === p.value && (await St(), w("info", `用户 ${Ve.from} 已挂断通话`));
22853
- } catch (Ue) {
22854
- console.warn("parse custom message fail", Ue), w("error", "接收广播消息异常: " + Ue.message);
22841
+ const Je = new TextDecoder().decode(new Uint8Array(Te)), Be = JSON.parse(Je);
22842
+ if (!Be || !Be.type) return;
22843
+ Be.type === "incoming_call" && Be.to === p.value ? (A.value = { from: Be.from, callId: Be.callId }, E.value = !0, N.value = Be.from) : Be.type === "call_response" && Be.to === p.value ? Be.accept ? (w("info", `用户 ${Be.from} 接听了呼叫`), await Q(), await ne(), R.value = !0, N.value = Be.from) : (w("info", `用户 ${Be.from} 拒绝了呼叫`), X()) : Be.type === "hangup_call" && Be.to === p.value && (await St(), w("info", `用户 ${Be.from} 已挂断通话`));
22844
+ } catch (He) {
22845
+ w("error", "接收广播消息异常: " + He.message);
22855
22846
  }
22856
22847
  }
22857
22848
  async function Mt(ue) {
22858
- console.log("🚀 ~ 发起呼叫");
22859
22849
  const Te = ue && String(ue).trim();
22860
22850
  if (!Te) {
22861
22851
  w("error", "缺少呼叫目标,请传入目标用户ID");
@@ -22866,8 +22856,8 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22866
22856
  return;
22867
22857
  }
22868
22858
  E.value = !0, k.value = Te, N.value = Te;
22869
- const Ue = `call_${Date.now()}_${Math.floor(Math.random() * 1e4)}`, ze = { type: "incoming_call", from: p.value, to: Te, callId: Ue };
22870
- await zi(ze, 1), w("info", `已向 ${Te} 发起呼叫,等待应答`);
22859
+ const He = `call_${Date.now()}_${Math.floor(Math.random() * 1e4)}`, Je = { type: "incoming_call", from: p.value, to: Te, callId: He };
22860
+ await zi(Je, 1), w("info", `已向 ${Te} 发起呼叫,等待应答`);
22871
22861
  }
22872
22862
  async function St() {
22873
22863
  try {
@@ -22880,16 +22870,16 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22880
22870
  };
22881
22871
  await zi(Te, 3), X(), w("info", "已挂断");
22882
22872
  } catch (ue) {
22883
- console.warn("hangup fail", ue), w("error", "挂断失败:" + ue);
22873
+ w("error", "挂断失败:" + ue);
22884
22874
  }
22885
22875
  }
22886
22876
  async function Qr() {
22887
- if (console.log("🚀 ~ 接听来电"), !A.value) return;
22877
+ if (!A.value) return;
22888
22878
  const ue = { type: "call_response", from: p.value, to: A.value.from, callId: A.value.callId, accept: !0 };
22889
22879
  await zi(ue, 2), await Q(), await ne(), R.value = !0, k.value = A.value.from, N.value = A.value.from, A.value = null;
22890
22880
  }
22891
22881
  async function Dr() {
22892
- if (console.log("🚀 ~ 拒绝来电"), A.value) {
22882
+ if (A.value) {
22893
22883
  const ue = { type: "call_response", from: p.value, to: A.value.from, callId: A.value.callId, accept: !1 };
22894
22884
  await zi(ue, 2), A.value = null, X();
22895
22885
  return;
@@ -22915,12 +22905,12 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22915
22905
  ri("div", {
22916
22906
  class: Jv(["player-container", { single: y.value.length === 1 }])
22917
22907
  }, [
22918
- (_a(!0), jo(Yv, null, NG(y.value, (Ue) => (_a(), jo("div", {
22919
- key: Ue,
22908
+ (_a(!0), jo(Yv, null, NG(y.value, (He) => (_a(), jo("div", {
22909
+ key: He,
22920
22910
  class: "remote",
22921
- id: Ue,
22911
+ id: He,
22922
22912
  style: PG({
22923
- aspectRatio: S[Ue] || "16/9"
22913
+ aspectRatio: S[He] || "16/9"
22924
22914
  })
22925
22915
  }, null, 12, wz))), 128))
22926
22916
  ], 2),
@@ -22973,7 +22963,7 @@ const Tz = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
22973
22963
  _: 1
22974
22964
  }));
22975
22965
  }
22976
- }, Bz = /* @__PURE__ */ bz(Fz, [["__scopeId", "data-v-fc651f6b"]]), Gz = Bz;
22966
+ }, Bz = /* @__PURE__ */ bz(Fz, [["__scopeId", "data-v-a8e04866"]]), Gz = Bz;
22977
22967
  export {
22978
22968
  Gz as CallKit,
22979
22969
  Bz as default