xjzh-component 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ self.onmessage = function (event) {
6
6
  } = event.data;
7
7
  let cameraNum = 0;
8
8
  let ws = new WebSocket(url);
9
+ console.log('object :>> ws', ws);
9
10
  // socket 连接
10
11
  ws.onopen = function () {
11
12
  self.postMessage({
@@ -16,6 +17,7 @@ self.onmessage = function (event) {
16
17
  ws.onmessage = async function ({
17
18
  data
18
19
  }) {
20
+ console.log('object :>> ws - data', data);
19
21
  if (data.size == 1) {
20
22
  // 摄像头数量 || 是否开启人脸
21
23
  cameraNum = await self.convertBlobToNumber(data);
@@ -112,27 +112,6 @@ module.exports = {
112
112
  module.exports = {};
113
113
 
114
114
 
115
- /***/ }),
116
-
117
- /***/ 479:
118
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
119
-
120
- "use strict";
121
- __webpack_require__.r(__webpack_exports__);
122
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
123
- /* 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__);
124
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
125
- /* 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__);
126
- // Imports
127
-
128
-
129
- 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()));
130
- // Module
131
- ___CSS_LOADER_EXPORT___.push([module.id, ".video-canvas[data-v-50940904]{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-evenly;margin-top:16px}.video-canvas .itemBox[data-v-50940904]{border-radius:4px;transform:translateZ(0);margin-bottom:11px;position:relative;overflow:hidden}.video-canvas canvas[data-v-50940904]{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}.video-canvas .full-screen[data-v-50940904]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
132
- // Exports
133
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
134
-
135
-
136
115
  /***/ }),
137
116
 
138
117
  /***/ 616:
@@ -497,22 +476,6 @@ module.exports = function (it) {
497
476
  };
498
477
 
499
478
 
500
- /***/ }),
501
-
502
- /***/ 4185:
503
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
504
-
505
- // style-loader: Adds some css to the DOM by adding a <style> tag
506
-
507
- // load the styles
508
- var content = __webpack_require__(479);
509
- if(content.__esModule) content = content.default;
510
- if(typeof content === 'string') content = [[module.id, content, '']];
511
- if(content.locals) module.exports = content.locals;
512
- // add the styles to the DOM
513
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
514
- var update = add("1237ea75", content, true, {"sourceMap":false,"shadowMode":false});
515
-
516
479
  /***/ }),
517
480
 
518
481
  /***/ 4270:
@@ -645,6 +608,27 @@ if (params + '' !== 'a=2') {
645
608
  }
646
609
 
647
610
 
611
+ /***/ }),
612
+
613
+ /***/ 4633:
614
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
615
+
616
+ "use strict";
617
+ __webpack_require__.r(__webpack_exports__);
618
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
619
+ /* 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__);
620
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
621
+ /* 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__);
622
+ // Imports
623
+
624
+
625
+ 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()));
626
+ // Module
627
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{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-450f21fe]{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-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
628
+ // Exports
629
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
630
+
631
+
648
632
  /***/ }),
649
633
 
650
634
  /***/ 4901:
@@ -1034,6 +1018,22 @@ module.exports = function (bitmap, value) {
1034
1018
  };
1035
1019
 
1036
1020
 
1021
+ /***/ }),
1022
+
1023
+ /***/ 7011:
1024
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1025
+
1026
+ // style-loader: Adds some css to the DOM by adding a <style> tag
1027
+
1028
+ // load the styles
1029
+ var content = __webpack_require__(4633);
1030
+ if(content.__esModule) content = content.default;
1031
+ if(typeof content === 'string') content = [[module.id, content, '']];
1032
+ if(content.locals) module.exports = content.locals;
1033
+ // add the styles to the DOM
1034
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
1035
+ var update = add("ab4a675a", content, true, {"sourceMap":false,"shadowMode":false});
1036
+
1037
1037
  /***/ }),
1038
1038
 
1039
1039
  /***/ 7040:
