ezuikit-js 7.6.5 → 7.6.6

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.
@@ -7,7 +7,7 @@
7
7
  "@testing-library/react": "^9.5.0",
8
8
  "@testing-library/user-event": "^7.2.1",
9
9
  "axios": "^0.19.2",
10
- "ezuikit-js": "^0.6.5",
10
+ "ezuikit-js": "^7.6.6",
11
11
  "react": "^16.13.1",
12
12
  "react-dom": "^16.13.1",
13
13
  "react-scripts": "3.4.1"
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "core-js": "^3.6.4",
12
- "ezuikit-js": "^0.6.5",
12
+ "ezuikit-js": "^7.6.6",
13
13
  "vue": "^2.6.11"
14
14
  },
15
15
  "devDependencies": {
package/ezuikit.js CHANGED
@@ -27308,7 +27308,7 @@ var Talk = /*#__PURE__*/function () {
27308
27308
  }
27309
27309
  }, {
27310
27310
  key: "startTalk",
27311
- value: function startTalk() {
27311
+ value: function startTalk(callback) {
27312
27312
  var _this2 = this;
27313
27313
  if (this.jSPlugin.capacity && this.jSPlugin.capacity.support_talk && !(this.jSPlugin.capacity && (this.jSPlugin.capacity.support_talk === '3' || this.jSPlugin.capacity.support_talk === '1'))) {
27314
27314
  if (typeof this.jSPlugin.params.handleError === 'function') {
@@ -27353,16 +27353,22 @@ var Talk = /*#__PURE__*/function () {
27353
27353
  window.EZUIKit.opt.deviceSerial = matchEzopenUrl(_this2.jSPlugin.url).deviceSerial;
27354
27354
  window.EZUIKit.opt.channelNo = matchEzopenUrl(_this2.jSPlugin.url).channelNo;
27355
27355
  var urlList = window.EZUIKit.opt.ttsUrl.split("?");
27356
- if (urlList.length === 2) {
27357
- // 国标设备
27356
+ if (urlList.length === 2 || window.EZUIKit.opt.deviceSerial.indexOf(":") !== -1) {
27357
+ // 国标设备、第三方对讲设备使用新的对讲格式
27358
27358
  var talk = "talk?dev=" + window.EZUIKit.opt.deviceSerial + "&chann=" + window.EZUIKit.opt.channelNo + "&encodetype=2";
27359
+ // var talk = "talk?dev=" + window.EZUIKit.opt.deviceSerial + "&chann=0" + "&encodetype=2";
27359
27360
  window.EZUIKit.opt.talkLink = window.EZUIKit.opt.ttsUrl.split("?")[0] + "/" + talk;
27360
- window.EZUIKit.opt.talkType = "gb28181";
27361
+ if (apiResult.ttsUrl.indexOf('gb28181') > -1) {
27362
+ window.EZUIKit.opt.talkType = "gb28181";
27363
+ }
27361
27364
  } else {
27362
27365
  // 普通设备
27363
27366
  var talk = "talk://" + window.EZUIKit.opt.deviceSerial + ":0:" + window.EZUIKit.opt.channelNo + ":cas.ys7.com:6500";
27364
27367
  window.EZUIKit.opt.talkLink = window.EZUIKit.opt.ttsUrl.split("?")[0] + "/" + talk;
27365
27368
  }
27369
+ if (callback) {
27370
+ callback(apiResult.ttsUrl.indexOf('gb28181') > -1);
27371
+ }
27366
27372
  window.EZUIKit.opt.stream = apiResult.stream;
27367
27373
  window.startTalk();
27368
27374
  }
@@ -30197,20 +30203,17 @@ var Theme = /*#__PURE__*/function () {
30197
30203
  play = _this9$decoderState$s2.play,
30198
30204
  sound = _this9$decoderState$s2.sound,
30199
30205
  talk = _this9$decoderState$s2.talk;
30200
- if (play) {
30206
+ if (play && !talk) {
30201
30207
  if (sound) {
30202
30208
  _this9.jSPlugin.closeSound();
30203
30209
  _this9.setDecoderState({
30204
30210
  sound: false
30205
30211
  });
30206
30212
  } else {
30207
- //xuehb 判断是否打开对讲了,对讲情况下不可以打开声音
30208
- if (!talk) {
30209
- _this9.jSPlugin.openSound();
30210
- _this9.setDecoderState({
30211
- sound: true
30212
- });
30213
- }
30213
+ _this9.jSPlugin.openSound();
30214
+ _this9.setDecoderState({
30215
+ sound: true
30216
+ });
30214
30217
  }
30215
30218
  }
30216
30219
  };
@@ -30281,13 +30284,15 @@ var Theme = /*#__PURE__*/function () {
30281
30284
  _this9.setDecoderState({
30282
30285
  talk: true
30283
30286
  });
30284
- if (sound) {
30285
- _this9.jSPlugin.closeSound();
30286
- _this9.setDecoderState({
30287
- sound: false
30288
- });
30289
- }
30290
- _this9.jSPlugin.Talk.startTalk();
30287
+ _this9.jSPlugin.Talk.startTalk(function (isGb) {
30288
+ if (sound && !isGb) {
30289
+ // 非国标设开启对讲时关闭视频流声音
30290
+ _this9.jSPlugin.closeSound();
30291
+ _this9.setDecoderState({
30292
+ sound: false
30293
+ });
30294
+ }
30295
+ });
30291
30296
  }
30292
30297
  }
30293
30298
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ezuikit-js",
3
3
  "maintainers": ["jzy"],
4
- "version": "7.6.5",
4
+ "version": "7.6.6",
5
5
  "description": "ezuikit javascript for npm",
6
6
  "main": "ezuikit.js",
7
7
  "scripts": {