@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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '../style/bar.less';
|
|
3
2
|
interface IContrallerBarProps {
|
|
4
3
|
rightExtContents: React.ReactNode;
|
|
5
4
|
rightMidExtContents: React.ReactNode;
|
|
@@ -10,5 +9,5 @@ interface IContrallerBarProps {
|
|
|
10
9
|
hideTimeProgress?: boolean;
|
|
11
10
|
oneFpsPlay?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare function ContrallerBar({ rightExtContents, rightMidExtContents, visibel, leftExtContents, leftMidExtContents, reload, hideTimeProgress, oneFpsPlay
|
|
12
|
+
declare function ContrallerBar({ rightExtContents, rightMidExtContents, visibel, leftExtContents, leftMidExtContents, reload, hideTimeProgress, oneFpsPlay }: IContrallerBarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default ContrallerBar;
|
|
@@ -1,10 +1,13 @@
|
|
|
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 React from 'react';
|
|
2
5
|
import LeftBar from "./left_bar";
|
|
3
6
|
import RightBar from "./right_bar";
|
|
4
|
-
import "../style/bar.less";
|
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
var contrallerBarLayoutCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 10;\n display: flex;\n width: 100%;\n height: 28px;\n background: rgb(29 33 53 / 80%);\n opacity: 1;\n align-items: center;\n justify-content: space-between;\n transition: opacity 0.3s;\n .anticon {\n cursor: pointer;\n }\n"])));
|
|
8
11
|
function ContrallerBar(_ref) {
|
|
9
12
|
var rightExtContents = _ref.rightExtContents,
|
|
10
13
|
rightMidExtContents = _ref.rightMidExtContents,
|
|
@@ -16,7 +19,10 @@ function ContrallerBar(_ref) {
|
|
|
16
19
|
oneFpsPlay = _ref.oneFpsPlay;
|
|
17
20
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
18
21
|
children: /*#__PURE__*/_jsxs("div", {
|
|
19
|
-
className:
|
|
22
|
+
className: contrallerBarLayoutCss,
|
|
23
|
+
style: !visibel ? {
|
|
24
|
+
opacity: 0
|
|
25
|
+
} : undefined,
|
|
20
26
|
children: [/*#__PURE__*/_jsx(LeftBar, {
|
|
21
27
|
oneFpsPlay: oneFpsPlay,
|
|
22
28
|
hideTimeProgress: hideTimeProgress,
|
|
@@ -6,5 +6,5 @@ interface ILeftBarProps {
|
|
|
6
6
|
hideTimeProgress?: boolean;
|
|
7
7
|
oneFpsPlay?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare function LeftBar({ reload, leftExtContents, leftMidExtContents, hideTimeProgress, oneFpsPlay }: ILeftBarProps): JSX.Element;
|
|
9
|
+
declare function LeftBar({ reload, leftExtContents, leftMidExtContents, hideTimeProgress, oneFpsPlay }: ILeftBarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default LeftBar;
|
|
@@ -7,6 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useCallback, useContext, useMemo, useState } from 'react';
|
|
8
8
|
import { Context } from "../context";
|
|
9
9
|
import { useVideoEvent } from "../event";
|
|
10
|
+
import EventName from "../event/eventName";
|
|
10
11
|
import IconFont from "../iconfont";
|
|
11
12
|
import Bar from "./bar";
|
|
12
13
|
import Time from "./time";
|
|
@@ -23,7 +24,8 @@ function LeftBar(_ref) {
|
|
|
23
24
|
api = _useContext.api,
|
|
24
25
|
container = _useContext.container,
|
|
25
26
|
isLive = _useContext.isLive,
|
|
26
|
-
isFpsPlay = _useContext.isFpsPlay
|
|
27
|
+
isFpsPlay = _useContext.isFpsPlay,
|
|
28
|
+
event = _useContext.event;
|
|
27
29
|
var _useState = useState(Date.now()),
|
|
28
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29
31
|
dep = _useState2[0],
|
|
@@ -58,8 +60,12 @@ function LeftBar(_ref) {
|
|
|
58
60
|
api === null || api === void 0 ? void 0 : api.pause();
|
|
59
61
|
}
|
|
60
62
|
}, [video, api]);
|
|
63
|
+
var reloadAction = function reloadAction() {
|
|
64
|
+
event === null || event === void 0 ? void 0 : event.emit(EventName.CLEAR_ERROR_TIMER);
|
|
65
|
+
event === null || event === void 0 ? void 0 : event.emit(EventName.RELOAD_SUCCESS);
|
|
66
|
+
reload();
|
|
67
|
+
};
|
|
61
68
|
return /*#__PURE__*/_jsxs("div", {
|
|
62
|
-
className: "contraller-left-bar",
|
|
63
69
|
children: [leftExtContents, !isFpsPlay && /*#__PURE__*/_jsx(Bar, {
|
|
64
70
|
children: /*#__PURE__*/_jsx(IconFont, {
|
|
65
71
|
onClick: changePlayStatus,
|
|
@@ -72,12 +78,15 @@ function LeftBar(_ref) {
|
|
|
72
78
|
})
|
|
73
79
|
}), !isLive && !hideTimeProgress && /*#__PURE__*/_jsx(Time, {}), /*#__PURE__*/_jsx(Bar, {
|
|
74
80
|
children: /*#__PURE__*/_jsx(IconFont, {
|
|
75
|
-
onClick:
|
|
81
|
+
onClick: reloadAction,
|
|
76
82
|
type: "lm-player-Refresh_Main",
|
|
77
83
|
title: "\u91CD\u8F7D"
|
|
78
84
|
})
|
|
79
85
|
}), !isLive && oneFpsPlay && /*#__PURE__*/_jsx(Bar, {
|
|
80
86
|
children: /*#__PURE__*/_jsx(IconFont, {
|
|
87
|
+
style: isFpsPlay ? {
|
|
88
|
+
color: 'var(--primary)'
|
|
89
|
+
} : undefined,
|
|
81
90
|
onClick: isFpsPlay ? api === null || api === void 0 ? void 0 : api.closeFpsPlay : api === null || api === void 0 ? void 0 : api.openFpsPlay,
|
|
82
91
|
type: "lm-player-zhuzhenplay",
|
|
83
92
|
title: "\u9010\u5E27\u64AD\u653E"
|
|
@@ -4,5 +4,5 @@ interface IRightBarProps {
|
|
|
4
4
|
rightExtContents: React.ReactNode;
|
|
5
5
|
rightMidExtContents: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare function RightBar({ rightExtContents, rightMidExtContents }: IRightBarProps): JSX.Element;
|
|
7
|
+
declare function RightBar({ rightExtContents, rightMidExtContents }: IRightBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default RightBar;
|
|
@@ -4,8 +4,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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
5
|
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useFullscreen } from 'ahooks';
|
|
7
8
|
import React, { useContext } from 'react';
|
|
8
|
-
import useFullscreen from "../../useFullscreen";
|
|
9
9
|
import { Context } from "../context";
|
|
10
10
|
import IconFont from "../iconfont";
|
|
11
11
|
import Bar from "./bar";
|
|
@@ -24,7 +24,6 @@ function RightBar(_ref) {
|
|
|
24
24
|
exitFullscreen = _useFullscreen2$.exitFullscreen;
|
|
25
25
|
var fullscreen = isFullScreen ? exitFullscreen : enterFullscreen;
|
|
26
26
|
return /*#__PURE__*/_jsxs("div", {
|
|
27
|
-
className: "contraller-right-bar",
|
|
28
27
|
children: [rightMidExtContents, /*#__PURE__*/_jsx(Bar, {
|
|
29
28
|
children: /*#__PURE__*/_jsx(IconFont, {
|
|
30
29
|
title: isFullScreen ? '窗口' : '全屏',
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
var _templateObject;
|
|
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; }
|
|
7
|
-
|
|
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';
|
|
8
10
|
import { useTimes } from "../timeline";
|
|
9
11
|
import { timeStamp } from "../util";
|
|
10
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
var classname = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n float: left;\n padding: 0 6px;\n font-size: 10px;\n line-height: 28px;\n color: #fff;\n"])));
|
|
11
14
|
function Time() {
|
|
12
15
|
var _useTimes = useTimes(),
|
|
13
16
|
_useTimes2 = _slicedToArray(_useTimes, 3),
|
|
14
17
|
current = _useTimes2[0],
|
|
15
18
|
duration = _useTimes2[2];
|
|
16
19
|
return /*#__PURE__*/_jsxs("span", {
|
|
17
|
-
className:
|
|
20
|
+
className: classname,
|
|
18
21
|
children: [timeStamp(current), "/", timeStamp(duration || 0)]
|
|
19
22
|
});
|
|
20
23
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Api from '../api';
|
|
3
|
-
import '../style/volume.less';
|
|
4
3
|
declare function Volume({ api, style }: {
|
|
5
4
|
api?: Api;
|
|
6
5
|
style?: React.CSSProperties;
|
|
7
|
-
}): JSX.Element;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
declare const _default: React.MemoExoticComponent<typeof Volume>;
|
|
9
8
|
export default _default;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import _useUpdate from "ahooks/es/useUpdate";
|
|
1
|
+
var _templateObject;
|
|
3
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
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."); }
|
|
5
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); }
|
|
6
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; }
|
|
7
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; } }
|
|
8
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';
|
|
10
|
+
import { useUpdate, useUpdateEffect } from 'ahooks';
|
|
9
11
|
import { Slider, Tooltip } from 'antd';
|
|
10
12
|
import React, { useMemo, useState } from 'react';
|
|
11
13
|
import IconFont from "../iconfont";
|
|
12
|
-
import "../style/volume.less";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var classname = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tooltip-inner {\n display: flex;\n width: 30px;\n height: 130px;\n padding: 12px 6px;\n text-align: center;\n border-radius: 15px;\n justify-content: center;\n }\n\n .ant-slider-vertical {\n margin: 0;\n }\n\n .ant-slider-track {\n background-color: var(--primary);\n }\n\n .ant-slider-handle {\n background-color: var(--primary);\n border-color: var(--gray1);\n }\n"])));
|
|
14
16
|
function Volume(_ref) {
|
|
15
17
|
var _api$getVolume;
|
|
16
18
|
var api = _ref.api,
|
|
@@ -19,7 +21,7 @@ function Volume(_ref) {
|
|
|
19
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
22
|
val = _useState2[0],
|
|
21
23
|
setVal = _useState2[1];
|
|
22
|
-
var update =
|
|
24
|
+
var update = useUpdate();
|
|
23
25
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
26
|
var volume = useMemo(function () {
|
|
25
27
|
return api !== null && api !== void 0 && api.muted ? 0 : val;
|
|
@@ -44,14 +46,17 @@ function Volume(_ref) {
|
|
|
44
46
|
}
|
|
45
47
|
update();
|
|
46
48
|
};
|
|
47
|
-
|
|
49
|
+
useUpdateEffect(function () {
|
|
48
50
|
return api === null || api === void 0 ? void 0 : api.setVolume(val / 100);
|
|
49
51
|
}, [val]);
|
|
50
52
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
51
53
|
arrow: false,
|
|
52
|
-
overlayClassName:
|
|
54
|
+
overlayClassName: classname,
|
|
53
55
|
title: /*#__PURE__*/_jsx(Slider, {
|
|
54
56
|
onChange: onChange,
|
|
57
|
+
style: {
|
|
58
|
+
height: 100
|
|
59
|
+
},
|
|
55
60
|
vertical: true,
|
|
56
61
|
value: val
|
|
57
62
|
}),
|
package/es/Player/demo.d.ts
CHANGED
package/es/Player/demo.js
CHANGED
|
@@ -10,9 +10,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { Button,
|
|
13
|
+
import { Button, Input, Select } from 'antd';
|
|
14
14
|
import moment from 'dayjs';
|
|
15
|
-
import
|
|
15
|
+
import { useState } from 'react';
|
|
16
16
|
import FrontendPlayer from "./frontend_player";
|
|
17
17
|
import SegmentPlayer from "./segment_player";
|
|
18
18
|
import Player from "./single_player";
|
|
@@ -115,13 +115,18 @@ function Demo1() {
|
|
|
115
115
|
},
|
|
116
116
|
children: "\u64AD\u653E"
|
|
117
117
|
})]
|
|
118
|
-
}), /*#__PURE__*/_jsx(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
119
|
+
style: {
|
|
120
|
+
height: 600
|
|
121
|
+
},
|
|
122
|
+
children: /*#__PURE__*/_jsx(Player, {
|
|
123
|
+
fpsDelay: 800,
|
|
124
|
+
oneFpsPlay: true,
|
|
125
|
+
type: state.type,
|
|
126
|
+
url: state.url,
|
|
127
|
+
isLive: !!state.isLive,
|
|
128
|
+
customTimeLine: state.isLive ? /*#__PURE__*/_jsx(_Fragment, {}) : undefined
|
|
129
|
+
})
|
|
125
130
|
})]
|
|
126
131
|
});
|
|
127
132
|
}
|
|
@@ -194,11 +199,16 @@ function Demo2() {
|
|
|
194
199
|
},
|
|
195
200
|
children: "\u64AD\u653E"
|
|
196
201
|
})]
|
|
197
|
-
}), /*#__PURE__*/_jsx(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
203
|
+
style: {
|
|
204
|
+
height: 600
|
|
205
|
+
},
|
|
206
|
+
children: /*#__PURE__*/_jsx(SegmentPlayer, {
|
|
207
|
+
oneFpsPlay: true,
|
|
208
|
+
begin: mm.valueOf(),
|
|
209
|
+
segments: state.segments,
|
|
210
|
+
isLive: false
|
|
211
|
+
})
|
|
202
212
|
})]
|
|
203
213
|
});
|
|
204
214
|
}
|
|
@@ -214,8 +224,6 @@ function Demo3() {
|
|
|
214
224
|
setState = _useState6[1];
|
|
215
225
|
return /*#__PURE__*/_jsxs("div", {
|
|
216
226
|
style: {
|
|
217
|
-
width: '600px',
|
|
218
|
-
height: '400px',
|
|
219
227
|
marginTop: 20
|
|
220
228
|
},
|
|
221
229
|
children: [/*#__PURE__*/_jsx("h3", {
|
|
@@ -253,24 +261,28 @@ function Demo3() {
|
|
|
253
261
|
},
|
|
254
262
|
children: "\u64AD\u653E"
|
|
255
263
|
})]
|
|
256
|
-
}), /*#__PURE__*/_jsx(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
url: state.url,
|
|
260
|
-
onSeek: function onSeek(time) {
|
|
261
|
-
return setState(function (old) {
|
|
262
|
-
return _objectSpread(_objectSpread({}, old), {}, {
|
|
263
|
-
url: "".concat(old.url, "?").concat(time)
|
|
264
|
-
});
|
|
265
|
-
});
|
|
264
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
265
|
+
style: {
|
|
266
|
+
height: 600
|
|
266
267
|
},
|
|
267
|
-
|
|
268
|
+
children: /*#__PURE__*/_jsx(FrontendPlayer, {
|
|
269
|
+
begin: state.begin,
|
|
270
|
+
end: state.end,
|
|
271
|
+
url: state.url,
|
|
272
|
+
onSeek: function onSeek(time) {
|
|
273
|
+
return setState(function (old) {
|
|
274
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
275
|
+
url: "".concat(old.url, "?").concat(time)
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
type: "native"
|
|
280
|
+
})
|
|
268
281
|
})]
|
|
269
282
|
});
|
|
270
283
|
}
|
|
271
284
|
var App = function App() {
|
|
272
|
-
return /*#__PURE__*/_jsxs(
|
|
273
|
-
prefixCls: "cloudapp",
|
|
285
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
274
286
|
children: [/*#__PURE__*/_jsx(Demo1, {}), /*#__PURE__*/_jsx(Demo2, {}), /*#__PURE__*/_jsx(Demo3, {})]
|
|
275
287
|
});
|
|
276
288
|
};
|
package/es/Player/empty.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Empty(): JSX.Element;
|
|
1
|
+
export default function Empty(): import("react/jsx-runtime").JSX.Element;
|
package/es/Player/empty.js
CHANGED
|
@@ -15,7 +15,7 @@ declare class VideoEventInstance {
|
|
|
15
15
|
off(eventName: string, handle: () => void): void;
|
|
16
16
|
destroy(): void;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
type PlayEvent = VideoEventInstance;
|
|
19
19
|
export declare function usePlayerEvent(video?: HTMLVideoElement): PlayEvent | undefined;
|
|
20
20
|
export declare function useVideoEvent(eventName: string, handle: (event: any) => void, context?: VideoEventInstance): void;
|
|
21
21
|
export declare function useRegisterPlayerEvent(eventName: string, handle: (event: any) => void, context?: VideoEventInstance): void;
|
package/es/Player/event/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _useLatest from "ahooks/es/useLatest";
|
|
2
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); }
|
|
3
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
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."); }
|
|
@@ -12,6 +11,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
12
11
|
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; }
|
|
13
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
15
|
+
import { useLatest } from 'ahooks';
|
|
15
16
|
import { useContext, useEffect, useMemo, useState } from 'react';
|
|
16
17
|
import nextTick from "../../nextTick";
|
|
17
18
|
import { Context } from "../context";
|
|
@@ -121,7 +122,7 @@ export function useVideoEvent(eventName, handle, context) {
|
|
|
121
122
|
var _ctx$event;
|
|
122
123
|
return (_ctx$event = ctx === null || ctx === void 0 ? void 0 : ctx.event) !== null && _ctx$event !== void 0 ? _ctx$event : context;
|
|
123
124
|
}, [context, ctx === null || ctx === void 0 ? void 0 : ctx.event]);
|
|
124
|
-
var handlerRef =
|
|
125
|
+
var handlerRef = useLatest(handle);
|
|
125
126
|
useEffect(function () {
|
|
126
127
|
if (!event) {
|
|
127
128
|
return undefined;
|
|
@@ -142,7 +143,7 @@ export function useRegisterPlayerEvent(eventName, handle, context) {
|
|
|
142
143
|
var _ctx$event2;
|
|
143
144
|
return (_ctx$event2 = ctx === null || ctx === void 0 ? void 0 : ctx.event) !== null && _ctx$event2 !== void 0 ? _ctx$event2 : context;
|
|
144
145
|
}, [context, ctx === null || ctx === void 0 ? void 0 : ctx.event]);
|
|
145
|
-
var handlerRef =
|
|
146
|
+
var handlerRef = useLatest(handle);
|
|
146
147
|
useEffect(function () {
|
|
147
148
|
if (!event) {
|
|
148
149
|
return undefined;
|
package/es/Player/fps_play.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type Api from './api';
|
|
3
2
|
import type VideoEventInstance from './event';
|
|
4
3
|
interface IFPSPlay {
|
|
@@ -7,5 +6,5 @@ interface IFPSPlay {
|
|
|
7
6
|
fpsDelay?: number;
|
|
8
7
|
fps?: number;
|
|
9
8
|
}
|
|
10
|
-
declare function FPSPlay({ api, event, fpsDelay, fps }: IFPSPlay): JSX.Element;
|
|
9
|
+
declare function FPSPlay({ api, event, fpsDelay, fps }: IFPSPlay): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export default FPSPlay;
|
package/es/Player/fps_play.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
var _templateObject;
|
|
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; }
|
|
7
|
-
|
|
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';
|
|
10
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
8
11
|
import useRafInterval from "../useRafInterval";
|
|
9
12
|
import { useRegisterPlayerEvent } from "./event";
|
|
10
13
|
import Events from "./event/eventName";
|
|
11
14
|
import { getDomStyleValue } from "./util";
|
|
12
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
var fpsPlayCanvasCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n"])));
|
|
13
17
|
var oneFps = 1 / 30;
|
|
14
18
|
function FPSPlay(_ref) {
|
|
15
19
|
var api = _ref.api,
|
|
@@ -77,7 +81,7 @@ function FPSPlay(_ref) {
|
|
|
77
81
|
return !(api !== null && api !== void 0 && api.paused) ? api === null || api === void 0 ? void 0 : api.pause() : null;
|
|
78
82
|
}, 10);
|
|
79
83
|
return /*#__PURE__*/_jsx("canvas", {
|
|
80
|
-
className:
|
|
84
|
+
className: fpsPlayCanvasCss,
|
|
81
85
|
ref: ref
|
|
82
86
|
});
|
|
83
87
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { IFrontendPlayerProps } from './player';
|
|
3
2
|
/**
|
|
4
3
|
* @desc 主组件,负责片段整体逻辑控制
|
|
5
4
|
* @return JSX.Element
|
|
6
5
|
*/
|
|
7
|
-
declare function FrontendPlayer({ url, begin, end, onSeek, forwordRef, customTimeLine, onCanPlayerInit, ...props }: IFrontendPlayerProps): JSX.Element;
|
|
6
|
+
declare function FrontendPlayer({ url, begin, end, onSeek, forwordRef, customTimeLine, onCanPlayerInit, ...props }: IFrontendPlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default FrontendPlayer;
|
|
@@ -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 _useUpdate from "ahooks/es/useUpdate";
|
|
4
2
|
var _excluded = ["url", "begin", "end", "onSeek", "forwordRef", "customTimeLine", "onCanPlayerInit"];
|
|
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; }
|
|
@@ -9,6 +7,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
9
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
8
|
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
9
|
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; }
|
|
10
|
+
import { useMemoizedFn, useUpdate } from 'ahooks';
|
|
12
11
|
import React, { useMemo, useRef } from 'react';
|
|
13
12
|
import Events from "./event/eventName";
|
|
14
13
|
import FrontendTimeLine from "./frontend_timeline";
|
|
@@ -29,7 +28,7 @@ function FrontendPlayer(_ref) {
|
|
|
29
28
|
customTimeLine = _ref.customTimeLine,
|
|
30
29
|
onCanPlayerInit = _ref.onCanPlayerInit,
|
|
31
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var update =
|
|
31
|
+
var update = useUpdate();
|
|
33
32
|
var ref = useRef(null);
|
|
34
33
|
var playRef = forwordRef ? forwordRef : ref;
|
|
35
34
|
var _ref2 = playRef.current || {},
|
|
@@ -42,13 +41,13 @@ function FrontendPlayer(_ref) {
|
|
|
42
41
|
}, [begin, end]); //单位s 秒
|
|
43
42
|
|
|
44
43
|
// 重置reload
|
|
45
|
-
var reload =
|
|
44
|
+
var reload = useMemoizedFn(function () {
|
|
46
45
|
var _playRef$current, _playRef$current2;
|
|
47
46
|
(_playRef$current = playRef.current) === null || _playRef$current === void 0 ? void 0 : _playRef$current.event.emit(Events.RELOAD);
|
|
48
47
|
onSeek === null || onSeek === void 0 ? void 0 : onSeek(begin);
|
|
49
48
|
(_playRef$current2 = playRef.current) === null || _playRef$current2 === void 0 ? void 0 : _playRef$current2.api.reload();
|
|
50
49
|
});
|
|
51
|
-
var onInit =
|
|
50
|
+
var onInit = useMemoizedFn(function () {
|
|
52
51
|
update();
|
|
53
52
|
onCanPlayerInit === null || onCanPlayerInit === void 0 ? void 0 : onCanPlayerInit();
|
|
54
53
|
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './style/timeline.less';
|
|
3
1
|
interface ITimeLineProps {
|
|
4
2
|
duration: number;
|
|
5
3
|
begin: number;
|
|
6
4
|
end: number;
|
|
7
5
|
onSeek?: (time: number) => void;
|
|
8
6
|
}
|
|
9
|
-
declare function FrontendTimeLine({ duration, begin, end, onSeek }: ITimeLineProps): JSX.Element;
|
|
7
|
+
declare function FrontendTimeLine({ duration, begin, end, onSeek }: ITimeLineProps): import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default FrontendTimeLine;
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
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; }
|
|
4
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; }
|
|
5
5
|
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; }
|
|
@@ -11,14 +11,18 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
11
11
|
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; }
|
|
12
12
|
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; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
import { css } from '@emotion/css';
|
|
16
|
+
import { useUpdateEffect } from 'ahooks';
|
|
14
17
|
import moment from 'dayjs';
|
|
15
18
|
import React, { startTransition, useMemo, useState } from 'react';
|
|
16
19
|
import useBarStatus from "./contraller_bar/useBarStatus";
|
|
17
|
-
import "./
|
|
18
|
-
import { useTimes } from "./timeline";
|
|
20
|
+
import { currentLineCss, playerTimelineLayoutCss, useTimes } from "./timeline";
|
|
19
21
|
import { FMT } from "./util";
|
|
20
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
var frontendLineMarkCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n width: 2px;\n height: 100%;\n pointer-events: none;\n background-color: #fff;\n"])));
|
|
25
|
+
var frontendLineTipBoxCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: -130px;\n width: max-content;\n padding: 10px;\n margin-left: -81px;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n background-color: rgb(0 0 0 / 65%);\n border-radius: 3px;\n"])));
|
|
22
26
|
function TipTitle(_ref) {
|
|
23
27
|
var end = _ref.end,
|
|
24
28
|
begin = _ref.begin,
|
|
@@ -29,7 +33,7 @@ function TipTitle(_ref) {
|
|
|
29
33
|
return null;
|
|
30
34
|
}
|
|
31
35
|
return /*#__PURE__*/_jsxs("div", {
|
|
32
|
-
className:
|
|
36
|
+
className: frontendLineTipBoxCss,
|
|
33
37
|
style: {
|
|
34
38
|
left: left
|
|
35
39
|
},
|
|
@@ -73,7 +77,7 @@ function FrontendTimeLine(_ref2) {
|
|
|
73
77
|
var rTime = useMemo(function () {
|
|
74
78
|
return state.time + currentTime;
|
|
75
79
|
}, [state.time, currentTime]);
|
|
76
|
-
|
|
80
|
+
useUpdateEffect(function () {
|
|
77
81
|
return setState(function (old) {
|
|
78
82
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
79
83
|
time: 0
|
|
@@ -119,12 +123,16 @@ function FrontendTimeLine(_ref2) {
|
|
|
119
123
|
});
|
|
120
124
|
};
|
|
121
125
|
return /*#__PURE__*/_jsxs("div", {
|
|
122
|
-
className:
|
|
126
|
+
className: playerTimelineLayoutCss,
|
|
127
|
+
style: status === 0 ? {
|
|
128
|
+
bottom: 0,
|
|
129
|
+
height: 4
|
|
130
|
+
} : undefined,
|
|
123
131
|
onClick: seekWithLine,
|
|
124
132
|
onMouseMove: onLineMouseOver,
|
|
125
133
|
onMouseOut: onLineMouseOut,
|
|
126
134
|
children: [/*#__PURE__*/_jsx("div", {
|
|
127
|
-
className:
|
|
135
|
+
className: currentLineCss,
|
|
128
136
|
style: {
|
|
129
137
|
width: "".concat(playPercent, "%")
|
|
130
138
|
}
|
|
@@ -135,7 +143,7 @@ function FrontendTimeLine(_ref2) {
|
|
|
135
143
|
current: cTime,
|
|
136
144
|
markTime: state.markTime
|
|
137
145
|
}), state.left !== -1 && /*#__PURE__*/_jsx("span", {
|
|
138
|
-
className:
|
|
146
|
+
className: frontendLineMarkCss,
|
|
139
147
|
style: {
|
|
140
148
|
left: state.left
|
|
141
149
|
}
|
package/es/Player/iconfont.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IIconFontProps } from '../IconFont';
|
|
3
2
|
import './style/iconfont.js';
|
|
4
|
-
declare function IconFont({ className, ...props }: IIconFontProps): JSX.Element;
|
|
3
|
+
declare function IconFont({ className, ...props }: IIconFontProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export default IconFont;
|
package/es/Player/iconfont.js
CHANGED
|
@@ -7,7 +7,6 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
-
import React from 'react';
|
|
11
10
|
import Icon from "../IconFont";
|
|
12
11
|
import "./style/iconfont.js";
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -16,7 +15,7 @@ function IconFont(_ref) {
|
|
|
16
15
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
17
|
return /*#__PURE__*/_jsx(Icon, _objectSpread({
|
|
19
|
-
className: "
|
|
18
|
+
className: "".concat(className)
|
|
20
19
|
}, props));
|
|
21
20
|
}
|
|
22
21
|
export default IconFont;
|