@cloud-app-dev/vidc 3.2.16 → 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.
Files changed (271) hide show
  1. package/.prettierrc.js +1 -1
  2. package/.stylelintrc.js +113 -0
  3. package/es/AppContext/index.js +3 -4
  4. package/es/Box/InfoBox/index.less +8 -6
  5. package/es/Box/TwoColumnBox/index.less +32 -22
  6. package/es/Box/index.less +1 -1
  7. package/es/CheckGroupFixed/index.less +17 -14
  8. package/es/CustomRenderSelect/index.less +7 -7
  9. package/es/DisableMark/index.less +3 -3
  10. package/es/DomMove/index.js +5 -5
  11. package/es/Drag/DragAndDropItem.js +1 -2
  12. package/es/Drag/DropItem.js +2 -2
  13. package/es/Drag/index.d.ts +9 -7
  14. package/es/Drawer/index.js +19 -20
  15. package/es/Drawer/index.less +8 -8
  16. package/es/Drawer/interface.d.ts +4 -3
  17. package/es/DynamicGridList/Demo.js +1 -1
  18. package/es/DynamicList/index.less +2 -0
  19. package/es/FullScreen/index.less +6 -4
  20. package/es/GridList/Demo.js +2 -2
  21. package/es/GridList/index.js +2 -1
  22. package/es/GridList/index.less +1 -1
  23. package/es/ImageView/index.less +2 -1
  24. package/es/Input/index.less +1 -1
  25. package/es/LabelValue/index.less +5 -2
  26. package/es/List/index.less +2 -2
  27. package/es/ListWithSizeAnimate/demo.js +0 -1
  28. package/es/ListWithSizeAnimate/index.js +18 -28
  29. package/es/ListWithSizeAnimate/index.less +10 -6
  30. package/es/Map/BasicMap/index.less +8 -3
  31. package/es/Map/ClusterLayer/index.less +8 -6
  32. package/es/Map/FindPio/index.less +2 -2
  33. package/es/Map/LevelCenter/index.js +3 -4
  34. package/es/Map/MapDrawSelect/index.js +2 -3
  35. package/es/Map/ResetTools/index.less +10 -6
  36. package/es/Map/SinglePoint/index.less +3 -3
  37. package/es/Map/useMarker/index.js +1 -1
  38. package/es/Modal/index.js +17 -17
  39. package/es/Modal/index.less +10 -11
  40. package/es/Picture/component/DefaultRects/index.js +3 -1
  41. package/es/Picture/component/DefaultRects/index.less +51 -28
  42. package/es/Picture/component/DrawRect/index.js +3 -1
  43. package/es/Picture/component/DrawRect/index.less +2 -2
  44. package/es/Picture/component/RectMenu/index.less +11 -6
  45. package/es/Picture/component/Tools/index.js +1 -1
  46. package/es/Picture/component/Tools/index.less +12 -6
  47. package/es/Picture/index.js +50 -26
  48. package/es/Picture/index.less +3 -2
  49. package/es/Picture/useDraw.js +1 -1
  50. package/es/Picture/utils.js +35 -34
  51. package/es/Player/api/index.js +67 -35
  52. package/es/Player/contraller_bar/contraller_event.js +4 -4
  53. package/es/Player/contraller_bar/left_bar.js +12 -10
  54. package/es/Player/empty.js +6 -0
  55. package/es/Player/event/errorEvent.js +7 -8
  56. package/es/Player/event/index.js +1 -1
  57. package/es/Player/fps_play.js +10 -8
  58. package/es/Player/frontend_player.js +13 -10
  59. package/es/Player/frontend_timeline.js +41 -41
  60. package/es/Player/live_heart.js +15 -5
  61. package/es/Player/message.js +5 -5
  62. package/es/Player/segment_player.js +31 -24
  63. package/es/Player/segment_timeline.js +71 -71
  64. package/es/Player/single_player.js +17 -21
  65. package/es/Player/style/bar.less +13 -9
  66. package/es/Player/style/index.less +8 -4
  67. package/es/Player/style/message.less +22 -16
  68. package/es/Player/style/slider.less +40 -37
  69. package/es/Player/style/timeline.less +43 -33
  70. package/es/Player/style/volume.less +7 -4
  71. package/es/Player/timeline.js +16 -8
  72. package/es/Player/util.js +82 -58
  73. package/es/PlayerExt/index.less +2 -2
  74. package/es/Progress/index.d.ts +8 -11
  75. package/es/Progress/index.less +5 -4
  76. package/es/ROI/index.less +8 -4
  77. package/es/ScreenPlayer/index.less +49 -26
  78. package/es/TableLayout/index.less +1 -1
  79. package/es/ThemeAntd/demo.less +4 -3
  80. package/es/ThemeAntd/index.less +12 -12
  81. package/es/ThemeAntd/style/button.less +4 -4
  82. package/es/ThemeAntd/style/checkbox.less +3 -3
  83. package/es/ThemeAntd/style/input.less +7 -7
  84. package/es/ThemeAntd/style/pagination.less +4 -4
  85. package/es/ThemeAntd/style/picker.less +5 -5
  86. package/es/ThemeAntd/style/radio.less +2 -2
  87. package/es/ThemeAntd/style/scrollbar.less +5 -3
  88. package/es/ThemeAntd/style/select.less +8 -8
  89. package/es/ThemeAntd/style/table.less +4 -4
  90. package/es/Tree/index.less +13 -12
  91. package/es/VList/index.d.ts +12 -18
  92. package/es/useSimpleState/index.js +1 -1
  93. package/package.json +12 -6
  94. package/tsconfig.json +12 -0
  95. package/es/Api/index.d.ts +0 -12
  96. package/es/AppContext/Sync.d.ts +0 -8
  97. package/es/AppContext/index.d.ts +0 -10
  98. package/es/AppContext/static.d.ts +0 -8
  99. package/es/Auth/index.d.ts +0 -8
  100. package/es/AutoExit/index.d.ts +0 -6
  101. package/es/Box/BetweenBox/index.d.ts +0 -12
  102. package/es/Box/InfoBox/index.d.ts +0 -12
  103. package/es/Box/TwoColumnBox/index.d.ts +0 -10
  104. package/es/Box/deps/content-grid.d.ts +0 -9
  105. package/es/Box/deps/grid-factory.d.ts +0 -10
  106. package/es/Box/deps/simple-grid.d.ts +0 -9
  107. package/es/Box/index.d.ts +0 -14
  108. package/es/CheckGroupFixed/demo.d.ts +0 -3
  109. package/es/CheckGroupFixed/index.d.ts +0 -18
  110. package/es/Config/index.d.ts +0 -4
  111. package/es/Config/utils.d.ts +0 -4
  112. package/es/ConfigContext/index.d.ts +0 -22
  113. package/es/CustomRenderSelect/index.d.ts +0 -12
  114. package/es/DisableMark/index.d.ts +0 -9
  115. package/es/DomMove/demo.d.ts +0 -2
  116. package/es/DomMove/index.d.ts +0 -16
  117. package/es/DomMove/utils.d.ts +0 -8
  118. package/es/Drag/DragAndDropItem.d.ts +0 -4
  119. package/es/Drag/DropItem.d.ts +0 -4
  120. package/es/Drag/index.less +0 -0
  121. package/es/Drawer/Footer.d.ts +0 -5
  122. package/es/Drawer/demo.d.ts +0 -3
  123. package/es/Drawer/index.d.ts +0 -38
  124. package/es/DynamicGridList/Demo.d.ts +0 -3
  125. package/es/DynamicGridList/index.d.ts +0 -27
  126. package/es/DynamicList/demo.d.ts +0 -2
  127. package/es/DynamicList/index.d.ts +0 -31
  128. package/es/DynamicList/utils.d.ts +0 -4
  129. package/es/ErrorFallback/index.d.ts +0 -9
  130. package/es/FrontendPlayer/index.d.ts +0 -2
  131. package/es/FullScreen/index.d.ts +0 -22
  132. package/es/GridList/Demo.d.ts +0 -3
  133. package/es/GridList/data.d.ts +0 -16
  134. package/es/GridList/hook.d.ts +0 -13
  135. package/es/GridList/index.d.ts +0 -15
  136. package/es/GridList/utils.d.ts +0 -9
  137. package/es/HightLevel/index.d.ts +0 -9
  138. package/es/IconFont/index.d.ts +0 -12
  139. package/es/ImageView/index.d.ts +0 -17
  140. package/es/Input/demo.d.ts +0 -3
  141. package/es/Input/index.d.ts +0 -19
  142. package/es/InstanceHistory/index.d.ts +0 -3
  143. package/es/LabelValue/index.d.ts +0 -23
  144. package/es/List/demo.d.ts +0 -3
  145. package/es/List/index.d.ts +0 -41
  146. package/es/ListWithSizeAnimate/demo.d.ts +0 -2
  147. package/es/ListWithSizeAnimate/index.d.ts +0 -15
  148. package/es/LoaderApp/index.d.ts +0 -31
  149. package/es/LoaderApp/loader.d.ts +0 -19
  150. package/es/LoaderApp/sandbox.back.d.ts +0 -18
  151. package/es/LoaderApp/sandbox.d.ts +0 -12
  152. package/es/LoaderApp/utils.d.ts +0 -19
  153. package/es/LoaderScript/index.d.ts +0 -26
  154. package/es/LoaderScript/utils.d.ts +0 -14
  155. package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
  156. package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
  157. package/es/Map/BasicMap/index.d.ts +0 -9
  158. package/es/Map/ClusterLayer/hook.d.ts +0 -5
  159. package/es/Map/ClusterLayer/index.d.ts +0 -6
  160. package/es/Map/Config/index.d.ts +0 -7
  161. package/es/Map/Config/utils.d.ts +0 -2
  162. package/es/Map/Context/index.d.ts +0 -11
  163. package/es/Map/FindPio/index.d.ts +0 -4
  164. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
  165. package/es/Map/InfoWindow/demo.d.ts +0 -3
  166. package/es/Map/InfoWindow/index.d.ts +0 -10
  167. package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
  168. package/es/Map/LevelCenter/demo.d.ts +0 -3
  169. package/es/Map/LevelCenter/index.d.ts +0 -16
  170. package/es/Map/LevelCenter/index.less +0 -2
  171. package/es/Map/LoaderMap/index.d.ts +0 -12
  172. package/es/Map/MapDrawSelect/demo.d.ts +0 -3
  173. package/es/Map/MapDrawSelect/index.d.ts +0 -16
  174. package/es/Map/MapDrawSelect/index.less +0 -2
  175. package/es/Map/MouseTool/index.d.ts +0 -10
  176. package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
  177. package/es/Map/ResetTools/index.d.ts +0 -10
  178. package/es/Map/SinglePoint/index.d.ts +0 -27
  179. package/es/Map/hook/useMapEvent.d.ts +0 -2
  180. package/es/Map/hook/useMapType.d.ts +0 -4
  181. package/es/Map/icon.d.ts +0 -2
  182. package/es/Map/index.d.ts +0 -24
  183. package/es/Map/useMarker/index.d.ts +0 -11
  184. package/es/Map/useMarker/index.less +0 -0
  185. package/es/Map/withMap/index.d.ts +0 -3
  186. package/es/Modal/demo.d.ts +0 -3
  187. package/es/Modal/index.d.ts +0 -44
  188. package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
  189. package/es/Picture/component/DefaultRects/index.d.ts +0 -13
  190. package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
  191. package/es/Picture/component/DrawRect/index.d.ts +0 -13
  192. package/es/Picture/component/RectMenu/index.d.ts +0 -12
  193. package/es/Picture/component/RectMenu/utils.d.ts +0 -12
  194. package/es/Picture/component/Tools/index.d.ts +0 -13
  195. package/es/Picture/component/WheelScale/index.d.ts +0 -7
  196. package/es/Picture/demo.d.ts +0 -2
  197. package/es/Picture/dragBound.d.ts +0 -5
  198. package/es/Picture/index.d.ts +0 -19
  199. package/es/Picture/loadCaptureRectImage.d.ts +0 -8
  200. package/es/Picture/useDraw.d.ts +0 -1
  201. package/es/Picture/utils.d.ts +0 -21
  202. package/es/Player/api/index.d.ts +0 -68
  203. package/es/Player/context.d.ts +0 -21
  204. package/es/Player/contraller_bar/bar.d.ts +0 -8
  205. package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
  206. package/es/Player/contraller_bar/index.d.ts +0 -14
  207. package/es/Player/contraller_bar/left_bar.d.ts +0 -10
  208. package/es/Player/contraller_bar/right_bar.d.ts +0 -8
  209. package/es/Player/contraller_bar/time.d.ts +0 -3
  210. package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
  211. package/es/Player/contraller_bar/volume.d.ts +0 -9
  212. package/es/Player/demo.d.ts +0 -3
  213. package/es/Player/event/errorEvent.d.ts +0 -16
  214. package/es/Player/event/eventName.d.ts +0 -18
  215. package/es/Player/event/index.d.ts +0 -24
  216. package/es/Player/fps_play.d.ts +0 -11
  217. package/es/Player/frontend_player.d.ts +0 -8
  218. package/es/Player/frontend_timeline.d.ts +0 -10
  219. package/es/Player/iconfont.d.ts +0 -5
  220. package/es/Player/index.d.ts +0 -2
  221. package/es/Player/live_heart.d.ts +0 -8
  222. package/es/Player/message.d.ts +0 -5
  223. package/es/Player/segment_player.d.ts +0 -9
  224. package/es/Player/segment_timeline.d.ts +0 -12
  225. package/es/Player/single_player.d.ts +0 -5
  226. package/es/Player/timeline.d.ts +0 -5
  227. package/es/Player/util.d.ts +0 -28
  228. package/es/PlayerExt/demo.d.ts +0 -3
  229. package/es/PlayerExt/index.d.ts +0 -48
  230. package/es/ROI/demo.d.ts +0 -3
  231. package/es/ROI/index.d.ts +0 -39
  232. package/es/ROI/utils.d.ts +0 -1
  233. package/es/ScreenPlayer/Live.d.ts +0 -10
  234. package/es/ScreenPlayer/LiveTools.d.ts +0 -29
  235. package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
  236. package/es/ScreenPlayer/RatePick.d.ts +0 -7
  237. package/es/ScreenPlayer/Record.d.ts +0 -10
  238. package/es/ScreenPlayer/RecordTools.d.ts +0 -37
  239. package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
  240. package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
  241. package/es/ScreenPlayer/TimeMode.d.ts +0 -7
  242. package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
  243. package/es/ScreenPlayer/demo.d.ts +0 -2
  244. package/es/ScreenPlayer/demo2.d.ts +0 -2
  245. package/es/ScreenPlayer/index.d.ts +0 -6
  246. package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
  247. package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
  248. package/es/ScreenPlayer/utils.d.ts +0 -19
  249. package/es/SegmentPlayer/index.d.ts +0 -2
  250. package/es/Service/fetch-adapter.d.ts +0 -12
  251. package/es/Service/http.d.ts +0 -6
  252. package/es/Service/index.d.ts +0 -3
  253. package/es/Service/middleware.d.ts +0 -5
  254. package/es/TableLayout/index.d.ts +0 -13
  255. package/es/ThemeAntd/demo.d.ts +0 -4
  256. package/es/ThemeAntd/index.d.ts +0 -7
  257. package/es/Timeout/index.d.ts +0 -32
  258. package/es/Tree/demo.d.ts +0 -3
  259. package/es/Tree/index.d.ts +0 -24
  260. package/es/VList/utils.d.ts +0 -14
  261. package/es/index.d.ts +0 -52
  262. package/es/useDrawROI/index.d.ts +0 -16
  263. package/es/useEventEmitterHandle/index.d.ts +0 -2
  264. package/es/useFullscreen/demo.d.ts +0 -2
  265. package/es/useFullscreen/index.d.ts +0 -12
  266. package/es/useHistory/index.d.ts +0 -3
  267. package/es/useInfiniteScroll/index.d.ts +0 -16
  268. package/es/useRafInterval/index.d.ts +0 -5
  269. package/es/useSimpleState/index.d.ts +0 -3
  270. package/es/useVirtualList/index.d.ts +0 -13
  271. package/es/utils.d.ts +0 -25
