xjzh-component 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xjzh-component.common.js +485 -136
- package/dist/xjzh-component.umd.js +523 -174
- package/dist/xjzh-component.umd.min.js +5 -5
- package/package.json +1 -1
|
@@ -35,6 +35,27 @@ module.exports = function (argument, usingIterator) {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
/***/ }),
|
|
39
|
+
|
|
40
|
+
/***/ 172:
|
|
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, ".XjzhVideoList[data-v-44471c94]{display:flex;flex-wrap:wrap;justify-content:center}.XjzhVideoList[data-v-44471c94],.XjzhVideoList .videoItem .video-js[data-v-44471c94],.XjzhVideoList .videoItem .video-js video[data-v-44471c94]{width:100%;height:100%}", ""]);
|
|
55
|
+
// Exports
|
|
56
|
+
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
57
|
+
|
|
58
|
+
|
|
38
59
|
/***/ }),
|
|
39
60
|
|
|
40
61
|
/***/ 184:
|
|
@@ -448,22 +469,6 @@ module.exports = {};
|
|
|
448
469
|
|
|
449
470
|
/***/ }),
|
|
450
471
|
|
|
451
|
-
/***/ 564:
|
|
452
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
453
|
-
|
|
454
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
455
|
-
|
|
456
|
-
// load the styles
|
|
457
|
-
var content = __webpack_require__(3022);
|
|
458
|
-
if(content.__esModule) content = content.default;
|
|
459
|
-
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
460
|
-
if(content.locals) module.exports = content.locals;
|
|
461
|
-
// add the styles to the DOM
|
|
462
|
-
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
463
|
-
var update = add("2a44b768", content, true, {"sourceMap":false,"shadowMode":false});
|
|
464
|
-
|
|
465
|
-
/***/ }),
|
|
466
|
-
|
|
467
472
|
/***/ 616:
|
|
468
473
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
469
474
|
|
|
@@ -1575,7 +1580,23 @@ module.exports = userAgent ? String(userAgent) : '';
|
|
|
1575
1580
|
|
|
1576
1581
|
/***/ }),
|
|
1577
1582
|
|
|
1578
|
-
/***/
|
|
1583
|
+
/***/ 2998:
|
|
1584
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1585
|
+
|
|
1586
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
1587
|
+
|
|
1588
|
+
// load the styles
|
|
1589
|
+
var content = __webpack_require__(8628);
|
|
1590
|
+
if(content.__esModule) content = content.default;
|
|
1591
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
1592
|
+
if(content.locals) module.exports = content.locals;
|
|
1593
|
+
// add the styles to the DOM
|
|
1594
|
+
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
1595
|
+
var update = add("411494e9", content, true, {"sourceMap":false,"shadowMode":false});
|
|
1596
|
+
|
|
1597
|
+
/***/ }),
|
|
1598
|
+
|
|
1599
|
+
/***/ 3038:
|
|
1579
1600
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1580
1601
|
|
|
1581
1602
|
"use strict";
|
|
@@ -1589,7 +1610,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1589
1610
|
|
|
1590
1611
|
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()));
|
|
1591
1612
|
// Module
|
|
1592
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".
|
|
1613
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-117b9ec4]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-117b9ec4]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-117b9ec4]{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-117b9ec4]{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-117b9ec4]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-117b9ec4]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
|
|
1593
1614
|
// Exports
|
|
1594
1615
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
1595
1616
|
|
|
@@ -2646,22 +2667,6 @@ module.exports = function (METHOD_NAME, ExpectedError) {
|
|
|
2646
2667
|
};
|
|
2647
2668
|
|
|
2648
2669
|
|
|
2649
|
-
/***/ }),
|
|
2650
|
-
|
|
2651
|
-
/***/ 4561:
|
|
2652
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2653
|
-
|
|
2654
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
2655
|
-
|
|
2656
|
-
// load the styles
|
|
2657
|
-
var content = __webpack_require__(8643);
|
|
2658
|
-
if(content.__esModule) content = content.default;
|
|
2659
|
-
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
2660
|
-
if(content.locals) module.exports = content.locals;
|
|
2661
|
-
// add the styles to the DOM
|
|
2662
|
-
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
2663
|
-
var update = add("03dc9351", content, true, {"sourceMap":false,"shadowMode":false});
|
|
2664
|
-
|
|
2665
2670
|
/***/ }),
|
|
2666
2671
|
|
|
2667
2672
|
/***/ 4576:
|
|
@@ -5586,6 +5591,22 @@ module.exports = function (V, P) {
|
|
|
5586
5591
|
};
|
|
5587
5592
|
|
|
5588
5593
|
|
|
5594
|
+
/***/ }),
|
|
5595
|
+
|
|
5596
|
+
/***/ 6016:
|
|
5597
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
5598
|
+
|
|
5599
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
5600
|
+
|
|
5601
|
+
// load the styles
|
|
5602
|
+
var content = __webpack_require__(3038);
|
|
5603
|
+
if(content.__esModule) content = content.default;
|
|
5604
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
5605
|
+
if(content.locals) module.exports = content.locals;
|
|
5606
|
+
// add the styles to the DOM
|
|
5607
|
+
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
5608
|
+
var update = add("9d2dde00", content, true, {"sourceMap":false,"shadowMode":false});
|
|
5609
|
+
|
|
5589
5610
|
/***/ }),
|
|
5590
5611
|
|
|
5591
5612
|
/***/ 6080:
|
|
@@ -10178,6 +10199,22 @@ module.exports = function (name) {
|
|
|
10178
10199
|
};
|
|
10179
10200
|
|
|
10180
10201
|
|
|
10202
|
+
/***/ }),
|
|
10203
|
+
|
|
10204
|
+
/***/ 8314:
|
|
10205
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
10206
|
+
|
|
10207
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
10208
|
+
|
|
10209
|
+
// load the styles
|
|
10210
|
+
var content = __webpack_require__(172);
|
|
10211
|
+
if(content.__esModule) content = content.default;
|
|
10212
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
10213
|
+
if(content.locals) module.exports = content.locals;
|
|
10214
|
+
// add the styles to the DOM
|
|
10215
|
+
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
10216
|
+
var update = add("f426cc98", content, true, {"sourceMap":false,"shadowMode":false});
|
|
10217
|
+
|
|
10181
10218
|
/***/ }),
|
|
10182
10219
|
|
|
10183
10220
|
/***/ 8480:
|
|
@@ -10234,7 +10271,7 @@ module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
|
10234
10271
|
|
|
10235
10272
|
/***/ }),
|
|
10236
10273
|
|
|
10237
|
-
/***/
|
|
10274
|
+
/***/ 8628:
|
|
10238
10275
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10239
10276
|
|
|
10240
10277
|
"use strict";
|
|
@@ -10248,7 +10285,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10248
10285
|
|
|
10249
10286
|
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()));
|
|
10250
10287
|
// Module
|
|
10251
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-
|
|
10288
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-6842db6e]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-6842db6e]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-6842db6e]{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-6842db6e]{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-6842db6e]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-6842db6e]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
|
|
10252
10289
|
// Exports
|
|
10253
10290
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
10254
10291
|
|
|
@@ -11311,7 +11348,7 @@ if (typeof window !== 'undefined') {
|
|
|
11311
11348
|
// Indicate to webpack that this file can be concatenated
|
|
11312
11349
|
/* harmony default export */ var setPublicPath = (null);
|
|
11313
11350
|
|
|
11314
|
-
;// ./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=
|
|
11351
|
+
;// ./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=117b9ec4&scoped=true
|
|
11315
11352
|
var render = function render() {
|
|
11316
11353
|
var _vm = this,
|
|
11317
11354
|
_c = _vm._self._c;
|
|
@@ -11586,7 +11623,7 @@ const InlineWorker = __webpack_require__(1161);
|
|
|
11586
11623
|
this.worker = null;
|
|
11587
11624
|
}
|
|
11588
11625
|
},
|
|
11589
|
-
showCanvas(type,
|
|
11626
|
+
showCanvas(type, blob) {
|
|
11590
11627
|
this.cameraObj[type].totalFPS++;
|
|
11591
11628
|
if (!this.cameraObj[type] || !this.cameraObj[type].imgBox || !this.cameraObj[type].ctx) {
|
|
11592
11629
|
return;
|
|
@@ -11597,7 +11634,7 @@ const InlineWorker = __webpack_require__(1161);
|
|
|
11597
11634
|
}
|
|
11598
11635
|
if (this.cameraObj[type].isLoading) return;
|
|
11599
11636
|
this.cameraObj[type].isLoading = true;
|
|
11600
|
-
this.cameraObj[type].allUrl.unshift(URL.createObjectURL(
|
|
11637
|
+
this.cameraObj[type].allUrl.unshift(URL.createObjectURL(blob));
|
|
11601
11638
|
this.cameraObj[type].imgBox.src = this.cameraObj[type].allUrl[0];
|
|
11602
11639
|
this.cameraObj[type].imgBox.onload = () => {
|
|
11603
11640
|
if (!this.cameraObj[type].ctx) return;
|
|
@@ -11687,9 +11724,9 @@ const InlineWorker = __webpack_require__(1161);
|
|
|
11687
11724
|
});
|
|
11688
11725
|
;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
|
|
11689
11726
|
/* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
|
|
11690
|
-
// 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=
|
|
11691
|
-
var
|
|
11692
|
-
;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=
|
|
11727
|
+
// 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=117b9ec4&prod&lang=scss&scoped=true
|
|
11728
|
+
var xjzhImgCanvasvue_type_style_index_0_id_117b9ec4_prod_lang_scss_scoped_true = __webpack_require__(6016);
|
|
11729
|
+
;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=117b9ec4&prod&lang=scss&scoped=true
|
|
11693
11730
|
|
|
11694
11731
|
;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
11695
11732
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -11804,14 +11841,14 @@ var component = normalizeComponent(
|
|
|
11804
11841
|
staticRenderFns,
|
|
11805
11842
|
false,
|
|
11806
11843
|
null,
|
|
11807
|
-
"
|
|
11844
|
+
"117b9ec4",
|
|
11808
11845
|
null
|
|
11809
11846
|
|
|
11810
11847
|
)
|
|
11811
11848
|
|
|
11812
11849
|
/* harmony default export */ var xjzhImgCanvas = (component.exports);
|
|
11813
|
-
;// ./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=
|
|
11814
|
-
var
|
|
11850
|
+
;// ./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=44471c94&scoped=true
|
|
11851
|
+
var xjzhVideoListvue_type_template_id_44471c94_scoped_true_render = function render() {
|
|
11815
11852
|
var _vm = this,
|
|
11816
11853
|
_c = _vm._self._c;
|
|
11817
11854
|
return _c('div', {
|
|
@@ -11841,7 +11878,7 @@ var xjzhVideoListvue_type_template_id_652406a6_scoped_true_render = function ren
|
|
|
11841
11878
|
})]);
|
|
11842
11879
|
}), 0);
|
|
11843
11880
|
};
|
|
11844
|
-
var
|
|
11881
|
+
var xjzhVideoListvue_type_template_id_44471c94_scoped_true_staticRenderFns = [];
|
|
11845
11882
|
|
|
11846
11883
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
11847
11884
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -74981,11 +75018,7 @@ function utils_debounce(func, wait, immediate) {
|
|
|
74981
75018
|
return {
|
|
74982
75019
|
playerList: [],
|
|
74983
75020
|
isModifyArr: [],
|
|
74984
|
-
|
|
74985
|
-
0: false,
|
|
74986
|
-
1: false,
|
|
74987
|
-
2: false
|
|
74988
|
-
}
|
|
75021
|
+
isPlay: true
|
|
74989
75022
|
};
|
|
74990
75023
|
},
|
|
74991
75024
|
mounted() {
|
|
@@ -75005,18 +75038,30 @@ function utils_debounce(func, wait, immediate) {
|
|
|
75005
75038
|
this.playerList[i] = videojs(id, this.setOption(url), () => {});
|
|
75006
75039
|
this.playerList[i].index = i;
|
|
75007
75040
|
}
|
|
75008
|
-
this.playerList[i].on('play', function () {
|
|
75041
|
+
this.playerList[i].on('play', utils_debounce(function () {
|
|
75009
75042
|
// 播放
|
|
75010
|
-
_this.
|
|
75011
|
-
|
|
75012
|
-
|
|
75043
|
+
if (!_this.playerList[i]) return;
|
|
75044
|
+
_this.isPlay = true;
|
|
75045
|
+
_this.handleIsModify(i);
|
|
75046
|
+
for (let j = 0; j < _this.playerList.length; j++) {
|
|
75047
|
+
if (_this.isModifyArr.includes(j)) continue;
|
|
75048
|
+
_this.playerList[j].play();
|
|
75049
|
+
}
|
|
75050
|
+
}, 300));
|
|
75051
|
+
this.playerList[i].on('pause', utils_debounce(function () {
|
|
75013
75052
|
// 暂停
|
|
75053
|
+
// 播放结束,不统一暂停
|
|
75054
|
+
if (!_this.playerList[i]) return;
|
|
75055
|
+
_this.isPlay = false;
|
|
75014
75056
|
let currentTime = _this.playerList[i].currentTime(); // 获取当前播放时间
|
|
75015
75057
|
let duration = _this.playerList[i].duration(); // 获取视频总时长
|
|
75016
|
-
// 播放结束,不统一暂停
|
|
75017
75058
|
if (currentTime === duration) return;
|
|
75018
|
-
_this.
|
|
75019
|
-
|
|
75059
|
+
_this.handleIsModify(i);
|
|
75060
|
+
for (let j = 0; j < _this.playerList.length; j++) {
|
|
75061
|
+
if (_this.isModifyArr.includes(j)) continue;
|
|
75062
|
+
_this.playerList[j].pause();
|
|
75063
|
+
}
|
|
75064
|
+
}, 300));
|
|
75020
75065
|
this.playerList[i].on('ratechange', function () {
|
|
75021
75066
|
// 倍数
|
|
75022
75067
|
_this.handleIsModify(i);
|
|
@@ -75026,7 +75071,8 @@ function utils_debounce(func, wait, immediate) {
|
|
|
75026
75071
|
}
|
|
75027
75072
|
});
|
|
75028
75073
|
this.playerList[i].on('ended', function () {
|
|
75029
|
-
//
|
|
75074
|
+
//
|
|
75075
|
+
if (!_this.playerList[i]) return;
|
|
75030
75076
|
_this.handleIsModify(i);
|
|
75031
75077
|
for (let j = 0; j < _this.playerList.length; j++) {
|
|
75032
75078
|
let currentTime = _this.playerList[j].currentTime(); // 获取当前播放时间
|
|
@@ -75035,16 +75081,15 @@ function utils_debounce(func, wait, immediate) {
|
|
|
75035
75081
|
_this.playerList[j].ended(_this.playerList[i].ended());
|
|
75036
75082
|
}
|
|
75037
75083
|
});
|
|
75038
|
-
|
|
75039
|
-
|
|
75040
|
-
|
|
75041
|
-
|
|
75042
|
-
|
|
75043
|
-
|
|
75044
|
-
|
|
75045
|
-
|
|
75046
|
-
|
|
75047
|
-
}
|
|
75084
|
+
this.playerList[i].on('seeking', utils_throttle(function () {
|
|
75085
|
+
// 播放进度条同步
|
|
75086
|
+
if (!_this.playerList[i]) return;
|
|
75087
|
+
_this.handleIsModify(i);
|
|
75088
|
+
for (let j = 0; j < _this.playerList.length; j++) {
|
|
75089
|
+
if (_this.isModifyArr.includes(j)) continue;
|
|
75090
|
+
_this.playerList[j].currentTime(_this.playerList[i].currentTime());
|
|
75091
|
+
}
|
|
75092
|
+
}, 500));
|
|
75048
75093
|
},
|
|
75049
75094
|
setOption(src) {
|
|
75050
75095
|
return {
|
|
@@ -75090,12 +75135,6 @@ function utils_debounce(func, wait, immediate) {
|
|
|
75090
75135
|
}
|
|
75091
75136
|
this.isModifyArr.push(index);
|
|
75092
75137
|
},
|
|
75093
|
-
synchronize(type, index) {
|
|
75094
|
-
for (let i = 0; i < this.playerList.length; i++) {
|
|
75095
|
-
if (index === i) continue;
|
|
75096
|
-
this.playerList[i][type]();
|
|
75097
|
-
}
|
|
75098
|
-
},
|
|
75099
75138
|
clearPlay() {
|
|
75100
75139
|
if (this.playerList.length > 0) {
|
|
75101
75140
|
for (let i = 0; i < this.playerList.length; i++) {
|
|
@@ -75113,9 +75152,9 @@ function utils_debounce(func, wait, immediate) {
|
|
|
75113
75152
|
});
|
|
75114
75153
|
;// ./packages/components/xjzhVideoList.vue?vue&type=script&lang=js
|
|
75115
75154
|
/* harmony default export */ var components_xjzhVideoListvue_type_script_lang_js = (xjzhVideoListvue_type_script_lang_js);
|
|
75116
|
-
// 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=
|
|
75117
|
-
var
|
|
75118
|
-
;// ./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=
|
|
75155
|
+
// 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=44471c94&prod&lang=scss&scoped=true
|
|
75156
|
+
var xjzhVideoListvue_type_style_index_0_id_44471c94_prod_lang_scss_scoped_true = __webpack_require__(8314);
|
|
75157
|
+
;// ./packages/components/xjzhVideoList.vue?vue&type=style&index=0&id=44471c94&prod&lang=scss&scoped=true
|
|
75119
75158
|
|
|
75120
75159
|
;// ./packages/components/xjzhVideoList.vue
|
|
75121
75160
|
|
|
@@ -75128,96 +75167,406 @@ var xjzhVideoListvue_type_style_index_0_id_652406a6_prod_lang_scss_scoped_true =
|
|
|
75128
75167
|
|
|
75129
75168
|
var xjzhVideoList_component = normalizeComponent(
|
|
75130
75169
|
components_xjzhVideoListvue_type_script_lang_js,
|
|
75131
|
-
|
|
75132
|
-
|
|
75170
|
+
xjzhVideoListvue_type_template_id_44471c94_scoped_true_render,
|
|
75171
|
+
xjzhVideoListvue_type_template_id_44471c94_scoped_true_staticRenderFns,
|
|
75133
75172
|
false,
|
|
75134
75173
|
null,
|
|
75135
|
-
"
|
|
75174
|
+
"44471c94",
|
|
75136
75175
|
null
|
|
75137
75176
|
|
|
75138
75177
|
)
|
|
75139
75178
|
|
|
75140
75179
|
/* harmony default export */ var xjzhVideoList = (xjzhVideoList_component.exports);
|
|
75141
|
-
;// ./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/
|
|
75142
|
-
var
|
|
75180
|
+
;// ./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/xjzhImageBitmapCanvas.vue?vue&type=template&id=6842db6e&scoped=true
|
|
75181
|
+
var xjzhImageBitmapCanvasvue_type_template_id_6842db6e_scoped_true_render = function render() {
|
|
75143
75182
|
var _vm = this,
|
|
75144
75183
|
_c = _vm._self._c;
|
|
75145
|
-
return _c('div'
|
|
75184
|
+
return _c('div', {
|
|
75185
|
+
staticClass: "xjzh-img-canvas"
|
|
75186
|
+
}, _vm._l(_vm.cameraObj, function (item, index) {
|
|
75187
|
+
return _c('div', {
|
|
75188
|
+
key: index,
|
|
75189
|
+
class: ['itemBox', item.isFullScreen ? 'full-screen' : ''],
|
|
75190
|
+
style: {
|
|
75191
|
+
'width': _vm.width,
|
|
75192
|
+
'height': _vm.height
|
|
75193
|
+
},
|
|
75194
|
+
on: {
|
|
75195
|
+
"click": function ($event) {
|
|
75196
|
+
return _vm.handleScreen(index);
|
|
75197
|
+
}
|
|
75198
|
+
}
|
|
75199
|
+
}, [_c('p', {
|
|
75200
|
+
directives: [{
|
|
75201
|
+
name: "show",
|
|
75202
|
+
rawName: "v-show",
|
|
75203
|
+
value: _vm.showTitle,
|
|
75204
|
+
expression: "showTitle"
|
|
75205
|
+
}],
|
|
75206
|
+
staticClass: "item-title"
|
|
75207
|
+
}, [_vm._v(_vm._s(item.title))]), _c('canvas', {
|
|
75208
|
+
ref: item.domeId,
|
|
75209
|
+
refInFor: true
|
|
75210
|
+
})]);
|
|
75211
|
+
}), 0);
|
|
75146
75212
|
};
|
|
75147
|
-
var
|
|
75213
|
+
var xjzhImageBitmapCanvasvue_type_template_id_6842db6e_scoped_true_staticRenderFns = [];
|
|
75148
75214
|
|
|
75149
|
-
;// ./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/
|
|
75150
|
-
|
|
75151
|
-
|
|
75215
|
+
;// ./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/xjzhImageBitmapCanvas.vue?vue&type=script&lang=js
|
|
75216
|
+
const xjzhImageBitmapCanvasvue_type_script_lang_js_InlineWorker = __webpack_require__(1161);
|
|
75217
|
+
/* harmony default export */ var xjzhImageBitmapCanvasvue_type_script_lang_js = ({
|
|
75218
|
+
name: "XjzhImgCanvas",
|
|
75219
|
+
props: {
|
|
75220
|
+
videoUrl: {
|
|
75221
|
+
type: String,
|
|
75222
|
+
default: 'localhost:56000'
|
|
75223
|
+
},
|
|
75224
|
+
width: {
|
|
75225
|
+
type: String,
|
|
75226
|
+
default: '480px'
|
|
75227
|
+
},
|
|
75228
|
+
height: {
|
|
75229
|
+
type: String,
|
|
75230
|
+
default: '270px'
|
|
75231
|
+
},
|
|
75232
|
+
showTitle: {
|
|
75233
|
+
type: Boolean,
|
|
75234
|
+
default: true
|
|
75235
|
+
},
|
|
75236
|
+
isSwitchSide: {
|
|
75237
|
+
type: Boolean,
|
|
75238
|
+
default: false
|
|
75239
|
+
},
|
|
75240
|
+
canvasSize: {
|
|
75241
|
+
type: Array,
|
|
75242
|
+
default: () => {
|
|
75243
|
+
return [1920, 1080];
|
|
75244
|
+
}
|
|
75245
|
+
}
|
|
75246
|
+
},
|
|
75247
|
+
watch: {
|
|
75248
|
+
isSwitchSide: {
|
|
75249
|
+
handler(val) {
|
|
75250
|
+
console.log('object :>> ', val);
|
|
75251
|
+
this.cameraType[2].label = this.isSwitchSide ? '显' : '侧';
|
|
75252
|
+
}
|
|
75253
|
+
}
|
|
75254
|
+
},
|
|
75152
75255
|
data() {
|
|
75153
|
-
return {
|
|
75154
|
-
|
|
75155
|
-
|
|
75156
|
-
|
|
75157
|
-
|
|
75158
|
-
|
|
75159
|
-
|
|
75160
|
-
|
|
75161
|
-
|
|
75162
|
-
|
|
75163
|
-
|
|
75164
|
-
|
|
75165
|
-
|
|
75166
|
-
|
|
75167
|
-
|
|
75168
|
-
|
|
75169
|
-
|
|
75170
|
-
|
|
75171
|
-
|
|
75172
|
-
|
|
75173
|
-
|
|
75174
|
-
|
|
75175
|
-
|
|
75256
|
+
return {
|
|
75257
|
+
cameraNum: 0,
|
|
75258
|
+
cameraType: [{
|
|
75259
|
+
label: '斜',
|
|
75260
|
+
value: 'main'
|
|
75261
|
+
}, {
|
|
75262
|
+
label: '俯',
|
|
75263
|
+
value: 'sub'
|
|
75264
|
+
}, {
|
|
75265
|
+
label: '侧',
|
|
75266
|
+
value: 'side'
|
|
75267
|
+
}],
|
|
75268
|
+
currentFullScreen: '',
|
|
75269
|
+
answerPhoto: {
|
|
75270
|
+
canvas: null,
|
|
75271
|
+
ctx: null,
|
|
75272
|
+
isPhoto: false,
|
|
75273
|
+
canvasSize: [1920, 1080]
|
|
75274
|
+
},
|
|
75275
|
+
cameraObj: null,
|
|
75276
|
+
worker: null
|
|
75277
|
+
};
|
|
75278
|
+
},
|
|
75279
|
+
created() {
|
|
75280
|
+
this.destroyWorker();
|
|
75281
|
+
this.destroyCanvasData();
|
|
75282
|
+
this.createdWorker();
|
|
75283
|
+
},
|
|
75284
|
+
mounted() {
|
|
75285
|
+
this.$nextTick(() => {
|
|
75286
|
+
this.initWorker();
|
|
75287
|
+
});
|
|
75288
|
+
},
|
|
75289
|
+
methods: {
|
|
75290
|
+
createdWorker() {
|
|
75291
|
+
this.worker = new xjzhImageBitmapCanvasvue_type_script_lang_js_InlineWorker(function () {
|
|
75292
|
+
self.onmessage = function (event) {
|
|
75293
|
+
if (!event.data) return;
|
|
75294
|
+
const {
|
|
75295
|
+
url
|
|
75296
|
+
} = event.data;
|
|
75297
|
+
if (!url) return;
|
|
75298
|
+
let cameraNum = 0;
|
|
75299
|
+
let ws = new WebSocket(url);
|
|
75300
|
+
// socket 连接
|
|
75301
|
+
ws.onopen = function () {
|
|
75302
|
+
self.postMessage({
|
|
75303
|
+
type: 'open'
|
|
75304
|
+
});
|
|
75305
|
+
};
|
|
75306
|
+
// socket 接收数据
|
|
75307
|
+
ws.onmessage = function ({
|
|
75308
|
+
data
|
|
75309
|
+
}) {
|
|
75310
|
+
if (data.size === 1) {
|
|
75311
|
+
// 摄像头数量 || 是否开启人脸
|
|
75312
|
+
let reader = new FileReader();
|
|
75313
|
+
reader.onload = event => {
|
|
75314
|
+
cameraNum = event.target.result.charCodeAt(0);
|
|
75315
|
+
self.postMessage({
|
|
75316
|
+
type: 'message',
|
|
75317
|
+
data: cameraNum
|
|
75318
|
+
});
|
|
75319
|
+
reader = null;
|
|
75320
|
+
};
|
|
75321
|
+
reader.readAsText(data);
|
|
75322
|
+
} else {
|
|
75323
|
+
// 摄像头画面 数据
|
|
75324
|
+
let newBlob = new Blob([data], {
|
|
75325
|
+
type: 'image/jpeg'
|
|
75326
|
+
});
|
|
75327
|
+
self.postMessage({
|
|
75328
|
+
type: 'message',
|
|
75329
|
+
data: newBlob
|
|
75330
|
+
});
|
|
75331
|
+
}
|
|
75332
|
+
};
|
|
75333
|
+
// socket 断开
|
|
75334
|
+
ws.onclose = function (event) {
|
|
75335
|
+
self.postMessage({
|
|
75336
|
+
type: 'close',
|
|
75337
|
+
event: event
|
|
75338
|
+
});
|
|
75339
|
+
ws = null;
|
|
75340
|
+
setTimeout(() => {
|
|
75341
|
+
ws = new WebSocket(url);
|
|
75342
|
+
}, 1000);
|
|
75343
|
+
};
|
|
75344
|
+
// socket 错误
|
|
75345
|
+
ws.onerror = function (error) {
|
|
75346
|
+
self.postMessage({
|
|
75347
|
+
type: 'error',
|
|
75348
|
+
error: error
|
|
75349
|
+
});
|
|
75350
|
+
};
|
|
75351
|
+
};
|
|
75352
|
+
});
|
|
75353
|
+
},
|
|
75354
|
+
initAnswerPhoto() {
|
|
75355
|
+
this.answerPhoto.canvas = document.createElement('canvas');
|
|
75356
|
+
this.answerPhoto.ctx = this.answerPhoto.canvas.getContext('2d');
|
|
75357
|
+
this.answerPhoto.canvas.width = this.canvasSize[0] * this.cameraNum;
|
|
75358
|
+
this.answerPhoto.canvas.height = this.canvasSize[1];
|
|
75359
|
+
},
|
|
75360
|
+
initCanvas() {
|
|
75361
|
+
for (let i = 0; i < this.cameraNum; i++) {
|
|
75362
|
+
let type = this.cameraType[i].value;
|
|
75363
|
+
this.cameraObj[type].canvas = this.$refs[this.cameraObj[type].domeId][0];
|
|
75364
|
+
this.cameraObj[type].ctx = this.cameraObj[type].canvas.getContext('2d');
|
|
75365
|
+
this.cameraObj[type].canvas.width = this.canvasSize[0];
|
|
75366
|
+
this.cameraObj[type].canvas.height = this.canvasSize[1];
|
|
75367
|
+
}
|
|
75368
|
+
},
|
|
75369
|
+
initWorker() {
|
|
75370
|
+
if (!this.videoUrl) return;
|
|
75371
|
+
const url = `ws://${this.videoUrl}/socket`;
|
|
75372
|
+
let count = 0;
|
|
75373
|
+
this.worker.onmessage = event => {
|
|
75374
|
+
const {
|
|
75375
|
+
type,
|
|
75376
|
+
data,
|
|
75377
|
+
event: wsEvent,
|
|
75378
|
+
error
|
|
75379
|
+
} = event.data;
|
|
75380
|
+
if (type === 'open') {
|
|
75381
|
+
console.log('WebSocket open:');
|
|
75382
|
+
}
|
|
75383
|
+
if (type === 'message') {
|
|
75384
|
+
if (typeof data === 'number') {
|
|
75385
|
+
this.cameraNum = data;
|
|
75386
|
+
for (let i = 0; i < this.cameraNum; i++) {
|
|
75387
|
+
let typeVal = this.cameraType[i].value;
|
|
75388
|
+
this.cameraObj[typeVal] = {
|
|
75389
|
+
domeId: `canvas_${typeVal}`,
|
|
75390
|
+
title: this.cameraType[i].label,
|
|
75391
|
+
// 摄像头名称
|
|
75392
|
+
canvas: null,
|
|
75393
|
+
ctx: null,
|
|
75394
|
+
totalFPS: 0,
|
|
75395
|
+
// 单个摄像头 - 收到总帧数
|
|
75396
|
+
showTotalFPS: 0,
|
|
75397
|
+
// 单个摄像头 - 渲染总帧数
|
|
75398
|
+
frameSkip: 0,
|
|
75399
|
+
// 单个摄像头 - 跳帧 1(30),2(15),3(10)
|
|
75176
75400
|
|
|
75177
|
-
|
|
75178
|
-
|
|
75179
|
-
|
|
75180
|
-
|
|
75181
|
-
|
|
75182
|
-
|
|
75183
|
-
}
|
|
75184
|
-
|
|
75401
|
+
allUrl: [],
|
|
75402
|
+
// 所有图片地址
|
|
75403
|
+
isLoading: false,
|
|
75404
|
+
// 图片是否加载完
|
|
75405
|
+
isFullScreen: false // 画面是否全屏
|
|
75406
|
+
};
|
|
75407
|
+
}
|
|
75408
|
+
this.$forceUpdate();
|
|
75409
|
+
// 根据摄像头数量,初始化画布
|
|
75410
|
+
this.$nextTick(() => {
|
|
75411
|
+
this.initAnswerPhoto();
|
|
75412
|
+
this.initCanvas();
|
|
75413
|
+
});
|
|
75414
|
+
return;
|
|
75415
|
+
}
|
|
75416
|
+
// 摄像头画面渲染
|
|
75417
|
+
count++;
|
|
75418
|
+
this.showCanvas(this.cameraType[count - 1].value, data);
|
|
75419
|
+
count = count >= this.cameraNum ? 0 : count;
|
|
75420
|
+
}
|
|
75421
|
+
if (type === 'close') {
|
|
75422
|
+
console.log('WebSocket closed:', wsEvent);
|
|
75423
|
+
}
|
|
75424
|
+
if (type === 'error') {
|
|
75425
|
+
console.log(`Worker error: ${error.message}`);
|
|
75426
|
+
}
|
|
75427
|
+
};
|
|
75428
|
+
// worker 建立连接
|
|
75429
|
+
this.cameraObj = {};
|
|
75430
|
+
this.worker.postMessage({
|
|
75431
|
+
url
|
|
75432
|
+
});
|
|
75433
|
+
},
|
|
75434
|
+
// 销毁摄像头,worker
|
|
75435
|
+
destroyWorker() {
|
|
75436
|
+
if (this.worker) {
|
|
75437
|
+
this.worker.terminate();
|
|
75438
|
+
this.worker = null;
|
|
75439
|
+
}
|
|
75440
|
+
},
|
|
75441
|
+
showCanvas(type, blob) {
|
|
75442
|
+
this.cameraObj[type].totalFPS++;
|
|
75443
|
+
if (!this.cameraObj[type] || !this.cameraObj[type].ctx) {
|
|
75444
|
+
return;
|
|
75445
|
+
}
|
|
75446
|
+
if (this.currentFullScreen && this.currentFullScreen !== type) {
|
|
75447
|
+
this.destroyUrl(type);
|
|
75448
|
+
return;
|
|
75449
|
+
}
|
|
75450
|
+
if (this.cameraObj[type].isLoading) return;
|
|
75451
|
+
this.cameraObj[type].isLoading = true;
|
|
75452
|
+
createImageBitmap(blob, {
|
|
75453
|
+
imageSmoothingQuality: 'low'
|
|
75454
|
+
}).then(res => {
|
|
75455
|
+
this.cameraObj[type].allUrl.unshift(res);
|
|
75456
|
+
this.cameraObj[type].isLoading = false;
|
|
75457
|
+
});
|
|
75458
|
+
// this.cameraObj[type].allUrl.unshift(URL.createObjectURL(blob))
|
|
75185
75459
|
|
|
75186
|
-
|
|
75187
|
-
|
|
75188
|
-
|
|
75189
|
-
|
|
75190
|
-
|
|
75460
|
+
if (this.cameraObj[type].ctx && this.cameraObj[type].ctx.drawImage && this.cameraObj[type].allUrl[0]) {
|
|
75461
|
+
this.cameraObj[type].ctx.drawImage(this.cameraObj[type].allUrl[0], 0, 0, this.canvasSize[0], this.canvasSize[1]);
|
|
75462
|
+
}
|
|
75463
|
+
if (this.answerPhoto.isPhoto && this.cameraObj[type].allUrl[0]) {
|
|
75464
|
+
// 拍照使用
|
|
75465
|
+
if (this.cameraNum > 0) {
|
|
75466
|
+
this.answerPhoto.ctx.drawImage(this.cameraObj.main.allUrl[0], this.answerPhoto.canvasSize[0] * 0, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
|
|
75467
|
+
}
|
|
75468
|
+
if (this.cameraNum > 1) {
|
|
75469
|
+
this.answerPhoto.ctx.drawImage(this.cameraObj.sub.allUrl[0], this.answerPhoto.canvasSize[0] * 1, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
|
|
75470
|
+
}
|
|
75471
|
+
if (this.cameraNum > 2) {
|
|
75472
|
+
this.answerPhoto.ctx.drawImage(this.cameraObj.side.allUrl[0], this.answerPhoto.canvasSize[0] * 2, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
|
|
75473
|
+
}
|
|
75474
|
+
return;
|
|
75475
|
+
}
|
|
75476
|
+
this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
|
|
75477
|
+
},
|
|
75478
|
+
handleScreen(type) {
|
|
75479
|
+
this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
|
|
75480
|
+
this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
|
|
75481
|
+
this.$forceUpdate();
|
|
75482
|
+
},
|
|
75483
|
+
destroyCanvasData() {
|
|
75484
|
+
for (let i = 0; i < this.cameraNum; i++) {
|
|
75485
|
+
let type = this.cameraType[i].value;
|
|
75486
|
+
this.destroyUrl(type);
|
|
75487
|
+
this.destroyCanvas(type);
|
|
75488
|
+
}
|
|
75489
|
+
},
|
|
75490
|
+
destroyUrl(type) {
|
|
75491
|
+
for (let i = 0; i < this.cameraObj[type].allUrl.length; i++) {
|
|
75492
|
+
if (this.cameraObj[type].allUrl[i]) {
|
|
75493
|
+
this.cameraObj[type].allUrl[i].close();
|
|
75494
|
+
}
|
|
75495
|
+
delete this.cameraObj[type].allUrl[i];
|
|
75496
|
+
}
|
|
75497
|
+
this.cameraObj[type].allUrl = [];
|
|
75498
|
+
},
|
|
75499
|
+
destroyCanvas(type) {
|
|
75500
|
+
if (!this.cameraObj[type]) return;
|
|
75501
|
+
for (let key in this.cameraObj[type]) {
|
|
75502
|
+
if (typeof this.cameraObj[type][key] == 'object') {
|
|
75503
|
+
this.cameraObj[type][key] = '';
|
|
75504
|
+
}
|
|
75505
|
+
delete this.cameraObj[type][key];
|
|
75506
|
+
}
|
|
75507
|
+
},
|
|
75508
|
+
// 所有摄像头横向照片
|
|
75509
|
+
allPhoto() {
|
|
75510
|
+
this.answerPhoto.isPhoto = true;
|
|
75511
|
+
let startTime = new Date().getTime();
|
|
75512
|
+
return new Promise(resolve => {
|
|
75513
|
+
setTimeout(() => {
|
|
75514
|
+
resolve(this.answerPhoto.canvas.toDataURL('image/jpeg'));
|
|
75515
|
+
let endTime = new Date().getTime();
|
|
75516
|
+
let second = (endTime - startTime) / 1000;
|
|
75517
|
+
this.cameraObj.main.totalFPS = this.cameraObj.main.totalFPS + ~~(second * 30);
|
|
75518
|
+
this.cameraObj.sub.totalFPS = this.cameraObj.sub.totalFPS + ~~(second * 30);
|
|
75519
|
+
this.cameraObj.side.totalFPS = this.cameraObj.side.totalFPS + ~~(second * 30);
|
|
75520
|
+
this.answerPhoto.isPhoto = false;
|
|
75521
|
+
}, 200);
|
|
75522
|
+
});
|
|
75523
|
+
},
|
|
75524
|
+
// 单个摄像头照片
|
|
75525
|
+
selectPhoto(num) {
|
|
75526
|
+
let type = this.cameraType[num - 1].value;
|
|
75527
|
+
this.videoObj.videoMergeSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
|
|
75528
|
+
return this.videoObj.videoMergeSrc;
|
|
75529
|
+
}
|
|
75530
|
+
},
|
|
75531
|
+
beforeDestroy() {
|
|
75532
|
+
this.answerPhoto.canvas = null;
|
|
75533
|
+
this.answerPhoto.ctx = null;
|
|
75534
|
+
// this.destroyWorker()
|
|
75535
|
+
// this.destroyCanvasData()
|
|
75191
75536
|
}
|
|
75192
75537
|
});
|
|
75193
|
-
;// ./packages/components/
|
|
75194
|
-
/* harmony default export */ var
|
|
75195
|
-
|
|
75538
|
+
;// ./packages/components/xjzhImageBitmapCanvas.vue?vue&type=script&lang=js
|
|
75539
|
+
/* harmony default export */ var components_xjzhImageBitmapCanvasvue_type_script_lang_js = (xjzhImageBitmapCanvasvue_type_script_lang_js);
|
|
75540
|
+
// 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/xjzhImageBitmapCanvas.vue?vue&type=style&index=0&id=6842db6e&prod&lang=scss&scoped=true
|
|
75541
|
+
var xjzhImageBitmapCanvasvue_type_style_index_0_id_6842db6e_prod_lang_scss_scoped_true = __webpack_require__(2998);
|
|
75542
|
+
;// ./packages/components/xjzhImageBitmapCanvas.vue?vue&type=style&index=0&id=6842db6e&prod&lang=scss&scoped=true
|
|
75543
|
+
|
|
75544
|
+
;// ./packages/components/xjzhImageBitmapCanvas.vue
|
|
75196
75545
|
|
|
75197
75546
|
|
|
75198
75547
|
|
|
75548
|
+
;
|
|
75199
75549
|
|
|
75200
75550
|
|
|
75201
75551
|
/* normalize component */
|
|
75202
|
-
|
|
75203
|
-
var
|
|
75204
|
-
|
|
75205
|
-
|
|
75206
|
-
|
|
75552
|
+
|
|
75553
|
+
var xjzhImageBitmapCanvas_component = normalizeComponent(
|
|
75554
|
+
components_xjzhImageBitmapCanvasvue_type_script_lang_js,
|
|
75555
|
+
xjzhImageBitmapCanvasvue_type_template_id_6842db6e_scoped_true_render,
|
|
75556
|
+
xjzhImageBitmapCanvasvue_type_template_id_6842db6e_scoped_true_staticRenderFns,
|
|
75207
75557
|
false,
|
|
75208
75558
|
null,
|
|
75209
|
-
|
|
75559
|
+
"6842db6e",
|
|
75210
75560
|
null
|
|
75211
75561
|
|
|
75212
75562
|
)
|
|
75213
75563
|
|
|
75214
|
-
/* harmony default export */ var
|
|
75564
|
+
/* harmony default export */ var xjzhImageBitmapCanvas = (xjzhImageBitmapCanvas_component.exports);
|
|
75215
75565
|
;// ./packages/index.js
|
|
75216
75566
|
|
|
75217
75567
|
|
|
75218
75568
|
|
|
75219
|
-
|
|
75220
|
-
const components = [xjzhImgCanvas, xjzhVideoList, videoRtsp, videoWebGl];
|
|
75569
|
+
const components = [xjzhImgCanvas, xjzhVideoList, xjzhImageBitmapCanvas];
|
|
75221
75570
|
const install = function (Vue) {
|
|
75222
75571
|
if (install.installed) return;
|
|
75223
75572
|
components.map(component => Vue.component(component.name, component));
|