wargerm 0.6.11 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VideoPlayer/index.d.ts +1 -0
- package/dist/index.esm.js +15 -3
- package/dist/index.js +15 -3
- package/package.json +92 -92
package/dist/index.esm.js
CHANGED
@@ -6629,7 +6629,6 @@ function Xgplay(_ref, fRef) {
|
|
6629
6629
|
}
|
6630
6630
|
}
|
6631
6631
|
|
6632
|
-
console.log('playerRef.current', playerRef.current);
|
6633
6632
|
return function () {
|
6634
6633
|
var _playerRef$current, _playerRef$current2, _playerRef$current2$h, _playerRef$current3, _playerRef$current3$f, _playerRef$current4;
|
6635
6634
|
|
@@ -6682,6 +6681,7 @@ function VideoPlayer(_ref, ref) {
|
|
6682
6681
|
_ref$config = _ref.config,
|
6683
6682
|
config = _ref$config === void 0 ? {} : _ref$config,
|
6684
6683
|
layoutIndex = _ref.layoutIndex,
|
6684
|
+
_onDoubleClickCapture = _ref.onDoubleClickCapture,
|
6685
6685
|
_ref$url = _ref.url,
|
6686
6686
|
url = _ref$url === void 0 ? [] : _ref$url,
|
6687
6687
|
_ref$layouts = _ref.layouts,
|
@@ -6753,9 +6753,12 @@ function VideoPlayer(_ref, ref) {
|
|
6753
6753
|
return arr.map(function (item, index) {
|
6754
6754
|
return /*#__PURE__*/React.createElement("div", {
|
6755
6755
|
key: index,
|
6756
|
-
className: "camera ".concat(currentPlayerIndex == index
|
6756
|
+
className: "camera ".concat(currentPlayerIndex == index && arr.length > 1 ? 'activeCamera' : 'noneborder'),
|
6757
6757
|
onClickCapture: function onClickCapture() {
|
6758
6758
|
setCurrentPlayerIndex(index);
|
6759
|
+
},
|
6760
|
+
onDoubleClickCapture: function onDoubleClickCapture() {
|
6761
|
+
_onDoubleClickCapture && _onDoubleClickCapture(index, !document.fullscreenElement);
|
6759
6762
|
}
|
6760
6763
|
}, urls[index] ? /*#__PURE__*/React.createElement(Xgplay$1, {
|
6761
6764
|
setRef: function setRef(ref) {
|
@@ -6811,6 +6814,15 @@ function VideoPlayer(_ref, ref) {
|
|
6811
6814
|
|
6812
6815
|
setUrls(function (urls) {
|
6813
6816
|
urls[currentPlayerIndex] = url;
|
6817
|
+
setCurrentPlayerIndex(function (pre) {
|
6818
|
+
pre++;
|
6819
|
+
|
6820
|
+
if (pre == allLayouts[currentLayoutIndex || 0].span) {
|
6821
|
+
return 0;
|
6822
|
+
}
|
6823
|
+
|
6824
|
+
return pre;
|
6825
|
+
});
|
6814
6826
|
return _toConsumableArray(urls);
|
6815
6827
|
});
|
6816
6828
|
};
|
@@ -6838,7 +6850,7 @@ function VideoPlayer(_ref, ref) {
|
|
6838
6850
|
key: index,
|
6839
6851
|
className: "btnbox",
|
6840
6852
|
onClick: function onClick() {
|
6841
|
-
var playerIndex = allLayouts[index || 0].span >
|
6853
|
+
var playerIndex = allLayouts[index || 0].span > urls.length ? urls.length - 1 >= 0 ? urls.length : 0 : allLayouts[index || 0].span - 1;
|
6842
6854
|
setCurrentPlayerIndex(playerIndex);
|
6843
6855
|
setCurrentLayoutIndex(index);
|
6844
6856
|
}
|
package/dist/index.js
CHANGED
@@ -6694,7 +6694,6 @@ function Xgplay(_ref, fRef) {
|
|
6694
6694
|
}
|
6695
6695
|
}
|
6696
6696
|
|
6697
|
-
console.log('playerRef.current', playerRef.current);
|
6698
6697
|
return function () {
|
6699
6698
|
var _playerRef$current, _playerRef$current2, _playerRef$current2$h, _playerRef$current3, _playerRef$current3$f, _playerRef$current4;
|
6700
6699
|
|
@@ -6747,6 +6746,7 @@ function VideoPlayer(_ref, ref) {
|
|
6747
6746
|
_ref$config = _ref.config,
|
6748
6747
|
config = _ref$config === void 0 ? {} : _ref$config,
|
6749
6748
|
layoutIndex = _ref.layoutIndex,
|
6749
|
+
_onDoubleClickCapture = _ref.onDoubleClickCapture,
|
6750
6750
|
_ref$url = _ref.url,
|
6751
6751
|
url = _ref$url === void 0 ? [] : _ref$url,
|
6752
6752
|
_ref$layouts = _ref.layouts,
|
@@ -6818,9 +6818,12 @@ function VideoPlayer(_ref, ref) {
|
|
6818
6818
|
return arr.map(function (item, index) {
|
6819
6819
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
6820
6820
|
key: index,
|
6821
|
-
className: "camera ".concat(currentPlayerIndex == index
|
6821
|
+
className: "camera ".concat(currentPlayerIndex == index && arr.length > 1 ? 'activeCamera' : 'noneborder'),
|
6822
6822
|
onClickCapture: function onClickCapture() {
|
6823
6823
|
setCurrentPlayerIndex(index);
|
6824
|
+
},
|
6825
|
+
onDoubleClickCapture: function onDoubleClickCapture() {
|
6826
|
+
_onDoubleClickCapture && _onDoubleClickCapture(index, !document.fullscreenElement);
|
6824
6827
|
}
|
6825
6828
|
}, urls[index] ? /*#__PURE__*/React__default['default'].createElement(Xgplay$1, {
|
6826
6829
|
setRef: function setRef(ref) {
|
@@ -6876,6 +6879,15 @@ function VideoPlayer(_ref, ref) {
|
|
6876
6879
|
|
6877
6880
|
setUrls(function (urls) {
|
6878
6881
|
urls[currentPlayerIndex] = url;
|
6882
|
+
setCurrentPlayerIndex(function (pre) {
|
6883
|
+
pre++;
|
6884
|
+
|
6885
|
+
if (pre == allLayouts[currentLayoutIndex || 0].span) {
|
6886
|
+
return 0;
|
6887
|
+
}
|
6888
|
+
|
6889
|
+
return pre;
|
6890
|
+
});
|
6879
6891
|
return _toConsumableArray(urls);
|
6880
6892
|
});
|
6881
6893
|
};
|
@@ -6903,7 +6915,7 @@ function VideoPlayer(_ref, ref) {
|
|
6903
6915
|
key: index,
|
6904
6916
|
className: "btnbox",
|
6905
6917
|
onClick: function onClick() {
|
6906
|
-
var playerIndex = allLayouts[index || 0].span >
|
6918
|
+
var playerIndex = allLayouts[index || 0].span > urls.length ? urls.length - 1 >= 0 ? urls.length : 0 : allLayouts[index || 0].span - 1;
|
6907
6919
|
setCurrentPlayerIndex(playerIndex);
|
6908
6920
|
setCurrentLayoutIndex(index);
|
6909
6921
|
}
|
package/package.json
CHANGED
@@ -1,92 +1,92 @@
|
|
1
|
-
{
|
2
|
-
"private": false,
|
3
|
-
"name": "wargerm",
|
4
|
-
"version": "0.6.
|
5
|
-
"scripts": {
|
6
|
-
"dev": "dumi dev",
|
7
|
-
"docs:build": "dumi build",
|
8
|
-
"docs:deploy": "gh-pages -d docs-dist",
|
9
|
-
"build": "father-build",
|
10
|
-
"deploy": "npm run docs:build && npm run docs:deploy",
|
11
|
-
"release": "npm run build && npm publish",
|
12
|
-
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
13
|
-
"test": "umi-test",
|
14
|
-
"test:coverage": "umi-test --coverage"
|
15
|
-
},
|
16
|
-
"main": "dist/index.js",
|
17
|
-
"module": "dist/index.esm.js",
|
18
|
-
"unpkg": "dist/index.umd.min.js",
|
19
|
-
"typings": "dist/index.d.ts",
|
20
|
-
"author": "jinly2",
|
21
|
-
"license": "MIT",
|
22
|
-
"keywords": [
|
23
|
-
"React",
|
24
|
-
"Component"
|
25
|
-
],
|
26
|
-
"gitHooks": {
|
27
|
-
"pre-commit": "lint-staged"
|
28
|
-
},
|
29
|
-
"repository": {
|
30
|
-
"type": "git",
|
31
|
-
"url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
|
32
|
-
"branch": "main"
|
33
|
-
},
|
34
|
-
"files": [
|
35
|
-
"dist",
|
36
|
-
"es",
|
37
|
-
"lib",
|
38
|
-
"index.css"
|
39
|
-
],
|
40
|
-
"lint-staged": {
|
41
|
-
"*.{js,jsx,less,md,json}": [
|
42
|
-
"prettier --write"
|
43
|
-
],
|
44
|
-
"*.ts?(x)": [
|
45
|
-
"prettier --parser=typescript --write"
|
46
|
-
]
|
47
|
-
},
|
48
|
-
"dependencies": {
|
49
|
-
"@ant-design/pro-table": "^2.79.0",
|
50
|
-
"animate.css": "^4.1.1",
|
51
|
-
"echarts": "^5.2.2",
|
52
|
-
"echarts-for-react": "^3.0.2",
|
53
|
-
"lodash-es": "^4.17.21",
|
54
|
-
"moment": "^2.29.4",
|
55
|
-
"react-countup": "^6.0.0",
|
56
|
-
"react-dom": "^17.0.2",
|
57
|
-
"react-file-viewer": "^1.2.1",
|
58
|
-
"swiper": "^6.7.0",
|
59
|
-
"use-sync-external-store": "^1.2.0",
|
60
|
-
"xgplayer": "^2.31.6",
|
61
|
-
"xgplayer-flv": "^2.5.1",
|
62
|
-
"xgplayer-flv.js": "^2.3.0",
|
63
|
-
"xgplayer-hls": "^2.5.2",
|
64
|
-
"xgplayer-hls.js": "^2.6.1"
|
65
|
-
},
|
66
|
-
"peerDependencies": {
|
67
|
-
"@ant-design/icons": ">=4.2.0",
|
68
|
-
"antd": ">=4.7.0",
|
69
|
-
"classnames": ">=2.2.0",
|
70
|
-
"echarts": "^5.2.2",
|
71
|
-
"echarts-for-react": "^3.0.2",
|
72
|
-
"lodash-es": ">=4.17.21",
|
73
|
-
"react": ">=17.0.0"
|
74
|
-
},
|
75
|
-
"devDependencies": {
|
76
|
-
"@ant-design/icons": "^4.6.4",
|
77
|
-
"@types/lodash-es": "^4.17.6",
|
78
|
-
"@types/react-dom": "^17.0.11",
|
79
|
-
"@types/use-sync-external-store": "^0.0.3",
|
80
|
-
"@umijs/test": "^3.0.5",
|
81
|
-
"antd": "^4.16.13",
|
82
|
-
"babel-plugin-import": "^1.13.3",
|
83
|
-
"classnames": "^2.3.1",
|
84
|
-
"dumi": "^1.1.31",
|
85
|
-
"father-build": "^1.19.1",
|
86
|
-
"gh-pages": "^3.0.0",
|
87
|
-
"lint-staged": "^10.0.7",
|
88
|
-
"prettier": "^1.19.1",
|
89
|
-
"react": "^16.12.0",
|
90
|
-
"yorkie": "^2.0.0"
|
91
|
-
}
|
92
|
-
}
|
1
|
+
{
|
2
|
+
"private": false,
|
3
|
+
"name": "wargerm",
|
4
|
+
"version": "0.6.12",
|
5
|
+
"scripts": {
|
6
|
+
"dev": "dumi dev",
|
7
|
+
"docs:build": "dumi build",
|
8
|
+
"docs:deploy": "gh-pages -d docs-dist",
|
9
|
+
"build": "father-build",
|
10
|
+
"deploy": "npm run docs:build && npm run docs:deploy",
|
11
|
+
"release": "npm run build && npm publish",
|
12
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
13
|
+
"test": "umi-test",
|
14
|
+
"test:coverage": "umi-test --coverage"
|
15
|
+
},
|
16
|
+
"main": "dist/index.js",
|
17
|
+
"module": "dist/index.esm.js",
|
18
|
+
"unpkg": "dist/index.umd.min.js",
|
19
|
+
"typings": "dist/index.d.ts",
|
20
|
+
"author": "jinly2",
|
21
|
+
"license": "MIT",
|
22
|
+
"keywords": [
|
23
|
+
"React",
|
24
|
+
"Component"
|
25
|
+
],
|
26
|
+
"gitHooks": {
|
27
|
+
"pre-commit": "lint-staged"
|
28
|
+
},
|
29
|
+
"repository": {
|
30
|
+
"type": "git",
|
31
|
+
"url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
|
32
|
+
"branch": "main"
|
33
|
+
},
|
34
|
+
"files": [
|
35
|
+
"dist",
|
36
|
+
"es",
|
37
|
+
"lib",
|
38
|
+
"index.css"
|
39
|
+
],
|
40
|
+
"lint-staged": {
|
41
|
+
"*.{js,jsx,less,md,json}": [
|
42
|
+
"prettier --write"
|
43
|
+
],
|
44
|
+
"*.ts?(x)": [
|
45
|
+
"prettier --parser=typescript --write"
|
46
|
+
]
|
47
|
+
},
|
48
|
+
"dependencies": {
|
49
|
+
"@ant-design/pro-table": "^2.79.0",
|
50
|
+
"animate.css": "^4.1.1",
|
51
|
+
"echarts": "^5.2.2",
|
52
|
+
"echarts-for-react": "^3.0.2",
|
53
|
+
"lodash-es": "^4.17.21",
|
54
|
+
"moment": "^2.29.4",
|
55
|
+
"react-countup": "^6.0.0",
|
56
|
+
"react-dom": "^17.0.2",
|
57
|
+
"react-file-viewer": "^1.2.1",
|
58
|
+
"swiper": "^6.7.0",
|
59
|
+
"use-sync-external-store": "^1.2.0",
|
60
|
+
"xgplayer": "^2.31.6",
|
61
|
+
"xgplayer-flv": "^2.5.1",
|
62
|
+
"xgplayer-flv.js": "^2.3.0",
|
63
|
+
"xgplayer-hls": "^2.5.2",
|
64
|
+
"xgplayer-hls.js": "^2.6.1"
|
65
|
+
},
|
66
|
+
"peerDependencies": {
|
67
|
+
"@ant-design/icons": ">=4.2.0",
|
68
|
+
"antd": ">=4.7.0",
|
69
|
+
"classnames": ">=2.2.0",
|
70
|
+
"echarts": "^5.2.2",
|
71
|
+
"echarts-for-react": "^3.0.2",
|
72
|
+
"lodash-es": ">=4.17.21",
|
73
|
+
"react": ">=17.0.0"
|
74
|
+
},
|
75
|
+
"devDependencies": {
|
76
|
+
"@ant-design/icons": "^4.6.4",
|
77
|
+
"@types/lodash-es": "^4.17.6",
|
78
|
+
"@types/react-dom": "^17.0.11",
|
79
|
+
"@types/use-sync-external-store": "^0.0.3",
|
80
|
+
"@umijs/test": "^3.0.5",
|
81
|
+
"antd": "^4.16.13",
|
82
|
+
"babel-plugin-import": "^1.13.3",
|
83
|
+
"classnames": "^2.3.1",
|
84
|
+
"dumi": "^1.1.31",
|
85
|
+
"father-build": "^1.19.1",
|
86
|
+
"gh-pages": "^3.0.0",
|
87
|
+
"lint-staged": "^10.0.7",
|
88
|
+
"prettier": "^1.19.1",
|
89
|
+
"react": "^16.12.0",
|
90
|
+
"yorkie": "^2.0.0"
|
91
|
+
}
|
92
|
+
}
|