@@ -1,75 +1,78 @@
1
1
  .slider-layout {
2
+ position: relative;
3
+ display: flex;
2
4
  width: 100%;
3
5
  height: 100%;
4
6
  user-select: none;
5
- display: flex;
6
7
  justify-content: center;
7
8
  align-items: center;
8
- position: relative;
9
+
9
10
  .slider-content {
11
+ position: relative;
10
12
  width: 100%;
11
13
  height: 2px;
12
- position: relative;
13
- transition: height 0.2s;
14
- cursor: pointer;
15
14
  overflow: hidden;
15
+ cursor: pointer;
16
+ transition: height .2s;
16
17
  }
18
+
17
19
  .slider-other-content {
18
- width: 100%;
19
- height: 2px;
20
20
  position: absolute;
21
- left: 0;
22
21
  top: 50%;
23
- transform: translateY(-50%);
24
- transition: height 0.2s;
25
- cursor: pointer;
22
+ left: 0;
26
23
  z-index: 9;
24
+ width: 100%;
25
+ height: 2px;
27
26
  pointer-events: none;
27
+ cursor: pointer;
28
+ transform: translateY(-50%);
29
+ transition: height .2s;
28
30
  }
29
31
 
30
32
  .slider-max-line {
31
- width: 100%;
32
- height: 100%;
33
- background-color: #000;
34
33
  position: absolute;
35
- left: 0;
36
34
  top: 0;
35
+ left: 0;
37
36
  z-index: 1;
37
+ width: 100%;
38
+ height: 100%;
39
+ background-color: #000;
38
40
  border-radius: 4px;
39
41
  }
42
+
40
43
  .slider-visibel-line {
41
44
  position: absolute;
42
- height: 100%;
43
- background: #5b7eac;
44
- width: 100%;
45
- height: 100%;
46
- left: 0;
47
45
  top: 0;
46
+ left: 0;
48
47
  z-index: 3;
48
+ width: 100%;
49
+ height: 100%;
49
50
  cursor: pointer;
51
+ background: #5b7eac;
50
52
  border-radius: 4px;
51
53
  }
54
+
52
55
  .slider-current-line {
53
56
  position: absolute;
54
- height: 100%;
55
- background-color: #ffaa00;
56
- width: 100%;
57
- height: 100%;
58
- left: 0;
59
57
  top: 0;
58
+ left: 0;
60
59
  z-index: 3;
60
+ width: 100%;
61
+ height: 100%;
62
+ background-color: #fa0;
61
63
  border-radius: 4px;
62
64
  }
65
+
63
66
  .drag-change-icon {
64
67
  position: absolute;
68
+ top: -3px;
65
69
  width: 6px;
66
70
  height: 6px;
67
- border-radius: 50%;
68
71
  margin-left: -3px;
69
- border: 1px solid #fff;
70
- background-color: #ffaa00;
71
- top: -3px;
72
72
  pointer-events: all;
73
+ background-color: #fa0;
74
+ border: 1px solid #fff;
75
+ border-radius: 50%;
73
76
  box-sizing: content-box;
74
77
  }
75
78
 
@@ -78,26 +81,26 @@
78
81
  .slider-other-content {
79
82
  height: 4px;
80
83
  }
84
+
81
85
  .drag-change-icon {
86
+ top: -4px;
82
87
  width: 10px;
83
88
  height: 10px;
84
- top: -4px;
85
89
  margin-left: -5px;
86
90
  }
87
91
  }
