@cloud-app-dev/vidc 3.2.11 → 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 +201 -137
- 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
package/es/PlayerExt/demo.js
CHANGED
|
@@ -6,15 +6,30 @@ import "antd/lib/input/style";
|
|
|
6
6
|
import _Input from "antd/lib/input";
|
|
7
7
|
import "antd/lib/select/style";
|
|
8
8
|
import _Select from "antd/lib/select";
|
|
9
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
9
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
|
|
10
18
|
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."); }
|
|
19
|
+
|
|
11
20
|
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); }
|
|
21
|
+
|
|
12
22
|
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; }
|
|
23
|
+
|
|
13
24
|
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; }
|
|
25
|
+
|
|
14
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
15
28
|
import React, { useState } from 'react';
|
|
16
|
-
import Player from
|
|
17
|
-
import ExtModel from
|
|
29
|
+
import Player from "../Player/single_player";
|
|
30
|
+
import ExtModel from "./index";
|
|
31
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
33
|
var options = [{
|
|
19
34
|
value: '',
|
|
20
35
|
label: '自动'
|
|
@@ -32,124 +47,142 @@ var options2 = [{
|
|
|
32
47
|
value: 0,
|
|
33
48
|
label: '录像'
|
|
34
49
|
}];
|
|
50
|
+
|
|
35
51
|
//http://192.168.101.162:14088/flv/live/1853e2a5c3308bd62/2.flv?device_id=&channel_id=1853e2a5c3308bd62&stream_index=2&ip=0
|
|
36
52
|
function Demo() {
|
|
37
53
|
var _useState = useState({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
type: undefined,
|
|
55
|
+
isLive: 1,
|
|
56
|
+
url: '',
|
|
57
|
+
tempUrl: '',
|
|
58
|
+
mode: 1
|
|
59
|
+
}),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
state = _useState2[0],
|
|
62
|
+
setState = _useState2[1];
|
|
63
|
+
|
|
64
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
48
65
|
style: {
|
|
49
66
|
width: '100%',
|
|
50
67
|
height: 800
|
|
51
|
-
}
|
|
52
|
-
}, /*#__PURE__*/React.createElement("h3", null, "\u63D2\u4EF6\u89C6\u9891\u64AD\u653E"), /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
style: {
|
|
54
|
-
marginBottom: 10,
|
|
55
|
-
display: 'flex'
|
|
56
|
-
}
|
|
57
|
-
}, /*#__PURE__*/React.createElement(_Select, {
|
|
58
|
-
value: state.type || '',
|
|
59
|
-
onChange: function onChange(val) {
|
|
60
|
-
return setState(function (old) {
|
|
61
|
-
return Object.assign(Object.assign({}, old), {
|
|
62
|
-
type: val
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}, options.map(function (v) {
|
|
67
|
-
return /*#__PURE__*/React.createElement(_Select.Option, {
|
|
68
|
-
key: v.label,
|
|
69
|
-
value: v.value
|
|
70
|
-
}, v.label);
|
|
71
|
-
})), /*#__PURE__*/React.createElement(_Input, {
|
|
72
|
-
style: {
|
|
73
|
-
flex: 1,
|
|
74
|
-
height: 32
|
|
75
|
-
},
|
|
76
|
-
type: "text",
|
|
77
|
-
placeholder: "\u8BF7\u8F93\u5165\u89C6\u9891\u5730\u5740",
|
|
78
|
-
onChange: function onChange(e) {
|
|
79
|
-
return setState(function (old) {
|
|
80
|
-
return Object.assign(Object.assign({}, old), {
|
|
81
|
-
tempUrl: e.target.value
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}), /*#__PURE__*/React.createElement(_Select, {
|
|
86
|
-
value: state.isLive,
|
|
87
|
-
onChange: function onChange(val) {
|
|
88
|
-
return setState(function (old) {
|
|
89
|
-
return Object.assign(Object.assign({}, old), {
|
|
90
|
-
isLive: val
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}, options2.map(function (v) {
|
|
95
|
-
return /*#__PURE__*/React.createElement(_Select.Option, {
|
|
96
|
-
key: v.label,
|
|
97
|
-
value: v.value
|
|
98
|
-
}, v.label);
|
|
99
|
-
})), /*#__PURE__*/React.createElement(_Select, {
|
|
100
|
-
value: state.mode,
|
|
101
|
-
onChange: function onChange(val) {
|
|
102
|
-
return setState(function (old) {
|
|
103
|
-
return Object.assign(Object.assign({}, old), {
|
|
104
|
-
mode: val
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}, /*#__PURE__*/React.createElement(_Select.Option, {
|
|
109
|
-
value: 1
|
|
110
|
-
}, "\u6D4F\u89C8\u5668\u6A21\u5F0F"), /*#__PURE__*/React.createElement(_Select.Option, {
|
|
111
|
-
value: 2
|
|
112
|
-
}, "\u63D2\u4EF6\u6A21\u5F0F")), /*#__PURE__*/React.createElement(_Button, {
|
|
113
|
-
style: {
|
|
114
|
-
width: 60,
|
|
115
|
-
height: 32
|
|
116
68
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
69
|
+
children: [/*#__PURE__*/_jsx("h3", {
|
|
70
|
+
children: "\u63D2\u4EF6\u89C6\u9891\u64AD\u653E"
|
|
71
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
72
|
+
style: {
|
|
73
|
+
marginBottom: 10,
|
|
74
|
+
display: 'flex'
|
|
75
|
+
},
|
|
76
|
+
children: [/*#__PURE__*/_jsx(_Select, {
|
|
77
|
+
value: state.type || '',
|
|
78
|
+
onChange: function onChange(val) {
|
|
79
|
+
return setState(function (old) {
|
|
80
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
81
|
+
type: val
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
children: options.map(function (v) {
|
|
86
|
+
return /*#__PURE__*/_jsx(_Select.Option, {
|
|
87
|
+
value: v.value,
|
|
88
|
+
children: v.label
|
|
89
|
+
}, v.label);
|
|
90
|
+
})
|
|
91
|
+
}), /*#__PURE__*/_jsx(_Input, {
|
|
92
|
+
style: {
|
|
93
|
+
flex: 1,
|
|
94
|
+
height: 32
|
|
95
|
+
},
|
|
96
|
+
type: "text",
|
|
97
|
+
placeholder: "\u8BF7\u8F93\u5165\u89C6\u9891\u5730\u5740",
|
|
98
|
+
onChange: function onChange(e) {
|
|
99
|
+
return setState(function (old) {
|
|
100
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
101
|
+
tempUrl: e.target.value
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}), /*#__PURE__*/_jsx(_Select, {
|
|
106
|
+
value: state.isLive,
|
|
107
|
+
onChange: function onChange(val) {
|
|
108
|
+
return setState(function (old) {
|
|
109
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
110
|
+
isLive: val
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
children: options2.map(function (v) {
|
|
115
|
+
return /*#__PURE__*/_jsx(_Select.Option, {
|
|
116
|
+
value: v.value,
|
|
117
|
+
children: v.label
|
|
118
|
+
}, v.label);
|
|
119
|
+
})
|
|
120
|
+
}), /*#__PURE__*/_jsxs(_Select, {
|
|
121
|
+
value: state.mode,
|
|
122
|
+
onChange: function onChange(val) {
|
|
123
|
+
return setState(function (old) {
|
|
124
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
125
|
+
mode: val
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
children: [/*#__PURE__*/_jsx(_Select.Option, {
|
|
130
|
+
value: 1,
|
|
131
|
+
children: "\u6D4F\u89C8\u5668\u6A21\u5F0F"
|
|
132
|
+
}), /*#__PURE__*/_jsx(_Select.Option, {
|
|
133
|
+
value: 2,
|
|
134
|
+
children: "\u63D2\u4EF6\u6A21\u5F0F"
|
|
135
|
+
})]
|
|
136
|
+
}), /*#__PURE__*/_jsx(_Button, {
|
|
137
|
+
style: {
|
|
138
|
+
width: 60,
|
|
139
|
+
height: 32
|
|
140
|
+
},
|
|
141
|
+
onClick: function onClick(e) {
|
|
142
|
+
return setState(function (old) {
|
|
143
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
144
|
+
url: ''
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
children: "\u5173\u95ED"
|
|
149
|
+
}), /*#__PURE__*/_jsx(_Button, {
|
|
150
|
+
style: {
|
|
151
|
+
width: 60,
|
|
152
|
+
height: 32
|
|
153
|
+
},
|
|
154
|
+
onClick: function onClick(e) {
|
|
155
|
+
return setState(function (old) {
|
|
156
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
157
|
+
url: state.tempUrl
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
children: "\u64AD\u653E"
|
|
162
|
+
})]
|
|
163
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
164
|
+
style: {
|
|
165
|
+
height: 600
|
|
166
|
+
},
|
|
167
|
+
children: /*#__PURE__*/_jsx(ExtModel, {
|
|
168
|
+
url: state.url,
|
|
169
|
+
mode: state.mode,
|
|
170
|
+
pluginDownloadUrl: "http://192.168.101.162:19999/plugins/ZVPlayer.exe",
|
|
171
|
+
children: /*#__PURE__*/_jsx(Player, {
|
|
172
|
+
type: state.type,
|
|
173
|
+
url: state.url,
|
|
174
|
+
isLive: !!state.isLive
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
149
179
|
}
|
|
180
|
+
|
|
150
181
|
var App = function App() {
|
|
151
|
-
return /*#__PURE__*/
|
|
152
|
-
prefixCls: "cloudapp"
|
|
153
|
-
|
|
182
|
+
return /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
183
|
+
prefixCls: "cloudapp",
|
|
184
|
+
children: /*#__PURE__*/_jsx(Demo, {})
|
|
185
|
+
});
|
|
154
186
|
};
|
|
187
|
+
|
|
155
188
|
export default App;
|
package/es/PlayerExt/index.d.ts
CHANGED
package/es/PlayerExt/index.js
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
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
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
8
20
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
9
|
-
import IconFont from
|
|
10
|
-
import "./index.
|
|
21
|
+
import IconFont from "../Player/iconfont";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
|
|
11
26
|
/**
|
|
12
27
|
* 客户端插件模式,随机端口
|
|
13
28
|
*/
|
|
@@ -16,6 +31,7 @@ export var LOCAL_PORT = ['15080', '15081', '15082', '15083', '15084', '15085', '
|
|
|
16
31
|
* 随机获取端口号
|
|
17
32
|
* @returns
|
|
18
33
|
*/
|
|
34
|
+
|
|
19
35
|
export function getLocalPort() {
|
|
20
36
|
return LOCAL_PORT[Math.floor(Math.random() * LOCAL_PORT.length)];
|
|
21
37
|
}
|
|
@@ -25,6 +41,7 @@ export function getLocalPort() {
|
|
|
25
41
|
* @param params
|
|
26
42
|
* @returns
|
|
27
43
|
*/
|
|
44
|
+
|
|
28
45
|
export function getLocalPlayPath(url) {
|
|
29
46
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
30
47
|
var URL_TEMPLATE = "http://127.0.0.1:<port>/video/v1/transcoding?uri=<pull_uri>";
|
|
@@ -34,22 +51,26 @@ export function getLocalPlayPath(url) {
|
|
|
34
51
|
}
|
|
35
52
|
export function usePlugin(mode, key) {
|
|
36
53
|
var _useState = useState({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
installed: false
|
|
55
|
+
}),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
state = _useState2[0],
|
|
58
|
+
setState = _useState2[1];
|
|
59
|
+
|
|
42
60
|
useEffect(function () {
|
|
43
61
|
if (mode !== 2) {
|
|
44
62
|
return undefined;
|
|
45
63
|
}
|
|
64
|
+
|
|
46
65
|
var port = getLocalPort();
|
|
47
66
|
var url = "http://127.0.0.1:".concat(port, "/video/v1/state");
|
|
67
|
+
|
|
48
68
|
var thenFn = function thenFn(res) {
|
|
49
69
|
return res.status === 200 ? setState({
|
|
50
70
|
installed: true
|
|
51
71
|
}) : undefined;
|
|
52
72
|
};
|
|
73
|
+
|
|
53
74
|
fetch(url).then(thenFn).catch(function (e) {
|
|
54
75
|
return console.error('插件未安装', e);
|
|
55
76
|
});
|
|
@@ -60,118 +81,150 @@ export function usePlugin(mode, key) {
|
|
|
60
81
|
}, [state.installed, mode])
|
|
61
82
|
};
|
|
62
83
|
}
|
|
84
|
+
|
|
63
85
|
function NeedInstallPlugin(_ref) {
|
|
64
86
|
var pluginDownloadUrl = _ref.pluginDownloadUrl,
|
|
65
|
-
|
|
66
|
-
return /*#__PURE__*/
|
|
67
|
-
className: "lm-player-ext-layout"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
retry = _ref.retry;
|
|
88
|
+
return /*#__PURE__*/_jsx("div", {
|
|
89
|
+
className: "lm-player-ext-layout",
|
|
90
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
91
|
+
style: {
|
|
92
|
+
marginTop: -60,
|
|
93
|
+
textAlign: 'center'
|
|
94
|
+
},
|
|
95
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
96
|
+
children: /*#__PURE__*/_jsx(IconFont, {
|
|
97
|
+
type: "lm-player-PlaySource",
|
|
98
|
+
style: {
|
|
99
|
+
fontSize: 66
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
103
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
104
|
+
children: ["\u8BF7", /*#__PURE__*/_jsx("a", {
|
|
105
|
+
target: "_blank",
|
|
106
|
+
href: pluginDownloadUrl,
|
|
107
|
+
style: {
|
|
108
|
+
textDecoration: 'none',
|
|
109
|
+
padding: '0 4px'
|
|
110
|
+
},
|
|
111
|
+
download: "PlayerPlugin.exe",
|
|
112
|
+
rel: "noopener noreferrer",
|
|
113
|
+
children: "\u4E0B\u8F7D"
|
|
114
|
+
}), "\u64AD\u653E\u63D2\u4EF6\uFF0C"]
|
|
115
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
116
|
+
children: ["\u82E5\u5DF2\u5B89\u88C5\u8BF7\u70B9\u51FB", /*#__PURE__*/_jsx("a", {
|
|
117
|
+
style: {
|
|
118
|
+
padding: '0 4px'
|
|
119
|
+
},
|
|
120
|
+
onClick: retry,
|
|
121
|
+
children: "\u91CD\u8BD5"
|
|
122
|
+
})]
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
});
|
|
93
127
|
}
|
|
128
|
+
|
|
94
129
|
function Loading() {
|
|
95
|
-
return /*#__PURE__*/
|
|
96
|
-
className: "lm-player-ext-layout"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
return /*#__PURE__*/_jsx("div", {
|
|
131
|
+
className: "lm-player-ext-layout",
|
|
132
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
133
|
+
style: {
|
|
134
|
+
marginTop: -60,
|
|
135
|
+
textAlign: 'center'
|
|
136
|
+
},
|
|
137
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
138
|
+
children: /*#__PURE__*/_jsx(IconFont, {
|
|
139
|
+
type: "lm-player-PlaySource",
|
|
140
|
+
style: {
|
|
141
|
+
fontSize: 66
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
145
|
+
children: "\u6B63\u5728\u83B7\u53D6\u89C6\u9891\u6570\u636E\uFF0C\u8BF7\u7A0D\u7B49..."
|
|
146
|
+
})]
|
|
147
|
+
})
|
|
148
|
+
});
|
|
108
149
|
}
|
|
150
|
+
|
|
109
151
|
function Empty() {
|
|
110
|
-
return /*#__PURE__*/
|
|
111
|
-
className: "lm-player-ext-layout"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
152
|
+
return /*#__PURE__*/_jsx("div", {
|
|
153
|
+
className: "lm-player-ext-layout",
|
|
154
|
+
children: /*#__PURE__*/_jsx(IconFont, {
|
|
155
|
+
type: "lm-player-PlaySource",
|
|
156
|
+
style: {
|
|
157
|
+
fontSize: 66
|
|
158
|
+
}
|
|
159
|
+
})
|
|
160
|
+
});
|
|
118
161
|
}
|
|
162
|
+
|
|
119
163
|
export function ExtModel(_ref2) {
|
|
120
164
|
var url = _ref2.url,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
165
|
+
children = _ref2.children,
|
|
166
|
+
mode = _ref2.mode,
|
|
167
|
+
pluginDownloadUrl = _ref2.pluginDownloadUrl,
|
|
168
|
+
pluginParams = _ref2.pluginParams,
|
|
169
|
+
loading = _ref2.loading,
|
|
170
|
+
segments = _ref2.segments;
|
|
171
|
+
|
|
127
172
|
var _useState3 = useState({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
173
|
+
forceKey: Date.now()
|
|
174
|
+
}),
|
|
175
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
176
|
+
state = _useState4[0],
|
|
177
|
+
setState = _useState4[1];
|
|
178
|
+
|
|
133
179
|
var hasUrl = useMemo(function () {
|
|
134
180
|
return !!url || Array.isArray(segments) && segments.findIndex(function (v) {
|
|
135
181
|
return v.url;
|
|
136
182
|
}) > -1;
|
|
137
183
|
}, [segments, url]);
|
|
184
|
+
|
|
138
185
|
var _usePlugin = usePlugin(mode, state.forceKey),
|
|
139
|
-
|
|
140
|
-
|
|
186
|
+
needInstall = _usePlugin.needInstall; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
187
|
+
|
|
188
|
+
|
|
141
189
|
var playUrl = useMemo(function () {
|
|
142
190
|
return mode === 2 && url ? getLocalPlayPath(url, pluginParams) : url;
|
|
143
|
-
}, [url, mode]);
|
|
144
|
-
|
|
191
|
+
}, [url, mode]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
192
|
+
|
|
145
193
|
var playSegments = useMemo(function () {
|
|
146
194
|
return mode === 2 && url ? segments.map(function (v) {
|
|
147
|
-
return
|
|
195
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
148
196
|
url: getLocalPlayPath(v.url, pluginParams)
|
|
149
197
|
});
|
|
150
198
|
}) : url;
|
|
151
199
|
}, [segments, mode]);
|
|
200
|
+
|
|
152
201
|
if (needInstall) {
|
|
153
|
-
return /*#__PURE__*/
|
|
202
|
+
return /*#__PURE__*/_jsx(NeedInstallPlugin, {
|
|
154
203
|
pluginDownloadUrl: pluginDownloadUrl,
|
|
155
204
|
retry: function retry() {
|
|
156
205
|
return setState(function (old) {
|
|
157
|
-
return
|
|
206
|
+
return _objectSpread(_objectSpread({}, old), {}, {
|
|
158
207
|
forceKey: Date.now()
|
|
159
208
|
});
|
|
160
209
|
});
|
|
161
210
|
}
|
|
162
211
|
});
|
|
163
212
|
}
|
|
213
|
+
|
|
164
214
|
if (loading) {
|
|
165
|
-
return /*#__PURE__*/
|
|
215
|
+
return /*#__PURE__*/_jsx(Loading, {});
|
|
166
216
|
}
|
|
217
|
+
|
|
167
218
|
if (!hasUrl) {
|
|
168
|
-
return /*#__PURE__*/
|
|
219
|
+
return /*#__PURE__*/_jsx(Empty, {});
|
|
169
220
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
221
|
+
|
|
222
|
+
return /*#__PURE__*/_jsx("div", {
|
|
223
|
+
className: "lm-player-ext-layout",
|
|
224
|
+
children: /*#__PURE__*/React.cloneElement(children, mode === 2 ? {
|
|
225
|
+
url: playUrl,
|
|
226
|
+
segments: playSegments
|
|
227
|
+
} : {})
|
|
228
|
+
});
|
|
176
229
|
}
|
|
177
230
|
export { ExtModel as default };
|
|
File without changes
|
package/es/Progress/index.js
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import "antd/lib/progress/style";
|
|
2
2
|
import _Progress from "antd/lib/progress";
|
|
3
|
+
|
|
3
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
|
|
4
6
|
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."); }
|
|
7
|
+
|
|
5
8
|
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); }
|
|
9
|
+
|
|
6
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
|
+
|
|
7
12
|
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; }
|
|
13
|
+
|
|
8
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
|
|
9
16
|
import React, { useState, useEffect, useMemo, useRef } from 'react';
|
|
10
|
-
import "./index.
|
|
17
|
+
import "./index.less";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
|
|
11
20
|
function ProgressComponent(_ref) {
|
|
12
21
|
var status = _ref.status;
|
|
13
22
|
var timer = useRef(null);
|
|
14
23
|
var currentStatus = useRef('loading');
|
|
24
|
+
|
|
15
25
|
var _useState = useState(0),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
percent = _useState2[0],
|
|
28
|
+
setPersent = _useState2[1];
|
|
29
|
+
|
|
19
30
|
var isHide = useMemo(function () {
|
|
20
31
|
return percent === 100;
|
|
21
32
|
}, [percent]);
|
|
@@ -23,6 +34,7 @@ function ProgressComponent(_ref) {
|
|
|
23
34
|
if ((status === 'over' || status === 'error') && percent === 0) {
|
|
24
35
|
return;
|
|
25
36
|
}
|
|
37
|
+
|
|
26
38
|
if (percent <= 90 && currentStatus.current === 'loading') {
|
|
27
39
|
var num = percent + 20;
|
|
28
40
|
timer.current = setTimeout(function () {
|
|
@@ -41,7 +53,7 @@ function ProgressComponent(_ref) {
|
|
|
41
53
|
return clearTimeout(timer.current);
|
|
42
54
|
};
|
|
43
55
|
});
|
|
44
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/_jsx(_Progress, {
|
|
45
57
|
status: status === 'error' ? 'exception' : 'active',
|
|
46
58
|
percent: percent,
|
|
47
59
|
showInfo: false,
|
|
@@ -50,6 +62,7 @@ function ProgressComponent(_ref) {
|
|
|
50
62
|
className: "lm-c-loading-progress ".concat(isHide ? 'lm-c-loading-progress-over' : '')
|
|
51
63
|
});
|
|
52
64
|
}
|
|
65
|
+
|
|
53
66
|
ProgressComponent.defaultProps = {
|
|
54
67
|
status: 'loading'
|
|
55
68
|
};
|