@cloud-app-dev/vidc 3.2.10 → 3.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dumi/tmp/core/EmptyRoute.tsx +9 -0
- package/.dumi/tmp/core/defineApp.ts +16 -0
- package/.dumi/tmp/core/history.ts +61 -0
- package/.dumi/tmp/core/plugin.ts +42 -0
- package/.dumi/tmp/core/pluginConfig.d.ts +276 -0
- package/.dumi/tmp/core/polyfill.ts +202 -0
- package/.dumi/tmp/core/route.tsx +38 -0
- package/.dumi/tmp/core/terminal.ts +38 -0
- package/.dumi/tmp/dumi/exports.ts +5 -0
- package/.dumi/tmp/dumi/locales/config.ts +56 -0
- package/.dumi/tmp/dumi/locales/runtime.tsx +38 -0
- package/.dumi/tmp/dumi/meta/atoms.ts +4 -0
- package/.dumi/tmp/dumi/meta/index.ts +186 -0
- package/.dumi/tmp/dumi/meta/runtime.ts +18 -0
- package/.dumi/tmp/dumi/meta/tabs.ts +8 -0
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +41 -0
- package/.dumi/tmp/dumi/theme/builtins/API.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Badge.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Container.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Table.ts +4 -0
- package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Content.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Features.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Footer.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Header.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Hero.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Logo.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Navbar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/NotFound.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Toc.ts +4 -0
- package/.dumi/tmp/exports.ts +15 -0
- package/.dumi/tmp/testBrowser.tsx +82 -0
- package/.dumi/tmp/tsconfig.json +35 -0
- package/.dumi/tmp/typings.d.ts +136 -0
- package/.dumi/tmp/umi.ts +77 -0
- package/.dumi/tmp-production/core/EmptyRoute.tsx +9 -0
- package/.dumi/tmp-production/core/defineApp.ts +16 -0
- package/.dumi/tmp-production/core/history.ts +61 -0
- package/.dumi/tmp-production/core/plugin.ts +42 -0
- package/.dumi/tmp-production/core/pluginConfig.d.ts +276 -0
- package/.dumi/tmp-production/core/polyfill.ts +202 -0
- package/.dumi/tmp-production/core/route.tsx +38 -0
- package/.dumi/tmp-production/core/terminal.ts +38 -0
- package/.dumi/tmp-production/dumi/exports.ts +5 -0
- package/.dumi/tmp-production/dumi/locales/config.ts +56 -0
- package/.dumi/tmp-production/dumi/locales/runtime.tsx +38 -0
- package/.dumi/tmp-production/dumi/meta/atoms.ts +4 -0
- package/.dumi/tmp-production/dumi/meta/index.ts +178 -0
- package/.dumi/tmp-production/dumi/meta/runtime.ts +18 -0
- package/.dumi/tmp-production/dumi/meta/tabs.ts +5 -0
- package/.dumi/tmp-production/dumi/theme/ContextWrapper.tsx +41 -0
- package/.dumi/tmp-production/dumi/theme/builtins/API.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Badge.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Container.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Previewer.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/SourceCode.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Table.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/layouts/DocLayout.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Content.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/ContentTabs.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Features.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Footer.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Header.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Hero.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/HeroTitle.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/LangSwitch.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Logo.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Navbar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/NotFound.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActions.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/RtlSwitch.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/SearchBar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/SearchResult.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Sidebar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Toc.ts +4 -0
- package/.dumi/tmp-production/exports.ts +14 -0
- package/.dumi/tmp-production/testBrowser.tsx +82 -0
- package/.dumi/tmp-production/tsconfig.json +35 -0
- package/.dumi/tmp-production/typings.d.ts +136 -0
- package/.dumi/tmp-production/umi.ts +77 -0
- package/.dumirc.ts +71 -0
- package/.editorconfig +0 -3
- package/.eslintrc.js +3 -0
- package/.fatherrc.ts +19 -0
- package/.husky/commit-msg +5 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.js +16 -0
- package/.stylelintrc +3 -0
- package/README.md +14 -26
- package/es/Api/index.js +100 -30
- package/es/AppContext/Sync.js +19 -3
- package/es/AppContext/index.js +86 -42
- package/es/AppContext/static.js +7 -0
- package/es/Auth/index.js +11 -4
- package/es/AutoExit/index.js +11 -3
- package/es/Box/BetweenBox/index.js +19 -10
- package/es/Box/BetweenBox/{index.css → index.less} +0 -0
- package/es/Box/InfoBox/index.js +24 -18
- package/es/Box/InfoBox/index.less +22 -0
- package/es/Box/TwoColumnBox/index.js +42 -25
- package/es/Box/TwoColumnBox/index.less +70 -0
- package/es/Box/deps/grid-factory.d.ts +2 -2
- package/es/Box/deps/grid-factory.js +12 -0
- package/es/Box/index.js +29 -16
- package/es/Box/{index.css → index.less} +5 -4
- package/es/CheckGroupFixed/demo.d.ts +3 -0
- package/es/CheckGroupFixed/demo.js +28 -0
- package/es/CheckGroupFixed/index.js +117 -82
- package/es/CheckGroupFixed/index.less +50 -0
- package/es/Config/index.js +5 -1
- package/es/Config/utils.js +18 -3
- package/es/ConfigContext/index.js +8 -4
- package/es/CustomRenderSelect/index.js +71 -36
- package/es/CustomRenderSelect/index.less +25 -0
- package/es/DisableMark/index.js +14 -11
- package/es/DisableMark/{index.css → index.less} +0 -0
- package/es/DomMove/demo.js +14 -10
- package/es/DomMove/index.js +52 -30
- package/es/DomMove/utils.js +8 -3
- package/es/Drag/DragAndDropItem.js +44 -20
- package/es/Drag/DropItem.js +22 -6
- package/es/Drag/index.js +2 -2
- package/es/Drag/{index.css → index.less} +0 -0
- package/es/Drawer/Footer.js +22 -15
- package/es/Drawer/{Demo.d.ts → demo.d.ts} +0 -0
- package/es/Drawer/demo.js +109 -0
- package/es/Drawer/index.js +98 -60
- package/es/Drawer/index.less +42 -0
- package/es/ErrorFallback/index.js +23 -14
- package/es/FrontendPlayer/index.js +1 -1
- package/es/FullScreen/index.js +30 -17
- package/es/FullScreen/index.less +16 -0
- package/es/HightLevel/index.js +11 -4
- package/es/HightLevel/{index.css → index.less} +0 -0
- package/es/IconFont/index.js +39 -18
- package/es/ImageView/index.js +37 -13
- package/es/ImageView/index.less +10 -0
- package/es/Input/demo.d.ts +3 -0
- package/es/Input/demo.js +16 -0
- package/es/Input/index.js +46 -22
- package/es/Input/index.less +12 -0
- package/es/InstanceHistory/index.js +2 -0
- package/es/LabelValue/index.js +25 -18
- package/es/LabelValue/index.less +20 -0
- package/es/List/DynamicGridList/Demo.d.ts +1 -0
- package/es/List/DynamicGridList/Demo.js +52 -32
- package/es/List/DynamicGridList/index.js +37 -22
- package/es/List/DynamicList/index.js +76 -56
- package/es/List/DynamicList/index.less +15 -0
- package/es/List/GridList/Demo.d.ts +1 -0
- package/es/List/GridList/Demo.js +60 -38
- package/es/List/GridList/hook.d.ts +1 -1
- package/es/List/GridList/hook.js +66 -35
- package/es/List/GridList/index.js +33 -29
- package/es/List/GridList/{index.css → index.less} +0 -0
- package/es/List/GridList/utils.d.ts +2 -2
- package/es/List/GridList/utils.js +1 -0
- package/es/List/VList/index.d.ts +1 -1
- package/es/List/VList/index.js +32 -19
- package/es/List/VList/{index.css → index.less} +0 -0
- package/es/List/VList/utils.d.ts +2 -2
- package/es/List/VList/utils.js +8 -6
- package/es/List/demo.d.ts +3 -0
- package/es/List/demo.js +26 -0
- package/es/List/index.d.ts +1 -1
- package/es/List/index.js +31 -23
- package/es/List/{index.css → index.less} +5 -4
- package/es/LoaderApp/index.js +59 -25
- package/es/LoaderApp/{index.css → index.less} +0 -0
- package/es/LoaderApp/loader.js +40 -23
- package/es/LoaderApp/sandbox.back.js +101 -24
- package/es/LoaderApp/sandbox.js +26 -9
- package/es/LoaderApp/utils.d.ts +1 -1
- package/es/LoaderApp/utils.js +68 -25
- package/es/LoaderScript/index.js +25 -10
- package/es/LoaderScript/utils.js +151 -87
- package/es/Map/BasicMap/AMapInstance.d.ts +1 -1
- package/es/Map/BasicMap/AMapInstance.js +25 -3
- package/es/Map/BasicMap/LeafletInstance.js +28 -11
- package/es/Map/BasicMap/index.js +67 -27
- package/es/Map/BasicMap/index.less +24 -0
- package/es/Map/ClusterLayer/hook.d.ts +2 -2
- package/es/Map/ClusterLayer/hook.js +51 -23
- package/es/Map/ClusterLayer/index.d.ts +1 -1
- package/es/Map/ClusterLayer/index.js +14 -6
- package/es/Map/ClusterLayer/index.less +27 -0
- package/es/Map/Config/index.js +44 -16
- package/es/Map/Config/utils.js +17 -3
- package/es/Map/Context/index.js +43 -9
- package/es/Map/FindPio/index.js +5 -2
- package/es/Map/FindPio/{index.css → index.less} +0 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +1 -1
- package/es/Map/InfoWindow/MakerLikeWindow.js +41 -18
- package/es/Map/InfoWindow/demo.d.ts +1 -0
- package/es/Map/InfoWindow/demo.js +51 -29
- package/es/Map/InfoWindow/index.d.ts +1 -1
- package/es/Map/InfoWindow/index.js +39 -18
- package/es/Map/LevelCenter/DragMarker/index.js +16 -10
- package/es/Map/LevelCenter/demo.d.ts +1 -0
- package/es/Map/LevelCenter/demo.js +41 -22
- package/es/Map/LevelCenter/index.js +41 -29
- package/es/Map/LevelCenter/index.less +2 -0
- package/es/Map/LoaderMap/index.js +38 -22
- package/es/Map/MapDrawSelect/demo.d.ts +1 -0
- package/es/Map/MapDrawSelect/demo.js +65 -46
- package/es/Map/MapDrawSelect/index.js +43 -31
- package/es/Map/MapDrawSelect/index.less +2 -0
- package/es/Map/MouseTool/index.js +32 -18
- package/es/Map/MouseTool/useMouseTools.js +37 -8
- package/es/Map/ResetTools/index.js +58 -44
- package/es/Map/ResetTools/index.less +35 -0
- package/es/Map/SinglePoint/index.js +39 -27
- package/es/Map/SinglePoint/index.less +41 -0
- package/es/Map/hook/useMapEvent.js +8 -4
- package/es/Map/hook/useMapType.js +3 -2
- package/es/Map/index.d.ts +1 -0
- package/es/Map/index.js +11 -11
- package/es/Map/useMarker/index.d.ts +1 -1
- package/es/Map/useMarker/index.js +33 -13
- package/es/Map/{LevelCenter/index.css → useMarker/index.less} +0 -0
- package/es/Map/withMap/index.d.ts +1 -0
- package/es/Map/withMap/index.js +14 -4
- package/es/Modal/demo.d.ts +3 -0
- package/es/Modal/demo.js +106 -0
- package/es/Modal/index.js +94 -57
- package/es/Modal/index.less +45 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +59 -37
- package/es/Picture/component/DefaultRects/index.js +46 -32
- package/es/Picture/component/DefaultRects/index.less +188 -0
- package/es/Picture/component/DrawRect/index.js +37 -24
- package/es/Picture/component/DrawRect/{index.css → index.less} +0 -0
- package/es/Picture/component/RectMenu/index.js +35 -26
- package/es/Picture/component/RectMenu/index.less +31 -0
- package/es/Picture/component/RectMenu/utils.js +6 -3
- package/es/Picture/component/Tools/index.js +91 -69
- package/es/Picture/component/Tools/index.less +43 -0
- package/es/Picture/component/WheelScale/index.js +9 -4
- package/es/Picture/demo.js +14 -11
- package/es/Picture/dragBound.d.ts +1 -1
- package/es/Picture/dragBound.js +17 -4
- package/es/Picture/index.d.ts +2 -2
- package/es/Picture/index.js +202 -139
- package/es/Picture/index.less +14 -0
- package/es/Picture/loadCaptureRectImage.d.ts +1 -1
- package/es/Picture/loadCaptureRectImage.js +39 -14
- package/es/Picture/useDraw.js +40 -20
- package/es/Picture/utils.d.ts +9 -9
- package/es/Picture/utils.js +18 -3
- package/es/Player/api/index.d.ts +3 -3
- package/es/Player/api/index.js +117 -82
- package/es/Player/context.js +21 -7
- package/es/Player/contraller_bar/bar.d.ts +1 -1
- package/es/Player/contraller_bar/bar.js +28 -10
- package/es/Player/contraller_bar/contraller_event.js +34 -12
- package/es/Player/contraller_bar/index.js +30 -22
- package/es/Player/contraller_bar/left_bar.js +62 -39
- package/es/Player/contraller_bar/right_bar.js +34 -18
- package/es/Player/contraller_bar/time.js +19 -8
- package/es/Player/contraller_bar/useBarStatus.js +29 -11
- package/es/Player/contraller_bar/volume.js +43 -21
- package/es/Player/demo.d.ts +1 -0
- package/es/Player/demo.js +258 -215
- package/es/Player/event/errorEvent.js +41 -16
- package/es/Player/event/eventName.js +12 -1
- package/es/Player/event/index.js +66 -24
- package/es/Player/fps_play.js +33 -15
- package/es/Player/frontend_player.js +42 -20
- package/es/Player/frontend_timeline.js +95 -55
- package/es/Player/iconfont.js +23 -8
- package/es/Player/index.js +1 -1
- package/es/Player/live_heart.js +15 -3
- package/es/Player/message.js +68 -37
- package/es/Player/segment_player.js +113 -62
- package/es/Player/segment_timeline.js +145 -97
- package/es/Player/single_player.js +153 -111
- package/es/Player/style/bar.less +39 -0
- package/es/Player/style/iconfont.js +17 -10
- package/es/Player/style/index.less +30 -0
- package/es/Player/style/message.less +50 -0
- package/es/Player/style/slider.less +103 -0
- package/es/Player/style/timeline.less +106 -0
- package/es/Player/style/volume.less +21 -0
- package/es/Player/timeline.d.ts +1 -1
- package/es/Player/timeline.js +59 -32
- package/es/Player/util.js +46 -7
- package/es/PlayerExt/demo.d.ts +1 -0
- package/es/PlayerExt/demo.js +145 -112
- package/es/PlayerExt/index.d.ts +1 -1
- package/es/PlayerExt/index.js +135 -82
- package/es/PlayerExt/{index.css → index.less} +0 -0
- package/es/Progress/index.js +18 -5
- package/es/Progress/index.less +20 -0
- package/es/ROI/demo.d.ts +1 -0
- package/es/ROI/demo.js +12 -8
- package/es/ROI/index.js +45 -35
- package/es/ROI/index.less +29 -0
- package/es/ScreenPlayer/Live.d.ts +1 -1
- package/es/ScreenPlayer/Live.js +159 -103
- package/es/ScreenPlayer/LiveTools.js +153 -116
- package/es/ScreenPlayer/PlayerWithExt.js +168 -113
- package/es/ScreenPlayer/RatePick.js +35 -22
- package/es/ScreenPlayer/Record.js +291 -185
- package/es/ScreenPlayer/RecordTools.js +192 -148
- package/es/ScreenPlayer/ScreenSelect.js +33 -26
- package/es/ScreenPlayer/SegmentTimeLine.js +23 -16
- package/es/ScreenPlayer/TimeMode.js +22 -16
- package/es/ScreenPlayer/TimeSelect.js +84 -63
- package/es/ScreenPlayer/demo.js +16 -18
- package/es/ScreenPlayer/demo2.js +192 -177
- package/es/ScreenPlayer/index.d.ts +1 -0
- package/es/ScreenPlayer/index.js +3 -3
- package/es/ScreenPlayer/index.less +178 -0
- package/es/ScreenPlayer/useTimeSlider.js +148 -49
- package/es/ScreenPlayer/useVideoFit.js +18 -5
- package/es/ScreenPlayer/utils.js +6 -0
- package/es/SegmentPlayer/index.js +1 -1
- package/es/Service/fetch-adapter.d.ts +1 -1
- package/es/Service/fetch-adapter.js +48 -5
- package/es/Service/http.js +46 -16
- package/es/Service/index.js +2 -2
- package/es/TableLayout/index.js +18 -12
- package/es/TableLayout/{index.css → index.less} +0 -0
- package/es/ThemeAntd/demo.d.ts +1 -0
- package/es/ThemeAntd/demo.js +126 -76
- package/es/ThemeAntd/{demo.css → demo.less} +4 -3
- package/es/ThemeAntd/index.js +6 -2
- package/es/ThemeAntd/index.less +16 -0
- package/es/ThemeAntd/style/button.less +67 -0
- package/es/ThemeAntd/style/checkbox.less +72 -0
- package/es/ThemeAntd/style/form.less +12 -0
- package/es/ThemeAntd/style/input.less +83 -0
- package/es/ThemeAntd/style/pagination.less +95 -0
- package/es/ThemeAntd/style/picker.less +106 -0
- package/es/ThemeAntd/style/popover.less +5 -0
- package/es/ThemeAntd/style/radio.less +87 -0
- package/es/ThemeAntd/style/{scrollbar.css → scrollbar.less} +4 -2
- package/es/ThemeAntd/style/select.less +81 -0
- package/es/ThemeAntd/style/table.less +57 -0
- package/es/ThemeAntd/style/tree.less +18 -0
- package/es/Timeout/index.js +36 -12
- package/es/Tree/demo.js +26 -21
- package/es/Tree/index.js +51 -30
- package/es/Tree/index.less +59 -0
- package/es/index.js +47 -47
- package/es/useDrawROI/index.js +130 -65
- package/es/useEventEmitterHandle/index.js +6 -2
- package/es/useFullscreen/demo.js +44 -27
- package/es/useFullscreen/index.js +30 -8
- package/es/useHistory/index.js +3 -1
- package/es/useInfiniteScroll/index.js +50 -19
- package/es/useRafInterval/index.js +28 -4
- package/es/useSimpleState/index.js +23 -6
- package/es/useVirtualList/index.js +58 -20
- package/es/utils.d.ts +1 -1
- package/es/utils.js +53 -14
- package/package.json +42 -32
- package/tsconfig.json +8 -32
- package/.eslintrc +0 -4
- package/.fatherrc.js +0 -25
- package/.prettierrc +0 -11
- package/.umirc.ts +0 -55
- package/es/Box/InfoBox/index.css +0 -22
- package/es/Box/TwoColumnBox/index.css +0 -70
- package/es/CheckGroupFixed/index.css +0 -49
- package/es/CustomRenderSelect/index.css +0 -20
- package/es/Drawer/Demo.js +0 -59
- package/es/Drawer/index.css +0 -40
- package/es/FullScreen/index.css +0 -16
- package/es/ImageView/index.css +0 -10
- package/es/Input/index.css +0 -8
- package/es/LabelValue/index.css +0 -18
- package/es/List/DynamicList/index.css +0 -15
- package/es/Map/BasicMap/index.css +0 -24
- package/es/Map/ClusterLayer/index.css +0 -26
- package/es/Map/MapDrawSelect/index.css +0 -0
- package/es/Map/ResetTools/index.css +0 -32
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/index.css +0 -29
- package/es/Map/useMarker/index.css +0 -0
- package/es/Modal/index.css +0 -43
- package/es/Picture/component/DefaultRects/index.css +0 -247
- package/es/Picture/component/RectMenu/index.css +0 -31
- package/es/Picture/component/Tools/index.css +0 -42
- package/es/Picture/index.css +0 -12
- package/es/Player/style/bar.css +0 -38
- package/es/Player/style/index.css +0 -30
- package/es/Player/style/message.css +0 -49
- package/es/Player/style/slider.css +0 -96
- package/es/Player/style/timeline.css +0 -99
- package/es/Player/style/volume.css +0 -19
- package/es/Progress/index.css +0 -20
- package/es/ROI/index.css +0 -29
- package/es/ScreenPlayer/index.css +0 -166
- package/es/ThemeAntd/index.css +0 -620
- package/es/ThemeAntd/style/button.css +0 -55
- package/es/ThemeAntd/style/checkbox.css +0 -64
- package/es/ThemeAntd/style/form.css +0 -10
- package/es/ThemeAntd/style/input.css +0 -68
- package/es/ThemeAntd/style/pagination.css +0 -82
- package/es/ThemeAntd/style/picker.css +0 -98
- package/es/ThemeAntd/style/popover.css +0 -3
- package/es/ThemeAntd/style/radio.css +0 -80
- package/es/ThemeAntd/style/select.css +0 -76
- package/es/ThemeAntd/style/table.css +0 -46
- package/es/ThemeAntd/style/tree.css +0 -16
- package/es/Tree/index.css +0 -64
|
@@ -1,125 +1,165 @@
|
|
|
1
1
|
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
2
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
|
|
3
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
|
|
4
13
|
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); }
|
|
14
|
+
|
|
5
15
|
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; }
|
|
16
|
+
|
|
6
17
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
+
|
|
7
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
|
|
8
21
|
import React, { useMemo, useState, startTransition } from 'react';
|
|
9
|
-
import useBarStatus from
|
|
10
|
-
import { useTimes } from
|
|
11
|
-
import { FMT } from
|
|
22
|
+
import useBarStatus from "./contraller_bar/useBarStatus";
|
|
23
|
+
import { useTimes } from "./timeline";
|
|
24
|
+
import { FMT } from "./util";
|
|
12
25
|
import moment from 'moment';
|
|
13
|
-
import "./style/timeline.
|
|
26
|
+
import "./style/timeline.less";
|
|
27
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
|
|
14
30
|
function FrontendTimeLine(_ref) {
|
|
15
31
|
var duration = _ref.duration,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
begin = _ref.begin,
|
|
33
|
+
end = _ref.end,
|
|
34
|
+
onSeek = _ref.onSeek;
|
|
35
|
+
|
|
19
36
|
// time 是记录seek时跳了多少
|
|
20
37
|
var _useState = useState({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//获取视频当前播放时长单位s
|
|
38
|
+
time: 0,
|
|
39
|
+
markTime: 0,
|
|
40
|
+
left: -1,
|
|
41
|
+
visible: false
|
|
42
|
+
}),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
state = _useState2[0],
|
|
45
|
+
setState = _useState2[1];
|
|
46
|
+
|
|
47
|
+
var status = useBarStatus(); //获取视频当前播放时长单位s
|
|
48
|
+
|
|
31
49
|
var _useTimes = useTimes(),
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
_useTimes2 = _slicedToArray(_useTimes, 1),
|
|
51
|
+
currentTime = _useTimes2[0];
|
|
52
|
+
|
|
34
53
|
var rTime = useMemo(function () {
|
|
35
54
|
return state.time + currentTime;
|
|
36
55
|
}, [state.time, currentTime]);
|
|
56
|
+
|
|
37
57
|
_useUpdateEffect(function () {
|
|
38
58
|
return setState(function (old) {
|
|
39
|
-
return
|
|
59
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
40
60
|
time: 0
|
|
41
61
|
});
|
|
42
62
|
});
|
|
43
63
|
}, [begin]);
|
|
64
|
+
|
|
44
65
|
var playPercent = useMemo(function () {
|
|
45
66
|
return rTime / duration * 100;
|
|
46
67
|
}, [duration, rTime]);
|
|
47
68
|
var cTime = useMemo(function () {
|
|
48
69
|
return begin + rTime * 1000;
|
|
49
70
|
}, [begin, rTime]);
|
|
71
|
+
|
|
50
72
|
var seekWithLine = function seekWithLine(e) {
|
|
51
73
|
var rect = e.currentTarget.getBoundingClientRect();
|
|
52
74
|
var current = e.pageX - rect.left;
|
|
53
75
|
var cTime = current / rect.width * duration;
|
|
54
|
-
onSeek === null || onSeek === void 0 ? void 0 : onSeek(begin + cTime * 1000);
|
|
55
|
-
|
|
76
|
+
onSeek === null || onSeek === void 0 ? void 0 : onSeek(begin + cTime * 1000); //时间轴进度条rTime是要加上currentTime,这里要减去一下,包装交互一致性
|
|
77
|
+
|
|
56
78
|
setState(function (old) {
|
|
57
|
-
return
|
|
79
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
58
80
|
time: cTime
|
|
59
81
|
});
|
|
60
82
|
});
|
|
61
83
|
};
|
|
84
|
+
|
|
62
85
|
var onLineMouseOver = function onLineMouseOver(e) {
|
|
63
86
|
var rect = e.currentTarget.getBoundingClientRect();
|
|
64
87
|
var left = e.pageX - rect.left;
|
|
65
88
|
var mTime = left / rect.width * duration;
|
|
66
89
|
setState(function (old) {
|
|
67
|
-
return
|
|
90
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
68
91
|
left: left,
|
|
69
92
|
markTime: begin + mTime * 1000
|
|
70
93
|
});
|
|
71
94
|
});
|
|
72
95
|
};
|
|
96
|
+
|
|
73
97
|
var onLineMouseOut = function onLineMouseOut(e) {
|
|
74
98
|
return startTransition(function () {
|
|
75
99
|
return setState(function (old) {
|
|
76
|
-
return
|
|
100
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
77
101
|
left: -1
|
|
78
102
|
});
|
|
79
103
|
});
|
|
80
104
|
});
|
|
81
105
|
};
|
|
82
|
-
|
|
106
|
+
|
|
107
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
83
108
|
className: "player-timeline-layout frontend-player-timeline-layout ".concat(status === 0 ? 'hide-time-line' : ''),
|
|
84
109
|
onClick: seekWithLine,
|
|
85
110
|
onMouseMove: onLineMouseOver,
|
|
86
|
-
onMouseOut: onLineMouseOut
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
onMouseOut: onLineMouseOut,
|
|
112
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
113
|
+
className: "current-line",
|
|
114
|
+
style: {
|
|
115
|
+
width: "".concat(playPercent, "%")
|
|
116
|
+
}
|
|
117
|
+
}), /*#__PURE__*/_jsx(TipTitle, {
|
|
118
|
+
end: end,
|
|
119
|
+
begin: begin,
|
|
120
|
+
left: state.left,
|
|
121
|
+
current: cTime,
|
|
122
|
+
markTime: state.markTime
|
|
123
|
+
}), state.left !== -1 && /*#__PURE__*/_jsx("span", {
|
|
124
|
+
className: "frontend-line-mark",
|
|
125
|
+
style: {
|
|
126
|
+
left: state.left
|
|
127
|
+
}
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
104
130
|
}
|
|
131
|
+
|
|
105
132
|
function TipTitle(_ref2) {
|
|
106
133
|
var end = _ref2.end,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
134
|
+
begin = _ref2.begin,
|
|
135
|
+
left = _ref2.left,
|
|
136
|
+
current = _ref2.current,
|
|
137
|
+
markTime = _ref2.markTime;
|
|
138
|
+
|
|
111
139
|
if (left === -1) {
|
|
112
140
|
return null;
|
|
113
141
|
}
|
|
114
|
-
|
|
142
|
+
|
|
143
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
115
144
|
className: "frontend-line-tip-box",
|
|
116
145
|
style: {
|
|
117
146
|
left: left
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
147
|
+
},
|
|
148
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
149
|
+
style: {
|
|
150
|
+
fontWeight: 600
|
|
151
|
+
},
|
|
152
|
+
children: "\u5F55\u50CF\u4FE1\u606F"
|
|
153
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
154
|
+
children: ["\u5F00\u59CB\uFF1A", moment(begin).format(FMT)]
|
|
155
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
156
|
+
children: ["\u7ED3\u675F\uFF1A", moment(end).format(FMT)]
|
|
157
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
158
|
+
children: ["\u523B\u5EA6\uFF1A", moment(markTime).format(FMT)]
|
|
159
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
160
|
+
children: ["\u5F53\u524D\uFF1A", moment(current).format(FMT)]
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
124
163
|
}
|
|
164
|
+
|
|
125
165
|
export default FrontendTimeLine;
|
package/es/Player/iconfont.js
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["className"];
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
|
|
2
13
|
import React from 'react';
|
|
3
|
-
import Icon from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
import Icon from "../IconFont";
|
|
15
|
+
import "./style/iconfont.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
|
|
18
|
+
function IconFont(_ref) {
|
|
19
|
+
var _ref$className = _ref.className,
|
|
20
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
|
|
23
|
+
return /*#__PURE__*/_jsx(Icon, _objectSpread({
|
|
10
24
|
className: "lm-player-iconfont ".concat(className)
|
|
11
25
|
}, props));
|
|
12
26
|
}
|
|
27
|
+
|
|
13
28
|
export default IconFont;
|
package/es/Player/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import SinglePlayer from
|
|
1
|
+
import SinglePlayer from "./single_player";
|
|
2
2
|
export default SinglePlayer;
|
package/es/Player/live_heart.js
CHANGED
|
@@ -2,39 +2,51 @@ import _useRafInterval from "ahooks/es/useRafInterval";
|
|
|
2
2
|
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
3
3
|
import _useDocumentVisibility from "ahooks/es/useDocumentVisibility";
|
|
4
4
|
import { useRef } from 'react';
|
|
5
|
-
import Events from
|
|
5
|
+
import Events from "./event/eventName";
|
|
6
|
+
|
|
6
7
|
function useLiveHeart(_ref) {
|
|
7
8
|
var api = _ref.api,
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
event = _ref.event,
|
|
10
|
+
isLive = _ref.isLive;
|
|
11
|
+
|
|
10
12
|
var documentVisibility = _useDocumentVisibility();
|
|
13
|
+
|
|
11
14
|
var cTimeRef = useRef(null);
|
|
15
|
+
|
|
12
16
|
var run = function run() {
|
|
13
17
|
if (!isLive || documentVisibility !== 'visible') {
|
|
14
18
|
return;
|
|
15
19
|
}
|
|
20
|
+
|
|
16
21
|
var current = api.getCurrentTime();
|
|
17
22
|
var buffered = api.getSecondsLoaded();
|
|
23
|
+
|
|
18
24
|
if (buffered - current > 5) {
|
|
19
25
|
console.debug("\u5F53\u524D\u5EF6\u65F6\u8FC7\u5927current->".concat(current, " buffered->").concat(buffered, ", \u57FA\u4E8E\u89C6\u9891\u5F53\u524D\u7F13\u5B58\u65F6\u95F4\u66F4\u65B0\u5F53\u524D\u64AD\u653E\u65F6\u95F4 updateTime -> ").concat(buffered - 2));
|
|
20
26
|
api.seekTo(buffered - 2 > 0 ? buffered - 2 : 0);
|
|
21
27
|
api.play();
|
|
22
28
|
}
|
|
23
29
|
};
|
|
30
|
+
|
|
24
31
|
_useUpdateEffect(function () {
|
|
25
32
|
return run();
|
|
26
33
|
}, [documentVisibility]);
|
|
34
|
+
|
|
27
35
|
_useRafInterval(function () {
|
|
28
36
|
return cTimeRef.current = api.getCurrentTime();
|
|
29
37
|
}, 1 * 1000);
|
|
38
|
+
|
|
30
39
|
_useRafInterval(function () {
|
|
31
40
|
return run();
|
|
32
41
|
}, 30 * 1000);
|
|
42
|
+
|
|
33
43
|
_useRafInterval(function () {
|
|
34
44
|
var cuurentTime = api.getCurrentTime();
|
|
45
|
+
|
|
35
46
|
if (!!isLive && !api.video.paused && cuurentTime === cTimeRef.current) {
|
|
36
47
|
event.emit(Events.ERROR);
|
|
37
48
|
}
|
|
38
49
|
}, 20 * 1000);
|
|
39
50
|
}
|
|
51
|
+
|
|
40
52
|
export default useLiveHeart;
|
package/es/Player/message.js
CHANGED
|
@@ -1,56 +1,78 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
|
|
2
9
|
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."); }
|
|
10
|
+
|
|
3
11
|
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); }
|
|
12
|
+
|
|
4
13
|
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; }
|
|
14
|
+
|
|
5
15
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
+
|
|
6
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
|
|
7
19
|
import React, { useState, useMemo, useRef, useContext } from 'react';
|
|
8
|
-
import IconFont from
|
|
9
|
-
import { useRegisterPlayerEvent, useVideoEvent } from
|
|
10
|
-
import EventName from
|
|
11
|
-
import { Context } from
|
|
12
|
-
import "./style/message.
|
|
20
|
+
import IconFont from "./iconfont";
|
|
21
|
+
import { useRegisterPlayerEvent, useVideoEvent } from "./event";
|
|
22
|
+
import EventName from "./event/eventName";
|
|
23
|
+
import { Context } from "./context";
|
|
24
|
+
import "./style/message.less";
|
|
25
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
|
|
13
28
|
function VideoMessage() {
|
|
14
29
|
var _useContext = useContext(Context),
|
|
15
|
-
|
|
30
|
+
api = _useContext.api;
|
|
31
|
+
|
|
16
32
|
var _useState = useState({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
status: null,
|
|
34
|
+
errorTimer: 1,
|
|
35
|
+
loading: false
|
|
36
|
+
}),
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
state = _useState2[0],
|
|
39
|
+
setState = _useState2[1];
|
|
40
|
+
|
|
24
41
|
var timeRef = useRef(null);
|
|
25
42
|
var message = useMemo(function () {
|
|
26
43
|
if (state.status === 'fail') {
|
|
27
44
|
console.warn("\u89C6\u9891\u9519\u8BEF\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u91CD\u8BD5\uFF01");
|
|
28
45
|
return '请稍后重试!';
|
|
29
46
|
}
|
|
47
|
+
|
|
30
48
|
if (state.status === 'reload') {
|
|
31
49
|
console.warn("\u7B2C".concat(state.errorTimer, "\u6B21\u91CD\u8FDE"));
|
|
32
50
|
return "\u6B63\u5728\u5237\u65B0...";
|
|
33
51
|
}
|
|
52
|
+
|
|
34
53
|
return '';
|
|
35
54
|
}, [state.errorTimer, state.status]);
|
|
55
|
+
|
|
36
56
|
var openLoading = function openLoading() {
|
|
37
57
|
clearTimeout(timeRef.current);
|
|
38
58
|
timeRef.current = setTimeout(function () {
|
|
39
59
|
return setState(function (old) {
|
|
40
|
-
return
|
|
60
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
41
61
|
loading: true
|
|
42
62
|
});
|
|
43
63
|
});
|
|
44
64
|
}, 200);
|
|
45
65
|
};
|
|
66
|
+
|
|
46
67
|
var closeLoading = function closeLoading() {
|
|
47
68
|
clearTimeout(timeRef.current);
|
|
48
69
|
setState(function (old) {
|
|
49
|
-
return
|
|
70
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
50
71
|
loading: false
|
|
51
72
|
});
|
|
52
73
|
});
|
|
53
74
|
};
|
|
75
|
+
|
|
54
76
|
var errorReload = function errorReload(timer) {
|
|
55
77
|
clearTimeout(timeRef.current);
|
|
56
78
|
setState(function () {
|
|
@@ -61,38 +83,43 @@ function VideoMessage() {
|
|
|
61
83
|
};
|
|
62
84
|
});
|
|
63
85
|
};
|
|
86
|
+
|
|
64
87
|
var reloadFail = function reloadFail() {
|
|
65
88
|
return setState(function (old) {
|
|
66
|
-
return
|
|
89
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
67
90
|
status: 'fail'
|
|
68
91
|
});
|
|
69
92
|
});
|
|
70
93
|
};
|
|
94
|
+
|
|
71
95
|
var reloadSuccess = function reloadSuccess() {
|
|
72
96
|
return setState(function (old) {
|
|
73
|
-
return
|
|
97
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
74
98
|
status: null
|
|
75
99
|
});
|
|
76
100
|
});
|
|
77
101
|
};
|
|
102
|
+
|
|
78
103
|
var reload = function reload() {
|
|
79
104
|
return setState(function (old) {
|
|
80
|
-
return
|
|
105
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
81
106
|
status: 'reload',
|
|
82
107
|
loading: true
|
|
83
108
|
});
|
|
84
109
|
});
|
|
85
110
|
};
|
|
111
|
+
|
|
86
112
|
var playEnd = function playEnd() {
|
|
87
113
|
clearTimeout(timeRef.current);
|
|
88
114
|
setState(function (old) {
|
|
89
|
-
return
|
|
115
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
90
116
|
status: null,
|
|
91
117
|
loading: false
|
|
92
118
|
});
|
|
93
119
|
});
|
|
94
120
|
api.pause();
|
|
95
121
|
};
|
|
122
|
+
|
|
96
123
|
useVideoEvent('loadstart', openLoading);
|
|
97
124
|
useVideoEvent('loadeddata', closeLoading);
|
|
98
125
|
useVideoEvent('canplay', closeLoading);
|
|
@@ -103,25 +130,29 @@ function VideoMessage() {
|
|
|
103
130
|
useRegisterPlayerEvent(EventName.HISTORY_PLAY_END, playEnd);
|
|
104
131
|
useRegisterPlayerEvent(EventName.CLEAR_ERROR_TIMER, reloadSuccess);
|
|
105
132
|
var loading = state.loading,
|
|
106
|
-
|
|
107
|
-
return /*#__PURE__*/
|
|
108
|
-
className: "lm-player-message-mask ".concat(loading || status === 'fail' ? 'lm-player-mask-loading-animation' : '')
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
133
|
+
status = state.status;
|
|
134
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
135
|
+
className: "lm-player-message-mask ".concat(loading || status === 'fail' ? 'lm-player-mask-loading-animation' : ''),
|
|
136
|
+
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
137
|
+
type: status === 'fail' ? 'lm-player-YesorNo_No_Dark' : 'lm-player-Loading',
|
|
138
|
+
className: "".concat(loading && status !== 'fail' ? 'lm-player-loading-animation' : status === 'fail' ? 'lm-player-loadfail' : '', " lm-player-loading-icon")
|
|
139
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
140
|
+
className: "lm-player-message",
|
|
141
|
+
children: message
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
115
144
|
}
|
|
145
|
+
|
|
116
146
|
export var NoSource = function NoSource() {
|
|
117
|
-
return /*#__PURE__*/
|
|
118
|
-
className: "lm-player-message-mask lm-player-mask-loading-animation"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
147
|
+
return /*#__PURE__*/_jsx("div", {
|
|
148
|
+
className: "lm-player-message-mask lm-player-mask-loading-animation",
|
|
149
|
+
children: /*#__PURE__*/_jsx(IconFont, {
|
|
150
|
+
style: {
|
|
151
|
+
fontSize: 80
|
|
152
|
+
},
|
|
153
|
+
type: "lm-player-PlaySource",
|
|
154
|
+
title: "\u8BF7\u9009\u62E9\u89C6\u9891\u6E90"
|
|
155
|
+
})
|
|
156
|
+
});
|
|
126
157
|
};
|
|
127
158
|
export default VideoMessage;
|