ezuikit-js 0.5.2 → 0.5.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/ezuikit.js +22 -20
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,3 +3,6 @@ Date: 2022年3月31日 19:39:49
3
3
  [feat]支持切换主题
4
4
  [fix]修复对讲结束问题问题
5
5
  [feat]移动端主题支持隐藏回放时间轴
6
+ v 0.5.3
7
+ [feta]兼容部分浏览器formData格式
8
+ [feta]结束对讲释放麦克风
package/ezuikit.js CHANGED
@@ -25310,6 +25310,9 @@ class Talk {
25310
25310
  }
25311
25311
  stopTalk() {
25312
25312
  window.stopTalk();
25313
+ if(document.getElementById("myaudio") && document.getElementById("myaudio").srcObject) {
25314
+ document.getElementById("myaudio").srcObject.getTracks()[0].stop();
25315
+ }
25313
25316
  }
25314
25317
  }
25315
25318
 
@@ -29476,7 +29479,7 @@ class EZUIKitPlayer {
29476
29479
  });
29477
29480
  });
29478
29481
  }
29479
- },()=>{
29482
+ }, () => {
29480
29483
  return !!window.JSPlugin;
29481
29484
  });
29482
29485
  if ((params.plugin && params.plugin.indexOf("talk") !== -1)) {
@@ -29594,9 +29597,9 @@ class EZUIKitPlayer {
29594
29597
  var apiUrl = apiDomain + "/api/lapp/live/url/ezopen";
29595
29598
  var data = new FormData();
29596
29599
  data.append("ezopen", url);
29597
- data.append("isFlv", false);
29600
+ data.append("isFlv", "false");
29598
29601
  data.append("userAgent", window.navigator.userAgent);
29599
- data.append("isHttp", false);
29602
+ data.append("isHttp", "false");
29600
29603
  data.append("accessToken", accessToken);
29601
29604
  fetch(apiUrl, {
29602
29605
  method: "POST",
@@ -29907,7 +29910,7 @@ class EZUIKitPlayer {
29907
29910
  this.jSPlugin.JS_Play(wsUrl, wsParams, 0).then(() => {
29908
29911
  console.log("播放成功");
29909
29912
  this.pluginStatus.loadingClear();
29910
- this.pluginStatus.setPlayStatus({play: true, loading: false});
29913
+ this.pluginStatus.setPlayStatus({ play: true, loading: false });
29911
29914
  if (this.Theme) {
29912
29915
  this.Theme.setDecoderState({ play: true });
29913
29916
  }
@@ -29955,7 +29958,7 @@ class EZUIKitPlayer {
29955
29958
  });
29956
29959
  }
29957
29960
  play(options) {
29958
- this.pluginStatus.setPlayStatus({play: false, loading: true});
29961
+ this.pluginStatus.setPlayStatus({ play: false, loading: true });
29959
29962
  this.playStartTime = new Date().getTime();
29960
29963
  this.Monitor.dclog({
29961
29964
  url: this.url,
@@ -29999,10 +30002,10 @@ class EZUIKitPlayer {
29999
30002
  return promise;
30000
30003
  }
30001
30004
  stop() {
30002
- this.pluginStatus.setPlayStatus({loading: true});
30005
+ this.pluginStatus.setPlayStatus({ loading: true });
30003
30006
  return this.jSPlugin.JS_Stop(0).then(() => {
30004
30007
  console.log("停止成功");
30005
- this.pluginStatus.setPlayStatus({play: false,loading: false});
30008
+ this.pluginStatus.setPlayStatus({ play: false, loading: false });
30006
30009
  if (this.Theme) {
30007
30010
  this.Theme.setDecoderState({ play: false });
30008
30011
  }
@@ -30270,15 +30273,15 @@ class EZUIKitPlayer {
30270
30273
  type: "handleError"
30271
30274
  });
30272
30275
  }
30276
+ return new Promise((resolve, reject) => {
30277
+ this.speed = speed;
30278
+ reject({ code: -1, data: { speed: speed, result: "播放速度最大为4倍速度" } });
30279
+ });
30273
30280
  }
30274
30281
  var fastRT = this.jSPlugin.JS_Fast(0);
30275
- if (isPromise(fastRT)) {
30276
- this.speed = speed;
30277
- return fastRT;
30278
- }
30279
- return new Promise(function (resolve) {
30282
+ return new Promise((resolve) => {
30280
30283
  this.speed = speed;
30281
- resolve(fastRT);
30284
+ resolve({ code: 0, data: { speed: speed, result: fastRT } });
30282
30285
  });
30283
30286
  }
30284
30287
  slow() {
@@ -30296,16 +30299,15 @@ class EZUIKitPlayer {
30296
30299
  type: "handleError"
30297
30300
  });
30298
30301
  }
30302
+ return new Promise((resolve, reject) => {
30303
+ this.speed = speed;
30304
+ reject({ code: -1, data: { speed: speed, result: "播放速度最小为1倍速度" } });
30305
+ });
30299
30306
  }
30300
30307
  var slowRT = this.jSPlugin.JS_Slow(0);
30301
- console.log("slowRT", slowRT);
30302
- if (isPromise(slowRT)) {
30303
- this.speed = speed;
30304
- return slowRT;
30305
- }
30306
- return new Promise(function (resolve) {
30308
+ return new Promise((resolve) => {
30307
30309
  this.speed = speed;
30308
- resolve(slowRT);
30310
+ resolve({ code: 0, data: { speed: speed, result: slowRT } });
30309
30311
  });
30310
30312
  }
30311
30313
  seek(startTime, endTime) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezuikit-js",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "ezuikit javascript for npm",
5
5
  "main": "ezuikit.js",
6
6
  "scripts": {