88
92
  }
89
93
 
90
94
  .lm-player-slide-tips {
91
- background: rgba(0, 0, 0, 0.6);
92
95
  position: absolute;
93
- left: 0;
94
96
  top: -26px;
95
- transform: translate(-50%,-100%);
97
+ left: 0;
98
+ z-index: 99;
99
+ padding: 2px 4px;
96
100
  font-size: 12px;
97
101
  color: #fff;
98
- border-radius: 4px;
99
- z-index: 6;
100
- padding: 2px 4px;
101
102
  white-space: nowrap;
102
- z-index: 99;
103
+ background: rgb(0 0 0 / 60%);
104
+ border-radius: 4px;
105
+ transform: translate(-50%,-100%);
103
106
  }
@@ -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
- background: rgba(0, 0, 0, 1);
8
- display: flex;
9
+ cursor: pointer;
10
+ background: rgb(0 0 0 / 100%);
11
+ opacity: .8;
9
12
  justify-content: center;
10
13
  align-items: center;
11
- z-index: 9;
12
- opacity: 0.8;
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
- display: flex;
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
- content: ' ';
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
- z-index: 6;
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
- background-color: #fff;
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
- background-color: #fff;
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
- line-height: 20px;
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
- justify-content: center;
7
- text-align: center;
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);
@@ -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
- return [state.currentTime, state.buffered, api.getDuration()];
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) {
@@ -1,9 +1,9 @@
1
1
  .lm-player-ext-layout {
2
- background-color: #000;
2
+ display: flex;
3
3
  width: 100%;
4
4
  height: 100%;
5
5
  color: #fff;
6
- display: flex;
6
+ background-color: #000;
7
7
  flex-direction: column;
8
8
  align-items: center;
9
9
  justify-content: center;
@@ -1,12 +1,9 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- interface IProgressComponentProps {
4
- status: 'over' | 'error' | 'loading';
1
+ import * as React from 'react';
2
+
3
+ export interface ProgressInterface {
4
+ status: 'over' | 'error' | 'loading';
5
5
  }
6
- declare function ProgressComponent({ status }: IProgressComponentProps): JSX.Element;
7
- declare namespace ProgressComponent {
8
- var defaultProps: {
9
- status: string;
10
- };
11
- }
12
- export default ProgressComponent;
6
+
7
+ declare const Progress: React.FunctionComponent<ProgressInterface>;
8
+
9
+ export default Progress;
@@ -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
- transition: opacity 1s linear;
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
  }