xjzh-component 0.1.18 → 0.1.19

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.
@@ -35,27 +35,6 @@ module.exports = function (argument, usingIterator) {
35
35
  };
36
36
 
37
37
 
38
- /***/ }),
39
-
40
- /***/ 167:
41
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
42
-
43
- "use strict";
44
- __webpack_require__.r(__webpack_exports__);
45
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
46
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
47
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
48
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
49
- // Imports
50
-
51
-
52
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
53
- // Module
54
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-video-list[data-v-02fd09c1]{display:flex;flex-wrap:wrap;justify-content:center}.xjzh-video-list[data-v-02fd09c1],.xjzh-video-list .videoItem .video-js[data-v-02fd09c1],.xjzh-video-list .videoItem .video-js video[data-v-02fd09c1]{width:100%;height:100%}", ""]);
55
- // Exports
56
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
57
-
58
-
59
38
  /***/ }),
60
39
 
61
40
  /***/ 184:
@@ -349,6 +328,27 @@ VTTCue.prototype.getCueAsHTML = function() {
349
328
  module.exports = VTTCue;
350
329
 
351
330
 
331
+ /***/ }),
332
+
333
+ /***/ 230:
334
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
335
+
336
+ "use strict";
337
+ __webpack_require__.r(__webpack_exports__);
338
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
339
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
340
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
341
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
342
+ // Imports
343
+
344
+
345
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
346
+ // Module
347
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-bitmap-canvas[data-v-01c7d3f4]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-bitmap-canvas .itemBox[data-v-01c7d3f4]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-bitmap-canvas .itemBox .item-title[data-v-01c7d3f4]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-bitmap-canvas .itemBox canvas[data-v-01c7d3f4]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-bitmap-canvas .itemBox[data-v-01c7d3f4]:last-child{margin-bottom:0}.xjzh-bitmap-canvas .full-screen[data-v-01c7d3f4]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
348
+ // Exports
349
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
350
+
351
+
352
352
  /***/ }),
353
353
 
354
354
  /***/ 283:
@@ -450,6 +450,22 @@ var getBuiltIn = __webpack_require__(7751);
450
450
  module.exports = getBuiltIn('document', 'documentElement');
451
451
 
452
452
 
453
+ /***/ }),
454
+
455
+ /***/ 398:
456
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
457
+
458
+ // style-loader: Adds some css to the DOM by adding a <style> tag
459
+
460
+ // load the styles
461
+ var content = __webpack_require__(5208);
462
+ if(content.__esModule) content = content.default;
463
+ if(typeof content === 'string') content = [[module.id, content, '']];
464
+ if(content.locals) module.exports = content.locals;
465
+ // add the styles to the DOM
466
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
467
+ var update = add("22ba3b68", content, true, {"sourceMap":false,"shadowMode":false});
468
+
453
469
  /***/ }),
454
470
 
455
471
  /***/ 421:
@@ -581,6 +597,27 @@ module.exports = function (it) {
581
597
  };
582
598
 
583
599
 
600
+ /***/ }),
601
+
602
+ /***/ 1030:
603
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
604
+
605
+ "use strict";
606
+ __webpack_require__.r(__webpack_exports__);
607
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
608
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
609
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
610
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
611
+ // Imports
612
+
613
+
614
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
615
+ // Module
616
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-set-canvas[data-v-5d178756]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.xjzh-set-canvas .video-item[data-v-5d178756]{width:640px;height:360px;background-color:#eee;border-radius:8px;margin-bottom:24px;position:relative;overflow:hidden}.xjzh-set-canvas .video-item .item-head[data-v-5d178756]{display:flex;justify-content:space-between;align-items:center;position:absolute;top:12px;right:12px;left:12px;z-index:99}.xjzh-set-canvas .video-item .item-head span[data-v-5d178756]{background-color:#fff;color:#0076f6;font-size:18px;padding:5px 8px;border-radius:6px}.xjzh-set-canvas .video-item .set-screen[data-v-5d178756]{width:20px;height:20px;cursor:pointer;position:absolute;right:12px;bottom:8px;font-size:18px}.xjzh-set-canvas .video-item .set-screen img[data-v-5d178756]{width:100%;height:100%}.xjzh-set-canvas .video-item .set-full-screen[data-v-5d178756]{width:48px;height:48px}.xjzh-set-canvas .video-item canvas[data-v-5d178756]{width:100%;height:100%}.xjzh-set-canvas .full-screen[data-v-5d178756]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
617
+ // Exports
618
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
619
+
620
+
584
621
  /***/ }),
585
622
 
586
623
  /***/ 1036:
@@ -1215,6 +1252,22 @@ module.exports = function (object, names) {
1215
1252
  };
1216
1253
 
1217
1254
 
1255
+ /***/ }),
1256
+
1257
+ /***/ 2048:
1258
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1259
+
1260
+ // style-loader: Adds some css to the DOM by adding a <style> tag
1261
+
1262
+ // load the styles
1263
+ var content = __webpack_require__(230);
1264
+ if(content.__esModule) content = content.default;
1265
+ if(typeof content === 'string') content = [[module.id, content, '']];
1266
+ if(content.locals) module.exports = content.locals;
1267
+ // add the styles to the DOM
1268
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
1269
+ var update = add("6b7ffce0", content, true, {"sourceMap":false,"shadowMode":false});
1270
+
1218
1271
  /***/ }),
1219
1272
 
1220
1273
  /***/ 2106:
@@ -1283,27 +1336,6 @@ module.exports = !fails(function () {
1283
1336
  });
1284
1337
 
1285
1338
 
1286
- /***/ }),
1287
-
1288
- /***/ 2285:
1289
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1290
-
1291
- "use strict";
1292
- __webpack_require__.r(__webpack_exports__);
1293
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
1294
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
1295
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
1296
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
1297
- // Imports
1298
-
1299
-
1300
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
1301
- // Module
1302
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-bitmap-canvas[data-v-9125dc2c]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-bitmap-canvas .itemBox[data-v-9125dc2c]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-bitmap-canvas .itemBox .item-title[data-v-9125dc2c]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-bitmap-canvas .itemBox canvas[data-v-9125dc2c]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-bitmap-canvas .itemBox[data-v-9125dc2c]:last-child{margin-bottom:0}.xjzh-bitmap-canvas .full-screen[data-v-9125dc2c]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
1303
- // Exports
1304
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
1305
-
1306
-
1307
1339
  /***/ }),
1308
1340
 
1309
1341
  /***/ 2360:
@@ -1641,6 +1673,27 @@ module.exports = function (key) {
1641
1673
  };
1642
1674
 
1643
1675
 
1676
+ /***/ }),
1677
+
1678
+ /***/ 3430:
1679
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1680
+
1681
+ "use strict";
1682
+ __webpack_require__.r(__webpack_exports__);
1683
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
1684
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
1685
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
1686
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
1687
+ // Imports
1688
+
1689
+
1690
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
1691
+ // Module
1692
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-set-canvas[data-v-8665cefa]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.xjzh-set-canvas .video-item[data-v-8665cefa]{width:640px;height:360px;background-color:#eee;border-radius:8px;margin-bottom:24px;position:relative;overflow:hidden}.xjzh-set-canvas .video-item .item-head[data-v-8665cefa]{display:flex;justify-content:space-between;align-items:center;position:absolute;top:12px;right:12px;left:12px;z-index:99}.xjzh-set-canvas .video-item .item-head span[data-v-8665cefa]{background-color:#fff;color:#0076f6;font-size:18px;padding:5px 8px;border-radius:6px}.xjzh-set-canvas .video-item .set-screen[data-v-8665cefa]{width:20px;height:20px;cursor:pointer;position:absolute;right:12px;bottom:8px;font-size:18px}.xjzh-set-canvas .video-item .set-screen img[data-v-8665cefa]{width:100%;height:100%}.xjzh-set-canvas .video-item .set-full-screen[data-v-8665cefa]{width:48px;height:48px}.xjzh-set-canvas .video-item canvas[data-v-8665cefa]{width:100%;height:100%}.xjzh-set-canvas .full-screen[data-v-8665cefa]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
1693
+ // Exports
1694
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
1695
+
1696
+
1644
1697
  /***/ }),
1645
1698
 
1646
1699
  /***/ 3479:
@@ -1657,6 +1710,27 @@ if(content.locals) module.exports = content.locals;
1657
1710
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
1658
1711
  var update = add("669c5145", content, true, {"sourceMap":false,"shadowMode":false});
1659
1712
 
1713
+ /***/ }),
1714
+
1715
+ /***/ 3612:
1716
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1717
+
1718
+ "use strict";
1719
+ __webpack_require__.r(__webpack_exports__);
1720
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
1721
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
1722
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
1723
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
1724
+ // Imports
1725
+
1726
+
1727
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
1728
+ // Module
1729
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-video-list[data-v-098960cc]{display:flex;flex-wrap:wrap;justify-content:center}.xjzh-video-list[data-v-098960cc],.xjzh-video-list .videoItem .video-js[data-v-098960cc],.xjzh-video-list .videoItem .video-js video[data-v-098960cc]{width:100%;height:100%}", ""]);
1730
+ // Exports
1731
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
1732
+
1733
+
1660
1734
  /***/ }),
1661
1735
 
1662
1736
  /***/ 3626:
@@ -5038,6 +5112,27 @@ module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
5038
5112
  };
5039
5113
 
5040
5114
 
5115
+ /***/ }),
5116
+
5117
+ /***/ 5208:
5118
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
5119
+
5120
+ "use strict";
5121
+ __webpack_require__.r(__webpack_exports__);
5122
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
5123
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
5124
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
5125
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
5126
+ // Imports
5127
+
5128
+
5129
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
5130
+ // Module
5131
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-bc833fa2]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-bc833fa2]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-bc833fa2]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-bc833fa2]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-bc833fa2]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-bc833fa2]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
5132
+ // Exports
5133
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
5134
+
5135
+
5041
5136
  /***/ }),
5042
5137
 
5043
5138
  /***/ 5360:
@@ -5602,6 +5697,22 @@ module.exports = !DESCRIPTORS && !fails(function () {
5602
5697
  });
5603
5698
 
5604
5699
 
