@cloud-app-dev/vidc 4.0.15 → 4.0.19

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 (424) hide show
  1. package/.dumirc.ts +54 -70
  2. package/.editorconfig +13 -13
  3. package/.eslintignore +6 -6
  4. package/.eslintrc.js +3 -3
  5. package/.fatherrc.ts +14 -15
  6. package/.hintrc +8 -8
  7. package/.husky/commit-msg +5 -5
  8. package/.husky/pre-commit +4 -4
  9. package/.prettierignore +8 -8
  10. package/.prettierrc.js +16 -16
  11. package/.stylelintrc.js +113 -113
  12. package/README.md +19 -19
  13. package/{icon-fix.js → icon-fix.mjs} +31 -31
  14. package/package.json +97 -96
  15. package/release-build.sh +48 -47
  16. package/scripts/entry.js +20 -20
  17. package/theme-config.ts +125 -125
  18. package/tsconfig.json +16 -16
  19. package/typings/global.d.ts +4 -4
  20. package/es/AppContext/Sync.d.ts +0 -8
  21. package/es/AppContext/Sync.js +0 -44
  22. package/es/AppContext/index.d.ts +0 -10
  23. package/es/AppContext/index.js +0 -144
  24. package/es/AppContext/interface.d.ts +0 -41
  25. package/es/AppContext/static.d.ts +0 -8
  26. package/es/AppContext/static.js +0 -9
  27. package/es/Auth/index.d.ts +0 -8
  28. package/es/Auth/index.js +0 -18
  29. package/es/AutoExit/index.d.ts +0 -6
  30. package/es/AutoExit/index.js +0 -23
  31. package/es/CheckGroupFixed/demo.d.ts +0 -3
  32. package/es/CheckGroupFixed/demo.js +0 -25
  33. package/es/CheckGroupFixed/index.d.ts +0 -18
  34. package/es/CheckGroupFixed/index.js +0 -150
  35. package/es/CheckGroupFixed/index.less +0 -53
  36. package/es/Config/index.d.ts +0 -4
  37. package/es/Config/index.js +0 -77
  38. package/es/Config/interface.d.ts +0 -65
  39. package/es/Config/utils.d.ts +0 -4
  40. package/es/Config/utils.js +0 -33
  41. package/es/ConfigContext/index.d.ts +0 -22
  42. package/es/ConfigContext/index.js +0 -25
  43. package/es/CustomRenderSelect/index.d.ts +0 -12
  44. package/es/CustomRenderSelect/index.js +0 -83
  45. package/es/CustomRenderSelect/index.less +0 -25
  46. package/es/DBTools/index.d.ts +0 -25
  47. package/es/DBTools/index.js +0 -337
  48. package/es/DisableMark/index.d.ts +0 -9
  49. package/es/DisableMark/index.js +0 -22
  50. package/es/DisableMark/index.less +0 -9
  51. package/es/DomMove/demo.d.ts +0 -2
  52. package/es/DomMove/demo.js +0 -20
  53. package/es/DomMove/index.d.ts +0 -16
  54. package/es/DomMove/index.js +0 -149
  55. package/es/DomMove/utils.d.ts +0 -8
  56. package/es/DomMove/utils.js +0 -33
  57. package/es/Drag/DragAndDropItem.d.ts +0 -4
  58. package/es/Drag/DragAndDropItem.js +0 -133
  59. package/es/Drag/DropItem.d.ts +0 -4
  60. package/es/Drag/DropItem.js +0 -50
  61. package/es/Drag/index.d.ts +0 -7
  62. package/es/Drag/index.js +0 -7
  63. package/es/Drag/interface.d.ts +0 -16
  64. package/es/DynamicGridList/Demo.d.ts +0 -3
  65. package/es/DynamicGridList/Demo.js +0 -86
  66. package/es/DynamicGridList/index.d.ts +0 -27
  67. package/es/DynamicGridList/index.js +0 -71
  68. package/es/DynamicList/demo.d.ts +0 -2
  69. package/es/DynamicList/demo.js +0 -50
  70. package/es/DynamicList/index.d.ts +0 -31
  71. package/es/DynamicList/index.js +0 -96
  72. package/es/DynamicList/index.less +0 -17
  73. package/es/DynamicList/interface.d.ts +0 -19
  74. package/es/DynamicList/utils.d.ts +0 -4
  75. package/es/DynamicList/utils.js +0 -6
  76. package/es/ErrorFallback/index.d.ts +0 -9
  77. package/es/ErrorFallback/index.js +0 -38
  78. package/es/ErrorFallback/inerface.d.ts +0 -48
  79. package/es/EventTools/index.d.ts +0 -3
  80. package/es/EventTools/index.js +0 -12
  81. package/es/FrontendPlayer/index.d.ts +0 -4
  82. package/es/FrontendPlayer/index.js +0 -2
  83. package/es/FullScreen/index.d.ts +0 -22
  84. package/es/FullScreen/index.js +0 -36
  85. package/es/FullScreen/index.less +0 -18
  86. package/es/GridList/Demo.d.ts +0 -3
  87. package/es/GridList/Demo.js +0 -89
  88. package/es/GridList/data.d.ts +0 -16
  89. package/es/GridList/data.js +0 -609
  90. package/es/GridList/hook.d.ts +0 -13
  91. package/es/GridList/hook.js +0 -270
  92. package/es/GridList/index.d.ts +0 -15
  93. package/es/GridList/index.js +0 -48
  94. package/es/GridList/index.less +0 -8
  95. package/es/GridList/interface.d.ts +0 -59
  96. package/es/GridList/utils.d.ts +0 -9
  97. package/es/GridList/utils.js +0 -42
  98. package/es/HightLevel/index.d.ts +0 -9
  99. package/es/HightLevel/index.js +0 -21
  100. package/es/HightLevel/index.less +0 -3
  101. package/es/IconFont/index.d.ts +0 -12
  102. package/es/IconFont/index.js +0 -63
  103. package/es/ImageView/index.d.ts +0 -17
  104. package/es/ImageView/index.js +0 -58
  105. package/es/ImageView/index.less +0 -11
  106. package/es/InstanceHistory/index.d.ts +0 -3
  107. package/es/InstanceHistory/index.js +0 -7
  108. package/es/LabelPlayer/111.png +0 -0
  109. package/es/LabelPlayer/demo.d.ts +0 -2
  110. package/es/LabelPlayer/demo.js +0 -123
  111. package/es/LabelPlayer/index.d.ts +0 -21
  112. package/es/LabelPlayer/index.js +0 -169
  113. package/es/LabelPlayer/index.less +0 -24
  114. package/es/LabelValue/index.d.ts +0 -15
  115. package/es/LabelValue/index.js +0 -32
  116. package/es/LabelValue/index.less +0 -23
  117. package/es/List/demo.d.ts +0 -3
  118. package/es/List/demo.js +0 -26
  119. package/es/List/index.d.ts +0 -28
  120. package/es/List/index.js +0 -30
  121. package/es/List/index.less +0 -13
  122. package/es/ListWithSizeAnimate/demo.d.ts +0 -2
  123. package/es/ListWithSizeAnimate/demo.js +0 -128
  124. package/es/ListWithSizeAnimate/index.d.ts +0 -14
  125. package/es/ListWithSizeAnimate/index.js +0 -97
  126. package/es/ListWithSizeAnimate/index.less +0 -23
  127. package/es/LoaderScript/index.d.ts +0 -47
  128. package/es/LoaderScript/index.js +0 -38
  129. package/es/LoaderScript/utils.d.ts +0 -13
  130. package/es/LoaderScript/utils.js +0 -179
  131. package/es/Map/AMap.d.ts +0 -7109
  132. package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
  133. package/es/Map/BasicMap/AMapInstance.js +0 -98
  134. package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
  135. package/es/Map/BasicMap/LeafletInstance.js +0 -111
  136. package/es/Map/BasicMap/index.d.ts +0 -9
  137. package/es/Map/BasicMap/index.js +0 -98
  138. package/es/Map/BasicMap/index.less +0 -29
  139. package/es/Map/ClusterLayer/demo.d.ts +0 -3
  140. package/es/Map/ClusterLayer/demo.js +0 -22
  141. package/es/Map/ClusterLayer/hook.d.ts +0 -5
  142. package/es/Map/ClusterLayer/hook.js +0 -124
  143. package/es/Map/ClusterLayer/index.d.ts +0 -6
  144. package/es/Map/ClusterLayer/index.js +0 -32
  145. package/es/Map/ClusterLayer/index.less +0 -29
  146. package/es/Map/ClusterLayer/props.d.ts +0 -8
  147. package/es/Map/Config/index.d.ts +0 -9
  148. package/es/Map/Config/index.js +0 -52
  149. package/es/Map/Config/utils.d.ts +0 -2
  150. package/es/Map/Config/utils.js +0 -65
  151. package/es/Map/Context/index.d.ts +0 -11
  152. package/es/Map/Context/index.js +0 -56
  153. package/es/Map/FindPio/index.d.ts +0 -4
  154. package/es/Map/FindPio/index.js +0 -14
  155. package/es/Map/FindPio/index.less +0 -7
  156. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
  157. package/es/Map/InfoWindow/MakerLikeWindow.js +0 -113
  158. package/es/Map/InfoWindow/demo.d.ts +0 -3
  159. package/es/Map/InfoWindow/demo.js +0 -76
  160. package/es/Map/InfoWindow/index.d.ts +0 -11
  161. package/es/Map/InfoWindow/index.js +0 -67
  162. package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
  163. package/es/Map/LevelCenter/DragMarker/index.js +0 -44
  164. package/es/Map/LevelCenter/demo.d.ts +0 -3
  165. package/es/Map/LevelCenter/demo.js +0 -46
  166. package/es/Map/LevelCenter/index.d.ts +0 -15
  167. package/es/Map/LevelCenter/index.js +0 -71
  168. package/es/Map/LoaderMap/index.d.ts +0 -12
  169. package/es/Map/LoaderMap/index.js +0 -71
  170. package/es/Map/MapDrawSelect/demo.d.ts +0 -3
  171. package/es/Map/MapDrawSelect/demo.js +0 -79
  172. package/es/Map/MapDrawSelect/index.d.ts +0 -15
  173. package/es/Map/MapDrawSelect/index.js +0 -62
  174. package/es/Map/MouseTool/index.d.ts +0 -10
  175. package/es/Map/MouseTool/index.js +0 -44
  176. package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
  177. package/es/Map/MouseTool/useMouseTools.js +0 -83
  178. package/es/Map/ResetTools/index.d.ts +0 -10
  179. package/es/Map/ResetTools/index.js +0 -67
  180. package/es/Map/ResetTools/index.less +0 -39
  181. package/es/Map/SinglePoint/demo.d.ts +0 -3
  182. package/es/Map/SinglePoint/demo.js +0 -16
  183. package/es/Map/SinglePoint/index.d.ts +0 -27
  184. package/es/Map/SinglePoint/index.js +0 -57
  185. package/es/Map/SinglePoint/index.less +0 -41
  186. package/es/Map/hook/useMapEvent.d.ts +0 -2
  187. package/es/Map/hook/useMapEvent.js +0 -19
  188. package/es/Map/hook/useMapType.d.ts +0 -4
  189. package/es/Map/hook/useMapType.js +0 -12
  190. package/es/Map/icon.d.ts +0 -2
  191. package/es/Map/icon.js +0 -10
  192. package/es/Map/index.d.ts +0 -24
  193. package/es/Map/index.js +0 -25
  194. package/es/Map/interface.d.ts +0 -74
  195. package/es/Map/points.d.ts +0 -74
  196. package/es/Map/points.js +0 -1
  197. package/es/Map/useMarker/index.d.ts +0 -10
  198. package/es/Map/useMarker/index.js +0 -71
  199. package/es/Map/withMap/index.d.ts +0 -3
  200. package/es/Map/withMap/index.js +0 -18
  201. package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
  202. package/es/Picture/component/DefaultRects/RectInfo.js +0 -88
  203. package/es/Picture/component/DefaultRects/index.d.ts +0 -13
  204. package/es/Picture/component/DefaultRects/index.js +0 -58
  205. package/es/Picture/component/DefaultRects/index.less +0 -211
  206. package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
  207. package/es/Picture/component/DefaultRects/utils.js +0 -11
  208. package/es/Picture/component/DrawRect/index.d.ts +0 -13
  209. package/es/Picture/component/DrawRect/index.js +0 -51
  210. package/es/Picture/component/DrawRect/index.less +0 -8
  211. package/es/Picture/component/RectMenu/index.d.ts +0 -12
  212. package/es/Picture/component/RectMenu/index.js +0 -79
  213. package/es/Picture/component/RectMenu/index.less +0 -36
  214. package/es/Picture/component/RectMenu/utils.d.ts +0 -12
  215. package/es/Picture/component/RectMenu/utils.js +0 -19
  216. package/es/Picture/component/Tools/index.d.ts +0 -12
  217. package/es/Picture/component/Tools/index.js +0 -93
  218. package/es/Picture/component/Tools/index.less +0 -49
  219. package/es/Picture/component/WheelScale/index.d.ts +0 -7
  220. package/es/Picture/component/WheelScale/index.js +0 -29
  221. package/es/Picture/demo.d.ts +0 -2
  222. package/es/Picture/demo.js +0 -114
  223. package/es/Picture/index.d.ts +0 -19
  224. package/es/Picture/index.js +0 -354
  225. package/es/Picture/index.less +0 -20
  226. package/es/Picture/interface.d.ts +0 -196
  227. package/es/Picture/loadCaptureRectImage.d.ts +0 -3
  228. package/es/Picture/loadCaptureRectImage.js +0 -99
  229. package/es/Picture/useDraw.d.ts +0 -1
  230. package/es/Picture/useDraw.js +0 -103
  231. package/es/Picture/utils.d.ts +0 -26
  232. package/es/Picture/utils.js +0 -143
  233. package/es/Player/api/index.d.ts +0 -68
  234. package/es/Player/api/index.js +0 -283
  235. package/es/Player/context.d.ts +0 -21
  236. package/es/Player/context.js +0 -25
  237. package/es/Player/contraller_bar/bar.d.ts +0 -8
  238. package/es/Player/contraller_bar/bar.js +0 -28
  239. package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
  240. package/es/Player/contraller_bar/contraller_event.js +0 -53
  241. package/es/Player/contraller_bar/index.d.ts +0 -14
  242. package/es/Player/contraller_bar/index.js +0 -33
  243. package/es/Player/contraller_bar/left_bar.d.ts +0 -10
  244. package/es/Player/contraller_bar/left_bar.js +0 -88
  245. package/es/Player/contraller_bar/right_bar.d.ts +0 -8
  246. package/es/Player/contraller_bar/right_bar.js +0 -37
  247. package/es/Player/contraller_bar/time.d.ts +0 -3
  248. package/es/Player/contraller_bar/time.js +0 -21
  249. package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
  250. package/es/Player/contraller_bar/useBarStatus.js +0 -43
  251. package/es/Player/contraller_bar/volume.d.ts +0 -9
  252. package/es/Player/contraller_bar/volume.js +0 -65
  253. package/es/Player/demo.d.ts +0 -3
  254. package/es/Player/demo.js +0 -277
  255. package/es/Player/empty.d.ts +0 -2
  256. package/es/Player/empty.js +0 -6
  257. package/es/Player/event/errorEvent.d.ts +0 -14
  258. package/es/Player/event/errorEvent.js +0 -88
  259. package/es/Player/event/eventName.d.ts +0 -18
  260. package/es/Player/event/eventName.js +0 -30
  261. package/es/Player/event/index.d.ts +0 -24
  262. package/es/Player/event/index.js +0 -204
  263. package/es/Player/fps_play.d.ts +0 -11
  264. package/es/Player/fps_play.js +0 -84
  265. package/es/Player/frontend_player.d.ts +0 -8
  266. package/es/Player/frontend_player.js +0 -72
  267. package/es/Player/frontend_timeline.d.ts +0 -10
  268. package/es/Player/frontend_timeline.js +0 -145
  269. package/es/Player/iconfont.d.ts +0 -5
  270. package/es/Player/iconfont.js +0 -22
  271. package/es/Player/index.d.ts +0 -2
  272. package/es/Player/index.js +0 -2
  273. package/es/Player/live_heart.d.ts +0 -8
  274. package/es/Player/live_heart.js +0 -46
  275. package/es/Player/message.d.ts +0 -5
  276. package/es/Player/message.js +0 -138
  277. package/es/Player/player.d.ts +0 -231
  278. package/es/Player/segment_player.d.ts +0 -9
  279. package/es/Player/segment_player.js +0 -230
  280. package/es/Player/segment_timeline.d.ts +0 -12
  281. package/es/Player/segment_timeline.js +0 -190
  282. package/es/Player/single_player.d.ts +0 -5
  283. package/es/Player/single_player.js +0 -275
  284. package/es/Player/style/bar.less +0 -43
  285. package/es/Player/style/iconfont.js +0 -43
  286. package/es/Player/style/index.less +0 -34
  287. package/es/Player/style/message.less +0 -56
  288. package/es/Player/style/slider.less +0 -106
  289. package/es/Player/style/timeline.less +0 -116
  290. package/es/Player/style/volume.less +0 -24
  291. package/es/Player/timeline.d.ts +0 -5
  292. package/es/Player/timeline.js +0 -98
  293. package/es/Player/util.d.ts +0 -43
  294. package/es/Player/util.js +0 -189
  295. package/es/PlayerExt/demo.d.ts +0 -3
  296. package/es/PlayerExt/demo.js +0 -170
  297. package/es/PlayerExt/index.d.ts +0 -48
  298. package/es/PlayerExt/index.js +0 -207
  299. package/es/PlayerExt/index.less +0 -10
  300. package/es/Progress/index.d.ts +0 -12
  301. package/es/Progress/index.js +0 -56
  302. package/es/Progress/index.less +0 -21
  303. package/es/ROI/demo.d.ts +0 -3
  304. package/es/ROI/demo.js +0 -18
  305. package/es/ROI/index.d.ts +0 -33
  306. package/es/ROI/index.js +0 -57
  307. package/es/ROI/index.less +0 -33
  308. package/es/RefDrawer/Footer.d.ts +0 -9
  309. package/es/RefDrawer/Footer.js +0 -27
  310. package/es/RefDrawer/demo.d.ts +0 -3
  311. package/es/RefDrawer/demo.js +0 -32
  312. package/es/RefDrawer/index.d.ts +0 -26
  313. package/es/RefDrawer/index.js +0 -73
  314. package/es/RefModal/demo.d.ts +0 -3
  315. package/es/RefModal/demo.js +0 -32
  316. package/es/RefModal/index.d.ts +0 -17
  317. package/es/RefModal/index.js +0 -71
  318. package/es/ScreenPlayer/Live.d.ts +0 -10
  319. package/es/ScreenPlayer/Live.js +0 -220
  320. package/es/ScreenPlayer/LiveTools.d.ts +0 -29
  321. package/es/ScreenPlayer/LiveTools.js +0 -167
  322. package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
  323. package/es/ScreenPlayer/PlayerWithExt.js +0 -240
  324. package/es/ScreenPlayer/RatePick.d.ts +0 -8
  325. package/es/ScreenPlayer/RatePick.js +0 -30
  326. package/es/ScreenPlayer/Record.d.ts +0 -10
  327. package/es/ScreenPlayer/Record.js +0 -447
  328. package/es/ScreenPlayer/RecordTools.d.ts +0 -38
  329. package/es/ScreenPlayer/RecordTools.js +0 -216
  330. package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
  331. package/es/ScreenPlayer/ScreenSelect.js +0 -51
  332. package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
  333. package/es/ScreenPlayer/SegmentTimeLine.js +0 -38
  334. package/es/ScreenPlayer/TimeMode.d.ts +0 -7
  335. package/es/ScreenPlayer/TimeMode.js +0 -30
  336. package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
  337. package/es/ScreenPlayer/TimeSelect.js +0 -94
  338. package/es/ScreenPlayer/demo.d.ts +0 -2
  339. package/es/ScreenPlayer/demo.js +0 -24
  340. package/es/ScreenPlayer/demo2.d.ts +0 -2
  341. package/es/ScreenPlayer/demo2.js +0 -200
  342. package/es/ScreenPlayer/index.d.ts +0 -6
  343. package/es/ScreenPlayer/index.js +0 -9
  344. package/es/ScreenPlayer/index.less +0 -335
  345. package/es/ScreenPlayer/interface.d.ts +0 -216
  346. package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
  347. package/es/ScreenPlayer/useTimeSlider.js +0 -450
  348. package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
  349. package/es/ScreenPlayer/useVideoFit.js +0 -35
  350. package/es/ScreenPlayer/utils.d.ts +0 -17
  351. package/es/ScreenPlayer/utils.js +0 -85
  352. package/es/SegmentPlayer/index.d.ts +0 -2
  353. package/es/SegmentPlayer/index.js +0 -2
  354. package/es/Service/http.d.ts +0 -6
  355. package/es/Service/http.js +0 -125
  356. package/es/Service/index.d.ts +0 -3
  357. package/es/Service/index.js +0 -10
  358. package/es/Service/interface.d.ts +0 -22
  359. package/es/Service/middleware.d.ts +0 -5
  360. package/es/Service/middleware.js +0 -15
  361. package/es/SocketEmitter/eventEmitter.d.ts +0 -27
  362. package/es/SocketEmitter/eventEmitter.js +0 -88
  363. package/es/SocketEmitter/index.d.ts +0 -24
  364. package/es/SocketEmitter/index.js +0 -125
  365. package/es/SocketEmitter/interface.d.ts +0 -4
  366. package/es/TableLayout/index.d.ts +0 -10
  367. package/es/TableLayout/index.js +0 -29
  368. package/es/TableLayout/index.less +0 -4
  369. package/es/ThemeAntd/demo.d.ts +0 -4
  370. package/es/ThemeAntd/demo.js +0 -129
  371. package/es/ThemeAntd/demo.less +0 -20
  372. package/es/ThemeAntd/index.d.ts +0 -7
  373. package/es/ThemeAntd/index.js +0 -23
  374. package/es/ThemeAntd/index.less +0 -4
  375. package/es/Timeout/index.d.ts +0 -32
  376. package/es/Timeout/index.js +0 -70
  377. package/es/VList/index.d.ts +0 -11
  378. package/es/VList/index.js +0 -42
  379. package/es/VList/index.less +0 -6
  380. package/es/VList/utils.d.ts +0 -14
  381. package/es/VList/utils.js +0 -17
  382. package/es/bigNumberTransformCN/index.d.ts +0 -5
  383. package/es/bigNumberTransformCN/index.js +0 -60
  384. package/es/cache/index.d.ts +0 -34
  385. package/es/cache/index.js +0 -94
  386. package/es/copy/index.d.ts +0 -1
  387. package/es/copy/index.js +0 -9
  388. package/es/core.d.ts +0 -0
  389. package/es/getThemeStyle/index.d.ts +0 -2
  390. package/es/getThemeStyle/index.js +0 -5
  391. package/es/index.d.ts +0 -60
  392. package/es/index.js +0 -60
  393. package/es/logger/index.d.ts +0 -7
  394. package/es/logger/index.js +0 -30
  395. package/es/nextTick/index.d.ts +0 -1
  396. package/es/nextTick/index.js +0 -7
  397. package/es/submidstr/index.d.ts +0 -5
  398. package/es/submidstr/index.js +0 -14
  399. package/es/treeHelper/index.d.ts +0 -11
  400. package/es/treeHelper/index.js +0 -189
  401. package/es/typings.d.ts +0 -2
  402. package/es/useDrawROI/index.d.ts +0 -16
  403. package/es/useDrawROI/index.js +0 -322
  404. package/es/useEventEmitterHandle/index.d.ts +0 -2
  405. package/es/useEventEmitterHandle/index.js +0 -17
  406. package/es/useFullscreen/demo.d.ts +0 -2
  407. package/es/useFullscreen/demo.js +0 -48
  408. package/es/useFullscreen/index.d.ts +0 -12
  409. package/es/useFullscreen/index.js +0 -76
  410. package/es/useHistory/index.d.ts +0 -3
  411. package/es/useHistory/index.js +0 -9
  412. package/es/useHistory/interface.d.ts +0 -3
  413. package/es/useInfiniteScroll/index.d.ts +0 -16
  414. package/es/useInfiniteScroll/index.js +0 -101
  415. package/es/useRafInterval/index.d.ts +0 -5
  416. package/es/useRafInterval/index.js +0 -70
  417. package/es/useSimpleState/index.d.ts +0 -3
  418. package/es/useSimpleState/index.js +0 -36
  419. package/es/useVirtualList/index.d.ts +0 -13
  420. package/es/useVirtualList/index.js +0 -139
  421. package/es/utils.d.ts +0 -14
  422. package/es/utils.js +0 -75
  423. package/es/uuid/index.d.ts +0 -4
  424. package/es/uuid/index.js +0 -15