@@ -1845,12 +1845,12 @@ if (typeof window !== 'undefined') {
1845
1845
  // Indicate to webpack that this file can be concatenated
1846
1846
  /* harmony default export */ var setPublicPath = (null);
1847
1847
 
1848
- ;// ./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/videoCanvas.vue?vue&type=template&id=50940904&scoped=true
1848
+ ;// ./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=450f21fe&scoped=true
1849
1849
  var render = function render() {
1850
1850
  var _vm = this,
1851
1851
  _c = _vm._self._c;
1852
1852
  return _c('div', {
1853
- staticClass: "video-canvas"
1853
+ staticClass: "xjzh-img-canvas"
1854
1854
  }, _vm._l(_vm.cameraObj, function (item, index) {
1855
1855
  return _c('div', {
1856
1856
  key: index,
@@ -1886,15 +1886,15 @@ var web_url_search_params_delete = __webpack_require__(4603);
1886
1886
  var web_url_search_params_has = __webpack_require__(7566);
1887
1887
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
1888
1888
  var web_url_search_params_size = __webpack_require__(8721);
1889
- ;// ./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/videoCanvas.vue?vue&type=script&lang=js
1889
+ ;// ./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/xjzhImgCanvas.vue?vue&type=script&lang=js
1890
1890
 
1891
1891
 
1892
1892
 
1893
1893
 
1894
1894
 
1895
1895
 
1896
- /* harmony default export */ var videoCanvasvue_type_script_lang_js = ({
1897
- name: "VideoCanvas",
1896
+ /* harmony default export */ var xjzhImgCanvasvue_type_script_lang_js = ({
1897
+ name: "XjzhImgCanvas",
1898
1898
  props: {
1899
1899
  videoUrl: {
1900
1900
  type: String,
@@ -1902,11 +1902,11 @@ var web_url_search_params_size = __webpack_require__(8721);
1902
1902
  },
1903
1903
  width: {
1904
1904
  type: String,
1905
- default: '640px'
1905
+ default: '480px'
1906
1906
  },
1907
1907
  height: {
1908
1908
  type: String,
1909
- default: '360px'
1909
+ default: '270px'
1910
1910
  },
1911
1911
  showTitle: {
1912
1912
  type: Boolean,
@@ -1915,15 +1915,15 @@ var web_url_search_params_size = __webpack_require__(8721);
1915
1915
  isSwitchSide: {
1916
1916
  type: Boolean,
1917
1917
  default: false
1918
+ },
1919
+ canvasSize: {
1920
+ type: Array,
1921
+ default: () => {
1922
+ return [1920, 1080];
1923
+ }
1918
1924
  }
1919
1925
  },
1920
1926
  watch: {
1921
- videoUrl: {
1922
- handler(val) {
1923
- console.log('object :>> ', val);
1924
- this.initWorker();
1925
- }
1926
- },
1927
1927
  isSwitchSide: {
1928
1928
  handler(val) {
1929
1929
  console.log('object :>> ', val);
@@ -1947,36 +1947,41 @@ var web_url_search_params_size = __webpack_require__(8721);
1947
1947
  currentFullScreen: '',
1948
1948
  answerPhoto: {
1949
1949
  canvas: null,
1950
- context: null,
1951
- isPhoto: false
1950
+ ctx: null,
1951
+ isPhoto: false,
1952
+ canvasSize: [1920, 1080]
1952
1953
  },
1953
- canvasSize: [1920, 1080]
1954
+ cameraObj: null
1954
1955
  };
1955
1956
  },
1956
- mounted() {},
1957
+ mounted() {
1958
+ this.initWorker();
1959
+ },
1957
1960
  methods: {
1958
1961
  initAnswerPhoto() {
1959
1962
  this.answerPhoto.canvas = document.createElement('canvas');
1960
- this.answerPhoto.context = this.answerPhoto.canvas.getContext('2d');
1963
+ this.answerPhoto.ctx = this.answerPhoto.canvas.getContext('2d');
1961
1964
  this.answerPhoto.canvas.width = this.canvasSize[0] * this.cameraNum;
1962
1965
  this.answerPhoto.canvas.height = this.canvasSize[1];
1963
1966
  },
1964
1967
  initCanvas() {
1965
1968
  for (let i = 0; i < this.cameraNum; i++) {
1966
1969
  let type = this.cameraType[i].value;
1967
- this.cameraObj[type].canvas = document.getElementById(this.cameraObj[type].domeId);
1968
- this.cameraObj[type].content = this.cameraObj[type].canvas.getContext('2d');
1970
+ this.cameraObj[type].canvas = this.$refs[this.cameraObj[type].domeId][0];
1971
+ this.cameraObj[type].ctx = this.cameraObj[type].canvas.getContext('2d');
1969
1972
  this.cameraObj[type].canvas.width = this.canvasSize[0];
1970
1973
  this.cameraObj[type].canvas.height = this.canvasSize[1];
1971
1974
  this.cameraObj[type].imgBox = new Image();
1972
- this.cameraObj[type].videoUrl = '';
1973
1975
  }
1974
1976
  },
1975
1977
  initWorker() {
1976
1978
  const url = `ws://${this.videoUrl}/socket`;
1977
1979
  let count = 0;
1978
1980
  this.destroyWorker();
1981
+ this.destroyCanvasData();
1982
+ console.log('object :>> url', url);
1979
1983
  this.worker = new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(906), __webpack_require__.b));
1984
+ console.log('object :>> this.worker', this.worker);
1980
1985
  this.worker.onmessage = async event => {
1981
1986
  const {
1982
1987
  type,
@@ -1988,35 +1993,43 @@ var web_url_search_params_size = __webpack_require__(8721);
1988
1993
  if (type === 'message') {
1989
1994
  if (typeof data === 'number') {
1990
1995
  this.cameraNum = data;
1991
- localStorage.setItem('cameraNum', this.cameraNum);
1992
1996
  for (let i = 0; i < this.cameraNum; i++) {
1993
- this.cameraObj[this.cameraType[i].value] = {
1994
- domeId: `canvas_${this.cameraType[i].value}`,
1997
+ let typeVal = this.cameraType[i].value;
1998
+ this.cameraObj[typeVal] = {
1999
+ domeId: `canvas_${typeVal}`,
2000
+ title: this.cameraType[i].label,
2001
+ // 摄像头名称
1995
2002
  canvas: null,
1996
- content: null,
1997
- videoUrl: '',
2003
+ ctx: null,
1998
2004
  totalFPS: 0,
2005
+ // 单个摄像头 - 收到总帧数
1999
2006
  showTotalFPS: 0,
2000
- frameSkip: 1,
2007
+ // 单个摄像头 - 渲染总帧数
2008
+ frameSkip: 0,
2009
+ // 单个摄像头 - 跳帧 1(30),2(15),3(10)
2010
+
2001
2011
  imgBox: null,
2012
+ allUrl: [],
2013
+ // 所有图片地址
2002
2014
  isLoading: false,
2003
- isFullScreen: false,
2004
- title: this.cameraType[i].label
2015
+ // 图片是否加载完
2016
+ isFullScreen: false // 画面是否全屏
2005
2017
  };
2006
2018
  }
2019
+ this.$forceUpdate();
2020
+ // 根据摄像头数量,初始化画布
2007
2021
  this.$nextTick(() => {
2008
2022
  this.initAnswerPhoto();
2009
2023
  this.initCanvas();
2010
2024
  });
2011
2025
  return;
2012
2026
  }
2027
+
2028
+ // 摄像头画面渲染
2013
2029
  count++;
2014
2030
  this.showCanvas(this.cameraType[count - 1].value, data);
2015
2031
  count = count >= this.cameraNum ? 0 : count;
2016
2032
  }
2017
- if (type === 'message') {
2018
- console.log('WebSocket open:');
2019
- }
2020
2033
  if (type === 'close') {
2021
2034
  console.log('WebSocket closed:', wsEvent);
2022
2035
  }
@@ -2040,61 +2053,110 @@ var web_url_search_params_size = __webpack_require__(8721);
2040
2053
  this.worker = null;
2041
2054
  }
2042
2055
  },
2043
- showVideoCanvas(type, blod) {
2044
- // 当其中一个全屏时,其它画面不做渲染操作,并且清理其他缓存
2056
+ showCanvas(type, blod) {
2057
+ this.cameraObj[type].totalFPS++;
2058
+ if (!this.cameraObj[type] || !this.cameraObj[type].imgBox || !this.cameraObj[type].ctx) {
2059
+ return;
2060
+ }
2045
2061
  if (this.currentFullScreen && this.currentFullScreen !== type) {
2046
- if (this.cameraObj[type].videoUrl) {
2047
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2048
- this.cameraObj[type].videoUrl = '';
2049
- }
2062
+ this.destroyUrl(type);
2050
2063
  return;
2051
2064
  }
2052
2065
  if (this.cameraObj[type].isLoading) return;
2053
- this.cameraObj[type].videoUrl = URL.createObjectURL(blod);
2054
2066
  this.cameraObj[type].isLoading = true;
2055
- this.cameraObj[type].imgBox.src = this.cameraObj[type].videoUrl;
2067
+ this.cameraObj[type].allUrl.unshift(URL.createObjectURL(blod));
2068
+ this.cameraObj[type].imgBox.src = this.cameraObj[type].allUrl[0];
2056
2069
  this.cameraObj[type].imgBox.onload = () => {
2070
+ if (!this.cameraObj[type].ctx) return;
2071
+ this.cameraObj[type].ctx.drawImage(this.cameraObj[type].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
2057
2072
  this.cameraObj[type].isLoading = false;
2058
- this.cameraObj[type].content.drawImage(this.cameraObj[type].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
2059
- if (this.cameraObj[type].videoUrl) {
2060
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2061
- this.cameraObj[type].videoUrl = '';
2073
+ if (this.answerPhoto.isPhoto) {
2074
+ // 拍照使用
2075
+ if (this.cameraNum > 0) {
2076
+ this.answerPhoto.ctx.drawImage(this.cameraObj.main.imgBox, this.answerPhoto.canvasSize[0] * 0, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2077
+ }
2078
+ if (this.cameraNum > 1) {
2079
+ this.answerPhoto.ctx.drawImage(this.cameraObj.sub.imgBox, this.answerPhoto.canvasSize[0] * 1, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2080
+ }
2081
+ if (this.cameraNum > 2) {
2082
+ this.answerPhoto.ctx.drawImage(this.cameraObj.side.imgBox, this.answerPhoto.canvasSize[0] * 2, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2083
+ }
2084
+ return;
2062
2085
  }
2086
+ // 清除内存
2087
+ this.cameraObj[type].imgBox.src = '';
2088
+ this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
2063
2089
  };
2064
2090
  this.cameraObj[type].imgBox.onerror = () => {
2065
2091
  this.cameraObj[type].isLoading = false;
2066
- // 清除内存
2067
- if (this.cameraObj[type].videoUrl) {
2068
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2069
- this.cameraObj[type].videoUrl = '';
2070
- }
2092
+ if (!this.cameraObj[type] || !this.cameraObj[type].imgBox) return;
2093
+ this.cameraObj[type].imgBox.src = '';
2094
+ this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
2071
2095
  };
2072
2096
  },
2073
- AllPhoto() {
2074
- let type = this.cameraType[this.cameraNum - 1].value;
2075
- this.videoObj.videoSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
2076
- return this.videoObj.videoSrc;
2097
+ handleScreen(type) {
2098
+ this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
2099
+ this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
2100
+ this.$forceUpdate();
2077
2101
  },
2102
+ destroyCanvasData() {
2103
+ for (let i = 0; i < this.cameraNum; i++) {
2104
+ let type = this.cameraType[i].value;
2105
+ this.destroyUrl(type);
2106
+ this.destroyCanvas(type);
2107
+ }
2108
+ },
2109
+ destroyUrl(type) {
2110
+ for (let i = 0; i < this.cameraObj[type].allUrl.length; i++) {
2111
+ URL.revokeObjectURL(this.cameraObj[type].allUrl[i]);
2112
+ delete this.cameraObj[type].allUrl[i];
2113
+ }
2114
+ this.cameraObj[type].allUrl = [];
2115
+ },
2116
+ destroyCanvas(type) {
2117
+ if (!this.cameraObj[type]) return;
2118
+ for (let key in this.cameraObj[type]) {
2119
+ if (typeof this.cameraObj[type][key] == 'object') {
2120
+ this.cameraObj[type][key] = '';
2121
+ }
2122
+ delete this.cameraObj[type][key];
2123
+ }
2124
+ },
2125
+ // 所有摄像头横向照片
2126
+ allPhoto() {
2127
+ this.answerPhoto.isPhoto = true;
2128
+ let startTime = new Date().getTime();
2129
+ return new Promise(resolve => {
2130
+ setTimeout(() => {
2131
+ resolve(this.answerPhoto.canvas.toDataURL('image/jpeg'));
2132
+ let endTime = new Date().getTime();
2133
+ let second = (endTime - startTime) / 1000;
2134
+ this.cameraObj.main.totalFPS = this.cameraObj.main.totalFPS + ~~(second * 30);
2135
+ this.cameraObj.sub.totalFPS = this.cameraObj.sub.totalFPS + ~~(second * 30);
2136
+ this.cameraObj.side.totalFPS = this.cameraObj.side.totalFPS + ~~(second * 30);
2137
+ this.answerPhoto.isPhoto = false;
2138
+ }, 200);
2139
+ });
2140
+ },
2141
+ // 单个摄像头照片
2078
2142
  selectPhoto(num) {
2079
2143
  let type = this.cameraType[num - 1].value;
2080
2144
  this.videoObj.videoMergeSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
2081
2145
  return this.videoObj.videoMergeSrc;
2082
- },
2083
- handleScreen(type) {
2084
- this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
2085
- this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
2086
2146
  }
2087
2147
  },
2088
2148
  beforeDestroy() {
2089
2149
  this.answerPhoto.canvas = null;
2090
- this.answerPhoto.context = null;
2150
+ this.answerPhoto.ctx = null;
2151
+ this.destroyWorker();
2152
+ this.destroyCanvasData();
2091
2153
  }
2092
2154
  });
2093
- ;// ./packages/components/videoCanvas.vue?vue&type=script&lang=js
2094
- /* harmony default export */ var components_videoCanvasvue_type_script_lang_js = (videoCanvasvue_type_script_lang_js);
2095
- // 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/videoCanvas.vue?vue&type=style&index=0&id=50940904&prod&lang=scss&scoped=true
2096
- var videoCanvasvue_type_style_index_0_id_50940904_prod_lang_scss_scoped_true = __webpack_require__(4185);
2097
- ;// ./packages/components/videoCanvas.vue?vue&type=style&index=0&id=50940904&prod&lang=scss&scoped=true
2155
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
2156
+ /* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
2157
+ // 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=450f21fe&prod&lang=scss&scoped=true
2158
+ var xjzhImgCanvasvue_type_style_index_0_id_450f21fe_prod_lang_scss_scoped_true = __webpack_require__(7011);
2159
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2098
2160
 
2099
2161
  ;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2100
2162
  /* globals __VUE_SSR_CONTEXT__ */
@@ -2194,7 +2256,7 @@ function normalizeComponent(
2194
2256
  }
2195
2257
  }
2196
2258
 
2197
- ;// ./packages/components/videoCanvas.vue
2259
+ ;// ./packages/components/xjzhImgCanvas.vue
2198
2260
 
2199
2261
 
2200
2262
 
@@ -2204,17 +2266,17 @@ function normalizeComponent(
2204
2266
  /* normalize component */
2205
2267
 
2206
2268
  var component = normalizeComponent(
2207
- components_videoCanvasvue_type_script_lang_js,
2269
+ components_xjzhImgCanvasvue_type_script_lang_js,
2208
2270
  render,
2209
2271
  staticRenderFns,
2210
2272
  false,
2211
2273
  null,
2212
- "50940904",
2274
+ "450f21fe",
2213
2275
  null
2214
2276
 
2215
2277
  )
2216
2278
 
2217
- /* harmony default export */ var videoCanvas = (component.exports);
2279
+ /* harmony default export */ var xjzhImgCanvas = (component.exports);
2218
2280
  ;// ./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/videoRtsp.vue?vue&type=template&id=345d94c7
2219
2281
  var videoRtspvue_type_template_id_345d94c7_render = function render() {
2220
2282
  var _vm = this,
@@ -2293,7 +2355,7 @@ var videoWebGl_component = normalizeComponent(
2293
2355
 
2294
2356
 
2295
2357
 
2296
- const components = [videoCanvas, videoRtsp, videoWebGl];
2358
+ const components = [xjzhImgCanvas, videoRtsp, videoWebGl];
2297
2359
  const install = function (Vue) {
2298
2360
  if (install.installed) return;
2299
2361
  components.map(component => Vue.component(component.name, component));
@@ -16,6 +16,7 @@ self.onmessage = function (event) {
16
16
  } = event.data;
17
17
  let cameraNum = 0;
18
18
  let ws = new WebSocket(url);
19
+ console.log('object :>> ws', ws);
19
20
  // socket 连接
20
21
  ws.onopen = function () {
21
22
  self.postMessage({
@@ -26,6 +27,7 @@ self.onmessage = function (event) {
26
27
  ws.onmessage = async function ({
27
28
  data
28
29
  }) {
30
+ console.log('object :>> ws - data', data);
29
31
  if (data.size == 1) {
30
32
  // 摄像头数量 || 是否开启人脸
31
33
  cameraNum = await self.convertBlobToNumber(data);
@@ -381,6 +381,27 @@ module.exports = function (passed, required) {
381
381
  };
382
382
 
383
383
 
384
+ /***/ }),
385
+
386
+ /***/ 2825:
387
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
388
+
389
+ "use strict";
390
+ __webpack_require__.r(__webpack_exports__);
391
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
392
+ /* 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__);
393
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
394
+ /* 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__);
395
+ // Imports
396
+
397
+
398
+ 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()));
399
+ // Module
400
+ ___CSS_LOADER_EXPORT___.push([module.id, ".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{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-450f21fe]{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-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
401
+ // Exports
402
+ /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
403
+
404
+
384
405
  /***/ }),
385
406
 
386
407
  /***/ 2839:
@@ -618,22 +639,6 @@ if (params + '' !== 'a=2') {
618
639
  }
619
640
 
620
641
 
621
- /***/ }),
622
-
623
- /***/ 4707:
624
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
625
-
626
- // style-loader: Adds some css to the DOM by adding a <style> tag
627
-
628
- // load the styles
629
- var content = __webpack_require__(5807);
630
- if(content.__esModule) content = content.default;
631
- if(typeof content === 'string') content = [[module.id, content, '']];
632
- if(content.locals) module.exports = content.locals;
633
- // add the styles to the DOM
634
- var add = (__webpack_require__(9548)/* ["default"] */ .A)
635
- var update = add("59b0a0b9", content, true, {"sourceMap":false,"shadowMode":false});
636
-
637
642
  /***/ }),
638
643
 
639
644
  /***/ 4901:
@@ -720,27 +725,6 @@ module.exports = function (key, value) {
720
725
  };
721
726
 
722
727
 
723
- /***/ }),
724
-
725
- /***/ 5807:
726
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
727
-
728
- "use strict";
729
- __webpack_require__.r(__webpack_exports__);
730
- /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1601);
731
- /* 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__);
732
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
733
- /* 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__);
734
- // Imports
735
-
736
-
737
- 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()));
738
- // Module
739
- ___CSS_LOADER_EXPORT___.push([module.id, ".video-canvas[data-v-50940904]{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-evenly;margin-top:16px}.video-canvas .itemBox[data-v-50940904]{border-radius:4px;transform:translateZ(0);margin-bottom:11px;position:relative;overflow:hidden}.video-canvas canvas[data-v-50940904]{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}.video-canvas .full-screen[data-v-50940904]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}", ""]);
740
- // Exports
741
- /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
742
-
743
-
744
728
  /***/ }),
745
729
 
746
730
  /***/ 5917:
@@ -1301,6 +1285,22 @@ module.exports = function (exec) {
1301
1285
  };
1302
1286
 
1303
1287
 
1288
+ /***/ }),
1289
+
1290
+ /***/ 9101:
1291
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1292
+
1293
+ // style-loader: Adds some css to the DOM by adding a <style> tag
1294
+
1295
+ // load the styles
1296
+ var content = __webpack_require__(2825);
1297
+ if(content.__esModule) content = content.default;
1298
+ if(typeof content === 'string') content = [[module.id, content, '']];
1299
+ if(content.locals) module.exports = content.locals;
1300
+ // add the styles to the DOM
1301
+ var add = (__webpack_require__(9548)/* ["default"] */ .A)
1302
+ var update = add("7e46c097", content, true, {"sourceMap":false,"shadowMode":false});
1303
+
1304
1304
  /***/ }),
1305
1305
 
1306
1306
  /***/ 9297:
@@ -1855,12 +1855,12 @@ if (typeof window !== 'undefined') {
1855
1855
  // Indicate to webpack that this file can be concatenated
1856
1856
  /* harmony default export */ var setPublicPath = (null);
1857
1857
 
1858
- ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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/videoCanvas.vue?vue&type=template&id=50940904&scoped=true
1858
+ ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=450f21fe&scoped=true
1859
1859
  var render = function render() {
1860
1860
  var _vm = this,
1861
1861
  _c = _vm._self._c;
1862
1862
  return _c('div', {
1863
- staticClass: "video-canvas"
1863
+ staticClass: "xjzh-img-canvas"
1864
1864
  }, _vm._l(_vm.cameraObj, function (item, index) {
1865
1865
  return _c('div', {
1866
1866
  key: index,
@@ -1896,15 +1896,15 @@ var web_url_search_params_delete = __webpack_require__(4603);
1896
1896
  var web_url_search_params_has = __webpack_require__(7566);
1897
1897
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
1898
1898
  var web_url_search_params_size = __webpack_require__(8721);
1899
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/videoCanvas.vue?vue&type=script&lang=js
1899
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/babel-loader/lib/index.js!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
1900
1900
 
1901
1901
 
1902
1902
 
1903
1903
 
1904
1904
 
1905
1905
 
1906
- /* harmony default export */ var videoCanvasvue_type_script_lang_js = ({
1907
- name: "VideoCanvas",
1906
+ /* harmony default export */ var xjzhImgCanvasvue_type_script_lang_js = ({
1907
+ name: "XjzhImgCanvas",
1908
1908
  props: {
1909
1909
  videoUrl: {
1910
1910
  type: String,
@@ -1912,11 +1912,11 @@ var web_url_search_params_size = __webpack_require__(8721);
1912
1912
  },
1913
1913
  width: {
1914
1914
  type: String,
1915
- default: '640px'
1915
+ default: '480px'
1916
1916
  },
1917
1917
  height: {
1918
1918
  type: String,
1919
- default: '360px'
1919
+ default: '270px'
1920
1920
  },
1921
1921
  showTitle: {
1922
1922
  type: Boolean,
@@ -1925,15 +1925,15 @@ var web_url_search_params_size = __webpack_require__(8721);
1925
1925
  isSwitchSide: {
1926
1926
  type: Boolean,
1927
1927
  default: false
1928
+ },
1929
+ canvasSize: {
1930
+ type: Array,
1931
+ default: () => {
1932
+ return [1920, 1080];
1933
+ }
1928
1934
  }
1929
1935
  },
1930
1936
  watch: {
1931
- videoUrl: {
1932
- handler(val) {
1933
- console.log('object :>> ', val);
1934
- this.initWorker();
1935
- }
1936
- },
1937
1937
  isSwitchSide: {
1938
1938
  handler(val) {
1939
1939
  console.log('object :>> ', val);
@@ -1957,36 +1957,41 @@ var web_url_search_params_size = __webpack_require__(8721);
1957
1957
  currentFullScreen: '',
1958
1958
  answerPhoto: {
1959
1959
  canvas: null,
1960
- context: null,
1961
- isPhoto: false
1960
+ ctx: null,
1961
+ isPhoto: false,
1962
+ canvasSize: [1920, 1080]
1962
1963
  },
1963
- canvasSize: [1920, 1080]
1964
+ cameraObj: null
1964
1965
  };
1965
1966
  },
1966
- mounted() {},
1967
+ mounted() {
1968
+ this.initWorker();
1969
+ },
1967
1970
  methods: {
1968
1971
  initAnswerPhoto() {
1969
1972
  this.answerPhoto.canvas = document.createElement('canvas');
1970
- this.answerPhoto.context = this.answerPhoto.canvas.getContext('2d');
1973
+ this.answerPhoto.ctx = this.answerPhoto.canvas.getContext('2d');
1971
1974
  this.answerPhoto.canvas.width = this.canvasSize[0] * this.cameraNum;
1972
1975
  this.answerPhoto.canvas.height = this.canvasSize[1];
1973
1976
  },
1974
1977
  initCanvas() {
1975
1978
  for (let i = 0; i < this.cameraNum; i++) {
1976
1979
  let type = this.cameraType[i].value;
1977
- this.cameraObj[type].canvas = document.getElementById(this.cameraObj[type].domeId);
1978
- this.cameraObj[type].content = this.cameraObj[type].canvas.getContext('2d');
1980
+ this.cameraObj[type].canvas = this.$refs[this.cameraObj[type].domeId][0];
1981
+ this.cameraObj[type].ctx = this.cameraObj[type].canvas.getContext('2d');
1979
1982
  this.cameraObj[type].canvas.width = this.canvasSize[0];
1980
1983
  this.cameraObj[type].canvas.height = this.canvasSize[1];
1981
1984
  this.cameraObj[type].imgBox = new Image();
1982
- this.cameraObj[type].videoUrl = '';
1983
1985
  }
1984
1986
  },
1985
1987
  initWorker() {
1986
1988
  const url = `ws://${this.videoUrl}/socket`;
1987
1989
  let count = 0;
1988
1990
  this.destroyWorker();
1991
+ this.destroyCanvasData();
1992
+ console.log('object :>> url', url);
1989
1993
  this.worker = new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(600), __webpack_require__.b));
1994
+ console.log('object :>> this.worker', this.worker);
1990
1995
  this.worker.onmessage = async event => {
1991
1996
  const {
1992
1997
  type,
@@ -1998,35 +2003,43 @@ var web_url_search_params_size = __webpack_require__(8721);
1998
2003
  if (type === 'message') {
1999
2004
  if (typeof data === 'number') {
2000
2005
  this.cameraNum = data;
2001
- localStorage.setItem('cameraNum', this.cameraNum);
2002
2006
  for (let i = 0; i < this.cameraNum; i++) {
2003
- this.cameraObj[this.cameraType[i].value] = {
2004
- domeId: `canvas_${this.cameraType[i].value}`,
2007
+ let typeVal = this.cameraType[i].value;
2008
+ this.cameraObj[typeVal] = {
2009
+ domeId: `canvas_${typeVal}`,
2010
+ title: this.cameraType[i].label,
2011
+ // 摄像头名称
2005
2012
  canvas: null,
2006
- content: null,
2007
- videoUrl: '',
2013
+ ctx: null,
2008
2014
  totalFPS: 0,
2015
+ // 单个摄像头 - 收到总帧数
2009
2016
  showTotalFPS: 0,
2010
- frameSkip: 1,
2017
+ // 单个摄像头 - 渲染总帧数
2018
+ frameSkip: 0,
2019
+ // 单个摄像头 - 跳帧 1(30),2(15),3(10)
2020
+
2011
2021
  imgBox: null,
2022
+ allUrl: [],
2023
+ // 所有图片地址
2012
2024
  isLoading: false,
2013
- isFullScreen: false,
2014
- title: this.cameraType[i].label
2025
+ // 图片是否加载完
2026
+ isFullScreen: false // 画面是否全屏
2015
2027
  };
2016
2028
  }
2029
+ this.$forceUpdate();
2030
+ // 根据摄像头数量,初始化画布
2017
2031
  this.$nextTick(() => {
2018
2032
  this.initAnswerPhoto();
2019
2033
  this.initCanvas();
2020
2034
  });
2021
2035
  return;
2022
2036
  }
2037
+
2038
+ // 摄像头画面渲染
2023
2039
  count++;
2024
2040
  this.showCanvas(this.cameraType[count - 1].value, data);
2025
2041
  count = count >= this.cameraNum ? 0 : count;
2026
2042
  }
2027
- if (type === 'message') {
2028
- console.log('WebSocket open:');
2029
- }
2030
2043
  if (type === 'close') {
2031
2044
  console.log('WebSocket closed:', wsEvent);
2032
2045
  }
@@ -2050,61 +2063,110 @@ var web_url_search_params_size = __webpack_require__(8721);
2050
2063
  this.worker = null;
2051
2064
  }
2052
2065
  },
2053
- showVideoCanvas(type, blod) {
2054
- // 当其中一个全屏时,其它画面不做渲染操作,并且清理其他缓存
2066
+ showCanvas(type, blod) {
2067
+ this.cameraObj[type].totalFPS++;
2068
+ if (!this.cameraObj[type] || !this.cameraObj[type].imgBox || !this.cameraObj[type].ctx) {
2069
+ return;
2070
+ }
2055
2071
  if (this.currentFullScreen && this.currentFullScreen !== type) {
2056
- if (this.cameraObj[type].videoUrl) {
2057
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2058
- this.cameraObj[type].videoUrl = '';
2059
- }
2072
+ this.destroyUrl(type);
2060
2073
  return;
2061
2074
  }
2062
2075
  if (this.cameraObj[type].isLoading) return;
2063
- this.cameraObj[type].videoUrl = URL.createObjectURL(blod);
2064
2076
  this.cameraObj[type].isLoading = true;
2065
- this.cameraObj[type].imgBox.src = this.cameraObj[type].videoUrl;
2077
+ this.cameraObj[type].allUrl.unshift(URL.createObjectURL(blod));
2078
+ this.cameraObj[type].imgBox.src = this.cameraObj[type].allUrl[0];
2066
2079
  this.cameraObj[type].imgBox.onload = () => {
2080
+ if (!this.cameraObj[type].ctx) return;
2081
+ this.cameraObj[type].ctx.drawImage(this.cameraObj[type].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
2067
2082
  this.cameraObj[type].isLoading = false;
2068
- this.cameraObj[type].content.drawImage(this.cameraObj[type].imgBox, 0, 0, this.canvasSize[0], this.canvasSize[1]);
2069
- if (this.cameraObj[type].videoUrl) {
2070
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2071
- this.cameraObj[type].videoUrl = '';
2083
+ if (this.answerPhoto.isPhoto) {
2084
+ // 拍照使用
2085
+ if (this.cameraNum > 0) {
2086
+ this.answerPhoto.ctx.drawImage(this.cameraObj.main.imgBox, this.answerPhoto.canvasSize[0] * 0, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2087
+ }
2088
+ if (this.cameraNum > 1) {
2089
+ this.answerPhoto.ctx.drawImage(this.cameraObj.sub.imgBox, this.answerPhoto.canvasSize[0] * 1, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2090
+ }
2091
+ if (this.cameraNum > 2) {
2092
+ this.answerPhoto.ctx.drawImage(this.cameraObj.side.imgBox, this.answerPhoto.canvasSize[0] * 2, 0, this.answerPhoto.canvasSize[0], this.answerPhoto.canvasSize[1]);
2093
+ }
2094
+ return;
2072
2095
  }
2096
+ // 清除内存
2097
+ this.cameraObj[type].imgBox.src = '';
2098
+ this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
2073
2099
  };
2074
2100
  this.cameraObj[type].imgBox.onerror = () => {
2075
2101
  this.cameraObj[type].isLoading = false;
2076
- // 清除内存
2077
- if (this.cameraObj[type].videoUrl) {
2078
- URL.revokeObjectURL(this.cameraObj[type].videoUrl);
2079
- this.cameraObj[type].videoUrl = '';
2080
- }
2102
+ if (!this.cameraObj[type] || !this.cameraObj[type].imgBox) return;
2103
+ this.cameraObj[type].imgBox.src = '';
2104
+ this.destroyUrl(type, this.cameraObj[type].maxUrlNum);
2081
2105
  };
2082
2106
  },
2083
- AllPhoto() {
2084
- let type = this.cameraType[this.cameraNum - 1].value;
2085
- this.videoObj.videoSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
2086
- return this.videoObj.videoSrc;
2107
+ handleScreen(type) {
2108
+ this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
2109
+ this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
2110
+ this.$forceUpdate();
2087
2111
  },
2112
+ destroyCanvasData() {
2113
+ for (let i = 0; i < this.cameraNum; i++) {
2114
+ let type = this.cameraType[i].value;
2115
+ this.destroyUrl(type);
2116
+ this.destroyCanvas(type);
2117
+ }
2118
+ },
2119
+ destroyUrl(type) {
2120
+ for (let i = 0; i < this.cameraObj[type].allUrl.length; i++) {
2121
+ URL.revokeObjectURL(this.cameraObj[type].allUrl[i]);
2122
+ delete this.cameraObj[type].allUrl[i];
2123
+ }
2124
+ this.cameraObj[type].allUrl = [];
2125
+ },
2126
+ destroyCanvas(type) {
2127
+ if (!this.cameraObj[type]) return;
2128
+ for (let key in this.cameraObj[type]) {
2129
+ if (typeof this.cameraObj[type][key] == 'object') {
2130
+ this.cameraObj[type][key] = '';
2131
+ }
2132
+ delete this.cameraObj[type][key];
2133
+ }
2134
+ },
2135
+ // 所有摄像头横向照片
2136
+ allPhoto() {
2137
+ this.answerPhoto.isPhoto = true;
2138
+ let startTime = new Date().getTime();
2139
+ return new Promise(resolve => {
2140
+ setTimeout(() => {
2141
+ resolve(this.answerPhoto.canvas.toDataURL('image/jpeg'));
2142
+ let endTime = new Date().getTime();
2143
+ let second = (endTime - startTime) / 1000;
2144
+ this.cameraObj.main.totalFPS = this.cameraObj.main.totalFPS + ~~(second * 30);
2145
+ this.cameraObj.sub.totalFPS = this.cameraObj.sub.totalFPS + ~~(second * 30);
2146
+ this.cameraObj.side.totalFPS = this.cameraObj.side.totalFPS + ~~(second * 30);
2147
+ this.answerPhoto.isPhoto = false;
2148
+ }, 200);
2149
+ });
2150
+ },
2151
+ // 单个摄像头照片
2088
2152
  selectPhoto(num) {
2089
2153
  let type = this.cameraType[num - 1].value;
2090
2154
  this.videoObj.videoMergeSrc = this.cameraObj[type].canvas.toDataURL('image/jpeg');
2091
2155
  return this.videoObj.videoMergeSrc;
2092
- },
2093
- handleScreen(type) {
2094
- this.$set(this.cameraObj[type], 'isFullScreen', !this.cameraObj[type].isFullScreen);
2095
- this.currentFullScreen = this.cameraObj[type].isFullScreen ? type : '';
2096
2156
  }
2097
2157
  },
2098
2158
  beforeDestroy() {
2099
2159
  this.answerPhoto.canvas = null;
2100
- this.answerPhoto.context = null;
2160
+ this.answerPhoto.ctx = null;
2161
+ this.destroyWorker();
2162
+ this.destroyCanvasData();
2101
2163
  }
2102
2164
  });
2103
- ;// ./packages/components/videoCanvas.vue?vue&type=script&lang=js
2104
- /* harmony default export */ var components_videoCanvasvue_type_script_lang_js = (videoCanvasvue_type_script_lang_js);
2105
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/videoCanvas.vue?vue&type=style&index=0&id=50940904&prod&lang=scss&scoped=true
2106
- var videoCanvasvue_type_style_index_0_id_50940904_prod_lang_scss_scoped_true = __webpack_require__(4707);
2107
- ;// ./packages/components/videoCanvas.vue?vue&type=style&index=0&id=50940904&prod&lang=scss&scoped=true
2165
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=script&lang=js
2166
+ /* harmony default export */ var components_xjzhImgCanvasvue_type_script_lang_js = (xjzhImgCanvasvue_type_script_lang_js);
2167
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2168
+ var xjzhImgCanvasvue_type_style_index_0_id_450f21fe_prod_lang_scss_scoped_true = __webpack_require__(9101);
2169
+ ;// ./packages/components/xjzhImgCanvas.vue?vue&type=style&index=0&id=450f21fe&prod&lang=scss&scoped=true
2108
2170
 
2109
2171
  ;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
2110
2172
  /* globals __VUE_SSR_CONTEXT__ */
@@ -2204,7 +2266,7 @@ function normalizeComponent(
2204
2266
  }
2205
2267
  }
2206
2268
 
2207
- ;// ./packages/components/videoCanvas.vue
2269
+ ;// ./packages/components/xjzhImgCanvas.vue
2208
2270
 
2209
2271
 
2210
2272
 
@@ -2214,17 +2276,17 @@ function normalizeComponent(
2214
2276
  /* normalize component */
2215
2277
 
2216
2278
  var component = normalizeComponent(
2217
- components_videoCanvasvue_type_script_lang_js,
2279
+ components_xjzhImgCanvasvue_type_script_lang_js,
2218
2280
  render,
2219
2281
  staticRenderFns,
2220
2282
  false,
2221
2283
  null,
2222
- "50940904",
2284
+ "450f21fe",
2223
2285
  null
2224
2286
 
2225
2287
  )
2226
2288
 
2227
- /* harmony default export */ var videoCanvas = (component.exports);
2289
+ /* harmony default export */ var xjzhImgCanvas = (component.exports);
2228
2290
  ;// ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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/videoRtsp.vue?vue&type=template&id=345d94c7
2229
2291
  var videoRtspvue_type_template_id_345d94c7_render = function render() {
2230
2292
  var _vm = this,
@@ -2303,7 +2365,7 @@ var videoWebGl_component = normalizeComponent(
2303
2365
 
2304
2366
 
2305
2367
 
2306
- const components = [videoCanvas, videoRtsp, videoWebGl];
2368
+ const components = [xjzhImgCanvas, videoRtsp, videoWebGl];
2307
2369
  const install = function (Vue) {
2308
2370
  if (install.installed) return;
2309
2371
  components.map(component => Vue.component(component.name, component));
@@ -1,2 +1,2 @@
1
- (function(e,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["xjzh-component"]=o():e["xjzh-component"]=o()})("undefined"!==typeof self?self:this,function(){return function(){var e={};return self.onmessage=function(e){const{url:o}=e.data;let t=0,n=new WebSocket(o);n.onopen=function(){self.postMessage({type:"open"})},n.onmessage=async function({data:e}){if(1==e.size)t=await self.convertBlobToNumber(e),self.postMessage({type:"message",data:t});else{let o=new Blob([e],{type:"image/jpeg"});self.postMessage({type:"message",data:o}),o=null}e=null},n.onclose=function(e){self.postMessage({type:"close",event:e}),n=null,setTimeout(()=>{n=new WebSocket(o)},1e3)},n.onerror=function(e){self.postMessage({type:"error",error:e})}},self.convertBlobToNumber=function(e){return new Promise((o,t)=>{let n=new FileReader;n.onload=e=>{o(e.target.result.charCodeAt(0)),n=null},n.onerror=e=>{t(e)},n.readAsText(e)})},e}()});
1
+ (function(e,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["xjzh-component"]=o():e["xjzh-component"]=o()})("undefined"!==typeof self?self:this,function(){return function(){var e={};return self.onmessage=function(e){const{url:o}=e.data;let t=0,n=new WebSocket(o);console.log("object :>> ws",n),n.onopen=function(){self.postMessage({type:"open"})},n.onmessage=async function({data:e}){if(console.log("object :>> ws - data",e),1==e.size)t=await self.convertBlobToNumber(e),self.postMessage({type:"message",data:t});else{let o=new Blob([e],{type:"image/jpeg"});self.postMessage({type:"message",data:o}),o=null}e=null},n.onclose=function(e){self.postMessage({type:"close",event:e}),n=null,setTimeout(()=>{n=new WebSocket(o)},1e3)},n.onerror=function(e){self.postMessage({type:"error",error:e})}},self.convertBlobToNumber=function(e){return new Promise((o,t)=>{let n=new FileReader;n.onload=e=>{o(e.target.result.charCodeAt(0)),n=null},n.onerror=e=>{t(e)},n.readAsText(e)})},e}()});
2
2
  //# sourceMappingURL=xjzh-component.umd.min.221.js.map
@@ -1,2 +1,2 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xjzh-component"]=e():t["xjzh-component"]=e()})("undefined"!==typeof self?self:this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),o=r(9039),i=r(4901),a=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),l=r(1181),f=l.enforce,d=l.get,p=String,h=Object.defineProperty,v=n("".slice),m=n("".replace),g=n([].join),b=s&&!o(function(){return 8!==h(function(){},"length",{value:8}).length}),y=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===v(p(e),0,7)&&(e="["+m(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&a(r,"arity")&&t.length!==r.arity&&h(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=f(t);return a(n,"source")||(n.source=g(y,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return i(this)&&d(this).source||u(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),o=r(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},655:function(t,e,r){"use strict";var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},757:function(t,e,r){"use strict";var n=r(7751),o=r(4901),i=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},1181:function(t,e,r){"use strict";var n,o,i,a=r(8622),s=r(4576),c=r(34),u=r(6699),l=r(9297),f=r(7629),d=r(6119),p=r(421),h="Object already initialized",v=s.TypeError,m=s.WeakMap,g=function(t){return i(t)?o(t):n(t,{})},b=function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return r}};if(a||f.state){var y=f.state||(f.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw new v(h);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var w=d("state");p[w]=!0,n=function(t,e){if(l(t,w))throw new v(h);return e.facade=t,u(t,w,e),e},o=function(t){return l(t,w)?t[w]:{}},i=function(t){return l(t,w)}}t.exports={set:n,get:o,has:i,enforce:g,getterFor:b}},1601:function(t){"use strict";t.exports=function(t){return t[1]}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},2106:function(t,e,r){"use strict";var n=r(283),o=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},2140:function(t,e,r){"use strict";var n=r(8227),o=n("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},2195:function(t,e,r){"use strict";var n=r(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},2777:function(t,e,r){"use strict";var n=r(9565),o=r(34),i=r(757),a=r(5966),s=r(4270),c=r(8227),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,c=a(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!o(r)||i(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},2839:function(t,e,r){"use strict";var n=r(4576),o=n.navigator,i=o&&o.userAgent;t.exports=i?String(i):""},3392:function(t,e,r){"use strict";var n=r(9504),o=0,i=Math.random(),a=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3435:function(t,e,r){"use strict";r.r(e);var n=r(1601),o=r.n(n),i=r(6314),a=r.n(i),s=a()(o());s.push([t.id,".video-canvas[data-v-50940904]{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-evenly;margin-top:16px}.video-canvas .itemBox[data-v-50940904]{border-radius:4px;transform:translateZ(0);margin-bottom:11px;position:relative;overflow:hidden}.video-canvas canvas[data-v-50940904]{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}.video-canvas .full-screen[data-v-50940904]{width:100%;height:100%;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}",""]),e["default"]=s},3706:function(t,e,r){"use strict";var n=r(9504),o=r(4901),i=r(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,r){"use strict";var n=r(4576),o=r(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),o=r(4901),i=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},4495:function(t,e,r){"use strict";var n=r(9519),o=r(9039),i=r(4576),a=i.String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,r){"use strict";var n=r(6840),o=r(9504),i=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=o(c.append),l=o(c["delete"]),f=o(c.forEach),d=o([].push),p=new s("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="a=2"&&n(c,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];f(this,function(t,e){d(n,{key:e,value:t})}),a(e,1);var o,s=i(t),c=i(r),p=0,h=0,v=!1,m=n.length;while(p<m)o=n[p++],v||o.key===s?(v=!0,l(this,o.key)):h++;while(h<m)o=n[h++],o.key===s&&o.value===c||u(this,o.key,o.value)},{enumerable:!0,unsafe:!0})},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),o=r(5917),i=r(8686),a=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",p="writable";e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=l(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5917:function(t,e,r){"use strict";var n=r(3724),o=r(9039),i=r(4055);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),o=r(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",n="undefined"!==typeof e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,n,o,i){"string"===typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&a[l[0]]||("undefined"!==typeof i&&("undefined"===typeof l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=i),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),e.push(l))}},e}},6368:function(t,e,r){var n=r(3435);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var o=r(9548).A;o("bdf71b6a",n,!0,{sourceMap:!1,shadowMode:!1})},6395:function(t){"use strict";t.exports=!1},6699:function(t,e,r){"use strict";var n=r(3724),o=r(4913),i=r(6980);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6840:function(t,e,r){"use strict";var n=r(4901),o=r(4913),i=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&i(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),o=r(4901),i=r(2195),a=r(8227),s=a("toStringTag"),c=Object,u="Arguments"===i(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),s))?r:u?i(e):"Object"===(n=i(e))&&o(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7566:function(t,e,r){"use strict";var n=r(6840),o=r(9504),i=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=o(c.getAll),l=o(c.has),f=new s("a=1");!f.has("a",2)&&f.has("a",void 0)||n(c,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=u(this,t);a(e,1);var o=i(r),s=0;while(s<n.length)if(n[s++]===o)return!0;return!1},{enumerable:!0,unsafe:!0})},7629:function(t,e,r){"use strict";var n=r(6395),o=r(4576),i=r(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.45.1",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7750:function(t,e,r){"use strict";var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),o=r(4901),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},8227:function(t,e,r){"use strict";var n=r(4576),o=r(5745),i=r(9297),a=r(3392),s=r(4495),c=r(7040),u=n.Symbol,l=o("wks"),f=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return i(l,t)||(l[t]=s&&i(u,t)?u[t]:f("Symbol."+t)),l[t]}},8551:function(t,e,r){"use strict";var n=r(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),o=r(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8686:function(t,e,r){"use strict";var n=r(3724),o=r(9039);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:function(t,e,r){"use strict";var n=r(3724),o=r(9504),i=r(2106),a=URLSearchParams.prototype,s=o(a.forEach);n&&!("size"in a)&&i(a,"size",{get:function(){var t=0;return s(this,function(){t++}),t},configurable:!0,enumerable:!0})},8981:function(t,e,r){"use strict";var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9297:function(t,e,r){"use strict";var n=r(9504),o=r(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),o=r(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,o,i=r(4576),a=r(2839),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),o=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),t.exports=o},9548:function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},o=0;o<e.length;o++){var i=e[o],a=i[0],s=i[1],c=i[2],u=i[3],l={id:t+":"+o,css:s,media:c,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.d(e,{A:function(){return h}});var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},f=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,r,o){u=r,f=o||{};var a=n(t,e);return v(a),function(e){for(var r=[],o=0;o<a.length;o++){var s=a[o],c=i[s.id];c.refs--,r.push(c)}e?(a=n(t,e),v(a)):a=[];for(o=0;o<r.length;o++){c=r[o];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}}function v(t){for(var e=0;e<t.length;e++){var r=t[e],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(g(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(g(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,r,n=document.querySelector("style["+d+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(p){var o=c++;n=s||(s=m()),e=y.bind(null,n,o,!1),r=y.bind(null,n,o,!0)}else n=m(),e=w.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var b=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function w(t,e){var r=e.css,n=e.media,o=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute(d,e.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},9565:function(t,e,r){"use strict";var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.m=t,function(){r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,{a:e}),e}}(),function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.u=function(t){return"xjzh-component.umd.min."+t+".js"}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}(),function(){r.b=document.baseURI||self.location.href}();var n={};return function(){"use strict";if(r.r(n),r.d(n,{default:function(){return T}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(r.p=e[1])}var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"video-canvas"},t._l(t.cameraObj,function(r,n){return e("div",{key:n,class:["itemBox",r.isFullScreen?"full-screen":""],style:{width:t.width,height:t.height},on:{click:function(e){return t.handleScreen(n)}}},[e("p",{directives:[{name:"show",rawName:"v-show",value:t.showTitle,expression:"showTitle"}],staticClass:"item-title"},[t._v(t._s(r.title))]),e("canvas",{ref:r.domeId,refInFor:!0})])}),0)},i=[],a=(r(4603),r(7566),r(8721),{name:"VideoCanvas",props:{videoUrl:{type:String,default:"localhost:56000"},width:{type:String,default:"640px"},height:{type:String,default:"360px"},showTitle:{type:Boolean,default:!0},isSwitchSide:{type:Boolean,default:!1}},watch:{videoUrl:{handler(t){console.log("object :>> ",t),this.initWorker()}},isSwitchSide:{handler(t){console.log("object :>> ",t),this.cameraType[2].label=this.isSwitchSide?"显":"侧"}}},data(){return{cameraNum:0,cameraType:[{label:"斜",value:"main"},{label:"俯",value:"sub"},{label:"侧",value:"side"}],currentFullScreen:"",answerPhoto:{canvas:null,context:null,isPhoto:!1},canvasSize:[1920,1080]}},mounted(){},methods:{initAnswerPhoto(){this.answerPhoto.canvas=document.createElement("canvas"),this.answerPhoto.context=this.answerPhoto.canvas.getContext("2d"),this.answerPhoto.canvas.width=this.canvasSize[0]*this.cameraNum,this.answerPhoto.canvas.height=this.canvasSize[1]},initCanvas(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e].canvas=document.getElementById(this.cameraObj[e].domeId),this.cameraObj[e].content=this.cameraObj[e].canvas.getContext("2d"),this.cameraObj[e].canvas.width=this.canvasSize[0],this.cameraObj[e].canvas.height=this.canvasSize[1],this.cameraObj[e].imgBox=new Image,this.cameraObj[e].videoUrl=""}},initWorker(){const t=`ws://${this.videoUrl}/socket`;let e=0;this.destroyWorker(),this.worker=new Worker(new URL(r.p+r.u(221),r.b)),this.worker.onmessage=async t=>{const{type:r,data:n,event:o,error:i}=t.data;if("message"===r){if("number"===typeof n){this.cameraNum=n,localStorage.setItem("cameraNum",this.cameraNum);for(let t=0;t<this.cameraNum;t++)this.cameraObj[this.cameraType[t].value]={domeId:`canvas_${this.cameraType[t].value}`,canvas:null,content:null,videoUrl:"",totalFPS:0,showTotalFPS:0,frameSkip:1,imgBox:null,isLoading:!1,isFullScreen:!1,title:this.cameraType[t].label};return void this.$nextTick(()=>{this.initAnswerPhoto(),this.initCanvas()})}e++,this.showCanvas(this.cameraType[e-1].value,n),e=e>=this.cameraNum?0:e}"message"===r&&console.log("WebSocket open:"),"close"===r&&console.log("WebSocket closed:",o),"error"===r&&console.log(`WebSocket error: ${i.message}`)},this.worker.onerror=t=>{console.log(`Worker error: ${t.message}`)},this.cameraObj={},this.worker.postMessage({url:t})},destroyWorker(){this.worker&&(this.worker.terminate(),this.worker=null)},showVideoCanvas(t,e){this.currentFullScreen&&this.currentFullScreen!==t?this.cameraObj[t].videoUrl&&(URL.revokeObjectURL(this.cameraObj[t].videoUrl),this.cameraObj[t].videoUrl=""):this.cameraObj[t].isLoading||(this.cameraObj[t].videoUrl=URL.createObjectURL(e),this.cameraObj[t].isLoading=!0,this.cameraObj[t].imgBox.src=this.cameraObj[t].videoUrl,this.cameraObj[t].imgBox.onload=()=>{this.cameraObj[t].isLoading=!1,this.cameraObj[t].content.drawImage(this.cameraObj[t].imgBox,0,0,this.canvasSize[0],this.canvasSize[1]),this.cameraObj[t].videoUrl&&(URL.revokeObjectURL(this.cameraObj[t].videoUrl),this.cameraObj[t].videoUrl="")},this.cameraObj[t].imgBox.onerror=()=>{this.cameraObj[t].isLoading=!1,this.cameraObj[t].videoUrl&&(URL.revokeObjectURL(this.cameraObj[t].videoUrl),this.cameraObj[t].videoUrl="")})},AllPhoto(){let t=this.cameraType[this.cameraNum-1].value;return this.videoObj.videoSrc=this.cameraObj[t].canvas.toDataURL("image/jpeg"),this.videoObj.videoSrc},selectPhoto(t){let e=this.cameraType[t-1].value;return this.videoObj.videoMergeSrc=this.cameraObj[e].canvas.toDataURL("image/jpeg"),this.videoObj.videoMergeSrc},handleScreen(t){this.$set(this.cameraObj[t],"isFullScreen",!this.cameraObj[t].isFullScreen),this.currentFullScreen=this.cameraObj[t].isFullScreen?t:""}},beforeDestroy(){this.answerPhoto.canvas=null,this.answerPhoto.context=null}}),s=a;r(6368);function c(t,e,r,n,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var u=c(s,o,i,!1,null,"50940904",null),l=u.exports,f=function(){var t=this,e=t._self._c;return e("div")},d=[],p={name:"VideoRtsp",data(){return{}}},h=p,v=c(h,f,d,!1,null,null,null),m=v.exports,g=function(){var t=this,e=t._self._c;return e("div")},b=[],y={name:"VideoWebGl",data(){return{}}},w=y,x=c(w,g,b,!1,null,null,null),S=x.exports;const j=[l,m,S],O=function(t){O.installed||j.map(e=>t.component(e.name,e))};"undefined"!==typeof window&&window.Vue&&O(window.Vue);var U={install:O},T=U}(),n}()});
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xjzh-component"]=e():t["xjzh-component"]=e()})("undefined"!==typeof self?self:this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),a=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),l=r(1181),f=l.enforce,h=l.get,p=String,d=Object.defineProperty,m=n("".slice),v=n("".replace),g=n([].join),b=s&&!i(function(){return 8!==d(function(){},"length",{value:8}).length}),y=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===m(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&a(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=f(t);return a(n,"source")||(n.source=g(y,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||u(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},655:function(t,e,r){"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),a=r(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,s(t))}},1181:function(t,e,r){"use strict";var n,i,o,a=r(8622),s=r(4576),c=r(34),u=r(6699),l=r(9297),f=r(7629),h=r(6119),p=r(421),d="Object already initialized",m=s.TypeError,v=s.WeakMap,g=function(t){return o(t)?i(t):n(t,{})},b=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}};if(a||f.state){var y=f.state||(f.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw new m(d);return e.facade=t,y.set(t,e),e},i=function(t){return y.get(t)||{}},o=function(t){return y.has(t)}}else{var w=h("state");p[w]=!0,n=function(t,e){if(l(t,w))throw new m(d);return e.facade=t,u(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:n,get:i,has:o,enforce:g,getterFor:b}},1601:function(t){"use strict";t.exports=function(t){return t[1]}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},2140:function(t,e,r){"use strict";var n=r(8227),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),a=r(5966),s=r(4270),c=r(8227),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=a(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},2839:function(t,e,r){"use strict";var n=r(4576),i=n.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),a=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4005:function(t,e,r){"use strict";r.r(e);var n=r(1601),i=r.n(n),o=r(6314),a=r.n(o),s=a()(i());s.push([t.id,".xjzh-img-canvas[data-v-450f21fe]{width:100%;height:100%;display:flex;justify-content:space-evenly;align-items:center;flex-wrap:wrap}.xjzh-img-canvas .itemBox[data-v-450f21fe]{border-radius:4px;transform:translateZ(0);position:relative;overflow:hidden}.xjzh-img-canvas .itemBox .item-title[data-v-450f21fe]{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-450f21fe]{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-450f21fe]:last-child{margin-bottom:0}.xjzh-img-canvas .full-screen[data-v-450f21fe]{width:100%!important;height:100%!important;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999}",""]),e["default"]=s},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a("Can't convert object to primitive value")}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.append),l=i(c["delete"]),f=i(c.forEach),h=i([].push),p=new s("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="a=2"&&n(c,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];f(this,function(t,e){h(n,{key:e,value:t})}),a(e,1);var i,s=o(t),c=o(r),p=0,d=0,m=!1,v=n.length;while(p<v)i=n[p++],m||i.key===s?(m=!0,l(this,i.key)):d++;while(d<v)i=n[d++],i.key===s&&i.value===c||u(this,i.key,i.value)},{enumerable:!0,unsafe:!0})},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),a=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=n?o?function(t,e,r){if(a(t),e=s(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=l(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),i)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5326:function(t,e,r){var n=r(4005);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var i=r(9548).A;i("6d537929",n,!0,{sourceMap:!1,shadowMode:!1})},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",n="undefined"!==typeof e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,n,i,o){"string"===typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&a[l[0]]||("undefined"!==typeof o&&("undefined"===typeof l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},6395:function(t){"use strict";t.exports=!1},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),a=r(9433);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&o(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),a=r(8227),s=a("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),s))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7566:function(t,e,r){"use strict";var n=r(6840),i=r(9504),o=r(655),a=r(2812),s=URLSearchParams,c=s.prototype,u=i(c.getAll),l=i(c.has),f=new s("a=1");!f.has("a",2)&&f.has("a",void 0)||n(c,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=u(this,t);a(e,1);var i=o(r),s=0;while(s<n.length)if(n[s++]===i)return!0;return!1},{enumerable:!0,unsafe:!0})},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),a="__core-js_shared__",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.45.1",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),a=r(3392),s=r(4495),c=r(7040),u=n.Symbol,l=i("wks"),f=c?u["for"]||u:u&&u.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(u,t)?u[t]:f("Symbol."+t)),l[t]}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:function(t,e,r){"use strict";var n=r(3724),i=r(9504),o=r(2106),a=URLSearchParams.prototype,s=i(a.forEach);n&&!("size"in a)&&o(a,"size",{get:function(){var t=0;return s(this,function(){t++}),t},configurable:!0,enumerable:!0})},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,i,o=r(4576),a=r(2839),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},9548:function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.d(e,{A:function(){return d}});var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},f=null,h="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(t,e,r,i){u=r,f=i||{};var a=n(t,e);return m(a),function(e){for(var r=[],i=0;i<a.length;i++){var s=a[i],c=o[s.id];c.refs--,r.push(c)}e?(a=n(t,e),m(a)):a=[];for(i=0;i<r.length;i++){c=r[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function m(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(g(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(g(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,r,n=document.querySelector("style["+h+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(p){var i=c++;n=s||(s=v()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=v(),e=w.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var b=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function w(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute(h,e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.m=t,function(){r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,{a:e}),e}}(),function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.u=function(t){return"xjzh-component.umd.min."+t+".js"}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}(),function(){r.b=document.baseURI||self.location.href}();var n={};return function(){"use strict";if(r.r(n),r.d(n,{default:function(){return T}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(r.p=e[1])}var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"xjzh-img-canvas"},t._l(t.cameraObj,function(r,n){return e("div",{key:n,class:["itemBox",r.isFullScreen?"full-screen":""],style:{width:t.width,height:t.height},on:{click:function(e){return t.handleScreen(n)}}},[e("p",{directives:[{name:"show",rawName:"v-show",value:t.showTitle,expression:"showTitle"}],staticClass:"item-title"},[t._v(t._s(r.title))]),e("canvas",{ref:r.domeId,refInFor:!0})])}),0)},o=[],a=(r(4603),r(7566),r(8721),{name:"XjzhImgCanvas",props:{videoUrl:{type:String,default:"localhost:56000"},width:{type:String,default:"480px"},height:{type:String,default:"270px"},showTitle:{type:Boolean,default:!0},isSwitchSide:{type:Boolean,default:!1},canvasSize:{type:Array,default:()=>[1920,1080]}},watch:{isSwitchSide:{handler(t){console.log("object :>> ",t),this.cameraType[2].label=this.isSwitchSide?"显":"侧"}}},data(){return{cameraNum:0,cameraType:[{label:"斜",value:"main"},{label:"俯",value:"sub"},{label:"侧",value:"side"}],currentFullScreen:"",answerPhoto:{canvas:null,ctx:null,isPhoto:!1,canvasSize:[1920,1080]},cameraObj:null}},mounted(){this.initWorker()},methods:{initAnswerPhoto(){this.answerPhoto.canvas=document.createElement("canvas"),this.answerPhoto.ctx=this.answerPhoto.canvas.getContext("2d"),this.answerPhoto.canvas.width=this.canvasSize[0]*this.cameraNum,this.answerPhoto.canvas.height=this.canvasSize[1]},initCanvas(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e].canvas=this.$refs[this.cameraObj[e].domeId][0],this.cameraObj[e].ctx=this.cameraObj[e].canvas.getContext("2d"),this.cameraObj[e].canvas.width=this.canvasSize[0],this.cameraObj[e].canvas.height=this.canvasSize[1],this.cameraObj[e].imgBox=new Image}},initWorker(){const t=`ws://${this.videoUrl}/socket`;let e=0;this.destroyWorker(),this.destroyCanvasData(),console.log("object :>> url",t),this.worker=new Worker(new URL(r.p+r.u(221),r.b)),console.log("object :>> this.worker",this.worker),this.worker.onmessage=async t=>{const{type:r,data:n,event:i,error:o}=t.data;if("message"===r){if("number"===typeof n){this.cameraNum=n;for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.cameraObj[e]={domeId:`canvas_${e}`,title:this.cameraType[t].label,canvas:null,ctx:null,totalFPS:0,showTotalFPS:0,frameSkip:0,imgBox:null,allUrl:[],isLoading:!1,isFullScreen:!1}}return this.$forceUpdate(),void this.$nextTick(()=>{this.initAnswerPhoto(),this.initCanvas()})}e++,this.showCanvas(this.cameraType[e-1].value,n),e=e>=this.cameraNum?0:e}"close"===r&&console.log("WebSocket closed:",i),"error"===r&&console.log(`WebSocket error: ${o.message}`)},this.worker.onerror=t=>{console.log(`Worker error: ${t.message}`)},this.cameraObj={},this.worker.postMessage({url:t})},destroyWorker(){this.worker&&(this.worker.terminate(),this.worker=null)},showCanvas(t,e){this.cameraObj[t].totalFPS++,this.cameraObj[t]&&this.cameraObj[t].imgBox&&this.cameraObj[t].ctx&&(this.currentFullScreen&&this.currentFullScreen!==t?this.destroyUrl(t):this.cameraObj[t].isLoading||(this.cameraObj[t].isLoading=!0,this.cameraObj[t].allUrl.unshift(URL.createObjectURL(e)),this.cameraObj[t].imgBox.src=this.cameraObj[t].allUrl[0],this.cameraObj[t].imgBox.onload=()=>{if(this.cameraObj[t].ctx){if(this.cameraObj[t].ctx.drawImage(this.cameraObj[t].imgBox,0,0,this.canvasSize[0],this.canvasSize[1]),this.cameraObj[t].isLoading=!1,this.answerPhoto.isPhoto)return this.cameraNum>0&&this.answerPhoto.ctx.drawImage(this.cameraObj.main.imgBox,0*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),this.cameraNum>1&&this.answerPhoto.ctx.drawImage(this.cameraObj.sub.imgBox,1*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]),void(this.cameraNum>2&&this.answerPhoto.ctx.drawImage(this.cameraObj.side.imgBox,2*this.answerPhoto.canvasSize[0],0,this.answerPhoto.canvasSize[0],this.answerPhoto.canvasSize[1]));this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum)}},this.cameraObj[t].imgBox.onerror=()=>{this.cameraObj[t].isLoading=!1,this.cameraObj[t]&&this.cameraObj[t].imgBox&&(this.cameraObj[t].imgBox.src="",this.destroyUrl(t,this.cameraObj[t].maxUrlNum))}))},handleScreen(t){this.$set(this.cameraObj[t],"isFullScreen",!this.cameraObj[t].isFullScreen),this.currentFullScreen=this.cameraObj[t].isFullScreen?t:"",this.$forceUpdate()},destroyCanvasData(){for(let t=0;t<this.cameraNum;t++){let e=this.cameraType[t].value;this.destroyUrl(e),this.destroyCanvas(e)}},destroyUrl(t){for(let e=0;e<this.cameraObj[t].allUrl.length;e++)URL.revokeObjectURL(this.cameraObj[t].allUrl[e]),delete this.cameraObj[t].allUrl[e];this.cameraObj[t].allUrl=[]},destroyCanvas(t){if(this.cameraObj[t])for(let e in this.cameraObj[t])"object"==typeof this.cameraObj[t][e]&&(this.cameraObj[t][e]=""),delete this.cameraObj[t][e]},allPhoto(){this.answerPhoto.isPhoto=!0;let t=(new Date).getTime();return new Promise(e=>{setTimeout(()=>{e(this.answerPhoto.canvas.toDataURL("image/jpeg"));let r=(new Date).getTime(),n=(r-t)/1e3;this.cameraObj.main.totalFPS=this.cameraObj.main.totalFPS+~~(30*n),this.cameraObj.sub.totalFPS=this.cameraObj.sub.totalFPS+~~(30*n),this.cameraObj.side.totalFPS=this.cameraObj.side.totalFPS+~~(30*n),this.answerPhoto.isPhoto=!1},200)})},selectPhoto(t){let e=this.cameraType[t-1].value;return this.videoObj.videoMergeSrc=this.cameraObj[e].canvas.toDataURL("image/jpeg"),this.videoObj.videoMergeSrc}},beforeDestroy(){this.answerPhoto.canvas=null,this.answerPhoto.ctx=null,this.destroyWorker(),this.destroyCanvasData()}}),s=a;r(5326);function c(t,e,r,n,i,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var u=c(s,i,o,!1,null,"450f21fe",null),l=u.exports,f=function(){var t=this,e=t._self._c;return e("div")},h=[],p={name:"VideoRtsp",data(){return{}}},d=p,m=c(d,f,h,!1,null,null,null),v=m.exports,g=function(){var t=this,e=t._self._c;return e("div")},b=[],y={name:"VideoWebGl",data(){return{}}},w=y,x=c(w,g,b,!1,null,null,null),j=x.exports;const S=[l,v,j],O=function(t){O.installed||S.map(e=>t.component(e.name,e))};"undefined"!==typeof window&&window.Vue&&O(window.Vue);var P={install:O},T=P}(),n}()});
2
2
  //# sourceMappingURL=xjzh-component.umd.min.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xjzh-component",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "main": "dist/xjzh-component.umd.min.js",
6
6
  "scripts": {