5700
+ /***/ }),
5701
+
5702
+ /***/ 5960:
5703
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5704
+
5705
+ // style-loader: Adds some css to the DOM by adding a <style> tag
5706
+
5707
+ // load the styles
5708
+ var content = __webpack_require__(1030);
5709
+ if(content.__esModule) content = content.default;
5710
+ if(typeof content === 'string') content = [[module.id, content, '']];
5711
+ if(content.locals) module.exports = content.locals;
5712
+ // add the styles to the DOM
5713
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
5714
+ var update = add("8f89561e", content, true, {"sourceMap":false,"shadowMode":false});
5715
+
5605
5716
  /***/ }),
5606
5717
 
5607
5718
  /***/ 5966:
@@ -5795,22 +5906,6 @@ module.exports = function (obj) {
5795
5906
  };
5796
5907
 
5797
5908
 
5798
- /***/ }),
5799
-
5800
- /***/ 6201:
5801
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5802
-
5803
- // style-loader: Adds some css to the DOM by adding a <style> tag
5804
-
5805
- // load the styles
5806
- var content = __webpack_require__(167);
5807
- if(content.__esModule) content = content.default;
5808
- if(typeof content === 'string') content = [[module.id, content, '']];
5809
- if(content.locals) module.exports = content.locals;
5810
- // add the styles to the DOM
5811
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
5812
- var update = add("d6ea4be6", content, true, {"sourceMap":false,"shadowMode":false});
5813
-
5814
5909
  /***/ }),
5815
5910
 
5816
5911
  /***/ 6269:
@@ -9537,6 +9632,22 @@ module.exports = DESCRIPTORS ? function (object, key, value) {
9537
9632
  };
9538
9633
 
9539
9634
 
9635
+ /***/ }),
9636
+
9637
+ /***/ 6774:
9638
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9639
+
9640
+ // style-loader: Adds some css to the DOM by adding a <style> tag
9641
+
9642
+ // load the styles
9643
+ var content = __webpack_require__(3612);
9644
+ if(content.__esModule) content = content.default;
9645
+ if(typeof content === 'string') content = [[module.id, content, '']];
9646
+ if(content.locals) module.exports = content.locals;
9647
+ // add the styles to the DOM
9648
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
9649
+ var update = add("816f6580", content, true, {"sourceMap":false,"shadowMode":false});
9650
+
9540
9651
  /***/ }),
9541
9652
 
9542
9653
  /***/ 6801:
@@ -10137,27 +10248,6 @@ module.exports = function (argument) {
10137
10248
  };
10138
10249
 
10139
10250
 
10140
- /***/ }),
10141
-
10142
- /***/ 8022:
10143
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
10144
-
10145
- "use strict";
10146
- __webpack_require__.r(__webpack_exports__);
10147
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
10148
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
10149
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
10150
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
10151
- // Imports
10152
-
10153
-
10154
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
10155
- // Module
10156
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-2f1f85c3]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-2f1f85c3]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-2f1f85c3]{width:30px;height:30px;padding:0;margin:0;font-size:20px;border-radius:50%;text-align:center;line-height:30px;position:absolute;left:10px;top:10px;z-index:999;background-color:#fff;color:#0076f6}.xjzh-img-canvas .itemBox canvas[data-v-2f1f85c3]{margin:0;padding:0;width:100%;height:100%;will-change:transform;image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.xjzh-img-canvas .itemBox[data-v-2f1f85c3]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-2f1f85c3]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
10157
- // Exports
10158
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
10159
-
10160
-
10161
10251
  /***/ }),
10162
10252
 
10163
10253
  /***/ 8111:
@@ -10268,19 +10358,19 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACN
10268
10358
 
10269
10359
  /***/ }),
10270
10360
 
10271
- /***/ 8464:
10361
+ /***/ 8448:
10272
10362
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10273
10363
 
10274
10364
  // style-loader: Adds some css to the DOM by adding a <style> tag
10275
10365
 
10276
10366
  // load the styles
10277
- var content = __webpack_require__(8022);
10367
+ var content = __webpack_require__(3430);
10278
10368
  if(content.__esModule) content = content.default;
10279
10369
  if(typeof content === 'string') content = [[module.id, content, '']];
10280
10370
  if(content.locals) module.exports = content.locals;
10281
10371
  // add the styles to the DOM
10282
10372
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
10283
- var update = add("3e360232", content, true, {"sourceMap":false,"shadowMode":false});
10373
+ var update = add("216e8c2a", content, true, {"sourceMap":false,"shadowMode":false});
10284
10374
 
10285
10375
  /***/ }),
10286
10376
 
@@ -10302,22 +10392,6 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
10302
10392
  };
10303
10393
 
10304
10394
 
10305
- /***/ }),
10306
-
10307
- /***/ 8511:
10308
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10309
-
10310
- // style-loader: Adds some css to the DOM by adding a <style> tag
10311
-
10312
- // load the styles
10313
- var content = __webpack_require__(2285);
10314
- if(content.__esModule) content = content.default;
10315
- if(typeof content === 'string') content = [[module.id, content, '']];
10316
- if(content.locals) module.exports = content.locals;
10317
- // add the styles to the DOM
10318
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
10319
- var update = add("865e63ce", content, true, {"sourceMap":false,"shadowMode":false});
10320
-
10321
10395
  /***/ }),
10322
10396
 
10323
10397
  /***/ 8551:
@@ -10583,27 +10657,6 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
10583
10657
  } : $propertyIsEnumerable;
10584
10658
 
10585
10659
 
10586
- /***/ }),
10587
-
10588
- /***/ 8779:
10589
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
10590
-
10591
- "use strict";
10592
- __webpack_require__.r(__webpack_exports__);
10593
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
10594
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
10595
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
10596
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
10597
- // Imports
10598
-
10599
-
10600
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
10601
- // Module
10602
- ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-set-canvas[data-v-19dc6be0]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.xjzh-set-canvas .video-item[data-v-19dc6be0]{width:640px;height:360px;background-color:#eee;border-radius:4px 4px 4px 4px;margin-bottom:24px;position:relative}.xjzh-set-canvas .video-item .item-head[data-v-19dc6be0]{display:flex;justify-content:space-between;align-items:center;position:absolute;top:12px;right:12px;left:12px;z-index:99}.xjzh-set-canvas .video-item .item-head span[data-v-19dc6be0]{background-color:#fff;color:#0076f6;font-size:18px;padding:5px 8px;border-radius:6px}.xjzh-set-canvas .video-item .set-screen[data-v-19dc6be0]{width:20px;height:20px;cursor:pointer;position:absolute;right:12px;bottom:8px;font-size:18px}.xjzh-set-canvas .video-item .set-screen img[data-v-19dc6be0]{width:100%;height:100%}.xjzh-set-canvas .video-item .set-full-screen[data-v-19dc6be0]{width:48px;height:48px}.xjzh-set-canvas .video-item canvas[data-v-19dc6be0]{width:100%;height:100%}.xjzh-set-canvas .full-screen[data-v-19dc6be0]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
10603
- // Exports
10604
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
10605
-
10606
-
10607
10660
  /***/ }),
10608
10661
 
10609
10662
  /***/ 8962:
@@ -10820,22 +10873,6 @@ if (!version && userAgent) {
10820
10873
  module.exports = version;
10821
10874
 
10822
10875
 
10823
- /***/ }),
10824
-
10825
- /***/ 9525:
10826
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10827
-
10828
- // style-loader: Adds some css to the DOM by adding a <style> tag
10829
-
10830
- // load the styles
10831
- var content = __webpack_require__(8779);
10832
- if(content.__esModule) content = content.default;
10833
- if(typeof content === 'string') content = [[module.id, content, '']];
10834
- if(content.locals) module.exports = content.locals;
10835
- // add the styles to the DOM
10836
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
10837
- var update = add("3b96abe8", content, true, {"sourceMap":false,"shadowMode":false});
10838
-
10839
10876
  /***/ }),
10840
10877
 
10841
10878
  /***/ 9539:
