@cloud-app-dev/vidc 4.0.22 → 4.0.23
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/es/AppContext/Sync.d.ts +8 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +1 -1
- package/es/AppContext/static.d.ts +8 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/AutoExit/index.d.ts +6 -0
- package/es/CheckGroupFixed/demo.d.ts +3 -0
- package/es/CheckGroupFixed/index.d.ts +24 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/utils.d.ts +4 -0
- package/es/ConfigContext/index.d.ts +17 -0
- package/es/CustomRenderSelect/index.d.ts +12 -0
- package/es/DBTools/index.d.ts +25 -0
- package/es/DisableMark/index.d.ts +9 -0
- package/es/DomMove/demo.d.ts +2 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/index.d.ts +7 -9
- package/es/DynamicGridList/Demo.d.ts +3 -0
- package/es/DynamicGridList/index.d.ts +24 -0
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/DynamicList/index.d.ts +22 -0
- package/es/DynamicList/utils.d.ts +4 -0
- package/es/ErrorFallback/index.d.ts +9 -0
- package/es/EventTools/index.d.ts +3 -0
- package/es/FrontendPlayer/index.d.ts +4 -0
- package/es/FullScreen/index.d.ts +22 -0
- package/es/GridList/Demo.d.ts +3 -0
- package/es/GridList/data.d.ts +16 -0
- package/es/GridList/hook.d.ts +13 -0
- package/es/GridList/index.d.ts +15 -0
- package/es/GridList/utils.d.ts +9 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/IconFont/index.d.ts +12 -0
- package/es/ImageView/index.d.ts +20 -0
- package/es/InstanceHistory/index.d.ts +3 -0
- package/es/LabelPlayer/demo.d.ts +2 -0
- package/es/LabelPlayer/index.d.ts +21 -0
- package/es/LabelValue/index.d.ts +15 -0
- package/es/List/demo.d.ts +3 -0
- package/es/List/index.d.ts +28 -0
- package/es/ListWithSizeAnimate/demo.d.ts +2 -0
- package/es/ListWithSizeAnimate/index.d.ts +14 -0
- package/es/LoaderScript/index.d.ts +47 -0
- package/es/LoaderScript/utils.d.ts +13 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +19 -0
- package/es/Map/BasicMap/AMapInstance.js +2 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +18 -0
- package/es/Map/BasicMap/LeafletInstance.js +4 -2
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/ClusterLayer/demo.d.ts +3 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/hook.js +6 -2
- package/es/Map/ClusterLayer/index.d.ts +6 -0
- package/es/Map/Config/index.d.ts +9 -0
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/FindPio/index.d.ts +4 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +4 -0
- package/es/Map/InfoWindow/MakerLikeWindow.js +27 -6
- package/es/Map/InfoWindow/demo.d.ts +3 -0
- package/es/Map/InfoWindow/index.d.ts +11 -0
- package/es/Map/InfoWindow/index.js +5 -1
- package/es/Map/LevelCenter/DragMarker/index.d.ts +10 -0
- package/es/Map/LevelCenter/DragMarker/index.js +1 -0
- package/es/Map/LevelCenter/demo.d.ts +3 -0
- package/es/Map/LevelCenter/index.d.ts +15 -0
- package/es/Map/LoaderMap/index.d.ts +7 -0
- package/es/Map/MapDrawSelect/demo.d.ts +3 -0
- package/es/Map/MapDrawSelect/index.d.ts +15 -0
- package/es/Map/MouseTool/index.d.ts +10 -0
- package/es/Map/MouseTool/useMouseTools.d.ts +7 -0
- package/es/Map/MouseTool/useMouseTools.js +2 -1
- package/es/Map/ResetTools/index.d.ts +10 -0
- package/es/Map/SinglePoint/demo.d.ts +3 -0
- package/es/Map/SinglePoint/index.d.ts +27 -0
- package/es/Map/SinglePoint/index.js +1 -0
- package/es/Map/hook/useMapEvent.d.ts +2 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/index.d.ts +24 -0
- package/es/Map/points.d.ts +74 -0
- package/es/Map/useMarker/index.d.ts +10 -0
- package/es/Map/withMap/index.d.ts +3 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +8 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +3 -1
- package/es/Picture/component/DefaultRects/index.d.ts +13 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +1 -1
- package/es/Picture/component/DrawRect/index.d.ts +13 -0
- package/es/Picture/component/RectMenu/index.d.ts +12 -0
- package/es/Picture/component/RectMenu/index.js +6 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/Tools/index.d.ts +12 -0
- package/es/Picture/component/WheelScale/index.d.ts +7 -0
- package/es/Picture/demo.d.ts +2 -0
- package/es/Picture/index.d.ts +5 -0
- package/es/Picture/loadCaptureRectImage.d.ts +3 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/utils.d.ts +26 -0
- package/es/Player/api/index.d.ts +68 -0
- package/es/Player/context.d.ts +17 -0
- package/es/Player/contraller_bar/bar.d.ts +8 -0
- package/es/Player/contraller_bar/contraller_event.d.ts +6 -0
- package/es/Player/contraller_bar/contraller_event.js +2 -0
- package/es/Player/contraller_bar/index.d.ts +14 -0
- package/es/Player/contraller_bar/left_bar.d.ts +10 -0
- package/es/Player/contraller_bar/right_bar.d.ts +8 -0
- package/es/Player/contraller_bar/time.d.ts +3 -0
- package/es/Player/contraller_bar/useBarStatus.d.ts +2 -0
- package/es/Player/contraller_bar/volume.d.ts +9 -0
- package/es/Player/contraller_bar/volume.js +1 -1
- package/es/Player/demo.d.ts +3 -0
- package/es/Player/empty.d.ts +2 -0
- package/es/Player/event/errorEvent.d.ts +14 -0
- package/es/Player/event/eventName.d.ts +18 -0
- package/es/Player/event/index.d.ts +24 -0
- package/es/Player/fps_play.d.ts +11 -0
- package/es/Player/frontend_player.d.ts +8 -0
- package/es/Player/frontend_timeline.d.ts +10 -0
- package/es/Player/iconfont.d.ts +5 -0
- package/es/Player/index.d.ts +2 -0
- package/es/Player/live_heart.d.ts +8 -0
- package/es/Player/message.d.ts +5 -0
- package/es/Player/message.js +4 -0
- package/es/Player/segment_player.d.ts +9 -0
- package/es/Player/segment_timeline.d.ts +12 -0
- package/es/Player/single_player.d.ts +5 -0
- package/es/Player/timeline.d.ts +5 -0
- package/es/Player/util.d.ts +43 -0
- package/es/PlayerExt/demo.d.ts +3 -0
- package/es/PlayerExt/index.d.ts +48 -0
- package/es/Progress/index.d.ts +7 -9
- package/es/ROI/demo.d.ts +3 -0
- package/es/ROI/index.d.ts +33 -0
- package/es/RefDrawer/Footer.d.ts +9 -0
- package/es/RefDrawer/demo.d.ts +3 -0
- package/es/RefDrawer/index.d.ts +26 -0
- package/es/RefModal/demo.d.ts +3 -0
- package/es/RefModal/index.d.ts +17 -0
- package/es/ScreenPlayer/Live.d.ts +5 -0
- package/es/ScreenPlayer/LiveTools.d.ts +29 -0
- package/es/ScreenPlayer/LiveTools.js +2 -2
- package/es/ScreenPlayer/PlayerWithExt.d.ts +34 -0
- package/es/ScreenPlayer/RatePick.d.ts +8 -0
- package/es/ScreenPlayer/Record.d.ts +10 -0
- package/es/ScreenPlayer/RecordTools.d.ts +38 -0
- package/es/ScreenPlayer/RecordTools.js +14 -14
- package/es/ScreenPlayer/ScreenSelect.d.ts +7 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +17 -0
- package/es/ScreenPlayer/TimeMode.d.ts +7 -0
- package/es/ScreenPlayer/TimeSelect.d.ts +7 -0
- package/es/ScreenPlayer/demo.d.ts +2 -0
- package/es/ScreenPlayer/demo2.d.ts +2 -0
- package/es/ScreenPlayer/index.d.ts +6 -0
- package/es/ScreenPlayer/useTimeSlider.d.ts +25 -0
- package/es/ScreenPlayer/useTimeSlider.js +36 -36
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/utils.d.ts +17 -0
- package/es/SegmentPlayer/index.d.ts +2 -0
- package/es/Service/http.d.ts +6 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/middleware.d.ts +8 -0
- package/es/SocketEmitter/eventEmitter.d.ts +27 -0
- package/es/SocketEmitter/index.d.ts +24 -0
- package/es/TableLayout/index.d.ts +10 -0
- package/es/ThemeAntd/demo.d.ts +4 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/Timeout/index.d.ts +26 -0
- package/es/bigNumberTransformCN/index.d.ts +5 -0
- package/es/cache/index.d.ts +34 -0
- package/es/copy/index.d.ts +1 -0
- package/es/getThemeStyle/index.d.ts +2 -0
- package/es/index.d.ts +62 -0
- package/es/likeGo/index.d.ts +2 -0
- package/es/likeGoSync/index.d.ts +2 -0
- package/es/logger/index.d.ts +7 -0
- package/es/nextTick/index.d.ts +1 -0
- package/es/recorder/demo.d.ts +3 -0
- package/es/recorder/index.d.ts +294 -0
- package/es/submidstr/index.d.ts +5 -0
- package/es/treeHelper/index.d.ts +11 -0
- package/es/useDrawROI/index.d.ts +16 -0
- package/es/useEventEmitterHandle/index.d.ts +2 -0
- package/es/useFullscreen/demo.d.ts +2 -0
- package/es/useFullscreen/index.d.ts +12 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/useRafInterval/index.d.ts +5 -0
- package/es/useRafInterval/index.js +1 -0
- package/es/useSimpleState/index.d.ts +3 -0
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/utils.d.ts +14 -0
- package/es/uuid/index.d.ts +1 -0
- package/package.json +1 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IRIOProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* 调试模式,开启回绘制具体网格
|
|
7
|
+
*/
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 绘制数据变化
|
|
11
|
+
*/
|
|
12
|
+
onChange?: (rio: number[][], areas: [number, number][][]) => void;
|
|
13
|
+
/**
|
|
14
|
+
* 开启/关闭 标识
|
|
15
|
+
*/
|
|
16
|
+
isOpen?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* key变化回清楚画布
|
|
19
|
+
*/
|
|
20
|
+
renderKey?: React.Key;
|
|
21
|
+
/**
|
|
22
|
+
* rio共多少行
|
|
23
|
+
* @default 18
|
|
24
|
+
*/
|
|
25
|
+
row?: number;
|
|
26
|
+
/**
|
|
27
|
+
* rio 一行有多少个位置
|
|
28
|
+
* @default 32
|
|
29
|
+
*/
|
|
30
|
+
rowItems?: number;
|
|
31
|
+
}
|
|
32
|
+
declare function RIO({ children, debug, renderKey, onChange, isOpen, row, rowItems }: IRIOProps): React.JSX.Element;
|
|
33
|
+
export default RIO;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IFooterProps {
|
|
3
|
+
onClose?: (e: React.MouseEvent) => void;
|
|
4
|
+
cancelText: string;
|
|
5
|
+
okText: string;
|
|
6
|
+
onOk?: (e: React.MouseEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): React.JSX.Element;
|
|
9
|
+
export default Footer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DrawerProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IUseDrawerHookState {
|
|
4
|
+
content?: React.ReactNode;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
onOk?: (e: React.MouseEvent) => void;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IRefDrawerMethodsProps {
|
|
12
|
+
open: (options: IUseDrawerHookState) => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface IDrawerProps extends DrawerProps {
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
onOk?: (e: React.MouseEvent) => void;
|
|
18
|
+
/**
|
|
19
|
+
* @description 确认按钮文本
|
|
20
|
+
* @default 确定
|
|
21
|
+
* @type string
|
|
22
|
+
*/
|
|
23
|
+
okText?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const RefDrawer: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<IRefDrawerMethodsProps>>;
|
|
26
|
+
export default RefDrawer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IUseModalHookState {
|
|
4
|
+
content?: React.ReactNode;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
onOk?: () => void;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IRefModalMethodsProps {
|
|
12
|
+
open: (options: IUseModalHookState) => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
}
|
|
15
|
+
export type IModalProps = ModalProps;
|
|
16
|
+
declare const RefModal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<IRefModalMethodsProps>>;
|
|
17
|
+
export default RefModal;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExportPlayerType } from '../Player/player';
|
|
3
|
+
import { PlayModeType } from '../PlayerExt';
|
|
4
|
+
interface IToolsProps {
|
|
5
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
updateState: (state: {
|
|
7
|
+
screenNum?: number;
|
|
8
|
+
mode?: PlayModeType;
|
|
9
|
+
}) => void;
|
|
10
|
+
screenNum: number;
|
|
11
|
+
mode?: PlayModeType;
|
|
12
|
+
getPlayerItem: () => ExportPlayerType | undefined;
|
|
13
|
+
fit?: string;
|
|
14
|
+
toggleFit?: () => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
onCloseAll?: () => void;
|
|
17
|
+
snapshot?: (base64: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* 单窗口拓展工具条,左侧
|
|
20
|
+
*/
|
|
21
|
+
oneWinExtTools?: JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* 全局窗口工具条,右侧
|
|
24
|
+
*/
|
|
25
|
+
allWinExtTools?: JSX.Element;
|
|
26
|
+
hasPlugin?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare function LiveTools({ containerRef, oneWinExtTools, allWinExtTools, screenNum, mode, fit, hasPlugin, ...props }: IToolsProps): React.JSX.Element;
|
|
29
|
+
export default LiveTools;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExportPlayerType, ISegmentType, ISinglePlayerProps } from '../Player/player';
|
|
3
|
+
import type { PlayModeType } from '../PlayerExt';
|
|
4
|
+
interface ILivePlayerWithExtProps extends ISinglePlayerProps {
|
|
5
|
+
mode?: PlayModeType;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
updatePlayer: (obj: React.MutableRefObject<ExportPlayerType>) => void;
|
|
9
|
+
pluginDownloadUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function LivePlayerWithExt({ mode, url, type, style, className, updatePlayer, onClick, pluginDownloadUrl, ...props }: ILivePlayerWithExtProps): React.JSX.Element;
|
|
12
|
+
interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
13
|
+
segments?: ISegmentType[];
|
|
14
|
+
begin?: number;
|
|
15
|
+
fpsDelay?: number;
|
|
16
|
+
fps?: number;
|
|
17
|
+
httpLoading: boolean;
|
|
18
|
+
screenIndex?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function SegmentPlayerWithExt({ begin, style, className, segments, mode, fpsDelay, fps, httpLoading, ...props }: ISegmentPlayerWithExtProps): React.JSX.Element;
|
|
21
|
+
interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
22
|
+
segments?: ISegmentType[];
|
|
23
|
+
begin?: number;
|
|
24
|
+
httpLoading: boolean;
|
|
25
|
+
getLocalRecordUrl?: (options: {
|
|
26
|
+
url: URL;
|
|
27
|
+
begin: number;
|
|
28
|
+
end: number;
|
|
29
|
+
screenIndex: number;
|
|
30
|
+
}) => Promise<string>;
|
|
31
|
+
screenIndex: number;
|
|
32
|
+
}
|
|
33
|
+
export declare function FrontendPlayerWithExt({ mode, style, className, segments, pluginDownloadUrl, screenIndex, httpLoading, ...props }: IFrontendPlayerWithExtProps): React.JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IRecordPlayerProps } from './interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
/**
|
|
5
|
+
* @desc 录像设计的时间全部需要到毫秒
|
|
6
|
+
* @param param0
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare function RecordPlayer({ list, children, oneWinExtTools, allWinExtTools, fpsDelay, fps, seekLoading, multipleList, ...props }: IRecordPlayerProps): React.JSX.Element;
|
|
10
|
+
export default RecordPlayer;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExportPlayerType } from '../Player/player';
|
|
3
|
+
import { PlayModeType } from '../PlayerExt';
|
|
4
|
+
interface IToolsProps {
|
|
5
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
screenNum: number;
|
|
7
|
+
mode: PlayModeType;
|
|
8
|
+
fit?: string;
|
|
9
|
+
timeMode: number;
|
|
10
|
+
time?: number;
|
|
11
|
+
updateState: (state: {
|
|
12
|
+
screenNum?: number;
|
|
13
|
+
mode?: PlayModeType;
|
|
14
|
+
timeMode?: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
onTimeChange?: (options: {
|
|
17
|
+
currentTime?: number;
|
|
18
|
+
begin?: number;
|
|
19
|
+
}) => void;
|
|
20
|
+
toggleFit?: () => void;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
onCloseAll?: () => void;
|
|
23
|
+
getPlayerItem: () => ExportPlayerType | undefined;
|
|
24
|
+
download?: () => void;
|
|
25
|
+
snapshot?: (base64: string) => void;
|
|
26
|
+
multipleList?: number[];
|
|
27
|
+
/**
|
|
28
|
+
* 单窗口拓展工具条,左侧
|
|
29
|
+
*/
|
|
30
|
+
oneWinExtTools?: JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* 全局窗口工具条,右侧
|
|
33
|
+
*/
|
|
34
|
+
allWinExtTools?: JSX.Element;
|
|
35
|
+
hasPlugin?: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare function RecordTools({ containerRef, screenNum, fit, time, oneWinExtTools, allWinExtTools, ...props }: IToolsProps): React.JSX.Element;
|
|
38
|
+
export default RecordTools;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
var _excluded = ["containerRef", "screenNum", "
|
|
1
|
+
var _excluded = ["containerRef", "screenNum", "fit", "time", "oneWinExtTools", "allWinExtTools"];
|
|
2
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
2
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
4
|
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."); }
|
|
4
5
|
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); }
|
|
@@ -13,20 +14,17 @@ import React from 'react';
|
|
|
13
14
|
import Volume from "../Player/contraller_bar/volume";
|
|
14
15
|
import IconFont from "../Player/iconfont";
|
|
15
16
|
import useFullscreen from "../useFullscreen";
|
|
17
|
+
// import RatePick from './RatePick';
|
|
16
18
|
import ScreenSelect from "./ScreenSelect";
|
|
17
19
|
import TimeSelect from "./TimeSelect";
|
|
18
20
|
function RecordTools(_ref) {
|
|
19
21
|
var _player$video;
|
|
20
22
|
var containerRef = _ref.containerRef,
|
|
21
23
|
screenNum = _ref.screenNum,
|
|
22
|
-
_ref$mode = _ref.mode,
|
|
23
|
-
mode = _ref$mode === void 0 ? 1 : _ref$mode,
|
|
24
24
|
fit = _ref.fit,
|
|
25
25
|
time = _ref.time,
|
|
26
26
|
oneWinExtTools = _ref.oneWinExtTools,
|
|
27
27
|
allWinExtTools = _ref.allWinExtTools,
|
|
28
|
-
hasPlugin = _ref.hasPlugin,
|
|
29
|
-
multipleList = _ref.multipleList,
|
|
30
28
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
29
|
var _useFullscreen = useFullscreen(containerRef),
|
|
32
30
|
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
@@ -34,8 +32,8 @@ function RecordTools(_ref) {
|
|
|
34
32
|
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
35
33
|
var _useToggle = useToggle(false),
|
|
36
34
|
_useToggle2 = _slicedToArray(_useToggle, 2),
|
|
37
|
-
isFpsPlay = _useToggle2[0]
|
|
38
|
-
|
|
35
|
+
isFpsPlay = _useToggle2[0];
|
|
36
|
+
_objectDestructuringEmpty(_useToggle2[1]);
|
|
39
37
|
var update = useUpdate();
|
|
40
38
|
// 播放状态控制
|
|
41
39
|
var playToggle = function playToggle() {
|
|
@@ -59,11 +57,13 @@ function RecordTools(_ref) {
|
|
|
59
57
|
(_props$snapshot = props.snapshot) === null || _props$snapshot === void 0 || _props$snapshot.call(props, base64);
|
|
60
58
|
}
|
|
61
59
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
|
|
61
|
+
// const ratechange = (value: number) => {
|
|
62
|
+
// const player = props.getPlayerItem();
|
|
63
|
+
// player?.api.setPlaybackRate(value);
|
|
64
|
+
// update();
|
|
65
|
+
// };
|
|
66
|
+
|
|
67
67
|
var player = props.getPlayerItem();
|
|
68
68
|
useUpdateEffect(function () {
|
|
69
69
|
var player = props.getPlayerItem();
|
|
@@ -72,8 +72,8 @@ function RecordTools(_ref) {
|
|
|
72
72
|
}
|
|
73
73
|
}, [isFpsPlay]);
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* 定时获取play状态
|
|
75
|
+
/**
|
|
76
|
+
* 定时获取play状态
|
|
77
77
|
*/
|
|
78
78
|
useRafInterval(function () {
|
|
79
79
|
return update();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISegmentType } from '../Player/player';
|
|
3
|
+
interface ISegmentTimeLineProps {
|
|
4
|
+
begin?: number;
|
|
5
|
+
segments?: ISegmentType[];
|
|
6
|
+
onTimeChange: (options: {
|
|
7
|
+
currentTime?: number;
|
|
8
|
+
begin?: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
timeMode: number;
|
|
11
|
+
updateState: (state: {
|
|
12
|
+
timeMode: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
currentTime?: number;
|
|
15
|
+
}
|
|
16
|
+
declare function SegmentTimeLine({ begin, segments, onTimeChange, timeMode, updateState, currentTime }: ISegmentTimeLineProps): React.JSX.Element;
|
|
17
|
+
export default SegmentTimeLine;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Sceenplayer: {
|
|
3
|
+
LivePlayer: import("react").ComponentType<import("./interface").ILivePlayerProps>;
|
|
4
|
+
RecordPlayer: import("react").ComponentType<import("./interface").IRecordPlayerProps>;
|
|
5
|
+
};
|
|
6
|
+
export default Sceenplayer;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ISegmentType } from '../Player/player';
|
|
3
|
+
export interface ITimeSliderOptions {
|
|
4
|
+
hoursPer: number;
|
|
5
|
+
begin: number;
|
|
6
|
+
segments?: TimeCellItem[];
|
|
7
|
+
currentTime: number;
|
|
8
|
+
onTimeChange: (options: {
|
|
9
|
+
currentTime?: number;
|
|
10
|
+
begin?: number;
|
|
11
|
+
}, outTimeline?: boolean) => void;
|
|
12
|
+
onHoursPerChange: (hour: number) => void;
|
|
13
|
+
}
|
|
14
|
+
export type ITimeSliderState = {
|
|
15
|
+
hoursPer: number;
|
|
16
|
+
begin: number;
|
|
17
|
+
currentTime: number;
|
|
18
|
+
hover: {
|
|
19
|
+
x?: number;
|
|
20
|
+
time?: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type TimeCellItem = ISegmentType;
|
|
24
|
+
declare function useTimeSlider(canvasRef: React.RefObject<HTMLCanvasElement>, { hoursPer, begin, currentTime, segments, onTimeChange, onHoursPerChange }: ITimeSliderOptions): void;
|
|
25
|
+
export default useTimeSlider;
|
|
@@ -22,24 +22,24 @@ var minPerStep = [1, 2, 5, 10, 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440];
|
|
|
22
22
|
var minStepSize = 20;
|
|
23
23
|
var distance_between_gtitle = 80;
|
|
24
24
|
|
|
25
|
-
/**
|
|
26
|
-
* 下一个刻度
|
|
25
|
+
/**
|
|
26
|
+
* 下一个刻度
|
|
27
27
|
*/
|
|
28
28
|
function ms_to_next_step(timestamp, step) {
|
|
29
29
|
var remainder = timestamp % step;
|
|
30
30
|
return remainder ? step - remainder : 0;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* 返回 2018-01-01 10:00:00 格式时间
|
|
35
|
-
* @param {*} time
|
|
33
|
+
/**
|
|
34
|
+
* 返回 2018-01-01 10:00:00 格式时间
|
|
35
|
+
* @param {*} time
|
|
36
36
|
*/
|
|
37
37
|
function formartTimestemp(time) {
|
|
38
38
|
return moment(time).format('YYYY-MM-DD HH:mm:ss');
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* 返回时间轴上刻度的时间
|
|
42
|
-
* @param {*} datetime new Date 格式
|
|
40
|
+
/**
|
|
41
|
+
* 返回时间轴上刻度的时间
|
|
42
|
+
* @param {*} datetime new Date 格式
|
|
43
43
|
*/
|
|
44
44
|
function graduation_title(datetime) {
|
|
45
45
|
var mom = moment(datetime);
|
|
@@ -52,8 +52,8 @@ function graduation_title(datetime) {
|
|
|
52
52
|
return mom.format('HH:mm');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* 绘制线条
|
|
55
|
+
/**
|
|
56
|
+
* 绘制线条
|
|
57
57
|
*/
|
|
58
58
|
function drawLine(ctx, beginX, beginY, endX, endY, color, width) {
|
|
59
59
|
ctx.beginPath();
|
|
@@ -118,8 +118,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
118
118
|
return ctx === null || ctx === void 0 ? void 0 : ctx.clearRect(0, 0, width, height);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
/**
|
|
122
|
-
* 绘制覆盖时间刻度颜色,表示有录像的部分
|
|
121
|
+
/**
|
|
122
|
+
* 绘制覆盖时间刻度颜色,表示有录像的部分
|
|
123
123
|
*/
|
|
124
124
|
var drawOverlay = function drawOverlay() {
|
|
125
125
|
segments.forEach(function (item) {
|
|
@@ -134,8 +134,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
* 绘制刻度相关的
|
|
137
|
+
/**
|
|
138
|
+
* 绘制刻度相关的
|
|
139
139
|
*/
|
|
140
140
|
var drawScale = function drawScale() {
|
|
141
141
|
var px_per_min = width / (state.hoursPer * 60); // px/min
|
|
@@ -197,9 +197,9 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
/**
|
|
201
|
-
* 绘制当前刻度
|
|
202
|
-
* @returns
|
|
200
|
+
/**
|
|
201
|
+
* 绘制当前刻度
|
|
202
|
+
* @returns
|
|
203
203
|
*/
|
|
204
204
|
var drawCurrentLine = function drawCurrentLine() {
|
|
205
205
|
var currentTime = state.currentTime,
|
|
@@ -223,8 +223,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
223
223
|
drawLine(ctx, left, 20, left, height, currentColor, 2); //中间当前点线
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
-
/**
|
|
227
|
-
* 绘制提示时间
|
|
226
|
+
/**
|
|
227
|
+
* 绘制提示时间
|
|
228
228
|
*/
|
|
229
229
|
var drawHoverLine = function drawHoverLine() {
|
|
230
230
|
var _state$hover$x, _state$hover$time, _state$hover$x2, _state$hover$x3;
|
|
@@ -238,16 +238,16 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
238
238
|
drawLine(ctx, (_state$hover$x2 = state.hover.x) !== null && _state$hover$x2 !== void 0 ? _state$hover$x2 : 0, 20, (_state$hover$x3 = state.hover.x) !== null && _state$hover$x3 !== void 0 ? _state$hover$x3 : 0, height, hoverLineColor, 1);
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
/**
|
|
242
|
-
* 获取鼠标posx
|
|
243
|
-
* @param {*} e
|
|
241
|
+
/**
|
|
242
|
+
* 获取鼠标posx
|
|
243
|
+
* @param {*} e
|
|
244
244
|
*/
|
|
245
245
|
var get_cursor_x_position = function get_cursor_x_position(e) {
|
|
246
246
|
return e.offsetX;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
/**
|
|
250
|
-
* 更新画布大小
|
|
249
|
+
/**
|
|
250
|
+
* 更新画布大小
|
|
251
251
|
*/
|
|
252
252
|
useUpdateEffect(function () {
|
|
253
253
|
if (canvas) {
|
|
@@ -283,8 +283,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
283
283
|
});
|
|
284
284
|
}, [currentTime]);
|
|
285
285
|
|
|
286
|
-
/**
|
|
287
|
-
* 触发绘制范围单位(hour)
|
|
286
|
+
/**
|
|
287
|
+
* 触发绘制范围单位(hour)
|
|
288
288
|
*/
|
|
289
289
|
useEventListener('mousewheel', function (event) {
|
|
290
290
|
var _canvasRef$current, _canvasRef$current2, _canvasRef$current3;
|
|
@@ -329,8 +329,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
329
329
|
target: canvasRef
|
|
330
330
|
});
|
|
331
331
|
|
|
332
|
-
/**
|
|
333
|
-
* 用于处理canvas移除hover效果
|
|
332
|
+
/**
|
|
333
|
+
* 用于处理canvas移除hover效果
|
|
334
334
|
*/
|
|
335
335
|
useEventListener('mouseout', function () {
|
|
336
336
|
return setState(function (old) {
|
|
@@ -345,8 +345,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
345
345
|
target: canvasRef
|
|
346
346
|
});
|
|
347
347
|
|
|
348
|
-
/**
|
|
349
|
-
* hover效果绘制
|
|
348
|
+
/**
|
|
349
|
+
* hover效果绘制
|
|
350
350
|
*/
|
|
351
351
|
useEventListener('mousemove', function (e) {
|
|
352
352
|
if (extRef.current.mousedownTime) {
|
|
@@ -376,8 +376,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
376
376
|
target: canvasRef
|
|
377
377
|
});
|
|
378
378
|
|
|
379
|
-
/**
|
|
380
|
-
* 标记点击、拖动的触发器
|
|
379
|
+
/**
|
|
380
|
+
* 标记点击、拖动的触发器
|
|
381
381
|
*/
|
|
382
382
|
useEventListener('mousedown', function (e) {
|
|
383
383
|
extRef.current.mousedownTime = Date.now();
|
|
@@ -386,8 +386,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
386
386
|
target: canvasRef
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
/**
|
|
390
|
-
* 处理点击、结束拖动的处理
|
|
389
|
+
/**
|
|
390
|
+
* 处理点击、结束拖动的处理
|
|
391
391
|
*/
|
|
392
392
|
useEventListener('mouseup', function (e) {
|
|
393
393
|
if (!extRef.current.mousedownTime) {
|
|
@@ -427,8 +427,8 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
427
427
|
});
|
|
428
428
|
var moveTimerRef = useRef();
|
|
429
429
|
|
|
430
|
-
/**
|
|
431
|
-
* 拖动处理
|
|
430
|
+
/**
|
|
431
|
+
* 拖动处理
|
|
432
432
|
*/
|
|
433
433
|
useEventListener('mousemove', function (e) {
|
|
434
434
|
if (!extRef.current.mousedownTime) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ISegmentType } from '../Player/player';
|
|
2
|
+
export declare const ScreenType: {
|
|
3
|
+
name: number;
|
|
4
|
+
icon: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const TimeModeLibs: {
|
|
7
|
+
name: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function mergeFill<T, S>(len: number, mergeArr: T[] | undefined, fillItem: S): (T | S)[];
|
|
10
|
+
/**
|
|
11
|
+
* unix时间戳
|
|
12
|
+
* @param start
|
|
13
|
+
* @param end
|
|
14
|
+
* @param segments
|
|
15
|
+
*/
|
|
16
|
+
export declare const completionSegments: (start: number, end: number, segments: ISegmentType[]) => ISegmentType[];
|
|
17
|
+
export declare function sleep(time: number): Promise<unknown>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import type { RsponseType, XHRResponse } from './interface';
|
|
3
|
+
declare function http({ cancelHttp, ...newOptions }: RsponseType): Promise<any>;
|
|
4
|
+
declare const httpMultiPartInstance: AxiosInstance;
|
|
5
|
+
declare function httpXMLInstance({ url, method, data, headers, cancelHttp, isAsync }: XHRResponse): Promise<any>;
|
|
6
|
+
export { http as default, http, httpMultiPartInstance, httpXMLInstance };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InternalAxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { MiddleWareType } from './interface';
|
|
3
|
+
export declare const responseMiddleware: Array<any>;
|
|
4
|
+
export declare const responseErrorMiddleware: Array<any>;
|
|
5
|
+
export declare const requestMiddleware: Array<any>;
|
|
6
|
+
export declare function registerResponseMiddleware(fn: MiddleWareType): void;
|
|
7
|
+
export declare function registerResponseErrorMiddleware(fn: MiddleWareType): void;
|
|
8
|
+
export declare function registerRequestMiddleware(fn: (config: InternalAxiosRequestConfig<any>) => any): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 自定义事件
|
|
3
|
+
* author hjj
|
|
4
|
+
*/
|
|
5
|
+
type EventItemType = {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
listener: (data?: any) => void;
|
|
8
|
+
timer: number;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
declare class EventEmitter {
|
|
12
|
+
events: EventItemType;
|
|
13
|
+
constructor();
|
|
14
|
+
getEvents(): EventItemType;
|
|
15
|
+
once(eventName: string, listener: (...args: any) => void): void;
|
|
16
|
+
on(eventName: string, listener: (...args: any) => void, timer?: number): void;
|
|
17
|
+
emit(eventName: string, ...args: any): void;
|
|
18
|
+
remove(eventName: string): void;
|
|
19
|
+
off(eventName: string, listener: (...args: any) => void): void;
|
|
20
|
+
clear(): void;
|
|
21
|
+
trigger(eventName: string, args: any): void;
|
|
22
|
+
getListeners(eventName: string): {
|
|
23
|
+
listener: (data?: any) => void;
|
|
24
|
+
timer: number;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
27
|
+
export default EventEmitter;
|