wargerm 0.7.46 → 0.7.47
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/index.esm.js
CHANGED
@@ -8983,6 +8983,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
8983
8983
|
layoutIndex = _ref$layoutIndex === void 0 ? 0 : _ref$layoutIndex,
|
8984
8984
|
_ref$url = _ref.url,
|
8985
8985
|
url = _ref$url === void 0 ? [] : _ref$url,
|
8986
|
+
onPlayerClose = _ref.onPlayerClose,
|
8986
8987
|
_ref$layouts = _ref.layouts,
|
8987
8988
|
layouts = _ref$layouts === void 0 ? basicLayouts : _ref$layouts;
|
8988
8989
|
var allLayouts = layouts;
|
@@ -9018,6 +9019,12 @@ function VideoPlayer$1(_ref, ref) {
|
|
9018
9019
|
players = _useState8[0],
|
9019
9020
|
setPlayers = _useState8[1];
|
9020
9021
|
|
9022
|
+
var handleCloseAll = function handleCloseAll() {
|
9023
|
+
setPlayers([]);
|
9024
|
+
setUrls([]);
|
9025
|
+
setCurrentPlayerIndex(0);
|
9026
|
+
};
|
9027
|
+
|
9021
9028
|
var renderDom = useMemo(function () {
|
9022
9029
|
var arr = new Array(allLayouts[currentLayoutIndex].span).fill(0);
|
9023
9030
|
return arr.map(function (item, index) {
|
@@ -9039,6 +9046,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
9039
9046
|
|
9040
9047
|
arr.splice(index, 1, '');
|
9041
9048
|
setUrls(arr);
|
9049
|
+
onPlayerClose && onPlayerClose(index, arr);
|
9042
9050
|
}
|
9043
9051
|
}, /*#__PURE__*/React.createElement(CloseOutlined, null))), /*#__PURE__*/React.createElement(Xgplay$1, {
|
9044
9052
|
setRef: function setRef(ref) {
|
@@ -9119,6 +9127,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
9119
9127
|
currentLayoutIndex: currentLayoutIndex,
|
9120
9128
|
currentPlayerIndex: currentPlayerIndex,
|
9121
9129
|
urls: urls,
|
9130
|
+
handleCloseAll: handleCloseAll,
|
9122
9131
|
loadCamera: loadCamera
|
9123
9132
|
};
|
9124
9133
|
});
|
package/dist/index.js
CHANGED
@@ -9027,6 +9027,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
9027
9027
|
layoutIndex = _ref$layoutIndex === void 0 ? 0 : _ref$layoutIndex,
|
9028
9028
|
_ref$url = _ref.url,
|
9029
9029
|
url = _ref$url === void 0 ? [] : _ref$url,
|
9030
|
+
onPlayerClose = _ref.onPlayerClose,
|
9030
9031
|
_ref$layouts = _ref.layouts,
|
9031
9032
|
layouts = _ref$layouts === void 0 ? basicLayouts : _ref$layouts;
|
9032
9033
|
var allLayouts = layouts;
|
@@ -9062,6 +9063,12 @@ function VideoPlayer$1(_ref, ref) {
|
|
9062
9063
|
players = _useState8[0],
|
9063
9064
|
setPlayers = _useState8[1];
|
9064
9065
|
|
9066
|
+
var handleCloseAll = function handleCloseAll() {
|
9067
|
+
setPlayers([]);
|
9068
|
+
setUrls([]);
|
9069
|
+
setCurrentPlayerIndex(0);
|
9070
|
+
};
|
9071
|
+
|
9065
9072
|
var renderDom = React.useMemo(function () {
|
9066
9073
|
var arr = new Array(allLayouts[currentLayoutIndex].span).fill(0);
|
9067
9074
|
return arr.map(function (item, index) {
|
@@ -9083,6 +9090,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
9083
9090
|
|
9084
9091
|
arr.splice(index, 1, '');
|
9085
9092
|
setUrls(arr);
|
9093
|
+
onPlayerClose && onPlayerClose(index, arr);
|
9086
9094
|
}
|
9087
9095
|
}, /*#__PURE__*/React__default['default'].createElement(icons.CloseOutlined, null))), /*#__PURE__*/React__default['default'].createElement(Xgplay$1, {
|
9088
9096
|
setRef: function setRef(ref) {
|
@@ -9163,6 +9171,7 @@ function VideoPlayer$1(_ref, ref) {
|
|
9163
9171
|
currentLayoutIndex: currentLayoutIndex,
|
9164
9172
|
currentPlayerIndex: currentPlayerIndex,
|
9165
9173
|
urls: urls,
|
9174
|
+
handleCloseAll: handleCloseAll,
|
9166
9175
|
loadCamera: loadCamera
|
9167
9176
|
};
|
9168
9177
|
});
|