@@ -11447,7 +11484,7 @@ if (typeof window !== 'undefined') {
11447
11484
  // Indicate to webpack that this file can be concatenated
11448
11485
  /* harmony default export */ var setPublicPath = (null);
11449
11486
 
11450
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=2f1f85c3&scoped=true
11487
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=template&id=bc833fa2&scoped=true
11451
11488
  var render = function render() {
11452
11489
  var _vm = this,
11453
11490
  _c = _vm._self._c;
@@ -11655,6 +11692,16 @@ function initWorker() {
11655
11692
  default: () => {
11656
11693
  return [1920, 1080];
11657
11694
  }
11695
+ },
11696
+ // 每秒帧数
11697
+ framesPerSecond: {
11698
+ type: Number,
11699
+ default: 30
11700
+ },
11701
+ // 一秒渲染多少帧
11702
+ frameRate: {
11703
+ type: Number,
11704
+ default: 30
11658
11705
  }
11659
11706
  },
11660
11707
  watch: {
@@ -11744,7 +11791,7 @@ function initWorker() {
11744
11791
  // 单个摄像头 - 收到总帧数
11745
11792
  showTotalFPS: 0,
11746
11793
  // 单个摄像头 - 渲染总帧数
11747
- frameSkip: 0,
11794
+ frameRate: 0,
11748
11795
  // 单个摄像头 - 跳帧 1(30),2(15),3(10)
11749
11796
 
11750
11797
  imgBox: null,
@@ -11783,9 +11830,9 @@ function initWorker() {
11783
11830
  },
11784
11831
  showCanvas(type, blob) {
11785
11832
  this.cameraObj[type].totalFPS++;
11786
- if (!this.cameraObj[type] || !this.cameraObj[type].imgBox || !this.cameraObj[type].ctx) {
11787
- return;
11788
- }
11833
+ if (!this.cameraObj[type] || !this.cameraObj[type].imgBox || !this.cameraObj[type].ctx) return;
11834
+ if (this.cameraObj[type].totalFPS % (this.framesPerSecond / this.frameRate).toFixed(1) !== 0) return; // 跳帧处理
11835
+
11789
11836
  if (this.currentFullScreen && this.currentFullScreen !== type) {
11790
11837
  this.destroyUrl(type);
11791
11838
  return;
@@ -11887,9 +11934,9 @@ function initWorker() {
11887
11934
  });
11888
11935
  ;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
11889
11936
  /* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
11890
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=2f1f85c3&prod&lang=scss&scoped=true
11891
- var xjzhImgCanvasvue_type_style_index_0_id_2f1f85c3_prod_lang_scss_scoped_true = __webpack_require__(8464);
11892
- ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=2f1f85c3&prod&lang=scss&scoped=true
11937
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=bc833fa2&prod&lang=scss&scoped=true
11938
+ var xjzhImgCanvasvue_type_style_index_0_id_bc833fa2_prod_lang_scss_scoped_true = __webpack_require__(398);
11939
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=bc833fa2&prod&lang=scss&scoped=true
11893
11940
 
11894
11941
  ;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
11895
11942
  /* globals __VUE_SSR_CONTEXT__ */
@@ -12004,14 +12051,359 @@ var component = normalizeComponent(
12004
12051
  staticRenderFns,
12005
12052
  false,
12006
12053
  null,
12007
- "2f1f85c3",
12054
+ "bc833fa2",
12008
12055
  null
12009
12056
 
12010
12057
  )
12011
12058
 
12012
12059
  /* harmony default export */ var xjzhImgCanvas = (component.exports);
12013
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhVideoList.vue?vue&type=template&id=02fd09c1&scoped=true
12014
- var xjzhVideoListvue_type_template_id_02fd09c1_scoped_true_render = function render() {
12060
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=template&id=01c7d3f4&scoped=true
12061
+ var xjzhBitmapCanvasvue_type_template_id_01c7d3f4_scoped_true_render = function render() {
12062
+ var _vm = this,
12063
+ _c = _vm._self._c;
12064
+ return _c('div', {
12065
+ staticClass: "xjzh-bitmap-canvas"
12066
+ }, _vm._l(_vm.cameraObj, function (item, index) {
12067
+ return _c('div', {
12068
+ key: index,
12069
+ class: ['itemBox', item.isFullScreen ? 'full-screen' : ''],
12070
+ style: {
12071
+ 'width': _vm.width,
12072
+ 'height': _vm.height
12073
+ },
12074
+ on: {
12075
+ "click": function ($event) {
12076
+ return _vm.handleScreen(index);
12077
+ }
12078
+ }
12079
+ }, [_c('p', {
12080
+ directives: [{
12081
+ name: "show",
12082
+ rawName: "v-show",
12083
+ value: _vm.showTitle,
12084
+ expression: "showTitle"
12085
+ }],
12086
+ staticClass: "item-title"
12087
+ }, [_vm._v(_vm._s(item.title))]), _c('canvas', {
12088
+ ref: item.domeId,
12089
+ refInFor: true
12090
+ })]);
12091
+ }), 0);
12092
+ };
12093
+ var xjzhBitmapCanvasvue_type_template_id_01c7d3f4_scoped_true_staticRenderFns = [];
12094
+
12095
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=script&lang=js
12096
+
12097
+ /* harmony default export */ var xjzhBitmapCanvasvue_type_script_lang_js = ({
12098
+ name: "XjzhBitmapCanvas",
12099
+ props: {
12100
+ videoUrl: {
12101
+ type: String,
12102
+ default: 'localhost:56000'
12103
+ },
12104
+ width: {
12105
+ type: String,
12106
+ default: '480px'
12107
+ },
12108
+ height: {
12109
+ type: String,
12110
+ default: '270px'
12111
+ },
12112
+ showTitle: {
12113
+ type: Boolean,
12114
+ default: true
12115
+ },
12116
+ isSwitchSide: {
12117
+ type: Boolean,
12118
+ default: false
12119
+ },
12120
+ canvasSize: {
12121
+ type: Array,
12122
+ default: () => {
12123
+ return [1920, 1080];
12124
+ }
12125
+ },
12126
+ // 每秒帧数
12127
+ framesPerSecond: {
12128
+ type: Number,
12129
+ default: 30
12130
+ },
12131
+ // 一秒渲染多少帧
12132
+ frameRate: {
12133
+ type: Number,
12134
+ default: 30
12135
+ }
12136
+ },
12137
+ watch: {
12138
+ isSwitchSide: {
12139
+ handler() {
12140
+ if (this.cameraType[2]) {
12141
+ this.cameraType[2].label = this.isSwitchSide ? '显' : '侧';
12142
+ }
12143
+ }
12144
+ }
12145
+ },
12146
+ data() {
12147
+ return {
12148
+ cameraNum: 0,
12149
+ cameraType: [{
12150
+ label: '斜',
12151
+ value: 'main'
12152
+ }, {
12153
+ label: '俯',
12154
+ value: 'sub'
12155
+ }, {
12156
+ label: '侧',
12157
+ value: 'side'
12158
+ }],
12159
+ currentFullScreen: '',
12160
+ answerPhoto: {
12161
+ canvas: null,
12162
+ ctx: null,
12163
+ isPhoto: false,
12164
+ canvasSize: [1920, 1080]
12165
+ },
12166
+ cameraObj: null,
12167
+ worker: null
12168
+ };
12169
+ },
12170
+ created() {
12171
+ this.destroyWorker();
12172
+ },
12173
+ mounted() {
12174
+ this.$nextTick(() => {
12175
+ this.initWorker();
12176
+ });
12177
+ },
12178
+ methods: {
12179
+ initAnswerPhoto() {
12180
+ this.answerPhoto.canvas = document.createElement('canvas');
12181
+ this.answerPhoto.ctx = this.answerPhoto.canvas.getContext('2d');
12182
+ this.answerPhoto.canvas.width = this.canvasSize[0] * this.cameraNum;
12183
+ this.answerPhoto.canvas.height = this.canvasSize[1];
12184
+ },
12185
+ initCanvas() {
12186
+ for (let i = 0; i < this.cameraNum; i++) {
12187
+ let type = this.cameraType[i].value;
12188
+ this.cameraObj[type].canvas = this.$refs[this.cameraObj[type].domeId][0];
12189
+ this.cameraObj[type].ctx = this.cameraObj[type].canvas.getContext('2d');
12190
+ this.cameraObj[type].canvas.width = this.canvasSize[0];
12191
+ this.cameraObj[type].canvas.height = this.canvasSize[1];
12192
+ }
12193
+ },
12194
+ initWorker() {
12195
+ this.worker = initWorker();
12196
+ if (!this.videoUrl) return;
12197
+ const url = `ws://${this.videoUrl}/socket`;
12198
+ let count = 0;
12199
+ this.worker.onmessage = event => {
12200
+ const {
12201
+ type,
12202
+ data,
12203
+ event: wsEvent,
12204
+ error
12205
+ } = event.data;
12206
+ if (type === 'open') {
12207
+ console.log('WebSocket open:');
12208
+ }
12209
+ if (type === 'message') {
12210
+ if (typeof data === 'number') {
12211
+ this.cameraNum = data;
12212
+ for (let i = 0; i < this.cameraNum; i++) {
12213
+ let typeVal = this.cameraType[i].value;
12214
+ this.cameraObj[typeVal] = {
12215
+ domeId: `canvas_${typeVal}`,
12216
+ title: this.cameraType[i].label,
12217
+ // 摄像头名称
12218
+ canvas: null,
12219
+ ctx: null,
12220
+ totalFPS: 0,
12221
+ // 单个摄像头 - 收到总帧数
12222
+ showTotalFPS: 0,
12223
+ // 单个摄像头 - 渲染总帧数
12224
+ frameSkip: 0,
12225
+ // 单个摄像头 - 跳帧 1(30),2(15),3(10)
12226
+
12227
+ allUrl: [],
12228
+ // 所有图片地址
12229
+ isLoading: false,
12230
+ // 图片是否加载完
12231
+ isFullScreen: false // 画面是否全屏
12232
+ };
12233
+ }
12234
+ this.$forceUpdate();
12235
+ // 根据摄像头数量,初始化画布
12236
+ this.$nextTick(() => {
12237
+ this.initAnswerPhoto();
12238
+ this.initCanvas();
12239
+ });
12240
+ return;
12241
+ }
12242
+ // 摄像头画面渲染
12243
+ count++;
12244
+ if (count == 1) {
12245
+ this.showCanvas('main', data);
12246
+ }
12247
+ if (count == 2) {
12248
+ this.showCanvas('sub', data);
12249
+ }
12250
+ if (count == 3) {
12251
+ this.showCanvas('side', data);
12252
+ }
12253
+ count = count >= this.cameraNum ? 0 : count;
12254
+ }
12255
+ if (type === 'close') {
12256
+ console.log('WebSocket closed:', wsEvent);
12257
+ }
12258
+ if (type === 'error') {
12259
+ console.log(`Worker error: ${error.message}`);
12260
+ }
12261
+ };
12262
+ // worker 建立连接
12263
+ this.cameraObj = {};
12264
+ this.worker.postMessage({
12265
+ url
12266
+ });
12267
+ },
12268
+ // 销毁摄像头,worker
12269
+ destroyWorker() {
12270
+ if (this.worker) {
12271
+ this.worker.terminate();
12272
+ this.worker = null;
12273
+ }
12274
+ this.destroyCanvasData();
12275
+ },
12276
+ showCanvas(type, blob) {
12277
+ this.cameraObj[type].totalFPS++;
12278
+ if (!this.cameraObj[type] || !this.cameraObj[type].ctx) return;
12279
+ if (this.cameraObj[type].totalFPS % (this.framesPerSecond / this.frameRate).toFixed(1) !== 0) return; // 跳帧处理
12280
+ if (this.currentFullScreen && this.currentFullScreen !== type) {
12281
+ this.destroyUrl(type);
12282
+ return;
12283
+ }
12284
+ if (this.cameraObj[type].isLoading) return;
12285
+ this.cameraObj[type].isLoading = true;
12286
+ createImageBitmap(blob, {
12287
+ imageSmoothingQuality: 'low'
12288
+ }).then(res => {
12289
+ if (this.cameraObj[type].allUrl) {
12290
+ this.cameraObj[type].allUrl.unshift(res);
12291
+ this.cameraObj[type].isLoading = false;
12292
+ }
12293
+ }).catch(err => {
12294
+ console.log('object :>> createImageBitmap', err);
12295
+ this.cameraObj[type].isLoading = false;
12296
+ });
12297
+ if (this.cameraObj[type].ctx && this.cameraObj[type].ctx.drawImage && this.cameraObj[type].allUrl[0]) {
12298
+ // this.cameraObj[type].ctx.drawImage(this.cameraObj[type].allUrl[0], 0, 0, this.canvasSize[0], this.canvasSize[1])
12299
+ this.cameraObj[type].ctx.drawImage(this.cameraObj[type].allUrl[0], 0, 0);
12300
+ }
12301
+ if (this.answerPhoto.isPhoto && this.cameraObj[type].allUrl[0]) {
12302
+ // 拍照使用
12303
+ if (this.cameraNum > 0) {
12304
+ this.answerPhoto.ctx.drawImage(this.cameraObj.main.allUrl[0], this.answerPhoto.canvasSize[0] * 0, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
12305
+ }
12306
+ if (this.cameraNum > 1) {
12307
+ this.answerPhoto.ctx.drawImage(this.cameraObj.sub.allUrl[0], this.answerPhoto.canvasSize[0] * 1, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
12308
+ }
12309
+ if (this.cameraNum > 2) {
12310
+ this.answerPhoto.ctx.drawImage(this.cameraObj.side.allUrl[0], this.answerPhoto.canvasSize[0] * 2, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
12311
+ }
12312
+ return;
12313
+ }
12314
+ this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
12315
+ },
12316
+ handleScreen(type) {
12317
+ this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
12318
+ this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
12319
+ this.$forceUpdate();
12320
+ },
12321
+ destroyCanvasData() {
12322
+ for (let i = 0; i < this.cameraNum; i++) {
12323
+ let type = this.cameraType[i].value;
12324
+ this.destroyUrl(type);
12325
+ this.destroyCanvas(type);
12326
+ }
12327
+ },
12328
+ destroyUrl(type) {
12329
+ if (!this.cameraObj[type]) return;
12330
+ for (let i = 0; i < this.cameraObj[type].allUrl.length; i++) {
12331
+ if (this.cameraObj[type].allUrl[i]) {
12332
+ this.cameraObj[type].allUrl[i].close();
12333
+ }
12334
+ delete this.cameraObj[type].allUrl[i];
12335
+ }
12336
+ if (this.cameraObj[type].allUrl.length > 100) {
12337
+ this.cameraObj[type].allUrl = [];
12338
+ }
12339
+ },
12340
+ destroyCanvas(type) {
12341
+ if (!this.cameraObj[type]) return;
12342
+ for (let key in this.cameraObj[type]) {
12343
+ if (typeof this.cameraObj[type][key] == 'object') {
12344
+ this.cameraObj[type][key] = '';
12345
+ }
12346
+ delete this.cameraObj[type][key];
12347
+ }
12348
+ },
12349
+ // 所有摄像头横向照片
12350
+ allPhoto() {
12351
+ this.answerPhoto.isPhoto = true;
12352
+ let startTime = new Date().getTime();
12353
+ return new Promise(resolve => {
12354
+ setTimeout(() => {
12355
+ resolve(this.answerPhoto.canvas.toDataURL('image/jpeg'));
12356
+ let endTime = new Date().getTime();
12357
+ let second = (endTime - startTime) / 1000;
12358
+ this.cameraObj.main.totalFPS = this.cameraObj.main.totalFPS + ~~(second * 30);
12359
+ this.cameraObj.sub.totalFPS = this.cameraObj.sub.totalFPS + ~~(second * 30);
12360
+ this.cameraObj.side.totalFPS = this.cameraObj.side.totalFPS + ~~(second * 30);
12361
+ this.answerPhoto.isPhoto = false;
12362
+ }, 200);
12363
+ });
12364
+ },
12365
+ // 单个摄像头照片
12366
+ selectPhoto(num) {
12367
+ let type = this.cameraType[num - 1].value;
12368
+ this.videoObj.videoMergeSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
12369
+ return this.videoObj.videoMergeSrc;
12370
+ }
12371
+ },
12372
+ beforeDestroy() {
12373
+ this.answerPhoto.canvas = null;
12374
+ this.answerPhoto.ctx = null;
12375
+ this.destroyWorker();
12376
+ }
12377
+ });
12378
+ ;// ./packages/components/xjzhBitmapCanvas.vue?vue&type=script&lang=js
12379
+ /* harmony default export */ var components_xjzhBitmapCanvasvue_type_script_lang_js = (xjzhBitmapCanvasvue_type_script_lang_js);
12380
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=style&index=0&id=01c7d3f4&prod&lang=scss&scoped=true
12381
+ var xjzhBitmapCanvasvue_type_style_index_0_id_01c7d3f4_prod_lang_scss_scoped_true = __webpack_require__(2048);
12382
+ ;// ./packages/components/xjzhBitmapCanvas.vue?vue&type=style&index=0&id=01c7d3f4&prod&lang=scss&scoped=true
12383
+
12384
+ ;// ./packages/components/xjzhBitmapCanvas.vue
12385
+
12386
+
12387
+
12388
+ ;
12389
+
12390
+
12391
+ /* normalize component */
12392
+
12393
+ var xjzhBitmapCanvas_component = normalizeComponent(
12394
+ components_xjzhBitmapCanvasvue_type_script_lang_js,
12395
+ xjzhBitmapCanvasvue_type_template_id_01c7d3f4_scoped_true_render,
12396
+ xjzhBitmapCanvasvue_type_template_id_01c7d3f4_scoped_true_staticRenderFns,
12397
+ false,
12398
+ null,
12399
+ "01c7d3f4",
12400
+ null
12401
+
12402
+ )
12403
+
12404
+ /* harmony default export */ var xjzhBitmapCanvas = (xjzhBitmapCanvas_component.exports);
12405
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhVideoList.vue?vue&type=template&id=098960cc&scoped=true
12406
+ var xjzhVideoListvue_type_template_id_098960cc_scoped_true_render = function render() {
12015
12407
  var _vm = this,
12016
12408
  _c = _vm._self._c;
12017
12409
  return _c('div', {
@@ -12041,7 +12433,7 @@ var xjzhVideoListvue_type_template_id_02fd09c1_scoped_true_render = function ren
12041
12433
  })]);
12042
12434
  }), 0);
12043
12435
  };
12044
- var xjzhVideoListvue_type_template_id_02fd09c1_scoped_true_staticRenderFns = [];
12436
+ var xjzhVideoListvue_type_template_id_098960cc_scoped_true_staticRenderFns = [];
12045
12437
 
12046
12438
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
12047
12439
  var es_array_push = __webpack_require__(4114);
@@ -75098,7 +75490,7 @@ var video_js = __webpack_require__(3479);
75098
75490
  },
75099
75491
  loop: {
75100
75492
  type: Boolean,
75101
- default: false
75493
+ default: true
75102
75494
  },
75103
75495
  isFullscreen: {
75104
75496
  type: Boolean,
@@ -75120,6 +75512,7 @@ var video_js = __webpack_require__(3479);
75120
75512
  // 深度监听,可监听到对象、数组的变化
75121
75513
  handler() {
75122
75514
  this.$nextTick(() => {
75515
+ this.clearPlay();
75123
75516
  this.videoList.forEach((item, index) => {
75124
75517
  let id = `video${index}`;
75125
75518
  if (!this.ids.includes(id)) {
@@ -75262,6 +75655,10 @@ var video_js = __webpack_require__(3479);
75262
75655
  if (this.playerList.length > 0) {
75263
75656
  for (let i = 0; i < this.playerList.length; i++) {
75264
75657
  this.playerList[i].pause();
75658
+ this.playerList[i].off('play');
75659
+ this.playerList[i].off('pause');
75660
+ this.playerList[i].off('ratechange');
75661
+ this.playerList[i].off('seeking');
75265
75662
  this.playerList[i].dispose();
75266
75663
  this.playerList[i] = null;
75267
75664
  }
@@ -75275,9 +75672,9 @@ var video_js = __webpack_require__(3479);
75275
75672
  });
75276
75673
  ;// ./packages/components/xjzhVideoList.vue?vue&type=script&lang=js
75277
75674
  /* harmony default export */ var components_xjzhVideoListvue_type_script_lang_js = (xjzhVideoListvue_type_script_lang_js);
75278
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=02fd09c1&prod&lang=scss&scoped=true
75279
- var xjzhVideoListvue_type_style_index_0_id_02fd09c1_prod_lang_scss_scoped_true = __webpack_require__(6201);
75280
- ;// ./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=02fd09c1&prod&lang=scss&scoped=true
75675
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=098960cc&prod&lang=scss&scoped=true
75676
+ var xjzhVideoListvue_type_style_index_0_id_098960cc_prod_lang_scss_scoped_true = __webpack_require__(6774);
75677
+ ;// ./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=098960cc&prod&lang=scss&scoped=true
75281
75678
 
75282
75679
  ;// ./packages/components/xjzhVideoList.vue
75283
75680
 
@@ -75290,140 +75687,239 @@ var xjzhVideoListvue_type_style_index_0_id_02fd09c1_prod_lang_scss_scoped_true =
75290
75687
 
75291
75688
  var xjzhVideoList_component = normalizeComponent(
75292
75689
  components_xjzhVideoListvue_type_script_lang_js,
75293
- xjzhVideoListvue_type_template_id_02fd09c1_scoped_true_render,
75294
- xjzhVideoListvue_type_template_id_02fd09c1_scoped_true_staticRenderFns,
75690
+ xjzhVideoListvue_type_template_id_098960cc_scoped_true_render,
75691
+ xjzhVideoListvue_type_template_id_098960cc_scoped_true_staticRenderFns,
75295
75692
  false,
75296
75693
  null,
75297
- "02fd09c1",
75694
+ "098960cc",
75298
75695
  null
75299
75696
 
75300
75697
  )
75301
75698
 
75302
75699
  /* harmony default export */ var xjzhVideoList = (xjzhVideoList_component.exports);
75303
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=template&id=9125dc2c&scoped=true
75304
- var xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_render = function render() {
75700
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=template&id=5d178756&scoped=true
75701
+ var xjzhSetCanvasvue_type_template_id_5d178756_scoped_true_render = function render() {
75305
75702
  var _vm = this,
75306
75703
  _c = _vm._self._c;
75307
75704
  return _c('div', {
75308
- staticClass: "xjzh-bitmap-canvas"
75309
- }, _vm._l(_vm.cameraObj, function (item, index) {
75705
+ staticClass: "xjzh-set-canvas"
75706
+ }, _vm._l(_vm.cameraArr, function (item, index) {
75310
75707
  return _c('div', {
75708
+ directives: [{
75709
+ name: "show",
75710
+ rawName: "v-show",
75711
+ value: item.isShow,
75712
+ expression: "item.isShow"
75713
+ }],
75311
75714
  key: index,
75312
- class: ['itemBox', item.isFullScreen ? 'full-screen' : ''],
75313
- style: {
75314
- 'width': _vm.width,
75315
- 'height': _vm.height
75715
+ staticClass: "video-item",
75716
+ class: [item.isFullScreen ? ' full-screen' : '']
75717
+ }, [_c('div', {
75718
+ staticClass: "item-head"
75719
+ }, [_c('span', [_vm._v(_vm._s(item.name))]), _c('el-select', {
75720
+ directives: [{
75721
+ name: "show",
75722
+ rawName: "v-show",
75723
+ value: _vm.initPosition.length > 0,
75724
+ expression: "initPosition.length > 0"
75725
+ }],
75726
+ staticClass: "item-select",
75727
+ attrs: {
75728
+ "placeholder": "请选择设备",
75729
+ "disabled": item.isFullScreen
75730
+ },
75731
+ on: {
75732
+ "change": function ($event) {
75733
+ return _vm.handleSelect(index);
75734
+ }
75735
+ },
75736
+ model: {
75737
+ value: item.selectVal,
75738
+ callback: function ($$v) {
75739
+ _vm.$set(item, "selectVal", $$v);
75740
+ },
75741
+ expression: "item.selectVal"
75742
+ }
75743
+ }, _vm._l(_vm.videoList, function (it) {
75744
+ return _c('el-option', {
75745
+ key: it.value,
75746
+ attrs: {
75747
+ "label": it.label,
75748
+ "disabled": item.disabled,
75749
+ "value": it.value
75750
+ }
75751
+ });
75752
+ }), 1)], 1), _c('canvas', {
75753
+ attrs: {
75754
+ "id": item.domeId
75316
75755
  },
75317
75756
  on: {
75318
75757
  "click": function ($event) {
75319
75758
  return _vm.handleScreen(index);
75320
75759
  }
75321
75760
  }
75322
- }, [_c('p', {
75323
- directives: [{
75324
- name: "show",
75325
- rawName: "v-show",
75326
- value: _vm.showTitle,
75327
- expression: "showTitle"
75328
- }],
75329
- staticClass: "item-title"
75330
- }, [_vm._v(_vm._s(item.title))]), _c('canvas', {
75331
- ref: item.domeId,
75332
- refInFor: true
75333
- })]);
75761
+ }), _c('div', {
75762
+ class: ['set-screen', item.isFullScreen ? 'set-full-screen' : ''],
75763
+ on: {
75764
+ "click": function ($event) {
75765
+ return _vm.handleScreen(index);
75766
+ }
75767
+ }
75768
+ }, [_c('img', {
75769
+ attrs: {
75770
+ "src": item.isFullScreen ? _vm.screen : _vm.fullScreen,
75771
+ "alt": ""
75772
+ }
75773
+ })])]);
75334
75774
  }), 0);
75335
75775
  };
75336
- var xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_staticRenderFns = [];
75776
+ var xjzhSetCanvasvue_type_template_id_5d178756_scoped_true_staticRenderFns = [];
75337
75777
 
75338
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=script&lang=js
75778
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=script&lang=js
75339
75779
 
75340
- /* harmony default export */ var xjzhBitmapCanvasvue_type_script_lang_js = ({
75341
- name: "XjzhBitmapCanvas",
75780
+
75781
+
75782
+
75783
+
75784
+
75785
+
75786
+
75787
+
75788
+ /* harmony default export */ var xjzhSetCanvasvue_type_script_lang_js = ({
75789
+ name: 'XjzhSetCanvas',
75342
75790
  props: {
75343
75791
  videoUrl: {
75344
75792
  type: String,
75345
75793
  default: 'localhost:56000'
75346
75794
  },
75347
- width: {
75348
- type: String,
75349
- default: '480px'
75350
- },
75351
- height: {
75352
- type: String,
75353
- default: '270px'
75354
- },
75355
- showTitle: {
75356
- type: Boolean,
75357
- default: true
75358
- },
75359
75795
  isSwitchSide: {
75360
75796
  type: Boolean,
75361
75797
  default: false
75362
75798
  },
75799
+ storeCameraInfo: {
75800
+ type: Object,
75801
+ default: () => {
75802
+ return {
75803
+ cameras: 3,
75804
+ // 摄像头数量(不包含人脸摄像头) 2-斜、俯 | 3-斜、俯、侧、
75805
+ enableFace: 1 // 是否启动人脸 0-未启用 | 1-启动
75806
+ };
75807
+ }
75808
+ },
75809
+ // 每秒帧数
75810
+ framesPerSecond: {
75811
+ type: Number,
75812
+ default: 30
75813
+ },
75814
+ // 一秒渲染多少帧
75815
+ frameRate: {
75816
+ type: Number,
75817
+ default: 30
75818
+ },
75363
75819
  canvasSize: {
75364
75820
  type: Array,
75365
75821
  default: () => {
75366
75822
  return [1920, 1080];
75367
75823
  }
75368
- }
75369
- },
75370
- watch: {
75371
- isSwitchSide: {
75372
- handler() {
75373
- if (this.cameraType[2]) {
75374
- this.cameraType[2].label = this.isSwitchSide ? '显' : '侧';
75375
- }
75824
+ },
75825
+ initPosition: {
75826
+ type: Array,
75827
+ default: () => {
75828
+ return [0, 1, 2, 3];
75376
75829
  }
75377
75830
  }
75378
75831
  },
75379
75832
  data() {
75380
75833
  return {
75834
+ ip: '',
75381
75835
  cameraNum: 0,
75836
+ cameraArr: [],
75382
75837
  cameraType: [{
75383
- label: '',
75838
+ label: '斜视摄像头',
75384
75839
  value: 'main'
75385
75840
  }, {
75386
- label: '',
75841
+ label: '俯视摄像头',
75387
75842
  value: 'sub'
75388
75843
  }, {
75389
- label: '',
75844
+ label: '侧视摄像头',
75390
75845
  value: 'side'
75846
+ }, {
75847
+ label: '人脸识别摄像头',
75848
+ value: 'face'
75849
+ }],
75850
+ initVideoList: [{
75851
+ value: '0',
75852
+ label: '摄像头设备1',
75853
+ disabled: false
75854
+ }, {
75855
+ value: '1',
75856
+ label: '摄像头设备2',
75857
+ disabled: false
75858
+ }, {
75859
+ value: '2',
75860
+ label: '摄像头设备3',
75861
+ disabled: false
75862
+ }, {
75863
+ value: '3',
75864
+ label: '摄像头设备4',
75865
+ disabled: false
75391
75866
  }],
75867
+ position: [],
75868
+ isSwicth: false,
75392
75869
  currentFullScreen: '',
75393
- answerPhoto: {
75394
- canvas: null,
75395
- ctx: null,
75396
- isPhoto: false,
75397
- canvasSize: [1920, 1080]
75398
- },
75399
- cameraObj: null,
75400
- worker: null
75870
+ videoList: [],
75871
+ worker: null,
75872
+ faceWorker: null,
75873
+ isEnable: false,
75874
+ fullScreen: __webpack_require__(8382),
75875
+ screen: __webpack_require__(3102)
75401
75876
  };
75402
75877
  },
75403
75878
  created() {
75404
- this.destroyWorker();
75879
+ this.createdCamera();
75405
75880
  },
75406
75881
  mounted() {
75882
+ this.getCameraConfig();
75407
75883
  this.$nextTick(() => {
75408
75884
  this.initWorker();
75885
+ if (this.storeCameraInfo.enableFace == 1) {
75886
+ this.initWorkerFace();
75887
+ }
75409
75888
  });
75889
+ this.isSwicth = false;
75410
75890
  },
75411
75891
  methods: {
75412
- initAnswerPhoto() {
75413
- this.answerPhoto.canvas = document.createElement('canvas');
75414
- this.answerPhoto.ctx = this.answerPhoto.canvas.getContext('2d');
75415
- this.answerPhoto.canvas.width = this.canvasSize[0] * this.cameraNum;
75416
- this.answerPhoto.canvas.height = this.canvasSize[1];
75892
+ // 获取摄像头下拉
75893
+ getCameraConfig() {
75894
+ this.position = [];
75895
+ this.position = this.initPosition ? JSON.parse(JSON.stringify(this.initPosition)) : [];
75896
+ this.$nextTick(() => {
75897
+ for (let i = 0; i < this.position.length; i++) {
75898
+ this.cameraArr[i].selectVal = String(this.position[i]);
75899
+ }
75900
+ });
75417
75901
  },
75418
- initCanvas() {
75419
- for (let i = 0; i < this.cameraNum; i++) {
75420
- let type = this.cameraType[i].value;
75421
- this.cameraObj[type].canvas = this.$refs[this.cameraObj[type].domeId][0];
75422
- this.cameraObj[type].ctx = this.cameraObj[type].canvas.getContext('2d');
75423
- this.cameraObj[type].canvas.width = this.canvasSize[0];
75424
- this.cameraObj[type].canvas.height = this.canvasSize[1];
75902
+ // 初始化摄像头数据
75903
+ createdCamera() {
75904
+ this.cameraArr = [];
75905
+ for (let i = 0; i < this.cameraType.length; i++) {
75906
+ this.cameraArr.push({
75907
+ selectVal: '',
75908
+ type: this.cameraType[i].value,
75909
+ name: this.cameraType[i].label,
75910
+ domeId: `${this.cameraType[i].value}Canvas`,
75911
+ canvas: null,
75912
+ ctx: null,
75913
+ allUrl: [],
75914
+ totalFPS: 0,
75915
+ imgBox: new Image(),
75916
+ isLoading: false,
75917
+ isFullScreen: false,
75918
+ isShow: true
75919
+ });
75425
75920
  }
75426
75921
  },
75922
+ // 斜,俯,侧摄像头socket
75427
75923
  initWorker() {
75428
75924
  this.worker = initWorker();
75429
75925
  if (!this.videoUrl) return;
@@ -75442,48 +75938,47 @@ var xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_staticRenderFns =
75442
75938
  if (type === 'message') {
75443
75939
  if (typeof data === 'number') {
75444
75940
  this.cameraNum = data;
75445
- for (let i = 0; i < this.cameraNum; i++) {
75446
- let typeVal = this.cameraType[i].value;
75447
- this.cameraObj[typeVal] = {
75448
- domeId: `canvas_${typeVal}`,
75449
- title: this.cameraType[i].label,
75450
- // 摄像头名称
75451
- canvas: null,
75452
- ctx: null,
75453
- totalFPS: 0,
75454
- // 单个摄像头 - 收到总帧数
75455
- showTotalFPS: 0,
75456
- // 单个摄像头 - 渲染总帧数
75457
- frameSkip: 0,
75458
- // 单个摄像头 - 跳帧 1(30),2(15),3(10)
75459
-
75460
- allUrl: [],
75461
- // 所有图片地址
75462
- isLoading: false,
75463
- // 图片是否加载完
75464
- isFullScreen: false // 画面是否全屏
75465
- };
75941
+ if (this.videoList.length === 0) {
75942
+ for (let i = 0; i < this.cameraNum; i++) {
75943
+ if (this.storeCameraInfo.cameras < i + 1) {
75944
+ this.initVideoList[i].disabled = true;
75945
+ }
75946
+ this.videoList.push(this.initVideoList[i]);
75947
+ }
75466
75948
  }
75467
- this.$forceUpdate();
75468
75949
  // 根据摄像头数量,初始化画布
75469
75950
  this.$nextTick(() => {
75470
- this.initAnswerPhoto();
75471
75951
  this.initCanvas();
75472
75952
  });
75473
75953
  return;
75474
75954
  }
75475
75955
  // 摄像头画面渲染
75476
75956
  count++;
75477
- if (count == 1) {
75478
- this.showCanvas('main', data);
75479
- }
75480
- if (count == 2) {
75481
- this.showCanvas('sub', data);
75482
- }
75483
- if (count == 3) {
75484
- this.showCanvas('side', data);
75957
+ if (this.isSwicth) {
75958
+ if (count == this.initPosition.indexOf(this.position[0]) + 1) {
75959
+ this.showCanvas(0, data);
75960
+ }
75961
+ if (count == this.initPosition.indexOf(this.position[1]) + 1) {
75962
+ this.showCanvas(1, data);
75963
+ }
75964
+ if (count == this.initPosition.indexOf(this.position[2]) + 1) {
75965
+ this.showCanvas(2, data);
75966
+ }
75967
+ if (count == this.initPosition.indexOf(this.position[3]) + 1) {
75968
+ this.showCanvas(3, data);
75969
+ }
75970
+ } else {
75971
+ if (count == 1) {
75972
+ this.showCanvas(0, data);
75973
+ }
75974
+ if (count == 2) {
75975
+ this.showCanvas(1, data);
75976
+ }
75977
+ if (count == 3) {
75978
+ this.showCanvas(2, data);
75979
+ }
75485
75980
  }
75486
- // this.showCanvas(this.cameraType[count - 1].value, data)
75981
+ // this.showCanvas(count - 1, data)
75487
75982
  count = count >= this.cameraNum ? 0 : count;
75488
75983
  }
75489
75984
  if (type === 'close') {
@@ -75499,120 +75994,182 @@ var xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_staticRenderFns =
75499
75994
  url
75500
75995
  });
75501
75996
  },
75502
- // 销毁摄像头,worker
75503
- destroyWorker() {
75504
- if (this.worker) {
75505
- this.worker.terminate();
75506
- this.worker = null;
75507
- }
75508
- this.destroyCanvasData();
75509
- },
75510
- showCanvas(type, blob) {
75511
- this.cameraObj[type].totalFPS++;
75512
- if (!this.cameraObj[type] || !this.cameraObj[type].ctx) {
75513
- return;
75514
- }
75515
- if (this.currentFullScreen && this.currentFullScreen !== type) {
75516
- this.destroyUrl(type);
75517
- return;
75518
- }
75519
- if (this.cameraObj[type].isLoading) return;
75520
- this.cameraObj[type].isLoading = true;
75521
- createImageBitmap(blob, {
75522
- imageSmoothingQuality: 'low'
75523
- }).then(res => {
75524
- this.cameraObj[type].allUrl.unshift(res);
75525
- this.cameraObj[type].isLoading = false;
75526
- });
75527
- // this.cameraObj[type].allUrl.unshift(URL.createObjectURL(blob))
75528
-
75529
- if (this.cameraObj[type].ctx && this.cameraObj[type].ctx.drawImage && this.cameraObj[type].allUrl[0]) {
75530
- this.cameraObj[type].ctx.drawImage(this.cameraObj[type].allUrl[0], 0, 0, this.canvasSize[0], this.canvasSize[1]);
75531
- }
75532
- if (this.answerPhoto.isPhoto && this.cameraObj[type].allUrl[0]) {
75533
- // 拍照使用
75534
- if (this.cameraNum > 0) {
75535
- this.answerPhoto.ctx.drawImage(this.cameraObj.main.allUrl[0], this.answerPhoto.canvasSize[0] * 0, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
75997
+ // 人脸摄像头socket
75998
+ initWorkerFace() {
75999
+ this.faceWorker = initWorker();
76000
+ if (!this.videoUrl) return;
76001
+ const url = `ws://${this.videoUrl}/face`;
76002
+ this.faceWorker.onmessage = event => {
76003
+ const {
76004
+ type,
76005
+ data,
76006
+ event: wsEvent,
76007
+ error
76008
+ } = event.data;
76009
+ if (type === 'open') {
76010
+ console.log('WebSocket open:');
75536
76011
  }
75537
- if (this.cameraNum > 1) {
75538
- this.answerPhoto.ctx.drawImage(this.cameraObj.sub.allUrl[0], this.answerPhoto.canvasSize[0] * 1, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
76012
+ if (type === 'message') {
76013
+ // 摄像头数据及摄像头画面数据读取
76014
+ if (typeof data === 'number') {
76015
+ // data 0 隐藏人脸, 1显示人脸
76016
+ if (data == 0) {
76017
+ this.isEnable = false;
76018
+ return;
76019
+ }
76020
+ if (!this.faceTimer) {
76021
+ this.clearFaceTimer();
76022
+ this.faceTimer = setTimeout(() => {
76023
+ if (this.videoList.length == 0) {
76024
+ this.initVideoList[this.cameraNum].disabled = !this.isEnable;
76025
+ this.videoList = [this.initVideoList[this.cameraNum]];
76026
+ } else if (this.videoList.length !== this.cameraNum + 1 && this.cameraNum > 0) {
76027
+ this.initVideoList[this.cameraNum].disabled = !this.isEnable;
76028
+ this.videoList = [...this.videoList, this.initVideoList[this.cameraNum]];
76029
+ }
76030
+ }, 100);
76031
+ }
76032
+ return;
76033
+ }
76034
+ if (this.isSwicth && this.initPosition.indexOf(this.position[3]) < 4) {
76035
+ if (this.initPosition.indexOf(this.position[0]) == 3) {
76036
+ this.showCanvas(0, data);
76037
+ }
76038
+ if (this.initPosition.indexOf(this.position[1]) == 3) {
76039
+ this.showCanvas(1, data);
76040
+ }
76041
+ if (this.initPosition.indexOf(this.position[2]) == 3) {
76042
+ this.showCanvas(2, data);
76043
+ }
76044
+ if (this.initPosition.indexOf(this.position[3]) == 3) {
76045
+ this.showCanvas(3, data);
76046
+ }
76047
+ } else {
76048
+ this.showCanvas(3, data);
76049
+ }
75539
76050
  }
75540
- if (this.cameraNum > 2) {
75541
- this.answerPhoto.ctx.drawImage(this.cameraObj.side.allUrl[0], this.answerPhoto.canvasSize[0] * 2, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
76051
+ if (type === 'close') {
76052
+ console.log('WebSocket closed:', wsEvent);
75542
76053
  }
76054
+ if (type === 'error') {
76055
+ console.log(`WebSocket error: ${error.message}`);
76056
+ }
76057
+ };
76058
+ this.faceWorker.onerror = error => {
76059
+ console.log(`Worker error: ${error.message}`);
76060
+ };
76061
+ this.faceWorker.postMessage({
76062
+ url
76063
+ });
76064
+ },
76065
+ clearFaceTimer() {
76066
+ if (this.faceTimer) {
76067
+ clearTimeout(this.faceTimer);
76068
+ this.faceTimer = null;
76069
+ }
76070
+ },
76071
+ // 初始化canvas数据
76072
+ initCanvas() {
76073
+ for (let i = 0; i < this.cameraType.length; i++) {
76074
+ this.cameraArr[i].canvas = document.getElementById(this.cameraArr[i].domeId);
76075
+ this.cameraArr[i].ctx = this.cameraArr[i].canvas.getContext('2d');
76076
+ this.cameraArr[i].canvas.width = this.canvasSize[0];
76077
+ this.cameraArr[i].canvas.height = this.canvasSize[1];
76078
+ this.cameraArr[i].imgBox = new Image();
76079
+ }
76080
+ },
76081
+ // 渲染摄像头画面
76082
+ showCanvas(i, blob) {
76083
+ this.cameraArr[i].totalFPS++;
76084
+ if (!this.cameraArr[i] || !this.cameraArr[i].imgBox || !this.cameraArr[i].ctx) return; // 跳过没有canvas对象画面
76085
+ if (this.cameraArr[i].totalFPS % (this.framesPerSecond / this.frameRate).toFixed(1) !== 0) return; // 跳帧处理
76086
+ if (this.currentFullScreen && this.currentFullScreen !== i) {
76087
+ // 全屏 其他画面不做处理
76088
+ this.destroyUrl(i);
75543
76089
  return;
75544
76090
  }
75545
- this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
76091
+ if (this.cameraArr[i].isLoading) return;
76092
+ this.cameraArr[i].isLoading = true;
76093
+ this.cameraArr[i].allUrl.unshift(URL.createObjectURL(blob));
76094
+ this.cameraArr[i].imgBox.src = this.cameraArr[i].allUrl[0];
76095
+ this.cameraArr[i].imgBox.onload = () => {
76096
+ if (!this.cameraArr[i].ctx) return;
76097
+ this.cameraArr[i].ctx.drawImage(this.cameraArr[i].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
76098
+ this.cameraArr[i].isLoading = false;
76099
+ // 清除内存
76100
+ this.cameraArr[i].imgBox.src = '';
76101
+ this.destroyUrl(i, this.cameraArr[i].maxUrlNum);
76102
+ };
76103
+ this.cameraArr[i].imgBox.onerror = () => {
76104
+ this.cameraArr[i].isLoading = false;
76105
+ if (!this.cameraArr[i] || !this.cameraArr[i].imgBox) return;
76106
+ this.cameraArr[i].imgBox.src = '';
76107
+ this.destroyUrl(i, this.cameraArr[i].maxUrlNum);
76108
+ };
75546
76109
  },
75547
- handleScreen(type) {
75548
- this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
75549
- this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
76110
+ // 切换摄像头画面
76111
+ handleSelect(i) {
76112
+ this.isSwicth = true;
76113
+ this.currentType = this.cameraArr[i].selectVal;
76114
+ this.position[i] = Number(this.cameraArr[i].selectVal);
76115
+ },
76116
+ // 全屏视频画面
76117
+ handleScreen(index) {
76118
+ this.cameraArr[index].isFullScreen = !this.cameraArr[index].isFullScreen;
76119
+ this.currentFullScreen = this.cameraArr[index].isFullScreen ? index : '';
75550
76120
  this.$forceUpdate();
75551
76121
  },
75552
- destroyCanvasData() {
75553
- for (let i = 0; i < this.cameraNum; i++) {
75554
- let type = this.cameraType[i].value;
75555
- this.destroyUrl(type);
75556
- this.destroyCanvas(type);
75557
- }
76122
+ // 侧视,显微镜画面切换
76123
+ switchVideo() {
76124
+ if (!this.cameraArr[3]) return;
76125
+ let plugOut = JSON.parse(localStorage.getItem('plugOut'));
76126
+ this.cameraArr[3].title = plugOut == 0 ? '显微镜画面' : '侧视画面';
75558
76127
  },
75559
- destroyUrl(type) {
75560
- if (!this.cameraObj[type]) return;
75561
- for (let i = 0; i < this.cameraObj[type].allUrl.length; i++) {
75562
- if (this.cameraObj[type].allUrl[i]) {
75563
- this.cameraObj[type].allUrl[i].close();
75564
- }
75565
- delete this.cameraObj[type].allUrl[i];
76128
+ // 销毁摄像头,worker
76129
+ destroyWorker() {
76130
+ if (this.worker) {
76131
+ this.worker.terminate();
76132
+ this.worker = null;
75566
76133
  }
75567
- if (this.cameraObj[type].allUrl.length > 100) {
75568
- this.cameraObj[type].allUrl = [];
76134
+ if (this.faceWorker) {
76135
+ this.faceWorker.terminate();
76136
+ this.faceWorker = null;
75569
76137
  }
75570
- },
75571
- destroyCanvas(type) {
75572
- if (!this.cameraObj[type]) return;
75573
- for (let key in this.cameraObj[type]) {
75574
- if (typeof this.cameraObj[type][key] == 'object') {
75575
- this.cameraObj[type][key] = '';
76138
+ this.$nextTick(() => {
76139
+ for (let i = 0; i < this.cameraArr.length; i++) {
76140
+ this.destroyUrl(i);
76141
+ this.destroyCanvas(i);
75576
76142
  }
75577
- delete this.cameraObj[type][key];
75578
- }
75579
- },
75580
- // 所有摄像头横向照片
75581
- allPhoto() {
75582
- this.answerPhoto.isPhoto = true;
75583
- let startTime = new Date().getTime();
75584
- return new Promise(resolve => {
75585
- setTimeout(() => {
75586
- resolve(this.answerPhoto.canvas.toDataURL('image/jpeg'));
75587
- let endTime = new Date().getTime();
75588
- let second = (endTime - startTime) / 1000;
75589
- this.cameraObj.main.totalFPS = this.cameraObj.main.totalFPS + ~~(second * 30);
75590
- this.cameraObj.sub.totalFPS = this.cameraObj.sub.totalFPS + ~~(second * 30);
75591
- this.cameraObj.side.totalFPS = this.cameraObj.side.totalFPS + ~~(second * 30);
75592
- this.answerPhoto.isPhoto = false;
75593
- }, 200);
75594
76143
  });
75595
76144
  },
75596
- // 单个摄像头照片
75597
- selectPhoto(num) {
75598
- let type = this.cameraType[num - 1].value;
75599
- this.videoObj.videoMergeSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
75600
- return this.videoObj.videoMergeSrc;
76145
+ destroyUrl(index) {
76146
+ for (let i = 0; i < this.cameraArr[index].allUrl.length; i++) {
76147
+ URL.revokeObjectURL(this.cameraArr[index].allUrl[i]);
76148
+ delete this.cameraArr[index].allUrl[i];
76149
+ }
76150
+ this.cameraArr[index].allUrl = [];
76151
+ },
76152
+ destroyCanvas(index) {
76153
+ if (!this.cameraArr[index]) return;
76154
+ for (let key in this.cameraArr[index]) {
76155
+ if (typeof this.cameraArr[index][key] == 'object') {
76156
+ this.cameraArr[index][key] = '';
76157
+ }
76158
+ delete this.cameraArr[index][key];
76159
+ }
75601
76160
  }
75602
76161
  },
75603
76162
  beforeDestroy() {
75604
- this.answerPhoto.canvas = null;
75605
- this.answerPhoto.ctx = null;
75606
76163
  this.destroyWorker();
75607
76164
  }
75608
76165
  });
75609
- ;// ./packages/components/xjzhBitmapCanvas.vue?vue&type=script&lang=js
75610
- /* harmony default export */ var components_xjzhBitmapCanvasvue_type_script_lang_js = (xjzhBitmapCanvasvue_type_script_lang_js);
75611
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhBitmapCanvas.vue?vue&type=style&index=0&id=9125dc2c&prod&lang=scss&scoped=true
75612
- var xjzhBitmapCanvasvue_type_style_index_0_id_9125dc2c_prod_lang_scss_scoped_true = __webpack_require__(8511);
75613
- ;// ./packages/components/xjzhBitmapCanvas.vue?vue&type=style&index=0&id=9125dc2c&prod&lang=scss&scoped=true
76166
+ ;// ./packages/components/xjzhSetCanvas.vue?vue&type=script&lang=js
76167
+ /* harmony default export */ var components_xjzhSetCanvasvue_type_script_lang_js = (xjzhSetCanvasvue_type_script_lang_js);
76168
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=style&index=0&id=5d178756&prod&lang=scss&scoped=true
76169
+ var xjzhSetCanvasvue_type_style_index_0_id_5d178756_prod_lang_scss_scoped_true = __webpack_require__(5960);
76170
+ ;// ./packages/components/xjzhSetCanvas.vue?vue&type=style&index=0&id=5d178756&prod&lang=scss&scoped=true
75614
76171
 
75615
- ;// ./packages/components/xjzhBitmapCanvas.vue
76172
+ ;// ./packages/components/xjzhSetCanvas.vue
75616
76173
 
75617
76174
 
75618
76175
 
@@ -75621,20 +76178,20 @@ var xjzhBitmapCanvasvue_type_style_index_0_id_9125dc2c_prod_lang_scss_scoped_tru
75621
76178
 
75622
76179
  /* normalize component */
75623
76180
 
75624
- var xjzhBitmapCanvas_component = normalizeComponent(
75625
- components_xjzhBitmapCanvasvue_type_script_lang_js,
75626
- xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_render,
75627
- xjzhBitmapCanvasvue_type_template_id_9125dc2c_scoped_true_staticRenderFns,
76181
+ var xjzhSetCanvas_component = normalizeComponent(
76182
+ components_xjzhSetCanvasvue_type_script_lang_js,
76183
+ xjzhSetCanvasvue_type_template_id_5d178756_scoped_true_render,
76184
+ xjzhSetCanvasvue_type_template_id_5d178756_scoped_true_staticRenderFns,
75628
76185
  false,
75629
76186
  null,
75630
- "9125dc2c",
76187
+ "5d178756",
75631
76188
  null
75632
76189
 
75633
76190
  )
75634
76191
 
75635
- /* harmony default export */ var xjzhBitmapCanvas = (xjzhBitmapCanvas_component.exports);
75636
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=template&id=19dc6be0&scoped=true
75637
- var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_render = function render() {
76192
+ /* harmony default export */ var xjzhSetCanvas = (xjzhSetCanvas_component.exports);
76193
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetBitmapCanvas.vue?vue&type=template&id=8665cefa&scoped=true
76194
+ var xjzhSetBitmapCanvasvue_type_template_id_8665cefa_scoped_true_render = function render() {
75638
76195
  var _vm = this,
75639
76196
  _c = _vm._self._c;
75640
76197
  return _c('div', {
@@ -75709,19 +76266,13 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_render = function ren
75709
76266
  })])]);
75710
76267
  }), 0);
75711
76268
  };
75712
- var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
75713
-
75714
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=script&lang=js
75715
-
75716
-
76269
+ var xjzhSetBitmapCanvasvue_type_template_id_8665cefa_scoped_true_staticRenderFns = [];
75717
76270
 
76271
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetBitmapCanvas.vue?vue&type=script&lang=js
75718
76272
 
75719
76273
 
75720
76274
 
75721
-
75722
-
75723
-
75724
- /* harmony default export */ var xjzhSetCanvasvue_type_script_lang_js = ({
76275
+ /* harmony default export */ var xjzhSetBitmapCanvasvue_type_script_lang_js = ({
75725
76276
  name: 'XjzhSetCanvas',
75726
76277
  props: {
75727
76278
  videoUrl: {
@@ -75738,14 +76289,20 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
75738
76289
  return {
75739
76290
  cameras: 3,
75740
76291
  // 摄像头数量(不包含人脸摄像头) 2-斜、俯 | 3-斜、俯、侧、
75741
- enableFace: 1,
75742
- // 是否启动人脸 0-未启用 | 1-启动
75743
- frameRate: 0,
75744
- // 视频画面帧数
75745
- socketCameras: 0
76292
+ enableFace: 1 // 是否启动人脸 0-未启用 | 1-启动
75746
76293
  };
75747
76294
  }
75748
76295
  },
76296
+ // 每秒帧数
76297
+ framesPerSecond: {
76298
+ type: Number,
76299
+ default: 30
76300
+ },
76301
+ // 一秒渲染多少帧
76302
+ frameRate: {
76303
+ type: Number,
76304
+ default: 30
76305
+ },
75749
76306
  canvasSize: {
75750
76307
  type: Array,
75751
76308
  default: () => {
@@ -75841,7 +76398,7 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
75841
76398
  canvas: null,
75842
76399
  ctx: null,
75843
76400
  allUrl: [],
75844
- imgBox: new Image(),
76401
+ totalFPS: 0,
75845
76402
  isLoading: false,
75846
76403
  isFullScreen: false,
75847
76404
  isShow: true
@@ -75851,6 +76408,7 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
75851
76408
  // 斜,俯,侧摄像头socket
75852
76409
  initWorker() {
75853
76410
  this.worker = initWorker();
76411
+ console.log('object :>> ', this.videoUrl);
75854
76412
  if (!this.videoUrl) return;
75855
76413
  const url = `ws://${this.videoUrl}/socket`;
75856
76414
  let count = 0;
@@ -76004,36 +76562,44 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
76004
76562
  this.cameraArr[i].ctx = this.cameraArr[i].canvas.getContext('2d');
76005
76563
  this.cameraArr[i].canvas.width = this.canvasSize[0];
76006
76564
  this.cameraArr[i].canvas.height = this.canvasSize[1];
76007
- this.cameraArr[i].imgBox = new Image();
76008
76565
  }
76009
76566
  },
76010
76567
  // 渲染摄像头画面
76011
76568
  showCanvas(i, blob) {
76012
- if (!this.cameraArr[i] || !this.cameraArr[i].imgBox || !this.cameraArr[i].ctx) {
76013
- return;
76014
- }
76569
+ this.cameraArr[i].totalFPS++;
76570
+ if (!this.cameraArr[i] || !this.cameraArr[i].ctx) return; // 跳过没有canvas对象画面
76571
+ if (this.cameraArr[i].totalFPS % (this.framesPerSecond / this.frameRate).toFixed(1) !== 0) return; // 跳帧处理
76015
76572
  if (this.currentFullScreen && this.currentFullScreen !== i) {
76573
+ // 全屏 其他画面不做处理
76016
76574
  this.destroyUrl(i);
76017
76575
  return;
76018
76576
  }
76019
- if (this.cameraArr[i].isLoading) return;
76020
- this.cameraArr[i].isLoading = true;
76021
- this.cameraArr[i].allUrl.unshift(URL.createObjectURL(blob));
76022
- this.cameraArr[i].imgBox.src = this.cameraArr[i].allUrl[0];
76023
- this.cameraArr[i].imgBox.onload = () => {
76024
- if (!this.cameraArr[i].ctx) return;
76025
- this.cameraArr[i].ctx.drawImage(this.cameraArr[i].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
76026
- this.cameraArr[i].isLoading = false;
76027
- // 清除内存
76028
- this.cameraArr[i].imgBox.src = '';
76029
- this.destroyUrl(i, this.cameraArr[i].maxUrlNum);
76030
- };
76031
- this.cameraArr[i].imgBox.onerror = () => {
76032
- this.cameraArr[i].isLoading = false;
76033
- if (!this.cameraArr[i] || !this.cameraArr[i].imgBox) return;
76034
- this.cameraArr[i].imgBox.src = '';
76035
- this.destroyUrl(i, this.cameraArr[i].maxUrlNum);
76036
- };
76577
+ if (!this.cameraArr[i].isLoading) {
76578
+ this.cameraArr[i].isLoading = true;
76579
+ createImageBitmap(blob, {
76580
+ imageSmoothingQuality: 'low'
76581
+ }).then(res => {
76582
+ if (this.cameraArr[i].allUrl) {
76583
+ this.cameraArr[i].allUrl.unshift(res);
76584
+ this.cameraArr[i].isLoading = false;
76585
+ }
76586
+ }).catch(err => {
76587
+ console.log('object :>> createImageBitmap', err);
76588
+ this.cameraArr[i].isLoading = false;
76589
+ });
76590
+ }
76591
+ if (this.cameraArr[i].allUrl[0]) {
76592
+ this.cameraArr[i].ctx.drawImage(this.cameraArr[i].allUrl[0], 0, 0, this.canvasSize[0], this.canvasSize[1]);
76593
+ }
76594
+ for (let j = 0; j < this.cameraArr[i].allUrl.length; j++) {
76595
+ if (this.cameraArr[i].allUrl[j]) {
76596
+ this.cameraArr[i].allUrl[j].close();
76597
+ }
76598
+ delete this.cameraArr[i].allUrl[j];
76599
+ }
76600
+ if (this.cameraArr[i].allUrl.length > 100) {
76601
+ this.cameraArr[i].allUrl = [];
76602
+ }
76037
76603
  },
76038
76604
  // 切换摄像头画面
76039
76605
  handleSelect(i) {
@@ -76072,7 +76638,9 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
76072
76638
  },
76073
76639
  destroyUrl(index) {
76074
76640
  for (let i = 0; i < this.cameraArr[index].allUrl.length; i++) {
76075
- URL.revokeObjectURL(this.cameraArr[index].allUrl[i]);
76641
+ if (this.cameraArr[index].allUrl[i]) {
76642
+ this.cameraArr[index].allUrl[i].close();
76643
+ }
76076
76644
  delete this.cameraArr[index].allUrl[i];
76077
76645
  }
76078
76646
  this.cameraArr[index].allUrl = [];
@@ -76091,13 +76659,13 @@ var xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns = [];
76091
76659
  this.destroyWorker();
76092
76660
  }
76093
76661
  });
76094
- ;// ./packages/components/xjzhSetCanvas.vue?vue&type=script&lang=js
76095
- /* harmony default export */ var components_xjzhSetCanvasvue_type_script_lang_js = (xjzhSetCanvasvue_type_script_lang_js);
76096
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetCanvas.vue?vue&type=style&index=0&id=19dc6be0&prod&lang=scss&scoped=true
76097
- var xjzhSetCanvasvue_type_style_index_0_id_19dc6be0_prod_lang_scss_scoped_true = __webpack_require__(9525);
76098
- ;// ./packages/components/xjzhSetCanvas.vue?vue&type=style&index=0&id=19dc6be0&prod&lang=scss&scoped=true
76662
+ ;// ./packages/components/xjzhSetBitmapCanvas.vue?vue&type=script&lang=js
76663
+ /* harmony default export */ var components_xjzhSetBitmapCanvasvue_type_script_lang_js = (xjzhSetBitmapCanvasvue_type_script_lang_js);
76664
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSetBitmapCanvas.vue?vue&type=style&index=0&id=8665cefa&prod&lang=scss&scoped=true
76665
+ var xjzhSetBitmapCanvasvue_type_style_index_0_id_8665cefa_prod_lang_scss_scoped_true = __webpack_require__(8448);
76666
+ ;// ./packages/components/xjzhSetBitmapCanvas.vue?vue&type=style&index=0&id=8665cefa&prod&lang=scss&scoped=true
76099
76667
 
76100
- ;// ./packages/components/xjzhSetCanvas.vue
76668
+ ;// ./packages/components/xjzhSetBitmapCanvas.vue
76101
76669
 
76102
76670
 
76103
76671
 
@@ -76106,18 +76674,18 @@ var xjzhSetCanvasvue_type_style_index_0_id_19dc6be0_prod_lang_scss_scoped_true =
76106
76674
 
76107
76675
  /* normalize component */
76108
76676
 
76109
- var xjzhSetCanvas_component = normalizeComponent(
76110
- components_xjzhSetCanvasvue_type_script_lang_js,
76111
- xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_render,
76112
- xjzhSetCanvasvue_type_template_id_19dc6be0_scoped_true_staticRenderFns,
76677
+ var xjzhSetBitmapCanvas_component = normalizeComponent(
76678
+ components_xjzhSetBitmapCanvasvue_type_script_lang_js,
76679
+ xjzhSetBitmapCanvasvue_type_template_id_8665cefa_scoped_true_render,
76680
+ xjzhSetBitmapCanvasvue_type_template_id_8665cefa_scoped_true_staticRenderFns,
76113
76681
  false,
76114
76682
  null,
76115
- "19dc6be0",
76683
+ "8665cefa",
76116
76684
  null
76117
76685
 
76118
76686
  )
76119
76687
 
76120
- /* harmony default export */ var xjzhSetCanvas = (xjzhSetCanvas_component.exports);
76688
+ /* harmony default export */ var xjzhSetBitmapCanvas = (xjzhSetBitmapCanvas_component.exports);
76121
76689
  ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhSignature.vue?vue&type=template&id=7bb6a096&scoped=true
76122
76690
  var xjzhSignaturevue_type_template_id_7bb6a096_scoped_true_render = function render() {
76123
76691
  var _vm = this,
@@ -76304,7 +76872,8 @@ var xjzhSignature_component = normalizeComponent(
76304
76872
 
76305
76873
 
76306
76874
 
76307
- const components = [xjzhImgCanvas, xjzhVideoList, xjzhBitmapCanvas, xjzhSetCanvas, xjzhSignature];
76875
+
76876
+ const components = [xjzhImgCanvas, xjzhBitmapCanvas, xjzhVideoList, xjzhSetCanvas, xjzhSetBitmapCanvas, xjzhSignature];
76308
76877
  const install = function (Vue) {
76309
76878
  if (install.installed) return;
76310
76879
  components.map(component => Vue.component(component.name, component));