@cloud-app-dev/vidc 3.2.17 → 3.2.18
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/.prettierrc.js +1 -1
- package/.stylelintrc.js +113 -0
- package/es/AppContext/index.js +3 -4
- package/es/Box/InfoBox/index.less +8 -6
- package/es/Box/TwoColumnBox/index.less +32 -22
- package/es/Box/index.less +1 -1
- package/es/CheckGroupFixed/index.less +17 -14
- package/es/CustomRenderSelect/index.less +7 -7
- package/es/DisableMark/index.less +3 -3
- package/es/DomMove/index.js +5 -5
- package/es/Drag/DragAndDropItem.js +1 -2
- package/es/Drag/DropItem.js +2 -2
- package/es/Drag/index.d.ts +9 -7
- package/es/Drawer/index.js +19 -20
- package/es/Drawer/index.less +8 -8
- package/es/Drawer/interface.d.ts +4 -3
- package/es/DynamicList/index.less +2 -0
- package/es/FullScreen/index.less +6 -4
- package/es/GridList/index.js +1 -1
- package/es/GridList/index.less +1 -1
- package/es/ImageView/index.less +2 -1
- package/es/Input/index.less +1 -1
- package/es/LabelValue/index.less +5 -2
- package/es/List/index.less +2 -2
- package/es/ListWithSizeAnimate/demo.js +0 -1
- package/es/ListWithSizeAnimate/index.js +18 -28
- package/es/ListWithSizeAnimate/index.less +10 -6
- package/es/Map/BasicMap/index.less +8 -3
- package/es/Map/ClusterLayer/index.less +8 -6
- package/es/Map/FindPio/index.less +2 -2
- package/es/Map/LevelCenter/index.js +3 -4
- package/es/Map/MapDrawSelect/index.js +2 -3
- package/es/Map/ResetTools/index.less +10 -6
- package/es/Map/SinglePoint/index.less +3 -3
- package/es/Map/useMarker/index.js +1 -1
- package/es/Modal/index.js +17 -17
- package/es/Modal/index.less +10 -11
- package/es/Picture/component/DefaultRects/index.js +3 -1
- package/es/Picture/component/DefaultRects/index.less +51 -28
- package/es/Picture/component/DrawRect/index.js +3 -1
- package/es/Picture/component/DrawRect/index.less +2 -2
- package/es/Picture/component/RectMenu/index.less +11 -6
- package/es/Picture/component/Tools/index.js +1 -1
- package/es/Picture/component/Tools/index.less +12 -6
- package/es/Picture/index.js +50 -26
- package/es/Picture/index.less +3 -2
- package/es/Picture/useDraw.js +1 -1
- package/es/Picture/utils.js +35 -34
- package/es/Player/api/index.js +67 -35
- package/es/Player/contraller_bar/contraller_event.js +4 -4
- package/es/Player/contraller_bar/left_bar.js +12 -10
- package/es/Player/empty.js +6 -0
- package/es/Player/event/errorEvent.js +7 -8
- package/es/Player/event/index.js +1 -1
- package/es/Player/fps_play.js +10 -8
- package/es/Player/frontend_player.js +13 -10
- package/es/Player/frontend_timeline.js +41 -41
- package/es/Player/live_heart.js +15 -5
- package/es/Player/message.js +5 -5
- package/es/Player/segment_player.js +31 -24
- package/es/Player/segment_timeline.js +71 -71
- package/es/Player/single_player.js +17 -21
- package/es/Player/style/bar.less +13 -9
- package/es/Player/style/index.less +8 -4
- package/es/Player/style/message.less +22 -16
- package/es/Player/style/slider.less +40 -37
- package/es/Player/style/timeline.less +43 -33
- package/es/Player/style/volume.less +7 -4
- package/es/Player/timeline.js +16 -8
- package/es/Player/util.js +82 -58
- package/es/PlayerExt/index.less +2 -2
- package/es/Progress/index.d.ts +8 -11
- package/es/Progress/index.less +5 -4
- package/es/ROI/index.less +8 -4
- package/es/ScreenPlayer/index.less +49 -26
- package/es/TableLayout/index.less +1 -1
- package/es/ThemeAntd/demo.less +4 -3
- package/es/ThemeAntd/index.less +12 -12
- package/es/ThemeAntd/style/button.less +4 -4
- package/es/ThemeAntd/style/checkbox.less +3 -3
- package/es/ThemeAntd/style/input.less +7 -7
- package/es/ThemeAntd/style/pagination.less +4 -4
- package/es/ThemeAntd/style/picker.less +5 -5
- package/es/ThemeAntd/style/radio.less +2 -2
- package/es/ThemeAntd/style/scrollbar.less +5 -3
- package/es/ThemeAntd/style/select.less +8 -8
- package/es/ThemeAntd/style/table.less +4 -4
- package/es/Tree/index.less +13 -12
- package/es/VList/index.d.ts +12 -18
- package/es/useSimpleState/index.js +1 -1
- package/package.json +12 -6
- package/tsconfig.json +12 -0
- package/es/Api/index.d.ts +0 -12
- package/es/AppContext/Sync.d.ts +0 -8
- package/es/AppContext/index.d.ts +0 -10
- package/es/AppContext/static.d.ts +0 -8
- package/es/Auth/index.d.ts +0 -8
- package/es/AutoExit/index.d.ts +0 -6
- package/es/Box/BetweenBox/index.d.ts +0 -12
- package/es/Box/InfoBox/index.d.ts +0 -12
- package/es/Box/TwoColumnBox/index.d.ts +0 -10
- package/es/Box/deps/content-grid.d.ts +0 -9
- package/es/Box/deps/grid-factory.d.ts +0 -10
- package/es/Box/deps/simple-grid.d.ts +0 -9
- package/es/Box/index.d.ts +0 -14
- package/es/CheckGroupFixed/demo.d.ts +0 -3
- package/es/CheckGroupFixed/index.d.ts +0 -18
- package/es/Config/index.d.ts +0 -4
- package/es/Config/utils.d.ts +0 -4
- package/es/ConfigContext/index.d.ts +0 -22
- package/es/CustomRenderSelect/index.d.ts +0 -12
- package/es/DisableMark/index.d.ts +0 -9
- package/es/DomMove/demo.d.ts +0 -2
- package/es/DomMove/index.d.ts +0 -16
- package/es/DomMove/utils.d.ts +0 -8
- package/es/Drag/DragAndDropItem.d.ts +0 -4
- package/es/Drag/DropItem.d.ts +0 -4
- package/es/Drag/index.less +0 -0
- package/es/Drawer/Footer.d.ts +0 -5
- package/es/Drawer/demo.d.ts +0 -3
- package/es/Drawer/index.d.ts +0 -38
- package/es/DynamicGridList/Demo.d.ts +0 -3
- package/es/DynamicGridList/index.d.ts +0 -27
- package/es/DynamicList/demo.d.ts +0 -2
- package/es/DynamicList/index.d.ts +0 -31
- package/es/DynamicList/utils.d.ts +0 -4
- package/es/ErrorFallback/index.d.ts +0 -9
- package/es/FrontendPlayer/index.d.ts +0 -2
- package/es/FullScreen/index.d.ts +0 -22
- package/es/GridList/Demo.d.ts +0 -3
- package/es/GridList/data.d.ts +0 -16
- package/es/GridList/hook.d.ts +0 -13
- package/es/GridList/index.d.ts +0 -15
- package/es/GridList/utils.d.ts +0 -9
- package/es/HightLevel/index.d.ts +0 -9
- package/es/IconFont/index.d.ts +0 -12
- package/es/ImageView/index.d.ts +0 -17
- package/es/Input/demo.d.ts +0 -3
- package/es/Input/index.d.ts +0 -19
- package/es/InstanceHistory/index.d.ts +0 -3
- package/es/LabelValue/index.d.ts +0 -23
- package/es/List/demo.d.ts +0 -3
- package/es/List/index.d.ts +0 -41
- package/es/ListWithSizeAnimate/demo.d.ts +0 -2
- package/es/ListWithSizeAnimate/index.d.ts +0 -15
- package/es/LoaderApp/index.d.ts +0 -31
- package/es/LoaderApp/loader.d.ts +0 -19
- package/es/LoaderApp/sandbox.back.d.ts +0 -18
- package/es/LoaderApp/sandbox.d.ts +0 -12
- package/es/LoaderApp/utils.d.ts +0 -19
- package/es/LoaderScript/index.d.ts +0 -26
- package/es/LoaderScript/utils.d.ts +0 -14
- package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
- package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
- package/es/Map/BasicMap/index.d.ts +0 -9
- package/es/Map/ClusterLayer/hook.d.ts +0 -5
- package/es/Map/ClusterLayer/index.d.ts +0 -6
- package/es/Map/Config/index.d.ts +0 -7
- package/es/Map/Config/utils.d.ts +0 -2
- package/es/Map/Context/index.d.ts +0 -11
- package/es/Map/FindPio/index.d.ts +0 -4
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
- package/es/Map/InfoWindow/demo.d.ts +0 -3
- package/es/Map/InfoWindow/index.d.ts +0 -10
- package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
- package/es/Map/LevelCenter/demo.d.ts +0 -3
- package/es/Map/LevelCenter/index.d.ts +0 -16
- package/es/Map/LevelCenter/index.less +0 -2
- package/es/Map/LoaderMap/index.d.ts +0 -12
- package/es/Map/MapDrawSelect/demo.d.ts +0 -3
- package/es/Map/MapDrawSelect/index.d.ts +0 -16
- package/es/Map/MapDrawSelect/index.less +0 -2
- package/es/Map/MouseTool/index.d.ts +0 -10
- package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
- package/es/Map/ResetTools/index.d.ts +0 -10
- package/es/Map/SinglePoint/index.d.ts +0 -27
- package/es/Map/hook/useMapEvent.d.ts +0 -2
- package/es/Map/hook/useMapType.d.ts +0 -4
- package/es/Map/icon.d.ts +0 -2
- package/es/Map/index.d.ts +0 -24
- package/es/Map/useMarker/index.d.ts +0 -11
- package/es/Map/useMarker/index.less +0 -0
- package/es/Map/withMap/index.d.ts +0 -3
- package/es/Modal/demo.d.ts +0 -3
- package/es/Modal/index.d.ts +0 -44
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
- package/es/Picture/component/DefaultRects/index.d.ts +0 -13
- package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
- package/es/Picture/component/DrawRect/index.d.ts +0 -13
- package/es/Picture/component/RectMenu/index.d.ts +0 -12
- package/es/Picture/component/RectMenu/utils.d.ts +0 -12
- package/es/Picture/component/Tools/index.d.ts +0 -13
- package/es/Picture/component/WheelScale/index.d.ts +0 -7
- package/es/Picture/demo.d.ts +0 -2
- package/es/Picture/dragBound.d.ts +0 -5
- package/es/Picture/index.d.ts +0 -19
- package/es/Picture/loadCaptureRectImage.d.ts +0 -8
- package/es/Picture/useDraw.d.ts +0 -1
- package/es/Picture/utils.d.ts +0 -21
- package/es/Player/api/index.d.ts +0 -68
- package/es/Player/context.d.ts +0 -21
- package/es/Player/contraller_bar/bar.d.ts +0 -8
- package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
- package/es/Player/contraller_bar/index.d.ts +0 -14
- package/es/Player/contraller_bar/left_bar.d.ts +0 -10
- package/es/Player/contraller_bar/right_bar.d.ts +0 -8
- package/es/Player/contraller_bar/time.d.ts +0 -3
- package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
- package/es/Player/contraller_bar/volume.d.ts +0 -9
- package/es/Player/demo.d.ts +0 -3
- package/es/Player/event/errorEvent.d.ts +0 -16
- package/es/Player/event/eventName.d.ts +0 -18
- package/es/Player/event/index.d.ts +0 -24
- package/es/Player/fps_play.d.ts +0 -11
- package/es/Player/frontend_player.d.ts +0 -8
- package/es/Player/frontend_timeline.d.ts +0 -10
- package/es/Player/iconfont.d.ts +0 -5
- package/es/Player/index.d.ts +0 -2
- package/es/Player/live_heart.d.ts +0 -8
- package/es/Player/message.d.ts +0 -5
- package/es/Player/segment_player.d.ts +0 -9
- package/es/Player/segment_timeline.d.ts +0 -12
- package/es/Player/single_player.d.ts +0 -5
- package/es/Player/timeline.d.ts +0 -5
- package/es/Player/util.d.ts +0 -28
- package/es/PlayerExt/demo.d.ts +0 -3
- package/es/PlayerExt/index.d.ts +0 -48
- package/es/ROI/demo.d.ts +0 -3
- package/es/ROI/index.d.ts +0 -39
- package/es/ROI/utils.d.ts +0 -1
- package/es/ScreenPlayer/Live.d.ts +0 -10
- package/es/ScreenPlayer/LiveTools.d.ts +0 -29
- package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
- package/es/ScreenPlayer/RatePick.d.ts +0 -7
- package/es/ScreenPlayer/Record.d.ts +0 -10
- package/es/ScreenPlayer/RecordTools.d.ts +0 -37
- package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
- package/es/ScreenPlayer/TimeMode.d.ts +0 -7
- package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
- package/es/ScreenPlayer/demo.d.ts +0 -2
- package/es/ScreenPlayer/demo2.d.ts +0 -2
- package/es/ScreenPlayer/index.d.ts +0 -6
- package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
- package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
- package/es/ScreenPlayer/utils.d.ts +0 -19
- package/es/SegmentPlayer/index.d.ts +0 -2
- package/es/Service/fetch-adapter.d.ts +0 -12
- package/es/Service/http.d.ts +0 -6
- package/es/Service/index.d.ts +0 -3
- package/es/Service/middleware.d.ts +0 -5
- package/es/TableLayout/index.d.ts +0 -13
- package/es/ThemeAntd/demo.d.ts +0 -4
- package/es/ThemeAntd/index.d.ts +0 -7
- package/es/Timeout/index.d.ts +0 -32
- package/es/Tree/demo.d.ts +0 -3
- package/es/Tree/index.d.ts +0 -24
- package/es/VList/utils.d.ts +0 -14
- package/es/index.d.ts +0 -52
- package/es/useDrawROI/index.d.ts +0 -16
- package/es/useEventEmitterHandle/index.d.ts +0 -2
- package/es/useFullscreen/demo.d.ts +0 -2
- package/es/useFullscreen/index.d.ts +0 -12
- package/es/useHistory/index.d.ts +0 -3
- package/es/useInfiniteScroll/index.d.ts +0 -16
- package/es/useRafInterval/index.d.ts +0 -5
- package/es/useSimpleState/index.d.ts +0 -3
- package/es/useVirtualList/index.d.ts +0 -13
- package/es/utils.d.ts +0 -25
|
@@ -1,106 +1,116 @@
|
|
|
1
1
|
.player-timeline-layout {
|
|
2
2
|
position: absolute;
|
|
3
|
-
left: 0;
|
|
4
3
|
bottom: 28px;
|
|
4
|
+
left: 0;
|
|
5
|
+
z-index: 9;
|
|
6
|
+
display: flex;
|
|
5
7
|
width: 100%;
|
|
6
8
|
height: 20px;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
background: rgb(0 0 0 / 100%);
|
|
11
|
+
opacity: .8;
|
|
9
12
|
justify-content: center;
|
|
10
13
|
align-items: center;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
transition: all 0.1s;
|
|
14
|
-
cursor: pointer;
|
|
14
|
+
transition: all .1s;
|
|
15
|
+
|
|
15
16
|
&.hide-time-line {
|
|
16
17
|
bottom: 0;
|
|
17
18
|
height: 4px;
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
.buffer-line {
|
|
20
22
|
position: absolute;
|
|
21
|
-
left: 0;
|
|
22
23
|
top: 0;
|
|
24
|
+
left: 0;
|
|
23
25
|
height: 100%;
|
|
24
|
-
background-color: rgb(103, 103, 103);
|
|
25
|
-
pointer-events: none;
|
|
26
26
|
max-width: 100%;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
background-color: rgb(103 103 103);
|
|
27
29
|
}
|
|
30
|
+
|
|
28
31
|
.current-line {
|
|
29
32
|
position: absolute;
|
|
30
|
-
left: 0;
|
|
31
33
|
top: 0;
|
|
34
|
+
left: 0;
|
|
32
35
|
height: 100%;
|
|
33
|
-
background-color: rgba(70, 97, 255, 1);
|
|
34
|
-
pointer-events: none;
|
|
35
|
-
overflow: hidden;
|
|
36
36
|
max-width: 100%;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
background-color: rgb(70 97 255 / 100%);
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
&.player-segment-timeline-layout {
|
|
40
43
|
background: transparent;
|
|
44
|
+
|
|
41
45
|
.segment-line-box {
|
|
46
|
+
display: flex;
|
|
42
47
|
width: 100%;
|
|
43
48
|
height: 100%;
|
|
44
|
-
|
|
49
|
+
|
|
45
50
|
.segment-line-item {
|
|
46
|
-
background: rgba(0, 0, 0, 1);
|
|
47
51
|
position: relative;
|
|
52
|
+
background: rgb(0 0 0 / 100%);
|
|
48
53
|
box-sizing: border-box;
|
|
54
|
+
|
|
49
55
|
&:hover {
|
|
50
56
|
&::after {
|
|
51
|
-
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
z-index: 6;
|
|
52
61
|
width: 100%;
|
|
53
62
|
height: 100%;
|
|
54
|
-
left: 0;
|
|
55
|
-
top: 0;
|
|
56
63
|
border: 1px solid #fff;
|
|
57
|
-
|
|
58
|
-
position: absolute;
|
|
64
|
+
content: ' ';
|
|
59
65
|
}
|
|
60
66
|
}
|
|
67
|
+
|
|
61
68
|
&.segment-line-item-none {
|
|
62
|
-
background: rgba(222, 14, 14, 1);
|
|
63
69
|
z-index: 6;
|
|
64
70
|
cursor: not-allowed;
|
|
71
|
+
background: rgb(222 14 14 / 100%);
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
}
|
|
75
|
+
|
|
68
76
|
.segment-line-mark {
|
|
69
77
|
position: absolute;
|
|
70
|
-
height: 100%;
|
|
71
78
|
width: 2px;
|
|
72
|
-
|
|
79
|
+
height: 100%;
|
|
73
80
|
pointer-events: none;
|
|
81
|
+
background-color: #fff;
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
&.frontend-player-timeline-layout {
|
|
78
86
|
.frontend-line-mark {
|
|
79
87
|
position: absolute;
|
|
80
|
-
height: 100%;
|
|
81
88
|
width: 2px;
|
|
82
|
-
|
|
89
|
+
height: 100%;
|
|
83
90
|
pointer-events: none;
|
|
91
|
+
background-color: #fff;
|
|
84
92
|
}
|
|
93
|
+
|
|
85
94
|
.frontend-line-tip-box {
|
|
86
95
|
position: absolute;
|
|
87
96
|
top: -130px;
|
|
88
|
-
color: #fff;
|
|
89
|
-
font-size: 12px;
|
|
90
|
-
border-radius: 3px;
|
|
91
|
-
background-color: rgb(0, 0, 0, 0.65);
|
|
92
|
-
padding: 10px;
|
|
93
97
|
width: max-content;
|
|
94
|
-
|
|
98
|
+
padding: 10px;
|
|
95
99
|
margin-left: -81px;
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
line-height: 20px;
|
|
102
|
+
color: #fff;
|
|
103
|
+
background-color: rgb(0 0 0 / 65%);
|
|
104
|
+
border-radius: 3px;
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
107
|
}
|
|
99
108
|
|
|
100
109
|
.segment-line-tip-box {
|
|
101
110
|
font-size: 12px;
|
|
111
|
+
|
|
102
112
|
div {
|
|
103
|
-
margin: 0;
|
|
104
113
|
padding: 2px 0;
|
|
114
|
+
margin: 0;
|
|
105
115
|
}
|
|
106
116
|
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
.lm-player-volume-popup {
|
|
2
2
|
.cloudapp-tooltip-inner {
|
|
3
|
-
height: 130px;
|
|
4
|
-
width: 30px;
|
|
5
3
|
display: flex;
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
width: 30px;
|
|
5
|
+
height: 130px;
|
|
8
6
|
padding: 12px 6px;
|
|
7
|
+
text-align: center;
|
|
9
8
|
border-radius: 15px;
|
|
9
|
+
justify-content: center;
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
.cloudapp-slider-vertical {
|
|
12
13
|
margin: 0;
|
|
13
14
|
}
|
|
15
|
+
|
|
14
16
|
.cloudapp-slider-track {
|
|
15
17
|
background-color: var(--primary);
|
|
16
18
|
}
|
|
19
|
+
|
|
17
20
|
.cloudapp-slider-handle {
|
|
18
21
|
background-color: var(--primary);
|
|
19
22
|
border-color: var(--gray1);
|
package/es/Player/timeline.js
CHANGED
|
@@ -17,9 +17,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
|
|
19
19
|
import React, { useContext, useMemo, useState } from 'react';
|
|
20
|
+
import { Context } from "./context";
|
|
20
21
|
import useBarStatus from "./contraller_bar/useBarStatus";
|
|
21
22
|
import { useVideoEvent } from "./event";
|
|
22
|
-
import { Context } from "./context";
|
|
23
23
|
import "./style/timeline.less";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -38,23 +38,27 @@ export function useTimes() {
|
|
|
38
38
|
|
|
39
39
|
var getCurrentTime = function getCurrentTime() {
|
|
40
40
|
return setState(function (old) {
|
|
41
|
+
var _api$getCurrentTime, _api$getSecondsLoaded;
|
|
42
|
+
|
|
41
43
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
42
|
-
currentTime: api.getCurrentTime(),
|
|
43
|
-
buffered: api.getSecondsLoaded()
|
|
44
|
+
currentTime: (_api$getCurrentTime = api === null || api === void 0 ? void 0 : api.getCurrentTime()) !== null && _api$getCurrentTime !== void 0 ? _api$getCurrentTime : 0,
|
|
45
|
+
buffered: (_api$getSecondsLoaded = api === null || api === void 0 ? void 0 : api.getSecondsLoaded()) !== null && _api$getSecondsLoaded !== void 0 ? _api$getSecondsLoaded : 0
|
|
44
46
|
});
|
|
45
47
|
});
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
var getBuffered = function getBuffered() {
|
|
49
51
|
return setState(function (old) {
|
|
52
|
+
var _api$getSecondsLoaded2;
|
|
53
|
+
|
|
50
54
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
51
|
-
buffered: api.getSecondsLoaded()
|
|
55
|
+
buffered: (_api$getSecondsLoaded2 = api === null || api === void 0 ? void 0 : api.getSecondsLoaded()) !== null && _api$getSecondsLoaded2 !== void 0 ? _api$getSecondsLoaded2 : 0
|
|
52
56
|
});
|
|
53
57
|
});
|
|
54
58
|
};
|
|
55
59
|
|
|
56
60
|
var seekendPlay = function seekendPlay() {
|
|
57
|
-
return !isFpsPlay && api.play();
|
|
61
|
+
return !isFpsPlay && (api === null || api === void 0 ? void 0 : api.play());
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
useVideoEvent('timeupdate', getCurrentTime);
|
|
@@ -62,7 +66,9 @@ export function useTimes() {
|
|
|
62
66
|
useVideoEvent('suspend', getBuffered);
|
|
63
67
|
useVideoEvent('seeked', seekendPlay);
|
|
64
68
|
return useMemo(function () {
|
|
65
|
-
|
|
69
|
+
var _api$getDuration;
|
|
70
|
+
|
|
71
|
+
return [state.currentTime, state.buffered, (_api$getDuration = api === null || api === void 0 ? void 0 : api.getDuration()) !== null && _api$getDuration !== void 0 ? _api$getDuration : 0];
|
|
66
72
|
}, [state.currentTime, state.buffered, api]);
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -86,10 +92,12 @@ function TimeLine() {
|
|
|
86
92
|
}, [buffered, duration]);
|
|
87
93
|
|
|
88
94
|
var seekWithLine = function seekWithLine(e) {
|
|
95
|
+
var _api$getDuration2;
|
|
96
|
+
|
|
89
97
|
var rect = e.currentTarget.getBoundingClientRect();
|
|
90
98
|
var current = e.pageX - rect.left;
|
|
91
|
-
var cTime = current / rect.width * api.getDuration();
|
|
92
|
-
api.seekTo(cTime);
|
|
99
|
+
var cTime = current / rect.width * ((_api$getDuration2 = api === null || api === void 0 ? void 0 : api.getDuration()) !== null && _api$getDuration2 !== void 0 ? _api$getDuration2 : 0);
|
|
100
|
+
api === null || api === void 0 ? void 0 : api.seekTo(cTime);
|
|
93
101
|
};
|
|
94
102
|
|
|
95
103
|
return /*#__PURE__*/_jsxs("div", {
|
package/es/Player/util.js
CHANGED
|
@@ -2,27 +2,58 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
2
|
|
|
3
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
4
|
|
|
5
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
|
-
|
|
7
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
-
|
|
9
5
|
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; }
|
|
10
6
|
|
|
11
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; }
|
|
12
8
|
|
|
13
9
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
10
|
|
|
11
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
12
|
+
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
+
|
|
15
15
|
import Flvjs from '@cloud-app-dev/flv.js';
|
|
16
16
|
import Hls from 'hls.js';
|
|
17
17
|
import Events from "./event/eventName";
|
|
18
|
-
|
|
18
|
+
export function tryCatch(_x) {
|
|
19
|
+
return _tryCatch.apply(this, arguments);
|
|
20
|
+
}
|
|
19
21
|
/**
|
|
20
22
|
* 创建HLS对象
|
|
21
23
|
* @param {*} video
|
|
22
24
|
* @param {*} URL
|
|
23
25
|
*/
|
|
26
|
+
|
|
27
|
+
function _tryCatch() {
|
|
28
|
+
_tryCatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(fn) {
|
|
29
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
|
+
while (1) {
|
|
31
|
+
switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
_context.prev = 0;
|
|
34
|
+
_context.next = 3;
|
|
35
|
+
return fn();
|
|
36
|
+
|
|
37
|
+
case 3:
|
|
38
|
+
_context.next = 7;
|
|
39
|
+
break;
|
|
40
|
+
|
|
41
|
+
case 5:
|
|
42
|
+
_context.prev = 5;
|
|
43
|
+
_context.t0 = _context["catch"](0);
|
|
44
|
+
|
|
45
|
+
case 7:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, _callee, null, [[0, 5]]);
|
|
51
|
+
}));
|
|
52
|
+
return _tryCatch.apply(this, arguments);
|
|
53
|
+
}
|
|
54
|
+
|
|
24
55
|
export function createHlsPlayer(video, url, isLive, hlsConfig) {
|
|
25
|
-
if (!Hls.isSupported()) {
|
|
56
|
+
if (!Hls.isSupported() || !url) {
|
|
26
57
|
return undefined;
|
|
27
58
|
}
|
|
28
59
|
|
|
@@ -41,7 +72,7 @@ export function createHlsPlayer(video, url, isLive, hlsConfig) {
|
|
|
41
72
|
*/
|
|
42
73
|
|
|
43
74
|
export function createFlvPlayer(video, url, isLive, flvConfig) {
|
|
44
|
-
if (!Flvjs.isSupported()) {
|
|
75
|
+
if (!Flvjs.isSupported() || !url) {
|
|
45
76
|
return undefined;
|
|
46
77
|
}
|
|
47
78
|
|
|
@@ -52,20 +83,60 @@ export function createFlvPlayer(video, url, isLive, flvConfig) {
|
|
|
52
83
|
var mediaDataSource = _objectSpread({
|
|
53
84
|
type: 'flv',
|
|
54
85
|
url: url
|
|
55
|
-
}, flvConfig.mediaDataSource);
|
|
86
|
+
}, flvConfig === null || flvConfig === void 0 ? void 0 : flvConfig.mediaDataSource);
|
|
56
87
|
|
|
57
88
|
var config = _objectSpread({
|
|
58
89
|
enableWorker: true,
|
|
59
90
|
isLive: isLive !== null && isLive !== void 0 ? isLive : true,
|
|
60
91
|
enableStashBuffer: !isLive
|
|
61
|
-
}, flvConfig.config);
|
|
92
|
+
}, flvConfig === null || flvConfig === void 0 ? void 0 : flvConfig.config);
|
|
62
93
|
|
|
63
94
|
var player = Flvjs.createPlayer(mediaDataSource, config);
|
|
64
95
|
player.attachMediaElement(video);
|
|
65
96
|
player.load();
|
|
66
97
|
return player;
|
|
67
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* video unload
|
|
101
|
+
* @param video
|
|
102
|
+
* @param flv
|
|
103
|
+
* @param hls
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
export var playUnload = function playUnload(video, flv, hls) {
|
|
108
|
+
if (!video) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
video.pause();
|
|
113
|
+
|
|
114
|
+
if (flv) {
|
|
115
|
+
flv.unload();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (hls) {
|
|
120
|
+
hls.stopLoad();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
video.removeAttribute('src');
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* reload
|
|
128
|
+
* @param video
|
|
129
|
+
* @param event
|
|
130
|
+
* @param flv
|
|
131
|
+
* @param hls
|
|
132
|
+
* @param url
|
|
133
|
+
*/
|
|
134
|
+
|
|
68
135
|
export var playReload = function playReload(video, event, flv, hls, url) {
|
|
136
|
+
if (!video || !event) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
|
|
69
140
|
playUnload(video, flv, hls);
|
|
70
141
|
|
|
71
142
|
if (flv) {
|
|
@@ -75,7 +146,7 @@ export var playReload = function playReload(video, event, flv, hls, url) {
|
|
|
75
146
|
});
|
|
76
147
|
}
|
|
77
148
|
|
|
78
|
-
if (hls) {
|
|
149
|
+
if (hls && url) {
|
|
79
150
|
tryCatch(function () {
|
|
80
151
|
hls.swapAudioCodec();
|
|
81
152
|
hls.recoverMediaError();
|
|
@@ -85,7 +156,7 @@ export var playReload = function playReload(video, event, flv, hls, url) {
|
|
|
85
156
|
});
|
|
86
157
|
}
|
|
87
158
|
|
|
88
|
-
if (!flv && !hls) {
|
|
159
|
+
if (!flv && !hls && url) {
|
|
89
160
|
video.setAttribute('src', url);
|
|
90
161
|
tryCatch(function () {
|
|
91
162
|
return video.play();
|
|
@@ -94,21 +165,6 @@ export var playReload = function playReload(video, event, flv, hls, url) {
|
|
|
94
165
|
|
|
95
166
|
event.emit(Events.RELOAD);
|
|
96
167
|
};
|
|
97
|
-
export var playUnload = function playUnload(video, flv, hls) {
|
|
98
|
-
video.pause();
|
|
99
|
-
|
|
100
|
-
if (flv) {
|
|
101
|
-
flv.unload();
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (hls) {
|
|
106
|
-
hls.stopLoad();
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
video.removeAttribute('src');
|
|
111
|
-
};
|
|
112
168
|
/**
|
|
113
169
|
* 获取播放文件类型
|
|
114
170
|
* @param {*} url
|
|
@@ -136,38 +192,6 @@ export function timeStamp(second) {
|
|
|
136
192
|
export function getRandom() {
|
|
137
193
|
return Math.random().toString(36).substr(2);
|
|
138
194
|
}
|
|
139
|
-
export function tryCatch(_x) {
|
|
140
|
-
return _tryCatch.apply(this, arguments);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function _tryCatch() {
|
|
144
|
-
_tryCatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(fn) {
|
|
145
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
146
|
-
while (1) {
|
|
147
|
-
switch (_context.prev = _context.next) {
|
|
148
|
-
case 0:
|
|
149
|
-
_context.prev = 0;
|
|
150
|
-
_context.next = 3;
|
|
151
|
-
return fn();
|
|
152
|
-
|
|
153
|
-
case 3:
|
|
154
|
-
_context.next = 7;
|
|
155
|
-
break;
|
|
156
|
-
|
|
157
|
-
case 5:
|
|
158
|
-
_context.prev = 5;
|
|
159
|
-
_context.t0 = _context["catch"](0);
|
|
160
|
-
|
|
161
|
-
case 7:
|
|
162
|
-
case "end":
|
|
163
|
-
return _context.stop();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}, _callee, null, [[0, 5]]);
|
|
167
|
-
}));
|
|
168
|
-
return _tryCatch.apply(this, arguments);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
195
|
export var FMT = 'YYYY-MM-DD HH:mm:ss';
|
|
172
196
|
export function getDomStyleValue(dom, styleKey) {
|
|
173
197
|
if (!dom) {
|
package/es/PlayerExt/index.less
CHANGED
package/es/Progress/index.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface
|
|
4
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ProgressInterface {
|
|
4
|
+
status: 'over' | 'error' | 'loading';
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export default ProgressComponent;
|
|
6
|
+
|
|
7
|
+
declare const Progress: React.FunctionComponent<ProgressInterface>;
|
|
8
|
+
|
|
9
|
+
export default Progress;
|
package/es/Progress/index.less
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
.@{ant-prefix}-progress.lm-c-loading-progress {
|
|
2
|
-
height: 2px;
|
|
3
|
-
overflow: hidden;
|
|
4
2
|
position: absolute;
|
|
5
|
-
left: 0;
|
|
6
3
|
top: 0;
|
|
4
|
+
left: 0;
|
|
7
5
|
z-index: 99;
|
|
8
|
-
|
|
6
|
+
height: 2px;
|
|
7
|
+
overflow: hidden;
|
|
9
8
|
opacity: 1;
|
|
9
|
+
transition: opacity 1s linear;
|
|
10
|
+
|
|
10
11
|
&.lm-c-loading-progress-over {
|
|
11
12
|
opacity: 0;
|
|
12
13
|
}
|
package/es/ROI/index.less
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
.rio-layout {
|
|
2
|
+
position: relative;
|
|
2
3
|
width: 100%;
|
|
3
4
|
height: 100%;
|
|
4
|
-
|
|
5
|
+
|
|
5
6
|
canvas {
|
|
6
7
|
position: absolute;
|
|
7
|
-
left: 0;
|
|
8
8
|
top: 0;
|
|
9
|
+
left: 0;
|
|
9
10
|
width: 100%;
|
|
10
11
|
height: 100%;
|
|
11
12
|
}
|
|
13
|
+
|
|
12
14
|
.rio-debug-box {
|
|
13
15
|
position: absolute;
|
|
14
|
-
left: 0;
|
|
15
16
|
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
display: flex;
|
|
16
19
|
width: 100%;
|
|
17
20
|
height: 100%;
|
|
18
|
-
display: flex;
|
|
19
21
|
flex-direction: column;
|
|
22
|
+
|
|
20
23
|
& > div {
|
|
21
24
|
display: flex;
|
|
22
25
|
flex: 1;
|
|
26
|
+
|
|
23
27
|
span {
|
|
24
28
|
flex: 1;
|
|
25
29
|
border: 1px solid #eee;
|