@cloud-app-dev/vidc 2.3.0 → 3.0.2
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/.umirc.ts +2 -2
- package/es/Config/interface.d.ts +2 -1
- package/es/DomMove/demo.d.ts +2 -0
- package/es/DomMove/demo.js +16 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/index.js +145 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/{Picture/component/MoveContent → DomMove}/utils.js +19 -0
- package/es/Drawer/index.d.ts +2 -2
- package/es/Drawer/interface.d.ts +4 -174
- package/es/ErrorBoundary/index.d.ts +18 -0
- package/es/ErrorBoundary/index.js +79 -0
- package/es/List/DynamicGridList/Demo.js +40 -27
- package/es/List/DynamicGridList/index.d.ts +20 -29
- package/es/List/DynamicGridList/index.js +40 -63
- package/es/List/DynamicList/index.css +15 -0
- package/es/List/DynamicList/index.d.ts +14 -0
- package/es/List/DynamicList/index.js +105 -0
- package/es/List/DynamicList/interface.d.ts +19 -0
- package/es/List/DynamicList/utils.d.ts +4 -0
- package/es/List/DynamicList/utils.js +6 -0
- package/es/List/GridList/Demo.js +27 -4
- package/es/List/GridList/index.css +1 -0
- package/es/List/GridList/index.d.ts +2 -2
- package/es/List/GridList/index.js +8 -12
- package/es/List/GridList/interface.d.ts +1 -1
- package/es/List/VList/index.js +2 -3
- package/es/List/index.css +2 -54
- package/es/List/index.d.ts +6 -7
- package/es/List/index.js +14 -153
- package/es/List/interface.d.ts +3 -61
- package/es/LoaderApp/index.d.ts +1 -1
- package/es/LoaderApp/index.js +27 -46
- package/es/LoaderApp/interface.d.ts +3 -0
- package/es/LoaderApp/loader.d.ts +6 -7
- package/es/LoaderApp/loader.js +20 -30
- package/es/LoaderApp/sandbox.back.d.ts +18 -0
- package/es/LoaderApp/sandbox.back.js +356 -0
- package/es/LoaderApp/sandbox.d.ts +12 -0
- package/es/LoaderApp/sandbox.js +110 -0
- package/es/LoaderApp/utils.d.ts +5 -1
- package/es/LoaderApp/utils.js +98 -2
- package/es/Map/AMap.d.ts +1572 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +15 -0
- package/es/Map/BasicMap/AMapInstance.js +66 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +15 -0
- package/es/Map/BasicMap/LeafletInstance.js +98 -0
- package/es/Map/BasicMap/index.css +24 -0
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/BasicMap/index.js +103 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/hook.js +144 -0
- package/es/Map/ClusterLayer/index.css +26 -0
- package/es/Map/ClusterLayer/index.d.ts +5 -0
- package/es/Map/ClusterLayer/index.js +31 -0
- package/es/Map/ClusterLayer/props.d.ts +8 -0
- package/es/Map/Config/index.d.ts +7 -0
- package/es/{InitialConfig → Map/Config}/index.js +35 -36
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/{List/DynamicDeviceList → Map/Config}/utils.js +48 -45
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/Context/index.js +66 -0
- package/es/Map/FindPio/index.css +7 -0
- package/es/Map/FindPio/index.d.ts +4 -0
- package/es/Map/FindPio/index.js +16 -0
- package/es/{WorkerFlow/Demo.d.ts → Map/InfoWindow/demo.d.ts} +0 -0
- package/es/{List/DynamicDeviceList/Demo.js → Map/InfoWindow/demo.js} +27 -25
- package/es/Map/InfoWindow/index.d.ts +8 -0
- package/es/Map/InfoWindow/index.js +74 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +12 -0
- package/es/Map/LevelCenter/DragMarker/index.js +48 -0
- package/es/{List/DeviceList → Map/LevelCenter}/index.css +0 -0
- package/es/Map/LevelCenter/index.d.ts +13 -0
- package/es/Map/LevelCenter/index.js +42 -0
- package/es/Map/LoaderMap/index.d.ts +12 -0
- package/es/Map/LoaderMap/index.js +58 -0
- package/es/Map/ResetTools/index.css +32 -0
- package/es/Map/ResetTools/index.d.ts +9 -0
- package/es/Map/ResetTools/index.js +61 -0
- package/es/Map/SinglePoint/Marker/index.d.ts +7 -0
- package/es/Map/SinglePoint/Marker/index.js +29 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/index.css +29 -0
- package/es/Map/SinglePoint/index.d.ts +7 -0
- package/es/Map/SinglePoint/index.js +32 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/hook/useMapType.js +13 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/icon.js +10 -0
- package/es/Map/index.d.ts +23 -0
- package/es/Map/index.js +25 -0
- package/es/Map/interface.d.ts +55 -0
- package/es/Map/points.json +61247 -0
- package/es/{Picture/component/MoveContent → Map/useMarker}/index.css +0 -0
- package/es/Map/useMarker/index.d.ts +11 -0
- package/es/{WorkerFlow/Form/FormAuth.js → Map/useMarker/index.js} +57 -80
- package/es/Map/withMap/index.d.ts +2 -0
- package/es/Map/withMap/index.js +12 -0
- package/es/Modal/index.js +7 -5
- package/es/Picture/component/RectMenu/index.d.ts +1 -1
- package/es/Picture/index.d.ts +1 -1
- package/es/Picture/index.js +2 -2
- package/es/Player/api/index.d.ts +2 -8
- package/es/Player/api/index.js +29 -35
- package/es/Player/contraller_bar/left_bar.js +2 -2
- package/es/Player/contraller_bar/right_bar.d.ts +1 -1
- package/es/Player/contraller_bar/right_bar.js +13 -27
- package/es/Player/demo.js +21 -24
- package/es/Player/event/index.js +5 -1
- package/es/Player/frontend_player.d.ts +2 -3
- package/es/Player/frontend_player.js +35 -52
- package/es/Player/frontend_timeline.d.ts +3 -2
- package/es/Player/frontend_timeline.js +20 -9
- package/es/Player/live_heart.js +45 -12
- package/es/Player/message.js +23 -12
- package/es/Player/player.d.ts +29 -7
- package/es/Player/segment_player.d.ts +1 -1
- package/es/Player/segment_player.js +50 -39
- package/es/Player/segment_timeline.js +14 -13
- package/es/Player/single_player.js +59 -14
- package/es/Player/timeline.js +8 -6
- package/es/Player/util.d.ts +4 -25
- package/es/Player/util.js +47 -55
- package/es/PlayerExt/index.css +2 -2
- package/es/PlayerExt/index.d.ts +3 -1
- package/es/PlayerExt/index.js +19 -5
- package/es/ScreenPlayer/Live.d.ts +5 -0
- package/es/ScreenPlayer/Live.js +109 -0
- package/es/ScreenPlayer/LiveTools.d.ts +15 -0
- package/es/ScreenPlayer/LiveTools.js +95 -0
- package/es/ScreenPlayer/PlayerWithExt.d.ts +22 -0
- package/es/ScreenPlayer/PlayerWithExt.js +156 -0
- package/es/ScreenPlayer/Record.d.ts +5 -0
- package/es/{WorkerFlow/index.js → ScreenPlayer/Record.js} +286 -273
- package/es/ScreenPlayer/RecordTools.d.ts +17 -0
- package/es/ScreenPlayer/RecordTools.js +102 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +10 -0
- package/es/ScreenPlayer/SegmentTimeLine.js +40 -0
- package/es/ScreenPlayer/TimeSlider.d.ts +127 -0
- package/es/ScreenPlayer/TimeSlider.js +530 -0
- package/es/ScreenPlayer/demo.d.ts +2 -0
- package/es/ScreenPlayer/demo.js +25 -0
- package/es/ScreenPlayer/demo2.d.ts +2 -0
- package/es/ScreenPlayer/demo2.js +153 -0
- package/es/ScreenPlayer/index.css +49 -0
- package/es/ScreenPlayer/index.d.ts +5 -0
- package/es/ScreenPlayer/index.js +8 -0
- package/es/ScreenPlayer/interface.d.ts +81 -0
- package/es/ScreenPlayer/useRecordList.d.ts +3 -0
- package/es/{WorkerFlow/Form/UserAndGroupSelect.js → ScreenPlayer/useRecordList.js} +173 -176
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/useVideoFit.js +46 -0
- package/es/ScreenPlayer/utils.d.ts +25 -0
- package/es/ScreenPlayer/utils.js +84 -0
- package/es/Timeout/index.d.ts +33 -0
- package/es/Timeout/index.js +83 -0
- package/es/Tree/demo.js +9 -12
- package/es/Tree/index.css +55 -29
- package/es/Tree/index.d.ts +20 -19
- package/es/Tree/index.js +70 -185
- package/es/index.d.ts +8 -9
- package/es/index.js +8 -9
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/{useHttp → useInfiniteScroll}/index.js +79 -43
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/useVirtualList/index.js +175 -0
- package/es/withErrorBoundary/index.d.ts +9 -0
- package/es/withErrorBoundary/index.js +45 -0
- package/package.json +18 -21
- package/release-build.sh +44 -0
- package/test.js +48 -0
- package/es/DeviceIcon/icon.d.ts +0 -9
- package/es/DeviceIcon/icon.js +0 -138
- package/es/DeviceIcon/index.css +0 -8
- package/es/DeviceIcon/index.d.ts +0 -14
- package/es/DeviceIcon/index.js +0 -37
- package/es/DeviceSelect/TreeType.d.ts +0 -7
- package/es/DeviceSelect/TreeType.js +0 -36
- package/es/DeviceSelect/demo.d.ts +0 -3
- package/es/DeviceSelect/demo.js +0 -22
- package/es/DeviceSelect/index.css +0 -11
- package/es/DeviceSelect/index.d.ts +0 -13
- package/es/DeviceSelect/index.js +0 -191
- package/es/Dict/cache.d.ts +0 -3
- package/es/Dict/cache.js +0 -21
- package/es/Dict/device.d.ts +0 -28
- package/es/Dict/device.js +0 -117
- package/es/Dict/hook.d.ts +0 -3
- package/es/Dict/hook.js +0 -98
- package/es/Dict/index.d.ts +0 -9
- package/es/Dict/index.js +0 -10
- package/es/Dict/interface.d.ts +0 -16
- package/es/Dict/utils.d.ts +0 -10
- package/es/Dict/utils.js +0 -44
- package/es/InitialConfig/index.d.ts +0 -8
- package/es/InitialConfig/utils.d.ts +0 -20
- package/es/InitialConfig/utils.js +0 -110
- package/es/InitialRequest/index.d.ts +0 -9
- package/es/InitialRequest/index.js +0 -97
- package/es/InitialRequest/utils.d.ts +0 -10
- package/es/InitialRequest/utils.js +0 -116
- package/es/List/CheckExt.d.ts +0 -9
- package/es/List/CheckExt.js +0 -36
- package/es/List/DeviceList/index.d.ts +0 -11
- package/es/List/DeviceList/index.js +0 -50
- package/es/List/DynamicDeviceList/Demo.d.ts +0 -3
- package/es/List/DynamicDeviceList/index.css +0 -39
- package/es/List/DynamicDeviceList/index.d.ts +0 -12
- package/es/List/DynamicDeviceList/index.js +0 -205
- package/es/List/DynamicDeviceList/interface.d.ts +0 -37
- package/es/List/DynamicDeviceList/utils.d.ts +0 -16
- package/es/List/ListExt/index.css +0 -3
- package/es/List/ListExt/index.d.ts +0 -19
- package/es/List/ListExt/index.js +0 -44
- package/es/Picture/component/MoveContent/index.d.ts +0 -39
- package/es/Picture/component/MoveContent/index.js +0 -244
- package/es/Picture/component/MoveContent/utils.d.ts +0 -4
- package/es/Title/index.css +0 -25
- package/es/Title/index.d.ts +0 -12
- package/es/Title/index.js +0 -30
- package/es/Tree/BaseTree/index.css +0 -64
- package/es/Tree/BaseTree/index.d.ts +0 -24
- package/es/Tree/BaseTree/index.js +0 -83
- package/es/UserSelect/demo.d.ts +0 -3
- package/es/UserSelect/demo.js +0 -21
- package/es/UserSelect/index.css +0 -16
- package/es/UserSelect/index.d.ts +0 -18
- package/es/UserSelect/index.js +0 -194
- package/es/WorkerFlow/Demo.js +0 -57
- package/es/WorkerFlow/Form/Approver.d.ts +0 -10
- package/es/WorkerFlow/Form/Approver.js +0 -33
- package/es/WorkerFlow/Form/Condition.d.ts +0 -11
- package/es/WorkerFlow/Form/Condition.js +0 -235
- package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -8
- package/es/WorkerFlow/Form/EmptyUserSet.js +0 -137
- package/es/WorkerFlow/Form/FormAuth.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupList.d.ts +0 -12
- package/es/WorkerFlow/Form/GroupList.js +0 -44
- package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupSelect.js +0 -167
- package/es/WorkerFlow/Form/GroupSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +0 -177
- package/es/WorkerFlow/Form/Handle.d.ts +0 -10
- package/es/WorkerFlow/Form/Handle.js +0 -33
- package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -12
- package/es/WorkerFlow/Form/LevelGroupSelect.js +0 -208
- package/es/WorkerFlow/Form/Notifier.d.ts +0 -8
- package/es/WorkerFlow/Form/Notifier.js +0 -16
- package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.js +0 -150
- package/es/WorkerFlow/Form/UserSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/UserSelectModalContent.js +0 -166
- package/es/WorkerFlow/Form/UserSet.d.ts +0 -14
- package/es/WorkerFlow/Form/UserSet.js +0 -308
- package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -7
- package/es/WorkerFlow/Form/UsersHandleType.js +0 -32
- package/es/WorkerFlow/Form/utils.d.ts +0 -3
- package/es/WorkerFlow/Form/utils.js +0 -47
- package/es/WorkerFlow/Nodes/Add.d.ts +0 -7
- package/es/WorkerFlow/Nodes/Add.js +0 -98
- package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -10
- package/es/WorkerFlow/Nodes/AddOption.js +0 -23
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -8
- package/es/WorkerFlow/Nodes/AddOptionList.js +0 -46
- package/es/WorkerFlow/Nodes/Approver.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Approver.js +0 -53
- package/es/WorkerFlow/Nodes/Condition.d.ts +0 -10
- package/es/WorkerFlow/Nodes/Condition.js +0 -140
- package/es/WorkerFlow/Nodes/Constants.d.ts +0 -35
- package/es/WorkerFlow/Nodes/Constants.js +0 -150
- package/es/WorkerFlow/Nodes/End.d.ts +0 -7
- package/es/WorkerFlow/Nodes/End.js +0 -16
- package/es/WorkerFlow/Nodes/Handle.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Handle.js +0 -52
- package/es/WorkerFlow/Nodes/Node.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Node.js +0 -26
- package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Notifier.js +0 -52
- package/es/WorkerFlow/Nodes/Render.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Render.js +0 -16
- package/es/WorkerFlow/Nodes/Start.d.ts +0 -12
- package/es/WorkerFlow/Nodes/Start.js +0 -26
- package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -10
- package/es/WorkerFlow/Nodes/TitleElement.js +0 -127
- package/es/WorkerFlow/Nodes/Wrap.d.ts +0 -13
- package/es/WorkerFlow/Nodes/Wrap.js +0 -35
- package/es/WorkerFlow/OperatorContext.d.ts +0 -4
- package/es/WorkerFlow/OperatorContext.js +0 -3
- package/es/WorkerFlow/Tools.d.ts +0 -8
- package/es/WorkerFlow/Tools.js +0 -78
- package/es/WorkerFlow/XML/CanvasTag.d.ts +0 -3
- package/es/WorkerFlow/XML/CanvasTag.js +0 -142
- package/es/WorkerFlow/XML/EndEvent.d.ts +0 -1
- package/es/WorkerFlow/XML/EndEvent.js +0 -14
- package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +0 -9
- package/es/WorkerFlow/XML/ExclusiveGateway.js +0 -101
- package/es/WorkerFlow/XML/Root.d.ts +0 -1
- package/es/WorkerFlow/XML/Root.js +0 -5
- package/es/WorkerFlow/XML/StartEvent.d.ts +0 -5
- package/es/WorkerFlow/XML/StartEvent.js +0 -28
- package/es/WorkerFlow/XML/UserTask.d.ts +0 -5
- package/es/WorkerFlow/XML/UserTask.js +0 -93
- package/es/WorkerFlow/XML/index.d.ts +0 -4
- package/es/WorkerFlow/XML/index.js +0 -100
- package/es/WorkerFlow/XML/utils.d.ts +0 -6
- package/es/WorkerFlow/XML/utils.js +0 -97
- package/es/WorkerFlow/data.json +0 -83
- package/es/WorkerFlow/index.css +0 -779
- package/es/WorkerFlow/index.d.ts +0 -13
- package/es/WorkerFlow/interface.d.ts +0 -93
- package/es/WorkerFlow/template.d.ts +0 -2
- package/es/WorkerFlow/template.js +0 -17
- package/es/WorkerFlow/utils.d.ts +0 -14
- package/es/WorkerFlow/utils.js +0 -212
- package/es/useHttp/index.d.ts +0 -8
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import _useFullscreen3 from "ahooks/es/useFullscreen";
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ScreenType } from './utils';
|
|
17
|
+
|
|
18
|
+
function LiveTools(_ref) {
|
|
19
|
+
var containerRef = _ref.containerRef,
|
|
20
|
+
updateState = _ref.updateState,
|
|
21
|
+
screenNum = _ref.screenNum,
|
|
22
|
+
getPlayerItem = _ref.getPlayerItem,
|
|
23
|
+
mode = _ref.mode;
|
|
24
|
+
|
|
25
|
+
var _useFullscreen = _useFullscreen3(containerRef),
|
|
26
|
+
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
27
|
+
isFullscreen = _useFullscreen2[0],
|
|
28
|
+
toggleFullscreen = _useFullscreen2[1].toggleFullscreen; // 播放状态控制
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var playToggle = function playToggle() {
|
|
32
|
+
var player = getPlayerItem();
|
|
33
|
+
player ? player.video.paused ? player.api.play() : player.api.pause() : undefined;
|
|
34
|
+
}; // 重连
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var reload = function reload() {
|
|
38
|
+
var player = getPlayerItem();
|
|
39
|
+
player ? player.reload ? player.reload() : player.api.reload() : undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var snapshot = function snapshot() {
|
|
43
|
+
var player = getPlayerItem();
|
|
44
|
+
return player ? player.api.snapshot() : undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "player-tools"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "split-num"
|
|
51
|
+
}, ScreenType.map(function (item) {
|
|
52
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
key: "".concat(item.name),
|
|
54
|
+
style: {
|
|
55
|
+
padding: 6
|
|
56
|
+
},
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return updateState({
|
|
59
|
+
screenNum: item.name
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}, item.name);
|
|
63
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
64
|
+
style: {
|
|
65
|
+
padding: 6
|
|
66
|
+
},
|
|
67
|
+
onClick: toggleFullscreen
|
|
68
|
+
}, isFullscreen ? '退出' : '全屏'), /*#__PURE__*/React.createElement("span", {
|
|
69
|
+
style: {
|
|
70
|
+
padding: 6
|
|
71
|
+
},
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
return updateState({
|
|
74
|
+
mode: mode === 1 ? 2 : 1
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, "\u5207\u6362", mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F"), /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
style: {
|
|
79
|
+
padding: 6
|
|
80
|
+
},
|
|
81
|
+
onClick: playToggle
|
|
82
|
+
}, "\u64AD\u653E/\u6682\u505C"), /*#__PURE__*/React.createElement("span", {
|
|
83
|
+
style: {
|
|
84
|
+
padding: 6
|
|
85
|
+
},
|
|
86
|
+
onClick: reload
|
|
87
|
+
}, "\u91CD\u8FDE"), /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
style: {
|
|
89
|
+
padding: 6
|
|
90
|
+
},
|
|
91
|
+
onClick: snapshot
|
|
92
|
+
}, "\u622A\u56FE")));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default LiveTools;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExportPlayerType, ISegmentType, ISinglePlayerProps } from '../Player/player';
|
|
3
|
+
import type { PlayModeType } from '../PlayerExt';
|
|
4
|
+
interface ILivePlayerWithExtProps extends ISinglePlayerProps {
|
|
5
|
+
mode?: PlayModeType;
|
|
6
|
+
style: React.CSSProperties;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
updatePlayer: (obj: React.MutableRefObject<ExportPlayerType>) => void;
|
|
9
|
+
pluginDownloadUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function LivePlayerWithExt({ mode, isLive, url, type, style, className, updatePlayer, onClick, pluginDownloadUrl, ...props }: ILivePlayerWithExtProps): JSX.Element;
|
|
12
|
+
interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url' | 'mode'> {
|
|
13
|
+
segments?: ISegmentType[];
|
|
14
|
+
begin?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function SegmentPlayerWithExt({ begin, style, className, segments, updatePlayer, onClick, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
|
|
17
|
+
interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
18
|
+
segments?: ISegmentType[];
|
|
19
|
+
begin?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function FrontendPlayerWithExt({ mode, style, className, segments, updatePlayer, onClick, pluginDownloadUrl }: IFrontendPlayerWithExtProps): JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import { __rest } from "tslib";
|
|
14
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
15
|
+
import LivePlayer from '../Player/single_player';
|
|
16
|
+
import SegmentPlayer from '../Player/segment_player';
|
|
17
|
+
import FrontendPlayer from '../Player/frontend_player';
|
|
18
|
+
import ExtModel from '../PlayerExt';
|
|
19
|
+
export function LivePlayerWithExt(_a) {
|
|
20
|
+
var mode = _a.mode,
|
|
21
|
+
isLive = _a.isLive,
|
|
22
|
+
url = _a.url,
|
|
23
|
+
type = _a.type,
|
|
24
|
+
style = _a.style,
|
|
25
|
+
className = _a.className,
|
|
26
|
+
updatePlayer = _a.updatePlayer,
|
|
27
|
+
onClick = _a.onClick,
|
|
28
|
+
pluginDownloadUrl = _a.pluginDownloadUrl,
|
|
29
|
+
props = __rest(_a, ["mode", "isLive", "url", "type", "style", "className", "updatePlayer", "onClick", "pluginDownloadUrl"]);
|
|
30
|
+
|
|
31
|
+
var ref = useRef();
|
|
32
|
+
var update = useCallback(function () {
|
|
33
|
+
return updatePlayer(ref);
|
|
34
|
+
}, [updatePlayer]);
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "player-with-ext-layout ".concat(className),
|
|
37
|
+
style: style,
|
|
38
|
+
onClick: onClick
|
|
39
|
+
}, /*#__PURE__*/React.createElement(ExtModel, {
|
|
40
|
+
url: url,
|
|
41
|
+
mode: mode,
|
|
42
|
+
pluginDownloadUrl: pluginDownloadUrl
|
|
43
|
+
}, /*#__PURE__*/React.createElement(LivePlayer, Object.assign({}, props, {
|
|
44
|
+
type: type,
|
|
45
|
+
url: url,
|
|
46
|
+
isLive: isLive,
|
|
47
|
+
hideContrallerBar: true,
|
|
48
|
+
onCanPlayerInit: update,
|
|
49
|
+
ref: ref
|
|
50
|
+
}))));
|
|
51
|
+
}
|
|
52
|
+
export function SegmentPlayerWithExt(_a) {
|
|
53
|
+
var begin = _a.begin,
|
|
54
|
+
style = _a.style,
|
|
55
|
+
className = _a.className,
|
|
56
|
+
segments = _a.segments,
|
|
57
|
+
updatePlayer = _a.updatePlayer,
|
|
58
|
+
onClick = _a.onClick,
|
|
59
|
+
props = __rest(_a, ["begin", "style", "className", "segments", "updatePlayer", "onClick"]);
|
|
60
|
+
|
|
61
|
+
var ref = useRef();
|
|
62
|
+
var update = useCallback(function () {
|
|
63
|
+
return updatePlayer(ref);
|
|
64
|
+
}, [updatePlayer]);
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "player-with-ext-layout ".concat(className),
|
|
67
|
+
style: style,
|
|
68
|
+
onClick: onClick
|
|
69
|
+
}, /*#__PURE__*/React.createElement(ExtModel, {
|
|
70
|
+
segments: segments,
|
|
71
|
+
mode: 1
|
|
72
|
+
}, /*#__PURE__*/React.createElement(SegmentPlayer, Object.assign({}, props, {
|
|
73
|
+
segments: segments,
|
|
74
|
+
type: "hls",
|
|
75
|
+
isLive: false,
|
|
76
|
+
hideContrallerBar: true,
|
|
77
|
+
forwordRef: ref,
|
|
78
|
+
begin: begin,
|
|
79
|
+
onCanPlayerInit: update,
|
|
80
|
+
customTimeLine: /*#__PURE__*/React.createElement(React.Fragment, null)
|
|
81
|
+
}))));
|
|
82
|
+
}
|
|
83
|
+
export function FrontendPlayerWithExt(_ref) {
|
|
84
|
+
var mode = _ref.mode,
|
|
85
|
+
style = _ref.style,
|
|
86
|
+
className = _ref.className,
|
|
87
|
+
segments = _ref.segments,
|
|
88
|
+
updatePlayer = _ref.updatePlayer,
|
|
89
|
+
onClick = _ref.onClick,
|
|
90
|
+
pluginDownloadUrl = _ref.pluginDownloadUrl;
|
|
91
|
+
|
|
92
|
+
var _useState = useState({
|
|
93
|
+
begin: 0,
|
|
94
|
+
end: 0,
|
|
95
|
+
url: undefined
|
|
96
|
+
}),
|
|
97
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
98
|
+
state = _useState2[0],
|
|
99
|
+
setState = _useState2[1];
|
|
100
|
+
|
|
101
|
+
useEffect(function () {
|
|
102
|
+
if (!(Array.isArray(segments) && segments.length > 0)) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var _ref2 = [segments[0].beginTime, segments[segments.length - 1].endTime],
|
|
107
|
+
begin = _ref2[0],
|
|
108
|
+
end = _ref2[1];
|
|
109
|
+
var videoUrl = new URL(segments[0].url);
|
|
110
|
+
videoUrl.searchParams.set('begin', "".concat(begin));
|
|
111
|
+
setState({
|
|
112
|
+
begin: begin,
|
|
113
|
+
end: end,
|
|
114
|
+
url: videoUrl.toString()
|
|
115
|
+
});
|
|
116
|
+
}, [segments]);
|
|
117
|
+
var seekTo = useCallback(function (time) {
|
|
118
|
+
if (!state.url) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var videoUrl = new URL(state.url);
|
|
123
|
+
videoUrl.searchParams.set('begin', "".concat(time));
|
|
124
|
+
setState(function (old) {
|
|
125
|
+
return Object.assign(Object.assign({}, old), {
|
|
126
|
+
url: videoUrl.toString()
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}, [state.url]);
|
|
130
|
+
var ref = useRef();
|
|
131
|
+
var update = useCallback(function () {
|
|
132
|
+
return updatePlayer(ref);
|
|
133
|
+
}, [updatePlayer]);
|
|
134
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "player-with-ext-layout ".concat(className),
|
|
136
|
+
style: style,
|
|
137
|
+
onClick: onClick
|
|
138
|
+
}, /*#__PURE__*/React.createElement(ExtModel, {
|
|
139
|
+
segments: segments,
|
|
140
|
+
mode: mode,
|
|
141
|
+
pluginDownloadUrl: pluginDownloadUrl
|
|
142
|
+
}, /*#__PURE__*/React.createElement(FrontendPlayer, {
|
|
143
|
+
onSeek: seekTo,
|
|
144
|
+
url: state.url,
|
|
145
|
+
hideContrallerBar: true,
|
|
146
|
+
forwordRef: ref,
|
|
147
|
+
extActions: {
|
|
148
|
+
seekTo: seekTo
|
|
149
|
+
},
|
|
150
|
+
begin: state.begin,
|
|
151
|
+
end: state.end,
|
|
152
|
+
onCanPlayerInit: update,
|
|
153
|
+
customTimeLine: /*#__PURE__*/React.createElement(React.Fragment, null),
|
|
154
|
+
type: "flv"
|
|
155
|
+
})));
|
|
156
|
+
}
|