@cloud-app-dev/vidc 4.0.15 → 4.1.0
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 +2 -18
- package/.eslintrc.js +3 -0
- package/.fatherrc.ts +0 -7
- package/es/AppContext/Sync.d.ts +1 -2
- package/es/AppContext/index.d.ts +10 -3
- package/es/AppContext/index.js +14 -4
- package/es/AppContext/interface.d.ts +1 -0
- package/es/CheckGroupFixed/demo.d.ts +1 -2
- package/es/CheckGroupFixed/demo.js +7 -12
- package/es/CheckGroupFixed/index.d.ts +7 -3
- package/es/CheckGroupFixed/index.js +9 -9
- package/es/CheckGroupFixed/style.d.ts +6 -0
- package/es/CheckGroupFixed/style.js +9 -0
- package/es/Config/index.js +1 -1
- package/es/CustomRenderSelect/index.d.ts +3 -2
- package/es/CustomRenderSelect/index.js +13 -10
- package/es/DBTools/index.js +1 -2
- package/es/DisableMark/index.d.ts +1 -2
- package/es/DisableMark/index.js +5 -2
- package/es/DomMove/demo.d.ts +1 -2
- package/es/DomMove/demo.js +0 -1
- package/es/DomMove/index.js +7 -8
- package/es/DynamicGridList/demo.d.ts +2 -0
- package/es/DynamicGridList/index.d.ts +1 -1
- package/es/DynamicGridList/index.js +3 -3
- package/es/DynamicList/demo.d.ts +1 -2
- package/es/DynamicList/demo.js +14 -19
- package/es/DynamicList/index.d.ts +1 -2
- package/es/DynamicList/index.js +10 -8
- package/es/ErrorFallback/index.d.ts +1 -2
- package/es/EventTools/index.d.ts +1 -1
- package/es/GridList/demo.d.ts +2 -0
- package/es/GridList/{Demo.js → demo.js} +1 -1
- package/es/GridList/hook.js +2 -2
- package/es/GridList/index.d.ts +0 -1
- package/es/GridList/index.js +5 -2
- package/es/HightLevel/index.d.ts +1 -2
- package/es/HightLevel/index.js +2 -3
- package/es/IconFont/index.d.ts +1 -1
- package/es/LabelValue/index.d.ts +1 -2
- package/es/LabelValue/index.js +5 -2
- package/es/List/demo.d.ts +1 -2
- package/es/List/demo.js +1 -2
- package/es/List/index.d.ts +2 -3
- package/es/List/index.js +25 -17
- package/es/ListWithSizeAnimate/demo.d.ts +1 -2
- package/es/ListWithSizeAnimate/index.d.ts +0 -1
- package/es/ListWithSizeAnimate/index.js +19 -10
- package/es/LoaderScript/index.d.ts +1 -1
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +1 -2
- package/es/Picture/component/DefaultRects/RectInfo.js +6 -4
- package/es/Picture/component/DefaultRects/index.d.ts +1 -3
- package/es/Picture/component/DefaultRects/index.js +5 -5
- package/es/Picture/component/DefaultRects/style.d.ts +10 -0
- package/es/Picture/component/DefaultRects/style.js +28 -0
- package/es/Picture/component/DrawRect/index.d.ts +1 -3
- package/es/Picture/component/DrawRect/index.js +6 -3
- package/es/Picture/component/RectMenu/index.d.ts +1 -3
- package/es/Picture/component/RectMenu/index.js +13 -8
- package/es/Picture/component/Tools/index.d.ts +1 -2
- package/es/Picture/component/Tools/index.js +21 -9
- package/es/Picture/component/Tools/style.d.ts +2 -0
- package/es/Picture/component/Tools/style.js +5 -0
- package/es/Picture/component/WheelScale/index.d.ts +1 -2
- package/es/Picture/demo.d.ts +1 -2
- package/es/Picture/demo.js +1 -1
- package/es/Picture/index.d.ts +1 -3
- package/es/Picture/index.js +21 -19
- package/es/Picture/useDraw.js +4 -4
- package/es/Player/api/index.d.ts +1 -1
- package/es/Player/api/index.js +44 -18
- package/es/Player/context.d.ts +1 -1
- package/es/Player/contraller_bar/bar.d.ts +1 -1
- package/es/Player/contraller_bar/bar.js +5 -1
- package/es/Player/contraller_bar/contraller_event.d.ts +1 -1
- package/es/Player/contraller_bar/contraller_event.js +4 -5
- package/es/Player/contraller_bar/index.d.ts +1 -2
- package/es/Player/contraller_bar/index.js +8 -2
- package/es/Player/contraller_bar/left_bar.d.ts +1 -1
- package/es/Player/contraller_bar/left_bar.js +12 -3
- package/es/Player/contraller_bar/right_bar.d.ts +1 -1
- package/es/Player/contraller_bar/right_bar.js +1 -2
- package/es/Player/contraller_bar/time.d.ts +1 -2
- package/es/Player/contraller_bar/time.js +5 -2
- package/es/Player/contraller_bar/volume.d.ts +1 -2
- package/es/Player/contraller_bar/volume.js +11 -6
- package/es/Player/demo.d.ts +1 -2
- package/es/Player/demo.js +41 -29
- package/es/Player/empty.d.ts +1 -2
- package/es/Player/empty.js +0 -1
- package/es/Player/event/index.d.ts +1 -1
- package/es/Player/event/index.js +4 -3
- package/es/Player/fps_play.d.ts +1 -2
- package/es/Player/fps_play.js +6 -2
- package/es/Player/frontend_player.d.ts +1 -2
- package/es/Player/frontend_player.js +4 -5
- package/es/Player/frontend_timeline.d.ts +1 -3
- package/es/Player/frontend_timeline.js +16 -8
- package/es/Player/iconfont.d.ts +1 -2
- package/es/Player/iconfont.js +1 -2
- package/es/Player/live_heart.js +8 -9
- package/es/Player/message.d.ts +2 -4
- package/es/Player/message.js +16 -7
- package/es/Player/player.d.ts +2 -0
- package/es/Player/segment_player.d.ts +1 -2
- package/es/Player/segment_player.js +4 -5
- package/es/Player/segment_timeline.d.ts +1 -3
- package/es/Player/segment_timeline.js +19 -9
- package/es/Player/single_player.d.ts +0 -1
- package/es/Player/single_player.js +18 -15
- package/es/Player/timeline.d.ts +5 -3
- package/es/Player/timeline.js +10 -4
- package/es/Player/util.d.ts +2 -2
- package/es/Player/util.js +2 -2
- package/es/PlayerExt/demo.d.ts +1 -2
- package/es/PlayerExt/demo.js +3 -3
- package/es/PlayerExt/index.d.ts +1 -2
- package/es/PlayerExt/index.js +10 -5
- package/es/Progress/index.d.ts +1 -3
- package/es/Progress/index.js +7 -3
- package/es/ROI/demo.d.ts +1 -2
- package/es/ROI/demo.js +1 -2
- package/es/ROI/index.d.ts +1 -2
- package/es/ROI/index.js +17 -7
- package/es/RefDrawer/Footer.d.ts +1 -1
- package/es/RefDrawer/index.d.ts +1 -1
- package/es/RefDrawer/index.js +2 -2
- package/es/RefModal/demo.d.ts +1 -2
- package/es/RefModal/index.d.ts +1 -1
- package/es/RefModal/index.js +2 -2
- package/es/ScreenPlayer/Live.d.ts +1 -3
- package/es/ScreenPlayer/Live.js +10 -11
- package/es/ScreenPlayer/LiveTools.d.ts +5 -1
- package/es/ScreenPlayer/LiveTools.js +14 -9
- package/es/ScreenPlayer/PlayerWithExt.d.ts +3 -3
- package/es/ScreenPlayer/PlayerWithExt.js +14 -13
- package/es/ScreenPlayer/RatePick.d.ts +1 -2
- package/es/ScreenPlayer/RatePick.js +9 -4
- package/es/ScreenPlayer/Record.d.ts +1 -3
- package/es/ScreenPlayer/Record.js +27 -22
- package/es/ScreenPlayer/RecordTools.d.ts +1 -1
- package/es/ScreenPlayer/RecordTools.js +11 -13
- package/es/ScreenPlayer/ScreenSelect.d.ts +1 -2
- package/es/ScreenPlayer/ScreenSelect.js +11 -3
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -2
- package/es/ScreenPlayer/SegmentTimeLine.js +12 -6
- package/es/ScreenPlayer/TimeMode.d.ts +1 -2
- package/es/ScreenPlayer/TimeMode.js +7 -3
- package/es/ScreenPlayer/TimeSelect.d.ts +1 -2
- package/es/ScreenPlayer/TimeSelect.js +10 -5
- package/es/ScreenPlayer/containerStyle.d.ts +13 -0
- package/es/ScreenPlayer/containerStyle.js +32 -0
- package/es/ScreenPlayer/demo.d.ts +1 -2
- package/es/ScreenPlayer/demo.js +8 -13
- package/es/ScreenPlayer/demo2.d.ts +1 -2
- package/es/ScreenPlayer/demo2.js +112 -116
- package/es/ScreenPlayer/index.d.ts +2 -2
- package/es/ScreenPlayer/useTimeSlider.d.ts +2 -2
- package/es/ScreenPlayer/useTimeSlider.js +16 -15
- package/es/ScreenPlayer/useVideoFit.js +2 -2
- package/es/SocketEmitter/eventEmitter.d.ts +1 -1
- package/es/TableLayout/index.d.ts +1 -2
- package/es/TableLayout/index.js +7 -4
- package/es/Timeout/index.d.ts +1 -2
- package/es/Timeout/index.js +4 -5
- package/es/cache/index.d.ts +1 -1
- package/es/cache/index.js +21 -21
- package/es/index.d.ts +3 -11
- package/es/index.js +3 -11
- package/es/likeGo/index.d.ts +2 -0
- package/es/{Map/Config/utils.js → likeGo/index.js} +15 -49
- package/es/likeGoSync/index.d.ts +2 -0
- package/es/likeGoSync/index.js +10 -0
- package/es/logger/index.d.ts +4 -4
- package/es/nextTick/index.d.ts +1 -1
- package/es/nextTick/index.js +2 -6
- package/es/recorder/demo.d.ts +2 -0
- package/es/recorder/demo.js +200 -0
- package/es/recorder/index.d.ts +294 -0
- package/es/recorder/index.js +991 -0
- package/es/useDrawROI/index.js +8 -12
- package/es/useEventEmitterHandle/index.js +2 -2
- package/es/useInfiniteScroll/index.d.ts +1 -1
- package/es/useInfiniteScroll/index.js +8 -7
- package/es/useRafInterval/index.js +2 -2
- package/es/useSimpleState/index.js +3 -4
- package/es/useVirtualList/index.d.ts +1 -1
- package/es/useVirtualList/index.js +5 -8
- package/es/utils.d.ts +4 -4
- package/es/utils.js +1 -30
- package/es/uuid/index.d.ts +2 -1
- package/es/uuid/index.js +3 -12
- package/package.json +36 -37
- package/release-build.sh +3 -2
- package/scripts/{entry.js → entry.mjs} +4 -6
- package/{icon-fix.js → scripts/icon-fix.mjs} +4 -3
- package/tsconfig.json +1 -1
- package/es/Auth/index.d.ts +0 -8
- package/es/Auth/index.js +0 -18
- package/es/AutoExit/index.d.ts +0 -6
- package/es/AutoExit/index.js +0 -23
- package/es/CheckGroupFixed/index.less +0 -53
- package/es/ConfigContext/index.d.ts +0 -22
- package/es/ConfigContext/index.js +0 -25
- package/es/CustomRenderSelect/index.less +0 -25
- package/es/DisableMark/index.less +0 -9
- package/es/DynamicGridList/Demo.d.ts +0 -3
- package/es/DynamicList/index.less +0 -17
- package/es/FullScreen/index.d.ts +0 -22
- package/es/FullScreen/index.js +0 -36
- package/es/FullScreen/index.less +0 -18
- package/es/GridList/Demo.d.ts +0 -3
- package/es/GridList/index.less +0 -8
- package/es/HightLevel/index.less +0 -3
- package/es/ImageView/index.d.ts +0 -17
- package/es/ImageView/index.js +0 -58
- package/es/ImageView/index.less +0 -11
- package/es/LabelPlayer/111.png +0 -0
- package/es/LabelPlayer/demo.d.ts +0 -2
- package/es/LabelPlayer/demo.js +0 -123
- package/es/LabelPlayer/index.d.ts +0 -21
- package/es/LabelPlayer/index.js +0 -169
- package/es/LabelPlayer/index.less +0 -24
- package/es/LabelValue/index.less +0 -23
- package/es/List/index.less +0 -13
- package/es/ListWithSizeAnimate/index.less +0 -23
- package/es/Map/AMap.d.ts +0 -7109
- package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
- package/es/Map/BasicMap/AMapInstance.js +0 -98
- package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
- package/es/Map/BasicMap/LeafletInstance.js +0 -111
- package/es/Map/BasicMap/index.d.ts +0 -9
- package/es/Map/BasicMap/index.js +0 -98
- package/es/Map/BasicMap/index.less +0 -29
- package/es/Map/ClusterLayer/demo.d.ts +0 -3
- package/es/Map/ClusterLayer/demo.js +0 -22
- package/es/Map/ClusterLayer/hook.d.ts +0 -5
- package/es/Map/ClusterLayer/hook.js +0 -124
- package/es/Map/ClusterLayer/index.d.ts +0 -6
- package/es/Map/ClusterLayer/index.js +0 -32
- package/es/Map/ClusterLayer/index.less +0 -29
- package/es/Map/ClusterLayer/props.d.ts +0 -8
- package/es/Map/Config/index.d.ts +0 -9
- package/es/Map/Config/index.js +0 -52
- package/es/Map/Config/utils.d.ts +0 -2
- package/es/Map/Context/index.d.ts +0 -11
- package/es/Map/Context/index.js +0 -56
- package/es/Map/FindPio/index.d.ts +0 -4
- package/es/Map/FindPio/index.js +0 -14
- package/es/Map/FindPio/index.less +0 -7
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
- package/es/Map/InfoWindow/MakerLikeWindow.js +0 -113
- package/es/Map/InfoWindow/demo.d.ts +0 -3
- package/es/Map/InfoWindow/demo.js +0 -76
- package/es/Map/InfoWindow/index.d.ts +0 -11
- package/es/Map/InfoWindow/index.js +0 -67
- package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
- package/es/Map/LevelCenter/DragMarker/index.js +0 -44
- package/es/Map/LevelCenter/demo.d.ts +0 -3
- package/es/Map/LevelCenter/demo.js +0 -46
- package/es/Map/LevelCenter/index.d.ts +0 -15
- package/es/Map/LevelCenter/index.js +0 -71
- package/es/Map/LoaderMap/index.d.ts +0 -12
- package/es/Map/LoaderMap/index.js +0 -71
- package/es/Map/MapDrawSelect/demo.d.ts +0 -3
- package/es/Map/MapDrawSelect/demo.js +0 -79
- package/es/Map/MapDrawSelect/index.d.ts +0 -15
- package/es/Map/MapDrawSelect/index.js +0 -62
- package/es/Map/MouseTool/index.d.ts +0 -10
- package/es/Map/MouseTool/index.js +0 -44
- package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
- package/es/Map/MouseTool/useMouseTools.js +0 -83
- package/es/Map/ResetTools/index.d.ts +0 -10
- package/es/Map/ResetTools/index.js +0 -67
- package/es/Map/ResetTools/index.less +0 -39
- package/es/Map/SinglePoint/demo.d.ts +0 -3
- package/es/Map/SinglePoint/demo.js +0 -16
- package/es/Map/SinglePoint/index.d.ts +0 -27
- package/es/Map/SinglePoint/index.js +0 -57
- package/es/Map/SinglePoint/index.less +0 -41
- package/es/Map/hook/useMapEvent.d.ts +0 -2
- package/es/Map/hook/useMapEvent.js +0 -19
- package/es/Map/hook/useMapType.d.ts +0 -4
- package/es/Map/hook/useMapType.js +0 -12
- package/es/Map/icon.d.ts +0 -2
- package/es/Map/icon.js +0 -10
- package/es/Map/index.d.ts +0 -24
- package/es/Map/index.js +0 -25
- package/es/Map/interface.d.ts +0 -74
- package/es/Map/points.d.ts +0 -74
- package/es/Map/points.js +0 -1
- package/es/Map/useMarker/index.d.ts +0 -10
- package/es/Map/useMarker/index.js +0 -71
- package/es/Map/withMap/index.d.ts +0 -3
- package/es/Map/withMap/index.js +0 -18
- package/es/Picture/component/DefaultRects/index.less +0 -211
- package/es/Picture/component/DrawRect/index.less +0 -8
- package/es/Picture/component/RectMenu/index.less +0 -36
- package/es/Picture/component/Tools/index.less +0 -49
- package/es/Picture/index.less +0 -20
- package/es/Player/style/bar.less +0 -43
- package/es/Player/style/index.less +0 -34
- package/es/Player/style/message.less +0 -56
- package/es/Player/style/slider.less +0 -106
- package/es/Player/style/timeline.less +0 -116
- package/es/Player/style/volume.less +0 -24
- package/es/PlayerExt/index.less +0 -10
- package/es/Progress/index.less +0 -21
- package/es/ROI/index.less +0 -33
- package/es/ScreenPlayer/index.less +0 -335
- package/es/TableLayout/index.less +0 -4
- package/es/ThemeAntd/demo.d.ts +0 -4
- package/es/ThemeAntd/demo.js +0 -129
- package/es/ThemeAntd/demo.less +0 -20
- package/es/ThemeAntd/index.d.ts +0 -7
- package/es/ThemeAntd/index.js +0 -23
- package/es/ThemeAntd/index.less +0 -4
- package/es/VList/index.d.ts +0 -11
- package/es/VList/index.js +0 -42
- package/es/VList/index.less +0 -6
- package/es/VList/utils.d.ts +0 -14
- package/es/VList/utils.js +0 -17
- package/es/bigNumberTransformCN/index.d.ts +0 -5
- package/es/bigNumberTransformCN/index.js +0 -60
- package/es/useFullscreen/demo.d.ts +0 -2
- package/es/useFullscreen/demo.js +0 -48
- package/es/useFullscreen/index.d.ts +0 -12
- package/es/useFullscreen/index.js +0 -76
- /package/es/DynamicGridList/{Demo.js → demo.js} +0 -0
package/es/Progress/index.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
1
2
|
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."); }
|
|
3
4
|
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); }
|
|
4
5
|
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; }
|
|
5
6
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
9
|
+
import { css } from '@emotion/css';
|
|
7
10
|
import { Progress } from 'antd';
|
|
8
|
-
import
|
|
9
|
-
import "./index.less";
|
|
11
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
10
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
var loadingProgressCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n z-index: 99;\n height: 2px;\n overflow: hidden;\n opacity: 1;\n transition: opacity 1s linear;\n .ant-progress-outer {\n display: block;\n .ant-progress-inner {\n display: block;\n background-color: transparent;\n }\n }\n"])));
|
|
14
|
+
var loadingProgressOverCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n opacity: 0;\n"])));
|
|
11
15
|
function ProgressComponent(_ref) {
|
|
12
16
|
var status = _ref.status;
|
|
13
17
|
var timer = useRef();
|
|
@@ -47,7 +51,7 @@ function ProgressComponent(_ref) {
|
|
|
47
51
|
showInfo: false,
|
|
48
52
|
strokeWidth: 2,
|
|
49
53
|
strokeColor: status !== 'error' ? 'var(--primary)' : ' var(--danger)',
|
|
50
|
-
className: "
|
|
54
|
+
className: "".concat(loadingProgressCss, " ").concat(isHide ? loadingProgressOverCss : '')
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
ProgressComponent.defaultProps = {
|
package/es/ROI/demo.d.ts
CHANGED
package/es/ROI/demo.js
CHANGED
package/es/ROI/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
2
|
interface IRIOProps {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
4
|
/**
|
|
@@ -29,5 +28,5 @@ interface IRIOProps {
|
|
|
29
28
|
*/
|
|
30
29
|
rowItems?: number;
|
|
31
30
|
}
|
|
32
|
-
declare function RIO({ children, debug, renderKey, onChange, isOpen, row, rowItems }: IRIOProps): JSX.Element;
|
|
31
|
+
declare function RIO({ children, debug, renderKey, onChange, isOpen, row, rowItems }: IRIOProps): import("react/jsx-runtime").JSX.Element;
|
|
33
32
|
export default RIO;
|
package/es/ROI/index.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { css } from '@emotion/css';
|
|
4
|
+
import { useUpdateEffect } from 'ahooks';
|
|
2
5
|
import React, { useEffect, useRef } from 'react';
|
|
3
6
|
import useDrawROI from "../useDrawROI";
|
|
4
|
-
import "./index.less";
|
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
var roiLayoutCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n height: 100%;\n"])));
|
|
10
|
+
var canvasCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
11
|
+
var roiDebugBoxCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 100%;\n flex-direction: column;\n"])));
|
|
12
|
+
var rowIndexCss = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n"])));
|
|
13
|
+
var spanCss = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 1;\n border: 1px solid #eee;\n"])));
|
|
7
14
|
function RIO(_ref) {
|
|
8
15
|
var children = _ref.children,
|
|
9
16
|
debug = _ref.debug,
|
|
@@ -28,20 +35,22 @@ function RIO(_ref) {
|
|
|
28
35
|
useEffect(function () {
|
|
29
36
|
return isOpen ? open() : close();
|
|
30
37
|
}, [isOpen]);
|
|
31
|
-
|
|
38
|
+
useUpdateEffect(function () {
|
|
32
39
|
return clear();
|
|
33
40
|
}, [renderKey]);
|
|
34
|
-
|
|
41
|
+
useUpdateEffect(function () {
|
|
35
42
|
return onChange === null || onChange === void 0 ? void 0 : onChange(rio, areas);
|
|
36
43
|
}, [rio]);
|
|
37
44
|
return /*#__PURE__*/_jsxs("div", {
|
|
38
|
-
className:
|
|
45
|
+
className: roiLayoutCss,
|
|
39
46
|
children: [children, debug && /*#__PURE__*/_jsx("div", {
|
|
40
|
-
className:
|
|
47
|
+
className: roiDebugBoxCss,
|
|
41
48
|
children: rio.map(function (item, index) {
|
|
42
49
|
return /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: rowIndexCss,
|
|
43
51
|
children: item.map(function (n, i) {
|
|
44
52
|
return /*#__PURE__*/_jsx("span", {
|
|
53
|
+
className: spanCss,
|
|
45
54
|
style: {
|
|
46
55
|
backgroundColor: n === 1 ? 'rgba(0,0,0,0.5)' : 'transparent'
|
|
47
56
|
}
|
|
@@ -50,7 +59,8 @@ function RIO(_ref) {
|
|
|
50
59
|
}, "row-".concat(index));
|
|
51
60
|
})
|
|
52
61
|
}), /*#__PURE__*/_jsx("canvas", {
|
|
53
|
-
ref: ref
|
|
62
|
+
ref: ref,
|
|
63
|
+
className: canvasCss
|
|
54
64
|
})]
|
|
55
65
|
});
|
|
56
66
|
}
|
package/es/RefDrawer/Footer.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export interface IFooterProps {
|
|
|
5
5
|
okText: string;
|
|
6
6
|
onOk?: (e: React.MouseEvent) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): JSX.Element;
|
|
8
|
+
declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default Footer;
|
package/es/RefDrawer/index.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ export interface IDrawerProps extends DrawerProps {
|
|
|
22
22
|
*/
|
|
23
23
|
okText?: string;
|
|
24
24
|
}
|
|
25
|
-
declare const RefDrawer: React.ForwardRefExoticComponent<
|
|
25
|
+
declare const RefDrawer: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<IRefDrawerMethodsProps>>;
|
|
26
26
|
export default RefDrawer;
|
package/es/RefDrawer/index.js
CHANGED
|
@@ -12,11 +12,11 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { Drawer } from 'antd';
|
|
14
14
|
import React, { useContext, useImperativeHandle, useMemo, useState } from 'react';
|
|
15
|
-
import
|
|
15
|
+
import AppContext from "../AppContext";
|
|
16
16
|
import Footer from "./Footer";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
var RefDrawer = /*#__PURE__*/React.forwardRef(function RefDrawer(_, ref) {
|
|
19
|
-
var context = useContext(
|
|
19
|
+
var context = useContext(AppContext.Context);
|
|
20
20
|
var root = useMemo(function () {
|
|
21
21
|
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
22
22
|
}, [context === null || context === void 0 ? void 0 : context.root]);
|
package/es/RefModal/demo.d.ts
CHANGED
package/es/RefModal/index.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export interface IRefModalMethodsProps {
|
|
|
12
12
|
open: (options: IUseModalHookState) => void;
|
|
13
13
|
close: () => void;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type IModalProps = ModalProps;
|
|
16
16
|
declare const RefModal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<IRefModalMethodsProps>>;
|
|
17
17
|
export default RefModal;
|
package/es/RefModal/index.js
CHANGED
|
@@ -12,10 +12,10 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { Modal } from 'antd';
|
|
14
14
|
import React, { useContext, useImperativeHandle, useMemo, useState } from 'react';
|
|
15
|
-
import
|
|
15
|
+
import AppContext from "../AppContext";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(props, ref) {
|
|
18
|
-
var context = useContext(
|
|
18
|
+
var context = useContext(AppContext.Context);
|
|
19
19
|
var root = useMemo(function () {
|
|
20
20
|
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
21
21
|
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { ILivePlayerProps } from './interface';
|
|
3
|
-
import
|
|
4
|
-
declare function LivePlayer({ list, children, oneWinExtTools, allWinExtTools, ...props }: ILivePlayerProps): JSX.Element;
|
|
2
|
+
declare function LivePlayer({ list, children, oneWinExtTools, allWinExtTools, ...props }: ILivePlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
3
|
declare namespace LivePlayer {
|
|
6
4
|
var defaultProps: {
|
|
7
5
|
list: never[];
|
package/es/ScreenPlayer/Live.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
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
|
-
import _useMemoizedFn from "ahooks/es/useMemoizedFn";
|
|
3
|
-
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
4
2
|
var _excluded = ["list", "children", "oneWinExtTools", "allWinExtTools"];
|
|
5
3
|
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; }
|
|
6
4
|
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; }
|
|
@@ -15,18 +13,19 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
+
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
|
18
17
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
19
18
|
import DisableMark from "../DisableMark";
|
|
20
19
|
import Tools from "./LiveTools";
|
|
21
20
|
import { LivePlayerWithExt } from "./PlayerWithExt";
|
|
21
|
+
import containerStyle, { playerLayout, splitScreenPlayerWrapper } from "./containerStyle";
|
|
22
22
|
import useVideoFit from "./useVideoFit";
|
|
23
|
-
import {
|
|
24
|
-
import "./index.less";
|
|
23
|
+
import { ScreenType, mergeFill } from "./utils";
|
|
25
24
|
import { createElement as _createElement } from "react";
|
|
26
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
26
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
27
|
function LivePlayer(_ref) {
|
|
29
|
-
var _props$defaultScreen, _props$defaultSelectI;
|
|
28
|
+
var _props$defaultScreen, _props$defaultSelectI, _screenType$name;
|
|
30
29
|
var list = _ref.list,
|
|
31
30
|
children = _ref.children,
|
|
32
31
|
oneWinExtTools = _ref.oneWinExtTools,
|
|
@@ -125,7 +124,7 @@ function LivePlayer(_ref) {
|
|
|
125
124
|
|
|
126
125
|
// index变化同步到父组件
|
|
127
126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
|
-
|
|
127
|
+
useUpdateEffect(function () {
|
|
129
128
|
var _props$onIndexChange;
|
|
130
129
|
return (_props$onIndexChange = props.onIndexChange) === null || _props$onIndexChange === void 0 ? void 0 : _props$onIndexChange.call(props, state.selectIndex);
|
|
131
130
|
}, [state.selectIndex]);
|
|
@@ -133,11 +132,11 @@ function LivePlayer(_ref) {
|
|
|
133
132
|
/**
|
|
134
133
|
* 通知screenNum变化
|
|
135
134
|
*/
|
|
136
|
-
|
|
135
|
+
useUpdateEffect(function () {
|
|
137
136
|
var _props$screenChange2;
|
|
138
137
|
return (_props$screenChange2 = props.screenChange) === null || _props$screenChange2 === void 0 ? void 0 : _props$screenChange2.call(props, state.screenNum);
|
|
139
138
|
}, [state.screenNum]);
|
|
140
|
-
var onClose =
|
|
139
|
+
var onClose = useMemoizedFn(function () {
|
|
141
140
|
var _props$onClose;
|
|
142
141
|
setState(function (old) {
|
|
143
142
|
var item = screenList[old.selectIndex];
|
|
@@ -153,7 +152,7 @@ function LivePlayer(_ref) {
|
|
|
153
152
|
});
|
|
154
153
|
(_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
155
154
|
});
|
|
156
|
-
var onCloseAll =
|
|
155
|
+
var onCloseAll = useMemoizedFn(function () {
|
|
157
156
|
var _props$onCloseAll;
|
|
158
157
|
setState(function (old) {
|
|
159
158
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
@@ -164,9 +163,9 @@ function LivePlayer(_ref) {
|
|
|
164
163
|
(_props$onCloseAll = props.onCloseAll) === null || _props$onCloseAll === void 0 ? void 0 : _props$onCloseAll.call(props);
|
|
165
164
|
});
|
|
166
165
|
return /*#__PURE__*/_jsxs("div", {
|
|
167
|
-
className: "
|
|
166
|
+
className: "".concat(splitScreenPlayerWrapper),
|
|
168
167
|
children: [/*#__PURE__*/_jsx("div", {
|
|
169
|
-
className: "
|
|
168
|
+
className: "".concat(playerLayout, " ").concat(containerStyle["container".concat((_screenType$name = screenType === null || screenType === void 0 ? void 0 : screenType.name) !== null && _screenType$name !== void 0 ? _screenType$name : 1)]),
|
|
170
169
|
ref: domRef,
|
|
171
170
|
children: screenList.map(function (item, index) {
|
|
172
171
|
var _item$url;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExportPlayerType } from '../Player/player';
|
|
3
3
|
import { PlayModeType } from '../PlayerExt';
|
|
4
|
+
export declare const playerToolsCss: string;
|
|
5
|
+
export declare const playerToolsLeftCss: string;
|
|
6
|
+
export declare const playerToolsRightCss: string;
|
|
7
|
+
export declare const playerToolsMid: string;
|
|
4
8
|
interface IToolsProps {
|
|
5
9
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
6
10
|
updateState: (state: {
|
|
@@ -25,5 +29,5 @@ interface IToolsProps {
|
|
|
25
29
|
allWinExtTools?: JSX.Element;
|
|
26
30
|
hasPlugin?: boolean;
|
|
27
31
|
}
|
|
28
|
-
declare function LiveTools({ containerRef, oneWinExtTools, allWinExtTools, screenNum, mode, fit, hasPlugin, ...props }: IToolsProps): JSX.Element;
|
|
32
|
+
declare function LiveTools({ containerRef, oneWinExtTools, allWinExtTools, screenNum, mode, fit, hasPlugin, ...props }: IToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
export default LiveTools;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import _useInterval from "ahooks/es/useInterval";
|
|
2
|
-
import _useUpdate from "ahooks/es/useUpdate";
|
|
3
1
|
var _excluded = ["containerRef", "oneWinExtTools", "allWinExtTools", "screenNum", "mode", "fit", "hasPlugin"];
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
4
|
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
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); }
|
|
@@ -9,13 +8,19 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
9
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
import { css } from '@emotion/css';
|
|
13
|
+
import { useFullscreen, useInterval, useUpdate } from 'ahooks';
|
|
12
14
|
import React from 'react';
|
|
13
15
|
import Volume from "../Player/contraller_bar/volume";
|
|
14
16
|
import IconFont from "../Player/iconfont";
|
|
15
|
-
import useFullscreen from "../useFullscreen";
|
|
16
17
|
import ScreenSelect from "./ScreenSelect";
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
export var playerToolsCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n height: 42px;\n padding: 0 10px;\n background-color: #242c3d;\n align-items: center;\n justify-content: space-between;\n .player-tools-item {\n display: flex;\n width: 32px;\n height: 32px;\n margin: 0;\n font-size: 18px;\n color: var(--gray1);\n cursor: pointer;\n align-items: center;\n justify-content: center;\n\n .antion {\n font-size: 20px;\n }\n\n &:hover {\n background-color: var(--gray11);\n border-radius: var(--radius1);\n }\n }\n"])));
|
|
21
|
+
export var playerToolsLeftCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: grid;\n width: 35%;\n grid-template-columns: repeat(auto-fill, 32px);\n grid-gap: 10px;\n"])));
|
|
22
|
+
export var playerToolsRightCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 35%;\n display: flex;\n justify-content: flex-end;\n margin-right: 0;\n margin-left: 4px;\n align-items: center;\n"])));
|
|
23
|
+
export var playerToolsMid = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-self: center;\n height: 100%;\n"])));
|
|
19
24
|
function LiveTools(_ref) {
|
|
20
25
|
var containerRef = _ref.containerRef,
|
|
21
26
|
oneWinExtTools = _ref.oneWinExtTools,
|
|
@@ -30,7 +35,7 @@ function LiveTools(_ref) {
|
|
|
30
35
|
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
31
36
|
isFullscreen = _useFullscreen2[0],
|
|
32
37
|
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
33
|
-
var update =
|
|
38
|
+
var update = useUpdate();
|
|
34
39
|
// 播放状态控制
|
|
35
40
|
var playToggle = function playToggle() {
|
|
36
41
|
var player = props.getPlayerItem();
|
|
@@ -57,13 +62,13 @@ function LiveTools(_ref) {
|
|
|
57
62
|
/**
|
|
58
63
|
* 定时获取play状态
|
|
59
64
|
*/
|
|
60
|
-
|
|
65
|
+
useInterval(function () {
|
|
61
66
|
return update();
|
|
62
67
|
}, 2000);
|
|
63
68
|
return /*#__PURE__*/_jsxs("div", {
|
|
64
|
-
className:
|
|
69
|
+
className: playerToolsCss,
|
|
65
70
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
66
|
-
className:
|
|
71
|
+
className: playerToolsLeftCss,
|
|
67
72
|
children: [/*#__PURE__*/_jsx("span", {
|
|
68
73
|
className: "player-tools-item",
|
|
69
74
|
children: /*#__PURE__*/_jsx(Volume, {
|
|
@@ -110,7 +115,7 @@ function LiveTools(_ref) {
|
|
|
110
115
|
})
|
|
111
116
|
}), oneWinExtTools]
|
|
112
117
|
}), /*#__PURE__*/_jsx("div", {
|
|
113
|
-
className:
|
|
118
|
+
className: playerToolsMid,
|
|
114
119
|
children: /*#__PURE__*/_jsx("div", {
|
|
115
120
|
className: "player-tools-item",
|
|
116
121
|
onClick: playToggle,
|
|
@@ -126,7 +131,7 @@ function LiveTools(_ref) {
|
|
|
126
131
|
})
|
|
127
132
|
})
|
|
128
133
|
}), /*#__PURE__*/_jsxs("div", {
|
|
129
|
-
className:
|
|
134
|
+
className: playerToolsRightCss,
|
|
130
135
|
children: [allWinExtTools, /*#__PURE__*/_jsx("span", {
|
|
131
136
|
className: "player-tools-item",
|
|
132
137
|
onClick: props.onCloseAll,
|
|
@@ -8,7 +8,7 @@ interface ILivePlayerWithExtProps extends ISinglePlayerProps {
|
|
|
8
8
|
updatePlayer: (obj: React.MutableRefObject<ExportPlayerType>) => void;
|
|
9
9
|
pluginDownloadUrl?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function LivePlayerWithExt({ mode, url, type, style, className, updatePlayer, onClick, pluginDownloadUrl, ...props }: ILivePlayerWithExtProps): JSX.Element;
|
|
11
|
+
export declare function LivePlayerWithExt({ mode, url, type, style, className, updatePlayer, onClick, pluginDownloadUrl, ...props }: ILivePlayerWithExtProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
13
13
|
segments?: ISegmentType[];
|
|
14
14
|
begin?: number;
|
|
@@ -17,7 +17,7 @@ interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'
|
|
|
17
17
|
httpLoading: boolean;
|
|
18
18
|
screenIndex?: number;
|
|
19
19
|
}
|
|
20
|
-
export declare function SegmentPlayerWithExt({ begin, style, className, segments, mode, fpsDelay, fps, httpLoading, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
|
|
20
|
+
export declare function SegmentPlayerWithExt({ begin, style, className, segments, mode, fpsDelay, fps, httpLoading, ...props }: ISegmentPlayerWithExtProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
22
22
|
segments?: ISegmentType[];
|
|
23
23
|
begin?: number;
|
|
@@ -30,5 +30,5 @@ interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url
|
|
|
30
30
|
}) => Promise<string>;
|
|
31
31
|
screenIndex: number;
|
|
32
32
|
}
|
|
33
|
-
export declare function FrontendPlayerWithExt({ mode, style, className, segments, pluginDownloadUrl, screenIndex, httpLoading, ...props }: IFrontendPlayerWithExtProps): JSX.Element;
|
|
33
|
+
export declare function FrontendPlayerWithExt({ mode, style, className, segments, pluginDownloadUrl, screenIndex, httpLoading, ...props }: IFrontendPlayerWithExtProps): import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
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
|
-
import _useMemoizedFn from "ahooks/es/useMemoizedFn";
|
|
3
|
-
import _useLatest from "ahooks/es/useLatest";
|
|
4
|
-
import _useUpdate from "ahooks/es/useUpdate";
|
|
5
2
|
var _excluded = ["mode", "url", "type", "style", "className", "updatePlayer", "onClick", "pluginDownloadUrl"],
|
|
6
3
|
_excluded2 = ["begin", "style", "className", "segments", "mode", "fpsDelay", "fps", "httpLoading"],
|
|
7
4
|
_excluded3 = ["mode", "style", "className", "segments", "pluginDownloadUrl", "screenIndex", "httpLoading"];
|
|
5
|
+
var _templateObject;
|
|
8
6
|
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; }
|
|
9
7
|
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; }
|
|
10
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -18,15 +16,18 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
18
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
20
|
+
import { css } from '@emotion/css';
|
|
21
|
+
import { useFullscreen, useLatest, useMemoizedFn, useUpdate } from 'ahooks';
|
|
21
22
|
import moment from 'dayjs';
|
|
22
23
|
import React, { useEffect, useRef, useState } from 'react';
|
|
23
24
|
import FrontendPlayer from "../Player/frontend_player";
|
|
24
25
|
import SegmentPlayer from "../Player/segment_player";
|
|
25
26
|
import LivePlayer from "../Player/single_player";
|
|
26
27
|
import ExtModel from "../PlayerExt";
|
|
27
|
-
import useFullscreen from "../useFullscreen";
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
29
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
|
+
var playerWithExtLayout = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n .lm-player-ext-layout {\n border: 1px solid var(--gray12);\n box-sizing: border-box;\n }\n\n &.player-current-index {\n .lm-player-ext-layout {\n border: 1px solid var(--primary);\n }\n }\n"])));
|
|
30
31
|
export function LivePlayerWithExt(_ref) {
|
|
31
32
|
var _ref$current;
|
|
32
33
|
var mode = _ref.mode,
|
|
@@ -38,7 +39,7 @@ export function LivePlayerWithExt(_ref) {
|
|
|
38
39
|
onClick = _ref.onClick,
|
|
39
40
|
pluginDownloadUrl = _ref.pluginDownloadUrl,
|
|
40
41
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
var forceUpdate =
|
|
42
|
+
var forceUpdate = useUpdate();
|
|
42
43
|
var ref = useRef();
|
|
43
44
|
var update = function update() {
|
|
44
45
|
updatePlayer(ref);
|
|
@@ -48,7 +49,7 @@ export function LivePlayerWithExt(_ref) {
|
|
|
48
49
|
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
49
50
|
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
50
51
|
return /*#__PURE__*/_jsx("div", {
|
|
51
|
-
className: "
|
|
52
|
+
className: "".concat(playerWithExtLayout, " ").concat(className),
|
|
52
53
|
style: style,
|
|
53
54
|
onClick: onClick,
|
|
54
55
|
onDoubleClick: toggleFullscreen,
|
|
@@ -78,7 +79,7 @@ export function SegmentPlayerWithExt(_ref2) {
|
|
|
78
79
|
fps = _ref2.fps,
|
|
79
80
|
httpLoading = _ref2.httpLoading,
|
|
80
81
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
81
|
-
var forceUpdate =
|
|
82
|
+
var forceUpdate = useUpdate();
|
|
82
83
|
var ref = useRef();
|
|
83
84
|
var update = function update() {
|
|
84
85
|
props.updatePlayer(ref);
|
|
@@ -88,7 +89,7 @@ export function SegmentPlayerWithExt(_ref2) {
|
|
|
88
89
|
_useFullscreen4 = _slicedToArray(_useFullscreen3, 2),
|
|
89
90
|
toggleFullscreen = _useFullscreen4[1].toggleFullscreen;
|
|
90
91
|
return /*#__PURE__*/_jsx("div", {
|
|
91
|
-
className: "
|
|
92
|
+
className: "".concat(playerWithExtLayout, " ").concat(className),
|
|
92
93
|
style: style,
|
|
93
94
|
onClick: props.onClick,
|
|
94
95
|
onDoubleClick: toggleFullscreen,
|
|
@@ -128,7 +129,7 @@ export function FrontendPlayerWithExt(_ref3) {
|
|
|
128
129
|
_useState2 = _slicedToArray(_useState, 2),
|
|
129
130
|
state = _useState2[0],
|
|
130
131
|
setState = _useState2[1];
|
|
131
|
-
var latestUrl =
|
|
132
|
+
var latestUrl = useLatest(state.url);
|
|
132
133
|
useEffect(function () {
|
|
133
134
|
var _segments$index$url, _segments$index;
|
|
134
135
|
if (!(Array.isArray(segments) && segments.length > 0)) {
|
|
@@ -171,7 +172,7 @@ export function FrontendPlayerWithExt(_ref3) {
|
|
|
171
172
|
|
|
172
173
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
174
|
}, [segments]);
|
|
174
|
-
var seekTo =
|
|
175
|
+
var seekTo = useMemoizedFn(function (time) {
|
|
175
176
|
if (!latestUrl.current) {
|
|
176
177
|
return;
|
|
177
178
|
}
|
|
@@ -202,9 +203,9 @@ export function FrontendPlayerWithExt(_ref3) {
|
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
});
|
|
205
|
-
var forceUpdate =
|
|
206
|
+
var forceUpdate = useUpdate();
|
|
206
207
|
var ref = useRef();
|
|
207
|
-
var update =
|
|
208
|
+
var update = useMemoizedFn(function () {
|
|
208
209
|
props.updatePlayer(ref);
|
|
209
210
|
forceUpdate();
|
|
210
211
|
});
|
|
@@ -212,7 +213,7 @@ export function FrontendPlayerWithExt(_ref3) {
|
|
|
212
213
|
_useFullscreen6 = _slicedToArray(_useFullscreen5, 2),
|
|
213
214
|
toggleFullscreen = _useFullscreen6[1].toggleFullscreen;
|
|
214
215
|
return /*#__PURE__*/_jsx("div", {
|
|
215
|
-
className: "
|
|
216
|
+
className: "".concat(playerWithExtLayout, " ").concat(className),
|
|
216
217
|
style: style,
|
|
217
218
|
onClick: props.onClick,
|
|
218
219
|
onDoubleClick: toggleFullscreen,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface IRatePick {
|
|
3
2
|
onChange: (rate: number) => void;
|
|
4
3
|
value: number;
|
|
5
4
|
multipleList?: number[];
|
|
6
5
|
}
|
|
7
|
-
declare function RatePick({ onChange, value, multipleList }: IRatePick): JSX.Element;
|
|
6
|
+
declare function RatePick({ onChange, value, multipleList }: IRatePick): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default RatePick;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { css } from '@emotion/css';
|
|
1
4
|
import { Select } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
5
|
import CustomRenderSelect from "../CustomRenderSelect";
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
var selectCurrentRateItem = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n top: 4px;\n display: inline-block;\n width: 64px;\n padding: 2px 0;\n font-size: 12px;\n color: var(--gray1);\n text-align: center;\n cursor: pointer;\n border: 1px solid var(--gray1);\n border-radius: 2px;\n"])));
|
|
6
9
|
function RatePick(_ref) {
|
|
7
10
|
var onChange = _ref.onChange,
|
|
8
11
|
value = _ref.value,
|
|
@@ -10,19 +13,21 @@ function RatePick(_ref) {
|
|
|
10
13
|
multipleList = _ref$multipleList === void 0 ? [8, 6, 4, 2, 1.5, 1, 0.5] : _ref$multipleList;
|
|
11
14
|
return /*#__PURE__*/_jsx(CustomRenderSelect, {
|
|
12
15
|
value: value,
|
|
13
|
-
popupClassName: "rate-select-dropdown ",
|
|
14
16
|
customRender: function customRender() {
|
|
15
17
|
return /*#__PURE__*/_jsx("span", {
|
|
16
|
-
className:
|
|
18
|
+
className: selectCurrentRateItem,
|
|
17
19
|
children: "\u500D\u901F x".concat(value)
|
|
18
20
|
});
|
|
19
21
|
},
|
|
20
22
|
onChange: onChange,
|
|
21
23
|
placement: "topLeft",
|
|
24
|
+
style: {
|
|
25
|
+
width: 80
|
|
26
|
+
},
|
|
22
27
|
children: multipleList === null || multipleList === void 0 ? void 0 : multipleList.map(function (v, i) {
|
|
23
28
|
return /*#__PURE__*/_jsxs(Select.Option, {
|
|
24
29
|
value: v,
|
|
25
|
-
children: [v, "\u500D"]
|
|
30
|
+
children: ["x", v, "\u500D"]
|
|
26
31
|
}, i);
|
|
27
32
|
})
|
|
28
33
|
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { IRecordPlayerProps } from './interface';
|
|
3
|
-
import './index.less';
|
|
4
2
|
/**
|
|
5
3
|
* @desc 录像设计的时间全部需要到毫秒
|
|
6
4
|
* @param param0
|
|
7
5
|
* @returns
|
|
8
6
|
*/
|
|
9
|
-
declare function RecordPlayer({ list, children, oneWinExtTools, allWinExtTools, fpsDelay, fps, seekLoading, multipleList, ...props }: IRecordPlayerProps): JSX.Element;
|
|
7
|
+
declare function RecordPlayer({ list, children, oneWinExtTools, allWinExtTools, fpsDelay, fps, seekLoading, multipleList, ...props }: IRecordPlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default RecordPlayer;
|