package/es/Player/util.js DELETED
@@ -1,189 +0,0 @@
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
- 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, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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; }
3
- 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); } }
4
- 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); }); }; }
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; }
6
- 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; }
7
- 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; }
8
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
- 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
- import Flvjs from '@cloud-app-dev/mpegts.js';
11
- import Hls from 'hls.js';
12
- import { likeGo } from "../utils";
13
- import Events from "./event/eventName";
14
- /**
15
- * 创建HLS对象
16
- * @param {*} video
17
- * @param {*} URL
18
- */
19
- export function createHlsPlayer(video, url, isLive, hlsConfig) {
20
- if (!Hls.isSupported() || !url) {
21
- return undefined;
22
- }
23
- var player = new Hls(_objectSpread({
24
- liveDurationInfinity: isLive,
25
- enableWorker: true
26
- }, hlsConfig));
27
- player.loadSource(url);
28
- player.attachMedia(video);
29
- return player;
30
- }
31
-
32
- /**
33
- * 创建FLV对象
34
- * @param {*} video
35
- * @param {*} options
36
- */
37
- export function createFlvPlayer(video, url, isLive, flvConfig) {
38
- if (!Flvjs.isSupported() || !url) {
39
- return undefined;
40
- }
41
- Flvjs.LoggingControl.enableDebug = false;
42
- Flvjs.LoggingControl.enableVerbose = false;
43
- Flvjs.LoggingControl.enableWarn = false;
44
- var mediaDataSource = _objectSpread({
45
- type: 'flv',
46
- url: url
47
- }, flvConfig === null || flvConfig === void 0 ? void 0 : flvConfig.mediaDataSource);
48
- var config = _objectSpread({
49
- enableWorker: true,
50
- isLive: isLive !== null && isLive !== void 0 ? isLive : true,
51
- enableStashBuffer: !isLive
52
- }, flvConfig === null || flvConfig === void 0 ? void 0 : flvConfig.config);
53
- var player = Flvjs.createPlayer(mediaDataSource, config);
54
- player.attachMediaElement(video);
55
- player.load();
56
- return player;
57
- }
58
-
59
- /**
60
- * video unload
61
- * @param video
62
- * @param flv
63
- * @param hls
64
- * @returns
65
- */
66
- export var playUnload = function playUnload(video, flv, hls) {
67
- if (!video) {
68
- return;
69
- }
70
- video.pause();
71
- if (flv) {
72
- flv.unload();
73
- return;
74
- }
75
- if (hls) {
76
- hls.stopLoad();
77
- return;
78
- }
79
- video.removeAttribute('src');
80
- };
81
-
82
- /**
83
- * reload
84
- * @param video
85
- * @param event
86
- * @param flv
87
- * @param hls
88
- * @param url
89
- */
90
- export var playReload = function playReload(video, event, flv, hls, url) {
91
- if (!video || !event) {
92
- return undefined;
93
- }
94
- playUnload(video, flv, hls);
95
- if (flv) {
96
- likeGo( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
97
- return _regeneratorRuntime().wrap(function _callee$(_context) {
98
- while (1) switch (_context.prev = _context.next) {
99
- case 0:
100
- flv.load();
101
- flv.play();
102
- case 2:
103
- case "end":
104
- return _context.stop();
105
- }
106
- }, _callee);
107
- })));
108
- }
109
- if (hls && url) {
110
- likeGo( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
111
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
112
- while (1) switch (_context2.prev = _context2.next) {
113
- case 0:
114
- hls.swapAudioCodec();
115
- hls.recoverMediaError();
116
- hls.startLoad();
117
- hls.loadSource(url);
118
- video.play();
119
- case 5:
120
- case "end":
121
- return _context2.stop();
122
- }
123
- }, _callee2);
124
- })));
125
- }
126
- if (!flv && !hls && url) {
127
- video.setAttribute('src', url);
128
- likeGo( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
129
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
130
- while (1) switch (_context3.prev = _context3.next) {
131
- case 0:
132
- return _context3.abrupt("return", video.play());
133
- case 1:
134
- case "end":
135
- return _context3.stop();
136
- }
137
- }, _callee3);
138
- })));
139
- }
140
- event.emit(Events.RELOAD);
141
- };
142
-
143
- /**
144
- * 获取播放文件类型
145
- * @param {*} url
146
- */
147
- export function getVideoType(url) {
148
- if (!url) {
149
- return 'native';
150
- }
151
- return url.indexOf('.flv') > -1 ? 'flv' : url.indexOf('.m3u8') > -1 ? 'hls' : 'native';
152
- }
153
- export function timeStamp(second) {
154
- // 转换为式分秒
155
- var h = Math.round(second / 60 / 60 % 24);
156
- var m = second < 60 ? 0 : Math.round(second / 60 % 60);
157
- var s = Math.round(second % 60);
158
- if (h === 0) {
159
- return "".concat(m < 10 ? '0' + m : m, ":").concat(s < 10 ? '0' + s : s);
160
- }
161
- return "".concat(h < 10 ? '0' + h : h, ":").concat(m < 10 ? '0' + m : m, ":").concat(s < 10 ? '0' + s : s);
162
- }
163
- export function getRandom() {
164
- return Math.random().toString(36).substring(2);
165
- }
166
- export var FMT = 'YYYY-MM-DD HH:mm:ss';
167
- export function getDomStyleValue(dom, styleKey) {
168
- if (!dom) {
169
- return '';
170
- }
171
- return window.getComputedStyle(dom).getPropertyValue(styleKey);
172
- }
173
- export function createProxy(obj, getObj) {
174
- var handler = {
175
- get: function get(target, key, recevier) {
176
- if (_typeof(target[key]) === 'object') {
177
- createProxy(target[key]);
178
- }
179
- if (getObj && getObj[key]) {
180
- return Reflect.get(getObj, key);
181
- }
182
- return Reflect.get(target, key, recevier);
183
- },
184
- set: function set(target, key, value) {
185
- return Reflect.set(target, key, value);
186
- }
187
- };
188
- return new Proxy(obj, handler);
189
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const App: () => JSX.Element;
3
- export default App;
@@ -1,170 +0,0 @@
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
- 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; }
3
- 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; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- 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); }
7
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
- 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."); }
9
- 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); }
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
- 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
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState } from 'react';
14
- import { Button, ConfigProvider, Select, Input } from 'antd';
15
- import Player from "../Player/single_player";
16
- import ExtModel from "./index";
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- var options = [{
20
- value: '',
21
- label: '自动'
22
- }, {
23
- value: 'flv',
24
- label: 'FLV'
25
- }, {
26
- value: 'hls',
27
- label: 'HLS'
28
- }];
29
- var options2 = [{
30
- value: 1,
31
- label: '直播'
32
- }, {
33
- value: 0,
34
- label: '录像'
35
- }];
36
- //http://192.168.101.162:14088/flv/live/1853e2a5c3308bd62/2.flv?device_id=&channel_id=1853e2a5c3308bd62&stream_index=2&ip=0
37
- function Demo() {
38
- var _useState = useState({
39
- type: undefined,
40
- isLive: 1,
41
- url: '',
42
- tempUrl: '',
43
- mode: 1
44
- }),
45
- _useState2 = _slicedToArray(_useState, 2),
46
- state = _useState2[0],
47
- setState = _useState2[1];
48
- return /*#__PURE__*/_jsxs("div", {
49
- style: {
50
- width: '100%',
51
- height: 800
52
- },
53
- children: [/*#__PURE__*/_jsx("h3", {
54
- children: "\u63D2\u4EF6\u89C6\u9891\u64AD\u653E"
55
- }), /*#__PURE__*/_jsxs("div", {
56
- style: {
57
- marginBottom: 10,
58
- display: 'flex'
59
- },
60
- children: [/*#__PURE__*/_jsx(Select, {
61
- value: state.type || '',
62
- onChange: function onChange(val) {
63
- return setState(function (old) {
64
- return _objectSpread(_objectSpread({}, old), {}, {
65
- type: val
66
- });
67
- });
68
- },
69
- children: options.map(function (v) {
70
- return /*#__PURE__*/_jsx(Select.Option, {
71
- value: v.value,
72
- children: v.label
73
- }, v.label);
74
- })
75
- }), /*#__PURE__*/_jsx(Input, {
76
- style: {
77
- flex: 1,
78
- height: 32
79
- },
80
- type: "text",
81
- placeholder: "\u8BF7\u8F93\u5165\u89C6\u9891\u5730\u5740",
82
- onChange: function onChange(e) {
83
- return setState(function (old) {
84
- return _objectSpread(_objectSpread({}, old), {}, {
85
- tempUrl: e.target.value
86
- });
87
- });
88
- }
89
- }), /*#__PURE__*/_jsx(Select, {
90
- value: state.isLive,
91
- onChange: function onChange(val) {
92
- return setState(function (old) {
93
- return _objectSpread(_objectSpread({}, old), {}, {
94
- isLive: val
95
- });
96
- });
97
- },
98
- children: options2.map(function (v) {
99
- return /*#__PURE__*/_jsx(Select.Option, {
100
- value: v.value,
101
- children: v.label
102
- }, v.label);
103
- })
104
- }), /*#__PURE__*/_jsxs(Select, {
105
- value: state.mode,
106
- onChange: function onChange(val) {
107
- return setState(function (old) {
108
- return _objectSpread(_objectSpread({}, old), {}, {
109
- mode: val
110
- });
111
- });
112
- },
113
- children: [/*#__PURE__*/_jsx(Select.Option, {
114
- value: 1,
115
- children: "\u6D4F\u89C8\u5668\u6A21\u5F0F"
116
- }), /*#__PURE__*/_jsx(Select.Option, {
117
- value: 2,
118
- children: "\u63D2\u4EF6\u6A21\u5F0F"
119
- })]
120
- }), /*#__PURE__*/_jsx(Button, {
121
- style: {
122
- width: 60,
123
- height: 32
124
- },
125
- onClick: function onClick(e) {
126
- return setState(function (old) {
127
- return _objectSpread(_objectSpread({}, old), {}, {
128
- url: ''
129
- });
130
- });
131
- },
132
- children: "\u5173\u95ED"
133
- }), /*#__PURE__*/_jsx(Button, {
134
- style: {
135
- width: 60,
136
- height: 32
137
- },
138
- onClick: function onClick(e) {
139
- return setState(function (old) {
140
- return _objectSpread(_objectSpread({}, old), {}, {
141
- url: state.tempUrl
142
- });
143
- });
144
- },
145
- children: "\u64AD\u653E"
146
- })]
147
- }), /*#__PURE__*/_jsx("div", {
148
- style: {
149
- height: 600
150
- },
151
- children: /*#__PURE__*/_jsx(ExtModel, {
152
- url: state.url,
153
- mode: state.mode,
154
- pluginDownloadUrl: "http://192.168.101.162:19999/plugins/ZVPlayer.exe",
155
- children: /*#__PURE__*/_jsx(Player, {
156
- type: state.type,
157
- url: state.url,
158
- isLive: !!state.isLive
159
- })
160
- })
161
- })]
162
- });
163
- }
164
- var App = function App() {
165
- return /*#__PURE__*/_jsx(ConfigProvider, {
166
- prefixCls: "cloudapp",
167
- children: /*#__PURE__*/_jsx(Demo, {})
168
- });
169
- };
170
- export default App;
@@ -1,48 +0,0 @@
1
- /// <reference types="react" />
2
- import { ISegmentType } from 'src/Player/player';
3
- import './index.less';
4
- export declare type PlayModeType = 1 | 2;
5
- export interface IPluginProps {
6
- url?: string;
7
- children: JSX.Element;
8
- /**
9
- * @description 模式1浏览器模式,2插件模式
10
- * @default 1
11
- */
12
- mode?: PlayModeType;
13
- /**
14
- * @description 插件下载地址
15
- */
16
- pluginDownloadUrl?: string;
17
- /**
18
- * @description 插件模式下传递的参数 ’&’开头
19
- * @default ''
20
- */
21
- pluginParams?: string;
22
- segments?: ISegmentType[];
23
- /**
24
- * 正在获取视频数据
25
- */
26
- loading?: boolean;
27
- }
28
- /**
29
- * 客户端插件模式,随机端口
30
- */
31
- export declare const LOCAL_PORT: string[];
32
- /**
33
- * 随机获取端口号
34
- * @returns
35
- */
36
- export declare function getLocalPort(): string;
37
- /**
38
- * @desc 转码插件模式下的url
39
- * @param url
40
- * @param params
41
- * @returns
42
- */
43
- export declare function getLocalPlayPath(url: string, params?: string): string;
44
- export declare function usePlugin(mode?: PlayModeType, key?: any): {
45
- needInstall: boolean;
46
- };
47
- export declare function ExtModel({ url, children, mode, pluginDownloadUrl, pluginParams, loading, segments }: IPluginProps): JSX.Element;
48
- export { ExtModel as default };
@@ -1,207 +0,0 @@
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
- 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; }
3
- 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; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- 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); }
7
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
- 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."); }
9
- 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); }
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
- 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
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useEffect, useMemo, useState } from 'react';
14
- import IconFont from "../Player/iconfont";
15
- import "./index.less";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- /**
19
- * 客户端插件模式,随机端口
20
- */
21
- export var LOCAL_PORT = ['15080', '15081', '15082', '15083', '15084', '15085', '15086', '15087', '15088', '15089'];
22
-
23
- /**
24
- * 随机获取端口号
25
- * @returns
26
- */
27
- export function getLocalPort() {
28
- return LOCAL_PORT[Math.floor(Math.random() * LOCAL_PORT.length)];
29
- }
30
-
31
- /**
32
- * @desc 转码插件模式下的url
33
- * @param url
34
- * @param params
35
- * @returns
36
- */
37
- export function getLocalPlayPath(url) {
38
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
39
- var URL_TEMPLATE = "http://127.0.0.1:<port>/video/v1/transcoding?uri=<pull_uri>";
40
- var port = getLocalPort();
41
- var pull_uri = window.btoa(url).replace(/=/g, '').replace(/\//, '_').replace('+', '-');
42
- return URL_TEMPLATE.replace('<port>', port).replace('<pull_uri>', pull_uri) + params;
43
- }
44
- export function usePlugin(mode, key) {
45
- var _useState = useState({
46
- installed: false
47
- }),
48
- _useState2 = _slicedToArray(_useState, 2),
49
- state = _useState2[0],
50
- setState = _useState2[1];
51
- useEffect(function () {
52
- if (mode !== 2) {
53
- return undefined;
54
- }
55
- var port = getLocalPort();
56
- var url = "http://127.0.0.1:".concat(port, "/video/v1/state");
57
- var thenFn = function thenFn(res) {
58
- return res.status === 200 ? setState({
59
- installed: true
60
- }) : undefined;
61
- };
62
- fetch(url).then(thenFn).catch(function (e) {
63
- return console.error('插件未安装', e);
64
- });
65
- }, [mode, key]);
66
- return {
67
- needInstall: useMemo(function () {
68
- return mode === 2 && !state.installed;
69
- }, [state.installed, mode])
70
- };
71
- }
72
- function NeedInstallPlugin(_ref) {
73
- var pluginDownloadUrl = _ref.pluginDownloadUrl,
74
- retry = _ref.retry;
75
- return /*#__PURE__*/_jsx("div", {
76
- className: "lm-player-ext-layout",
77
- children: /*#__PURE__*/_jsxs("div", {
78
- style: {
79
- marginTop: -60,
80
- textAlign: 'center'
81
- },
82
- children: [/*#__PURE__*/_jsx("div", {
83
- children: /*#__PURE__*/_jsx(IconFont, {
84
- type: "lm-player-PlaySource",
85
- style: {
86
- fontSize: 66
87
- }
88
- })
89
- }), /*#__PURE__*/_jsxs("div", {
90
- children: [/*#__PURE__*/_jsxs("span", {
91
- children: ["\u8BF7", /*#__PURE__*/_jsx("a", {
92
- target: "_blank",
93
- href: pluginDownloadUrl,
94
- style: {
95
- textDecoration: 'none',
96
- padding: '0 4px'
97
- },
98
- download: "PlayerPlugin.exe",
99
- rel: "noopener noreferrer",
100
- children: "\u4E0B\u8F7D"
101
- }), "\u64AD\u653E\u63D2\u4EF6\uFF0C"]
102
- }), /*#__PURE__*/_jsxs("span", {
103
- children: ["\u82E5\u5DF2\u5B89\u88C5\u8BF7\u70B9\u51FB", /*#__PURE__*/_jsx("a", {
104
- style: {
105
- padding: '0 4px'
106
- },
107
- onClick: retry,
108
- children: "\u91CD\u8BD5"
109
- })]
110
- })]
111
- })]
112
- })
113
- });
114
- }
115
- function Loading() {
116
- return /*#__PURE__*/_jsx("div", {
117
- className: "lm-player-ext-layout",
118
- children: /*#__PURE__*/_jsxs("div", {
119
- style: {
120
- marginTop: -60,
121
- textAlign: 'center'
122
- },
123
- children: [/*#__PURE__*/_jsx("div", {
124
- children: /*#__PURE__*/_jsx(IconFont, {
125
- type: "lm-player-PlaySource",
126
- style: {
127
- fontSize: 66
128
- }
129
- })
130
- }), /*#__PURE__*/_jsx("div", {
131
- children: "\u6B63\u5728\u83B7\u53D6\u89C6\u9891\u6570\u636E\uFF0C\u8BF7\u7A0D\u7B49..."
132
- })]
133
- })
134
- });
135
- }
136
- function Empty() {
137
- return /*#__PURE__*/_jsx("div", {
138
- className: "lm-player-ext-layout",
139
- children: /*#__PURE__*/_jsx(IconFont, {
140
- type: "lm-player-PlaySource",
141
- style: {
142
- fontSize: 66
143
- }
144
- })
145
- });
146
- }
147
- export function ExtModel(_ref2) {
148
- var url = _ref2.url,
149
- children = _ref2.children,
150
- mode = _ref2.mode,
151
- pluginDownloadUrl = _ref2.pluginDownloadUrl,
152
- pluginParams = _ref2.pluginParams,
153
- loading = _ref2.loading,
154
- segments = _ref2.segments;
155
- var _useState3 = useState({
156
- forceKey: Date.now()
157
- }),
158
- _useState4 = _slicedToArray(_useState3, 2),
159
- state = _useState4[0],
160
- setState = _useState4[1];
161
- var hasUrl = useMemo(function () {
162
- return !!url || Array.isArray(segments) && segments.findIndex(function (v) {
163
- return v.url;
164
- }) > -1;
165
- }, [segments, url]);
166
- var _usePlugin = usePlugin(mode, state.forceKey),
167
- needInstall = _usePlugin.needInstall;
168
-
169
- // eslint-disable-next-line react-hooks/exhaustive-deps
170
- var playUrl = useMemo(function () {
171
- return mode === 2 && url ? getLocalPlayPath(url, pluginParams) : url;
172
- }, [url, mode]);
173
- // eslint-disable-next-line react-hooks/exhaustive-deps
174
- var playSegments = useMemo(function () {
175
- return mode === 2 && segments ? segments.map(function (v) {
176
- return _objectSpread(_objectSpread({}, v), {}, {
177
- url: v.url ? getLocalPlayPath(v.url, pluginParams) : undefined
178
- });
179
- }) : segments;
180
- }, [segments, mode]);
181
- if (needInstall) {
182
- return /*#__PURE__*/_jsx(NeedInstallPlugin, {
183
- pluginDownloadUrl: pluginDownloadUrl,
184
- retry: function retry() {
185
- return setState(function (old) {
186
- return _objectSpread(_objectSpread({}, old), {}, {
187
- forceKey: Date.now()
188
- });
189
- });
190
- }
191
- });
192
- }
193
- if (loading) {
194
- return /*#__PURE__*/_jsx(Loading, {});
195
- }
196
- if (!hasUrl) {
197
- return /*#__PURE__*/_jsx(Empty, {});
198
- }
199
- return /*#__PURE__*/_jsx("div", {
200
- className: "lm-player-ext-layout",
201
- children: /*#__PURE__*/React.cloneElement(children, mode === 2 ? {
202
- url: playUrl,
203
- segments: playSegments
204
- } : {})
205
- });
206
- }
207
- export { ExtModel as default };
@@ -1,10 +0,0 @@
1
- .lm-player-ext-layout {
2
- display: flex;
3
- width: 100%;
4
- height: 100%;
5
- color: #fff;
6
- background-color: #000;
7
- flex-direction: column;
8
- align-items: center;
9
- justify-content: center;
10
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- interface IProgressComponentProps {
4
- status: 'over' | 'error' | 'loading';
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;