module-develop-kit 0.4.1 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ export declare function htmlSanitize(input: string): string;
102
102
  /**
103
103
  * jssip、音频播放相关配置信息
104
104
  */
105
- declare interface ICallConfig extends SipAccount {
105
+ export declare interface ICallConfig extends SipAccount {
106
106
  /**
107
107
  * WebSocket安全协议地址
108
108
  */
@@ -140,7 +140,7 @@ declare interface ICallConfig extends SipAccount {
140
140
  /**
141
141
  * 用于拨打电话的相关信息
142
142
  */
143
- declare interface ICallOptions {
143
+ export declare interface ICallOptions {
144
144
  call: string;
145
145
  }
146
146
 
package/dist/index.es.js CHANGED
@@ -17951,13 +17951,14 @@ class o0 {
17951
17951
  we.PENDING !== this.callStatus && this.updateStatus(we.PENDING), Te.log("正在连接...");
17952
17952
  },
17953
17953
  progress: (E) => {
17954
- if (Te.log("呼叫进行中...", E), this.optimizationCall(), E.response) {
17954
+ if (Te.log("呼叫进行中..."), this.optimizationCall(), E.response) {
17955
17955
  const t = E.response.status_code, h = E.response.body;
17956
17956
  t === 183 && h ? (Te.log("收到 183 (带SDP),确认有早期媒体,停止本地提示音。"), this.stopPlayTipAudio()) : (t === 180 || t === 183 && !h) && Te.log(`收到 ${t} (无SDP),继续播放本地提示音。`);
17957
17957
  }
17958
17958
  },
17959
17959
  ended: (E) => {
17960
- we.FAILED !== this.callStatus && (this.updateStatus(we.ENDED, i ? E.cause : ke.causes.REJECTED), Te.log("通话已结束", E)), this.stop();
17960
+ var t;
17961
+ we.FAILED !== this.callStatus && (this.updateStatus(we.ENDED, i ? E == null ? void 0 : E.cause : ke.causes.REJECTED), Te.log("通话已结束", E == null ? void 0 : E.cause, ((t = E == null ? void 0 : E.message) == null ? void 0 : t.data) || "")), this.stop();
17961
17962
  },
17962
17963
  failed: (E) => {
17963
17964
  const { cause: t, message: h = {} } = E, y = t === "Canceled";
@@ -17965,10 +17966,10 @@ class o0 {
17965
17966
  y ? we.CANCELLED : we.FAILED,
17966
17967
  t,
17967
17968
  h == null ? void 0 : h.status_code
17968
- ), y ? Te.warn("通话已取消", E) : Te.error("通话失败", E), this.stop();
17969
+ ), y ? Te.warn("通话已取消", t, h || "") : Te.error("通话失败", t, h || ""), this.stop();
17969
17970
  },
17970
- accepted: (E) => {
17971
- this.stopPlayTipAudio(), Te.log("通话已接听", E);
17971
+ accepted: () => {
17972
+ this.stopPlayTipAudio(), Te.log("通话已接听");
17972
17973
  },
17973
17974
  confirmed: () => {
17974
17975
  this.updateStatus(we.ANSWERED), Te.log("通话已确认");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "module-develop-kit",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "前端项目通用工具包",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",