@cloud-app-dev/vidc 3.2.11 → 3.2.14
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/.dumirc.ts +71 -0
- package/.editorconfig +0 -3
- package/.eslintrc.js +3 -0
- package/.fatherrc.ts +19 -0
- package/.husky/commit-msg +5 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.js +16 -0
- package/README.md +14 -26
- package/es/Api/index.js +100 -30
- package/es/AppContext/Sync.js +19 -3
- package/es/AppContext/index.js +86 -42
- package/es/AppContext/static.js +7 -0
- package/es/Auth/index.js +11 -4
- package/es/AutoExit/index.js +11 -3
- package/es/Box/BetweenBox/index.js +19 -10
- package/es/Box/BetweenBox/{index.css → index.less} +0 -0
- package/es/Box/InfoBox/index.js +24 -18
- package/es/Box/InfoBox/index.less +22 -0
- package/es/Box/TwoColumnBox/index.js +42 -25
- package/es/Box/TwoColumnBox/index.less +70 -0
- package/es/Box/deps/grid-factory.d.ts +2 -2
- package/es/Box/deps/grid-factory.js +12 -0
- package/es/Box/index.js +29 -16
- package/es/Box/{index.css → index.less} +5 -4
- package/es/CheckGroupFixed/demo.d.ts +3 -0
- package/es/CheckGroupFixed/demo.js +28 -0
- package/es/CheckGroupFixed/index.js +117 -82
- package/es/CheckGroupFixed/index.less +50 -0
- package/es/Config/index.js +5 -1
- package/es/Config/utils.js +18 -3
- package/es/ConfigContext/index.js +8 -4
- package/es/CustomRenderSelect/index.js +71 -36
- package/es/CustomRenderSelect/index.less +25 -0
- package/es/DisableMark/index.js +14 -11
- package/es/DisableMark/{index.css → index.less} +0 -0
- package/es/DomMove/demo.js +14 -10
- package/es/DomMove/index.js +52 -30
- package/es/DomMove/utils.js +8 -3
- package/es/Drag/DragAndDropItem.js +44 -20
- package/es/Drag/DropItem.js +22 -6
- package/es/Drag/index.js +2 -2
- package/es/Drag/{index.css → index.less} +0 -0
- package/es/Drawer/Footer.js +22 -15
- package/es/Drawer/{Demo.d.ts → demo.d.ts} +0 -0
- package/es/Drawer/demo.js +109 -0
- package/es/Drawer/index.js +98 -60
- package/es/Drawer/index.less +42 -0
- package/es/ErrorFallback/index.js +23 -14
- package/es/FrontendPlayer/index.js +1 -1
- package/es/FullScreen/index.js +30 -17
- package/es/FullScreen/index.less +16 -0
- package/es/HightLevel/index.js +11 -4
- package/es/HightLevel/{index.css → index.less} +0 -0
- package/es/IconFont/index.js +39 -18
- package/es/ImageView/index.js +37 -13
- package/es/ImageView/index.less +10 -0
- package/es/Input/demo.d.ts +3 -0
- package/es/Input/demo.js +16 -0
- package/es/Input/index.js +46 -22
- package/es/Input/index.less +12 -0
- package/es/InstanceHistory/index.js +2 -0
- package/es/LabelValue/index.js +25 -18
- package/es/LabelValue/index.less +20 -0
- package/es/List/DynamicGridList/Demo.d.ts +1 -0
- package/es/List/DynamicGridList/Demo.js +52 -32
- package/es/List/DynamicGridList/index.d.ts +3 -3
- package/es/List/DynamicGridList/index.js +41 -26
- package/es/List/DynamicList/index.js +76 -56
- package/es/List/DynamicList/index.less +15 -0
- package/es/List/GridList/Demo.d.ts +1 -0
- package/es/List/GridList/Demo.js +60 -38
- package/es/List/GridList/hook.d.ts +1 -1
- package/es/List/GridList/hook.js +66 -35
- package/es/List/GridList/index.js +33 -29
- package/es/List/GridList/{index.css → index.less} +0 -0
- package/es/List/GridList/utils.d.ts +2 -2
- package/es/List/GridList/utils.js +1 -0
- package/es/List/VList/index.d.ts +1 -1
- package/es/List/VList/index.js +32 -19
- package/es/List/VList/{index.css → index.less} +0 -0
- package/es/List/VList/utils.d.ts +2 -2
- package/es/List/VList/utils.js +8 -6
- package/es/List/demo.d.ts +3 -0
- package/es/List/demo.js +26 -0
- package/es/List/index.d.ts +1 -1
- package/es/List/index.js +31 -23
- package/es/List/{index.css → index.less} +5 -4
- package/es/ListWithSizeAnimate/demo.d.ts +2 -0
- package/es/ListWithSizeAnimate/demo.js +19 -0
- package/es/ListWithSizeAnimate/index.d.ts +9 -0
- package/es/ListWithSizeAnimate/index.js +71 -0
- package/es/ListWithSizeAnimate/index.less +13 -0
- package/es/LoaderApp/index.js +59 -25
- package/es/LoaderApp/{index.css → index.less} +0 -0
- package/es/LoaderApp/loader.js +40 -23
- package/es/LoaderApp/sandbox.back.js +101 -24
- package/es/LoaderApp/sandbox.js +26 -9
- package/es/LoaderApp/utils.d.ts +1 -1
- package/es/LoaderApp/utils.js +68 -25
- package/es/LoaderScript/index.js +25 -10
- package/es/LoaderScript/utils.js +151 -87
- package/es/Map/BasicMap/AMapInstance.d.ts +1 -1
- package/es/Map/BasicMap/AMapInstance.js +25 -3
- package/es/Map/BasicMap/LeafletInstance.js +28 -11
- package/es/Map/BasicMap/index.js +67 -27
- package/es/Map/BasicMap/index.less +24 -0
- package/es/Map/ClusterLayer/hook.d.ts +2 -2
- package/es/Map/ClusterLayer/hook.js +51 -23
- package/es/Map/ClusterLayer/index.d.ts +1 -1
- package/es/Map/ClusterLayer/index.js +14 -6
- package/es/Map/ClusterLayer/index.less +27 -0
- package/es/Map/Config/index.js +44 -16
- package/es/Map/Config/utils.js +17 -3
- package/es/Map/Context/index.js +43 -9
- package/es/Map/FindPio/index.js +5 -2
- package/es/Map/FindPio/{index.css → index.less} +0 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +1 -1
- package/es/Map/InfoWindow/MakerLikeWindow.js +41 -18
- package/es/Map/InfoWindow/demo.d.ts +1 -0
- package/es/Map/InfoWindow/demo.js +51 -29
- package/es/Map/InfoWindow/index.d.ts +1 -1
- package/es/Map/InfoWindow/index.js +39 -18
- package/es/Map/LevelCenter/DragMarker/index.js +16 -10
- package/es/Map/LevelCenter/demo.d.ts +1 -0
- package/es/Map/LevelCenter/demo.js +41 -22
- package/es/Map/LevelCenter/index.js +41 -29
- package/es/Map/LevelCenter/index.less +2 -0
- package/es/Map/LoaderMap/index.js +38 -22
- package/es/Map/MapDrawSelect/demo.d.ts +1 -0
- package/es/Map/MapDrawSelect/demo.js +65 -46
- package/es/Map/MapDrawSelect/index.js +43 -31
- package/es/Map/MapDrawSelect/index.less +2 -0
- package/es/Map/MouseTool/index.js +32 -18
- package/es/Map/MouseTool/useMouseTools.js +37 -8
- package/es/Map/ResetTools/index.js +58 -44
- package/es/Map/ResetTools/index.less +35 -0
- package/es/Map/SinglePoint/index.js +39 -27
- package/es/Map/SinglePoint/index.less +41 -0
- package/es/Map/hook/useMapEvent.js +8 -4
- package/es/Map/hook/useMapType.js +3 -2
- package/es/Map/index.d.ts +1 -0
- package/es/Map/index.js +11 -11
- package/es/Map/useMarker/index.d.ts +1 -1
- package/es/Map/useMarker/index.js +33 -13
- package/es/Map/{LevelCenter/index.css → useMarker/index.less} +0 -0
- package/es/Map/withMap/index.d.ts +1 -0
- package/es/Map/withMap/index.js +14 -4
- package/es/Modal/demo.d.ts +3 -0
- package/es/Modal/demo.js +106 -0
- package/es/Modal/index.js +94 -57
- package/es/Modal/index.less +45 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +59 -37
- package/es/Picture/component/DefaultRects/index.js +46 -32
- package/es/Picture/component/DefaultRects/index.less +188 -0
- package/es/Picture/component/DrawRect/index.js +37 -24
- package/es/Picture/component/DrawRect/{index.css → index.less} +0 -0
- package/es/Picture/component/RectMenu/index.js +35 -26
- package/es/Picture/component/RectMenu/index.less +31 -0
- package/es/Picture/component/RectMenu/utils.js +6 -3
- package/es/Picture/component/Tools/index.js +91 -69
- package/es/Picture/component/Tools/index.less +43 -0
- package/es/Picture/component/WheelScale/index.js +9 -4
- package/es/Picture/demo.js +14 -11
- package/es/Picture/dragBound.d.ts +1 -1
- package/es/Picture/dragBound.js +17 -4
- package/es/Picture/index.d.ts +2 -2
- package/es/Picture/index.js +201 -137
- package/es/Picture/index.less +14 -0
- package/es/Picture/interface.d.ts +0 -6
- package/es/Picture/loadCaptureRectImage.d.ts +1 -1
- package/es/Picture/loadCaptureRectImage.js +39 -14
- package/es/Picture/useDraw.js +40 -20
- package/es/Picture/utils.d.ts +9 -9
- package/es/Picture/utils.js +18 -3
- package/es/Player/api/index.d.ts +3 -3
- package/es/Player/api/index.js +117 -82
- package/es/Player/context.js +21 -7
- package/es/Player/contraller_bar/bar.d.ts +1 -1
- package/es/Player/contraller_bar/bar.js +28 -10
- package/es/Player/contraller_bar/contraller_event.js +34 -12
- package/es/Player/contraller_bar/index.js +30 -22
- package/es/Player/contraller_bar/left_bar.js +62 -39
- package/es/Player/contraller_bar/right_bar.js +34 -18
- package/es/Player/contraller_bar/time.js +19 -8
- package/es/Player/contraller_bar/useBarStatus.js +29 -11
- package/es/Player/contraller_bar/volume.d.ts +1 -1
- package/es/Player/contraller_bar/volume.js +43 -21
- package/es/Player/demo.d.ts +1 -0
- package/es/Player/demo.js +258 -215
- package/es/Player/event/errorEvent.js +41 -16
- package/es/Player/event/eventName.js +12 -1
- package/es/Player/event/index.js +66 -24
- package/es/Player/fps_play.js +33 -15
- package/es/Player/frontend_player.js +42 -20
- package/es/Player/frontend_timeline.js +95 -55
- package/es/Player/iconfont.js +23 -8
- package/es/Player/index.js +1 -1
- package/es/Player/live_heart.js +15 -3
- package/es/Player/message.js +68 -37
- package/es/Player/segment_player.js +113 -62
- package/es/Player/segment_timeline.js +145 -97
- package/es/Player/single_player.js +153 -111
- package/es/Player/style/bar.less +39 -0
- package/es/Player/style/iconfont.js +17 -10
- package/es/Player/style/index.less +30 -0
- package/es/Player/style/message.less +50 -0
- package/es/Player/style/slider.less +103 -0
- package/es/Player/style/timeline.less +106 -0
- package/es/Player/style/volume.less +21 -0
- package/es/Player/timeline.d.ts +1 -1
- package/es/Player/timeline.js +59 -32
- package/es/Player/util.js +46 -7
- package/es/PlayerExt/demo.d.ts +1 -0
- package/es/PlayerExt/demo.js +145 -112
- package/es/PlayerExt/index.d.ts +2 -2
- package/es/PlayerExt/index.js +139 -87
- package/es/PlayerExt/{index.css → index.less} +0 -0
- package/es/Progress/index.js +18 -5
- package/es/Progress/index.less +20 -0
- package/es/ROI/demo.d.ts +1 -0
- package/es/ROI/demo.js +12 -8
- package/es/ROI/index.js +45 -35
- package/es/ROI/index.less +29 -0
- package/es/ScreenPlayer/Live.d.ts +2 -2
- package/es/ScreenPlayer/Live.js +172 -109
- package/es/ScreenPlayer/LiveTools.d.ts +2 -2
- package/es/ScreenPlayer/LiveTools.js +156 -116
- package/es/ScreenPlayer/PlayerWithExt.d.ts +2 -2
- package/es/ScreenPlayer/PlayerWithExt.js +172 -115
- package/es/ScreenPlayer/RatePick.js +35 -22
- package/es/ScreenPlayer/Record.d.ts +1 -1
- package/es/ScreenPlayer/Record.js +307 -192
- package/es/ScreenPlayer/RecordTools.d.ts +2 -2
- package/es/ScreenPlayer/RecordTools.js +201 -149
- package/es/ScreenPlayer/ScreenSelect.js +37 -28
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -1
- package/es/ScreenPlayer/SegmentTimeLine.js +24 -17
- package/es/ScreenPlayer/TimeMode.js +22 -16
- package/es/ScreenPlayer/TimeSelect.js +86 -65
- package/es/ScreenPlayer/demo.js +16 -18
- package/es/ScreenPlayer/demo2.js +193 -178
- package/es/ScreenPlayer/index.d.ts +1 -0
- package/es/ScreenPlayer/index.js +3 -3
- package/es/ScreenPlayer/index.less +178 -0
- package/es/ScreenPlayer/interface.d.ts +2 -2
- package/es/ScreenPlayer/useTimeSlider.d.ts +8 -8
- package/es/ScreenPlayer/useTimeSlider.js +167 -60
- package/es/ScreenPlayer/useVideoFit.d.ts +1 -1
- package/es/ScreenPlayer/useVideoFit.js +18 -5
- package/es/ScreenPlayer/utils.d.ts +1 -1
- package/es/ScreenPlayer/utils.js +10 -1
- package/es/SegmentPlayer/index.js +1 -1
- package/es/Service/fetch-adapter.d.ts +1 -1
- package/es/Service/fetch-adapter.js +48 -5
- package/es/Service/http.js +46 -16
- package/es/Service/index.js +2 -2
- package/es/TableLayout/index.js +18 -12
- package/es/TableLayout/{index.css → index.less} +0 -0
- package/es/ThemeAntd/demo.d.ts +1 -0
- package/es/ThemeAntd/demo.js +126 -76
- package/es/ThemeAntd/{demo.css → demo.less} +4 -3
- package/es/ThemeAntd/index.js +6 -2
- package/es/ThemeAntd/index.less +16 -0
- package/es/ThemeAntd/style/button.less +67 -0
- package/es/ThemeAntd/style/checkbox.less +72 -0
- package/es/ThemeAntd/style/form.less +12 -0
- package/es/ThemeAntd/style/input.less +83 -0
- package/es/ThemeAntd/style/pagination.less +95 -0
- package/es/ThemeAntd/style/picker.less +106 -0
- package/es/ThemeAntd/style/popover.less +5 -0
- package/es/ThemeAntd/style/radio.less +87 -0
- package/es/ThemeAntd/style/{scrollbar.css → scrollbar.less} +4 -2
- package/es/ThemeAntd/style/select.less +81 -0
- package/es/ThemeAntd/style/table.less +57 -0
- package/es/ThemeAntd/style/tree.less +18 -0
- package/es/Timeout/index.js +36 -12
- package/es/Tree/demo.js +26 -21
- package/es/Tree/index.js +51 -30
- package/es/Tree/index.less +59 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +48 -47
- package/es/useDrawROI/index.js +130 -65
- package/es/useEventEmitterHandle/index.js +6 -2
- package/es/useFullscreen/demo.js +44 -27
- package/es/useFullscreen/index.js +30 -8
- package/es/useHistory/index.js +3 -1
- package/es/useInfiniteScroll/index.js +50 -19
- package/es/useRafInterval/index.js +28 -4
- package/es/useSimpleState/index.js +23 -6
- package/es/useVirtualList/index.js +58 -20
- package/es/utils.d.ts +1 -1
- package/es/utils.js +53 -14
- package/package.json +37 -32
- package/tsconfig.json +8 -32
- package/.eslintrc +0 -4
- package/.fatherrc.js +0 -25
- package/.prettierrc +0 -11
- package/.umirc.ts +0 -55
- package/clear-cache.sh +0 -4
- package/es/Box/InfoBox/index.css +0 -22
- package/es/Box/TwoColumnBox/index.css +0 -70
- package/es/CheckGroupFixed/index.css +0 -49
- package/es/CustomRenderSelect/index.css +0 -20
- package/es/Drawer/Demo.js +0 -59
- package/es/Drawer/index.css +0 -40
- package/es/FullScreen/index.css +0 -16
- package/es/ImageView/index.css +0 -10
- package/es/Input/index.css +0 -8
- package/es/LabelValue/index.css +0 -18
- package/es/List/DynamicList/index.css +0 -15
- package/es/Map/BasicMap/index.css +0 -24
- package/es/Map/ClusterLayer/index.css +0 -26
- package/es/Map/MapDrawSelect/index.css +0 -0
- package/es/Map/ResetTools/index.css +0 -32
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/index.css +0 -29
- package/es/Map/useMarker/index.css +0 -0
- package/es/Modal/index.css +0 -43
- package/es/Picture/component/DefaultRects/index.css +0 -247
- package/es/Picture/component/RectMenu/index.css +0 -31
- package/es/Picture/component/Tools/index.css +0 -42
- package/es/Picture/index.css +0 -12
- package/es/Player/style/bar.css +0 -38
- package/es/Player/style/index.css +0 -30
- package/es/Player/style/message.css +0 -49
- package/es/Player/style/slider.css +0 -96
- package/es/Player/style/timeline.css +0 -99
- package/es/Player/style/volume.css +0 -19
- package/es/Progress/index.css +0 -20
- package/es/ROI/index.css +0 -29
- package/es/ScreenPlayer/index.css +0 -166
- package/es/ThemeAntd/index.css +0 -620
- package/es/ThemeAntd/style/button.css +0 -55
- package/es/ThemeAntd/style/checkbox.css +0 -64
- package/es/ThemeAntd/style/form.css +0 -10
- package/es/ThemeAntd/style/input.css +0 -68
- package/es/ThemeAntd/style/pagination.css +0 -82
- package/es/ThemeAntd/style/picker.css +0 -98
- package/es/ThemeAntd/style/popover.css +0 -3
- package/es/ThemeAntd/style/radio.css +0 -80
- package/es/ThemeAntd/style/select.css +0 -76
- package/es/ThemeAntd/style/table.css +0 -46
- package/es/ThemeAntd/style/tree.css +0 -16
- package/es/Tree/index.css +0 -64
package/es/ScreenPlayer/demo2.js
CHANGED
|
@@ -1,63 +1,55 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
import _DatePicker from "antd/lib/date-picker";
|
|
2
|
+
|
|
4
3
|
import "antd/lib/config-provider/style";
|
|
5
4
|
import _ConfigProvider from "antd/lib/config-provider";
|
|
5
|
+
import "antd/lib/date-picker/style";
|
|
6
|
+
import _DatePicker from "antd/lib/date-picker";
|
|
7
|
+
|
|
6
8
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
9
|
+
|
|
7
10
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
|
|
8
12
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
9
14
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
|
|
10
16
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
+
|
|
18
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
19
|
+
|
|
20
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
21
|
+
|
|
11
22
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
12
24
|
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."); }
|
|
25
|
+
|
|
13
26
|
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); }
|
|
27
|
+
|
|
14
28
|
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; }
|
|
29
|
+
|
|
15
30
|
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; }
|
|
31
|
+
|
|
16
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
+
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
|
+
|
|
38
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
|
|
20
40
|
import moment from 'moment';
|
|
21
|
-
import {
|
|
22
|
-
import Service from
|
|
23
|
-
|
|
41
|
+
import React, { useMemo, useState } from 'react';
|
|
42
|
+
import Service from "../Service";
|
|
43
|
+
import RecordPlayer from "./Record";
|
|
44
|
+
import { completionSegments } from "./utils";
|
|
45
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
46
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
47
|
+
var token = "eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NSIsImV4dCI6MTY2OTM3MzQ3NDc2MywidWlkIjoiMTAxMDAwMDAwNjk5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTA1MTgsMTAwMDAwMTEwNzI4XSwidmFsaWRUaW1lIjoxNzA0MzgzOTk5MDAwLCJvcHRDZW50ZXJJZCI6IjEwMDEwMDAwMDIzMyIsInVzZXJUeXBlIjoxMDA3MDQsImlhdCI6MTY2OTExNDI3NDc2M30.Wy8ag8Nhw6_mdF6E4i2lPGDYzRVl-q9KMn49WMFL2Qs";
|
|
24
48
|
var cids = ['560077633', '560073578'];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
props = __rest(_a, ["cid", "date", "recordType"]);
|
|
30
|
-
// const json = {
|
|
31
|
-
// code: 0,
|
|
32
|
-
// message: '成功',
|
|
33
|
-
// data: [
|
|
34
|
-
// {
|
|
35
|
-
// beginTime: '1667995200',
|
|
36
|
-
// endTime: '1667996100',
|
|
37
|
-
// url: 'https://jxsr-oss1.antelopecloud.cn/oss/v1/560077633/record/m3u8/1667995200_1667996100.m3u8?client_token=560077633_0_1668087138_21ad227ea16c7b29c11ea741f12bba36&head=1',
|
|
38
|
-
// },
|
|
39
|
-
// {
|
|
40
|
-
// beginTime: '1667996100',
|
|
41
|
-
// endTime: '1667997000',
|
|
42
|
-
// url: 'https://jxsr-oss1.antelopecloud.cn/oss/v1/560077633/record/m3u8/1667996100_1667997000.m3u8?client_token=560077633_0_1668087138_21ad227ea16c7b29c11ea741f12bba36',
|
|
43
|
-
// },
|
|
44
|
-
// {
|
|
45
|
-
// beginTime: '1667997000',
|
|
46
|
-
// endTime: '1667997900',
|
|
47
|
-
// url: 'https://jxsr-oss1.antelopecloud.cn/oss/v1/560077633/record/m3u8/1667997000_1667997900.m3u8?client_token=560077633_0_1668087138_21ad227ea16c7b29c11ea741f12bba36',
|
|
48
|
-
// },
|
|
49
|
-
// {
|
|
50
|
-
// beginTime: '1667997900',
|
|
51
|
-
// endTime: '1667998800',
|
|
52
|
-
// url: 'https://jxsr-oss1.antelopecloud.cn/oss/v1/560077633/record/m3u8/1667997900_1667998800.m3u8?client_token=560077633_0_1668087138_21ad227ea16c7b29c11ea741f12bba36',
|
|
53
|
-
// },
|
|
54
|
-
// {
|
|
55
|
-
// beginTime: '1667998800',
|
|
56
|
-
// endTime: '1667999136',
|
|
57
|
-
// url: 'https://jxsr-oss1.antelopecloud.cn/oss/v1/560077633/record/m3u8/1667998800_1667999136.m3u8?client_token=560077633_0_1668087138_21ad227ea16c7b29c11ea741f12bba36',
|
|
58
|
-
// },
|
|
59
|
-
// ],
|
|
60
|
-
// };
|
|
49
|
+
|
|
50
|
+
var query = function query(_ref) {
|
|
51
|
+
var cid = _ref.cid,
|
|
52
|
+
date = _ref.date;
|
|
61
53
|
var m = moment(date);
|
|
62
54
|
var beginTime = m.set({
|
|
63
55
|
hours: 0,
|
|
@@ -79,10 +71,9 @@ var query = function query(_a) {
|
|
|
79
71
|
endTime: endTime
|
|
80
72
|
}
|
|
81
73
|
});
|
|
82
|
-
// const promise = Promise.resolve(json.data.map((v: any) => ({ url: v.play_url, beginTime: v.begin, endTime: v.end })));
|
|
83
74
|
return promise.then(function (res) {
|
|
84
75
|
return completionSegments(beginTime, endTime, res.data).map(function (v) {
|
|
85
|
-
return
|
|
76
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
86
77
|
beginTime: v.beginTime * 1000,
|
|
87
78
|
endTime: v.endTime * 1000
|
|
88
79
|
});
|
|
@@ -93,145 +84,169 @@ var query = function query(_a) {
|
|
|
93
84
|
return Promise.reject();
|
|
94
85
|
});
|
|
95
86
|
};
|
|
87
|
+
|
|
96
88
|
export default function App() {
|
|
97
|
-
var _this = this;
|
|
98
89
|
var _useState = useState({
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
list: [],
|
|
91
|
+
idx: 0
|
|
92
|
+
}),
|
|
93
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
94
|
+
state = _useState2[0],
|
|
95
|
+
setState = _useState2[1];
|
|
96
|
+
|
|
105
97
|
var value = useMemo(function () {
|
|
106
|
-
|
|
98
|
+
var _state$list$state$idx;
|
|
99
|
+
|
|
100
|
+
return state.list[state.idx] ? moment((_state$list$state$idx = state.list[state.idx]) === null || _state$list$state$idx === void 0 ? void 0 : _state$list$state$idx.date).set({
|
|
107
101
|
hour: 0,
|
|
108
102
|
minute: 0,
|
|
109
103
|
second: 0
|
|
110
104
|
}) : undefined;
|
|
111
105
|
}, [state.list, state.idx]);
|
|
112
|
-
return /*#__PURE__*/
|
|
113
|
-
prefixCls: "cloudapp"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
106
|
+
return /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
107
|
+
prefixCls: "cloudapp",
|
|
108
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
109
|
+
style: {
|
|
110
|
+
width: '100%'
|
|
111
|
+
},
|
|
112
|
+
children: [/*#__PURE__*/_jsx(_DatePicker, {
|
|
113
|
+
value: value,
|
|
114
|
+
onChange: /*#__PURE__*/function () {
|
|
115
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(v) {
|
|
116
|
+
var list, flag, cid, date, item, segments;
|
|
117
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
118
|
+
while (1) {
|
|
119
|
+
switch (_context.prev = _context.next) {
|
|
120
|
+
case 0:
|
|
121
|
+
list = _toConsumableArray(state.list);
|
|
122
|
+
flag = state.idx % 2 === 0;
|
|
123
|
+
cid = flag ? cids[0] : cids[1];
|
|
124
|
+
date = v === null || v === void 0 ? void 0 : v.set({
|
|
125
|
+
hours: 0,
|
|
126
|
+
minutes: 0,
|
|
127
|
+
seconds: 0
|
|
128
|
+
}).valueOf();
|
|
129
|
+
item = {
|
|
130
|
+
date: date,
|
|
131
|
+
cid: cid,
|
|
132
|
+
type: 'hls',
|
|
133
|
+
recordType: 1,
|
|
134
|
+
loading: true
|
|
135
|
+
};
|
|
136
|
+
list[state.idx] = item;
|
|
137
|
+
setState(function (old) {
|
|
138
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
139
|
+
list: list
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
_context.next = 9;
|
|
143
|
+
return query(item);
|
|
144
|
+
|
|
145
|
+
case 9:
|
|
146
|
+
segments = _context.sent;
|
|
147
|
+
item.loading = false;
|
|
148
|
+
item.segments = segments;
|
|
149
|
+
list[state.idx] = item;
|
|
150
|
+
setState(function (old) {
|
|
151
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
152
|
+
list: _toConsumableArray(list)
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
case 14:
|
|
157
|
+
case "end":
|
|
158
|
+
return _context.stop();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}, _callee);
|
|
162
|
+
}));
|
|
163
|
+
|
|
164
|
+
return function (_x) {
|
|
165
|
+
return _ref2.apply(this, arguments);
|
|
166
|
+
};
|
|
167
|
+
}()
|
|
168
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
169
|
+
style: {
|
|
170
|
+
height: 600,
|
|
171
|
+
width: '100%'
|
|
172
|
+
},
|
|
173
|
+
children: /*#__PURE__*/_jsx(RecordPlayer, {
|
|
174
|
+
list: state.list,
|
|
175
|
+
onIndexChange: function onIndexChange(idx) {
|
|
176
|
+
return setState(function (old) {
|
|
177
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
178
|
+
idx: idx
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
onTimeLineChange: /*#__PURE__*/function () {
|
|
183
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(date) {
|
|
184
|
+
var item, _state$list$state$idx2, segments;
|
|
185
|
+
|
|
186
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
187
|
+
while (1) {
|
|
188
|
+
switch (_context2.prev = _context2.next) {
|
|
189
|
+
case 0:
|
|
190
|
+
item = state.list[state.idx];
|
|
191
|
+
|
|
192
|
+
if (!state.list[state.idx]) {
|
|
193
|
+
_context2.next = 10;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
state.list[state.idx].loading = true;
|
|
198
|
+
setState(function (old) {
|
|
199
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
200
|
+
list: _toConsumableArray(state.list)
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
_context2.next = 6;
|
|
204
|
+
return query({
|
|
205
|
+
cid: item.cid,
|
|
206
|
+
date: date,
|
|
207
|
+
recordType: 1
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
case 6:
|
|
211
|
+
segments = _context2.sent;
|
|
212
|
+
state.list[state.idx].loading = false;
|
|
213
|
+
state.list[state.idx].segments = [].concat(_toConsumableArray(segments), _toConsumableArray((_state$list$state$idx2 = state.list[state.idx].segments) !== null && _state$list$state$idx2 !== void 0 ? _state$list$state$idx2 : []));
|
|
214
|
+
setState(function (old) {
|
|
215
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
216
|
+
list: _toConsumableArray(state.list)
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
case 10:
|
|
221
|
+
case "end":
|
|
222
|
+
return _context2.stop();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}, _callee2);
|
|
226
|
+
}));
|
|
227
|
+
|
|
228
|
+
return function (_x2) {
|
|
229
|
+
return _ref3.apply(this, arguments);
|
|
230
|
+
};
|
|
231
|
+
}(),
|
|
232
|
+
onClose: function onClose() {
|
|
233
|
+
var list = state.list;
|
|
234
|
+
list[state.idx] = undefined;
|
|
235
|
+
setState(function (old) {
|
|
236
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
237
|
+
list: _toConsumableArray(list)
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
onCloseAll: function onCloseAll() {
|
|
242
|
+
return setState(function (old) {
|
|
243
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
244
|
+
list: []
|
|
245
|
+
});
|
|
246
|
+
});
|
|
164
247
|
}
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
})
|
|
169
|
-
style: {
|
|
170
|
-
minWidth: 900,
|
|
171
|
-
height: 800,
|
|
172
|
-
width: '100%'
|
|
173
|
-
}
|
|
174
|
-
}, /*#__PURE__*/React.createElement(RecordPlayer, {
|
|
175
|
-
list: state.list,
|
|
176
|
-
onIndexChange: function onIndexChange(idx) {
|
|
177
|
-
return setState(function (old) {
|
|
178
|
-
return Object.assign(Object.assign({}, old), {
|
|
179
|
-
idx: idx
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
},
|
|
183
|
-
onTimeLineChange: function onTimeLineChange(date) {
|
|
184
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
185
|
-
var item, segments;
|
|
186
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
187
|
-
while (1) {
|
|
188
|
-
switch (_context2.prev = _context2.next) {
|
|
189
|
-
case 0:
|
|
190
|
-
item = state.list[state.idx];
|
|
191
|
-
state.list[state.idx].loading = true;
|
|
192
|
-
setState(function (old) {
|
|
193
|
-
return Object.assign(Object.assign({}, old), {
|
|
194
|
-
list: _toConsumableArray(state.list)
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
_context2.next = 5;
|
|
198
|
-
return query({
|
|
199
|
-
cid: item.cid,
|
|
200
|
-
date: date,
|
|
201
|
-
recordType: 1
|
|
202
|
-
});
|
|
203
|
-
case 5:
|
|
204
|
-
segments = _context2.sent;
|
|
205
|
-
state.list[state.idx].loading = false;
|
|
206
|
-
state.list[state.idx].segments = [].concat(_toConsumableArray(segments), _toConsumableArray(state.list[state.idx].segments));
|
|
207
|
-
setState(function (old) {
|
|
208
|
-
return Object.assign(Object.assign({}, old), {
|
|
209
|
-
list: _toConsumableArray(state.list)
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
case 9:
|
|
213
|
-
case "end":
|
|
214
|
-
return _context2.stop();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}, _callee2);
|
|
218
|
-
}));
|
|
219
|
-
},
|
|
220
|
-
onClose: function onClose() {
|
|
221
|
-
var list = state.list;
|
|
222
|
-
list[state.idx] = undefined;
|
|
223
|
-
setState(function (old) {
|
|
224
|
-
return Object.assign(Object.assign({}, old), {
|
|
225
|
-
list: _toConsumableArray(list)
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
onCloseAll: function onCloseAll() {
|
|
230
|
-
return setState(function (old) {
|
|
231
|
-
return Object.assign(Object.assign({}, old), {
|
|
232
|
-
list: []
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
}))));
|
|
248
|
+
})
|
|
249
|
+
})]
|
|
250
|
+
})
|
|
251
|
+
});
|
|
237
252
|
}
|
package/es/ScreenPlayer/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withErrorBoundary } from 'react-error-boundary';
|
|
2
|
-
import LivePlayer from
|
|
3
|
-
import RecordPlayer from
|
|
4
|
-
import { errorBoundaryOptions } from
|
|
2
|
+
import LivePlayer from "./Live";
|
|
3
|
+
import RecordPlayer from "./Record";
|
|
4
|
+
import { errorBoundaryOptions } from "../ErrorFallback";
|
|
5
5
|
var Sceenplayer = {
|
|
6
6
|
LivePlayer: withErrorBoundary(LivePlayer, errorBoundaryOptions),
|
|
7
7
|
RecordPlayer: withErrorBoundary(RecordPlayer, errorBoundaryOptions)
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
.split-screen-player-wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
user-select: none;
|
|
6
|
+
min-width: 600px;
|
|
7
|
+
.player-layout {
|
|
8
|
+
height: calc(100% - 88px);
|
|
9
|
+
.player-with-ext-layout {
|
|
10
|
+
float: left;
|
|
11
|
+
.lm-player-ext-layout {
|
|
12
|
+
border: 1px solid var(--gray12);
|
|
13
|
+
height: 100%;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
&.player-current-index {
|
|
17
|
+
.lm-player-ext-layout {
|
|
18
|
+
border: 1px solid var(--primary);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&.split-screen-player-live-wrapper {
|
|
24
|
+
.player-layout {
|
|
25
|
+
height: calc(100% - 42px);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.player-tools-group {
|
|
29
|
+
height: 88px;
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
.player-record-time {
|
|
33
|
+
text-align: center;
|
|
34
|
+
background-color: var(--gray11);
|
|
35
|
+
line-height: 42px;
|
|
36
|
+
padding: 0 16px;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
color: var(--gray1);
|
|
39
|
+
margin: 0 20px;
|
|
40
|
+
}
|
|
41
|
+
.icon-chajian {
|
|
42
|
+
position: relative;
|
|
43
|
+
top: 1px;
|
|
44
|
+
left: 1px;
|
|
45
|
+
font-size: 22px !important;
|
|
46
|
+
}
|
|
47
|
+
.player-tools {
|
|
48
|
+
height: 42px;
|
|
49
|
+
background-color: #242c3d;
|
|
50
|
+
padding: 0 10px;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
position: relative;
|
|
55
|
+
.player-tools-left,
|
|
56
|
+
.player-tools-right {
|
|
57
|
+
width: 35%;
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-columns: repeat(auto-fill, 32px);
|
|
60
|
+
grid-gap: 10px;
|
|
61
|
+
}
|
|
62
|
+
.player-tools-right {
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: flex-end;
|
|
65
|
+
margin-right: 0;
|
|
66
|
+
margin-left: 4px;
|
|
67
|
+
}
|
|
68
|
+
.player-tools-mid {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-self: center;
|
|
72
|
+
height: 100%;
|
|
73
|
+
.player-tools-item {
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.player-tools-item {
|
|
79
|
+
font-size: 18px;
|
|
80
|
+
width: 32px;
|
|
81
|
+
height: 32px;
|
|
82
|
+
color: var(--gray1);
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
.lm-player-iconfont {
|
|
88
|
+
font-size: 20px;
|
|
89
|
+
}
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: var(--gray11);
|
|
92
|
+
border-radius: var(--radius1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.select-current-screen-item {
|
|
96
|
+
font-size: 18px;
|
|
97
|
+
width: 32px;
|
|
98
|
+
height: 32px;
|
|
99
|
+
color: var(--gray1);
|
|
100
|
+
text-align: center;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
.lm-player-iconfont {
|
|
106
|
+
font-size: 20px;
|
|
107
|
+
}
|
|
108
|
+
&:hover {
|
|
109
|
+
background-color: var(--gray11);
|
|
110
|
+
border-radius: var(--radius1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 录像
|
|
116
|
+
&.split-screen-player-wrapper-record {
|
|
117
|
+
.record-time-line {
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 46px;
|
|
120
|
+
position: relative;
|
|
121
|
+
canvas {
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 100%;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
background-color: #030917;
|
|
127
|
+
}
|
|
128
|
+
.time-line-mask {
|
|
129
|
+
position: absolute;
|
|
130
|
+
left: 0;
|
|
131
|
+
top: 0;
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
134
|
+
z-index: 5;
|
|
135
|
+
cursor: not-allowed;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.player-time-select {
|
|
142
|
+
width: 190px;
|
|
143
|
+
display: flex;
|
|
144
|
+
justify-content: space-around;
|
|
145
|
+
align-items: center;
|
|
146
|
+
}
|
|
147
|
+
.@{ant-prefix}-select.time-mode-select {
|
|
148
|
+
font-size: var(--fs-small);
|
|
149
|
+
color: var(--gray1);
|
|
150
|
+
|
|
151
|
+
.cloudapp-select-selector {
|
|
152
|
+
background-color: transparent !important;
|
|
153
|
+
border-radius: var(--radius1) !important;
|
|
154
|
+
}
|
|
155
|
+
.anticon {
|
|
156
|
+
color: var(--gray1);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
.custom-select-dropdown {
|
|
160
|
+
font-size: var(--fs-small);
|
|
161
|
+
.cloudapp-select-item {
|
|
162
|
+
font-size: var(--fs-small);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.select-current-rate-item {
|
|
167
|
+
color: var(--gray1);
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
border: 1px solid var(--gray1);
|
|
170
|
+
padding: 2px 0;
|
|
171
|
+
display: inline-block;
|
|
172
|
+
width: 64px;
|
|
173
|
+
border-radius: 2px;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
text-align: center;
|
|
176
|
+
position: relative;
|
|
177
|
+
top: 4px;
|
|
178
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { ExportPlayerType, ISegmentType } from '../Player/player';
|
|
2
3
|
import type { PlayModeType } from '../PlayerExt';
|
|
3
|
-
import type { ISegmentType, ExportPlayerType } from '../Player/player';
|
|
4
4
|
|
|
5
5
|
export type RecordItem = {
|
|
6
6
|
type?: 'flv' | 'hls' | 'native';
|
|
@@ -120,7 +120,7 @@ export interface IRecordPlayerState {
|
|
|
120
120
|
currentTimes: { [key: string]: number };
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
*
|
|
124
124
|
*/
|
|
125
125
|
begins: { [key: string]: number };
|
|
126
126
|
|