@cloud-app-dev/vidc 3.2.13 → 3.2.14
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/List/DynamicGridList/index.d.ts +3 -3
- package/es/List/DynamicGridList/index.js +5 -5
- package/es/ListWithSizeAnimate/demo.d.ts +2 -0
- package/es/ListWithSizeAnimate/demo.js +19 -0
- package/es/ListWithSizeAnimate/index.d.ts +9 -0
- package/es/ListWithSizeAnimate/index.js +71 -0
- package/es/ListWithSizeAnimate/index.less +13 -0
- package/es/Picture/interface.d.ts +0 -6
- package/es/Player/contraller_bar/volume.d.ts +1 -1
- package/es/PlayerExt/index.d.ts +1 -1
- package/es/PlayerExt/index.js +4 -5
- package/es/ScreenPlayer/Live.d.ts +1 -1
- package/es/ScreenPlayer/Live.js +24 -17
- package/es/ScreenPlayer/LiveTools.d.ts +2 -2
- package/es/ScreenPlayer/LiveTools.js +9 -6
- package/es/ScreenPlayer/PlayerWithExt.d.ts +2 -2
- package/es/ScreenPlayer/PlayerWithExt.js +7 -5
- package/es/ScreenPlayer/Record.d.ts +1 -1
- package/es/ScreenPlayer/Record.js +30 -21
- package/es/ScreenPlayer/RecordTools.d.ts +2 -2
- package/es/ScreenPlayer/RecordTools.js +20 -12
- package/es/ScreenPlayer/ScreenSelect.js +4 -2
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -1
- package/es/ScreenPlayer/SegmentTimeLine.js +1 -1
- package/es/ScreenPlayer/TimeSelect.js +2 -2
- package/es/ScreenPlayer/demo2.js +1 -1
- package/es/ScreenPlayer/interface.d.ts +2 -2
- package/es/ScreenPlayer/useTimeSlider.d.ts +8 -8
- package/es/ScreenPlayer/useTimeSlider.js +23 -15
- package/es/ScreenPlayer/useVideoFit.d.ts +1 -1
- package/es/ScreenPlayer/utils.d.ts +1 -1
- package/es/ScreenPlayer/utils.js +4 -1
- package/es/ThemeAntd/style/button.less +1 -1
- package/es/ThemeAntd/style/pagination.less +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/package.json +2 -7
- package/.dumi/tmp/core/EmptyRoute.tsx +0 -9
- package/.dumi/tmp/core/defineApp.ts +0 -16
- package/.dumi/tmp/core/history.ts +0 -61
- package/.dumi/tmp/core/plugin.ts +0 -42
- package/.dumi/tmp/core/pluginConfig.d.ts +0 -276
- package/.dumi/tmp/core/polyfill.ts +0 -202
- package/.dumi/tmp/core/route.tsx +0 -38
- package/.dumi/tmp/core/terminal.ts +0 -38
- package/.dumi/tmp/dumi/exports.ts +0 -5
- package/.dumi/tmp/dumi/locales/config.ts +0 -56
- package/.dumi/tmp/dumi/locales/runtime.tsx +0 -38
- package/.dumi/tmp/dumi/meta/atoms.ts +0 -4
- package/.dumi/tmp/dumi/meta/index.ts +0 -186
- package/.dumi/tmp/dumi/meta/runtime.ts +0 -18
- package/.dumi/tmp/dumi/meta/tabs.ts +0 -8
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +0 -41
- package/.dumi/tmp/dumi/theme/builtins/API.ts +0 -4
- package/.dumi/tmp/dumi/theme/builtins/Badge.ts +0 -4
- package/.dumi/tmp/dumi/theme/builtins/Container.ts +0 -4
- package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +0 -4
- package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +0 -4
- package/.dumi/tmp/dumi/theme/builtins/Table.ts +0 -4
- package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Content.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Features.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Footer.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Header.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Hero.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Logo.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Navbar.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/NotFound.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +0 -4
- package/.dumi/tmp/dumi/theme/slots/Toc.ts +0 -4
- package/.dumi/tmp/exports.ts +0 -15
- package/.dumi/tmp/testBrowser.tsx +0 -82
- package/.dumi/tmp/tsconfig.json +0 -35
- package/.dumi/tmp/typings.d.ts +0 -136
- package/.dumi/tmp/umi.ts +0 -77
- package/.dumi/tmp-production/core/EmptyRoute.tsx +0 -9
- package/.dumi/tmp-production/core/defineApp.ts +0 -16
- package/.dumi/tmp-production/core/history.ts +0 -61
- package/.dumi/tmp-production/core/plugin.ts +0 -42
- package/.dumi/tmp-production/core/pluginConfig.d.ts +0 -276
- package/.dumi/tmp-production/core/polyfill.ts +0 -202
- package/.dumi/tmp-production/core/route.tsx +0 -38
- package/.dumi/tmp-production/core/terminal.ts +0 -38
- package/.dumi/tmp-production/dumi/exports.ts +0 -5
- package/.dumi/tmp-production/dumi/locales/config.ts +0 -56
- package/.dumi/tmp-production/dumi/locales/runtime.tsx +0 -38
- package/.dumi/tmp-production/dumi/meta/atoms.ts +0 -4
- package/.dumi/tmp-production/dumi/meta/index.ts +0 -178
- package/.dumi/tmp-production/dumi/meta/runtime.ts +0 -18
- package/.dumi/tmp-production/dumi/meta/tabs.ts +0 -5
- package/.dumi/tmp-production/dumi/theme/ContextWrapper.tsx +0 -41
- package/.dumi/tmp-production/dumi/theme/builtins/API.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/builtins/Badge.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/builtins/Container.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/builtins/Previewer.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/builtins/SourceCode.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/builtins/Table.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/layouts/DocLayout.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Content.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/ContentTabs.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Features.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Footer.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Header.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Hero.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/HeroTitle.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/LangSwitch.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Logo.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Navbar.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/NotFound.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActions.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActionsExtra.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/RtlSwitch.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/SearchBar.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/SearchResult.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Sidebar.ts +0 -4
- package/.dumi/tmp-production/dumi/theme/slots/Toc.ts +0 -4
- package/.dumi/tmp-production/exports.ts +0 -14
- package/.dumi/tmp-production/testBrowser.tsx +0 -82
- package/.dumi/tmp-production/tsconfig.json +0 -35
- package/.dumi/tmp-production/typings.d.ts +0 -136
- package/.dumi/tmp-production/umi.ts +0 -77
- package/.stylelintrc +0 -3
- package/clear-cache.sh +0 -4
|
@@ -2,7 +2,7 @@ import _useRafInterval from "ahooks/es/useRafInterval";
|
|
|
2
2
|
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
3
3
|
import _useUpdate from "ahooks/es/useUpdate";
|
|
4
4
|
import _useToggle3 from "ahooks/es/useToggle";
|
|
5
|
-
var _excluded = ["containerRef", "screenNum", "
|
|
5
|
+
var _excluded = ["containerRef", "screenNum", "mode", "fit", "time", "oneWinExtTools", "allWinExtTools", "hasPlugin"];
|
|
6
6
|
|
|
7
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
|
|
@@ -21,12 +21,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
21
21
|
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; }
|
|
22
22
|
|
|
23
23
|
import React from 'react';
|
|
24
|
+
import Volume from "../Player/contraller_bar/volume";
|
|
24
25
|
import IconFont from "../Player/iconfont";
|
|
25
|
-
import ScreenSelect from "./ScreenSelect";
|
|
26
|
-
import TimeSelect from "./TimeSelect";
|
|
27
26
|
import useFullscreen from "../useFullscreen";
|
|
28
|
-
import Volume from "../Player/contraller_bar/volume";
|
|
29
27
|
import RatePick from "./RatePick";
|
|
28
|
+
import ScreenSelect from "./ScreenSelect";
|
|
29
|
+
import TimeSelect from "./TimeSelect";
|
|
30
30
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
31
31
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
32
|
|
|
@@ -35,7 +35,6 @@ function RecordTools(_ref) {
|
|
|
35
35
|
|
|
36
36
|
var containerRef = _ref.containerRef,
|
|
37
37
|
screenNum = _ref.screenNum,
|
|
38
|
-
timeMode = _ref.timeMode,
|
|
39
38
|
_ref$mode = _ref.mode,
|
|
40
39
|
mode = _ref$mode === void 0 ? 1 : _ref$mode,
|
|
41
40
|
fit = _ref.fit,
|
|
@@ -73,10 +72,14 @@ function RecordTools(_ref) {
|
|
|
73
72
|
};
|
|
74
73
|
|
|
75
74
|
var snapshotaction = function snapshotaction() {
|
|
76
|
-
var _props$snapshot;
|
|
77
|
-
|
|
78
75
|
var player = props.getPlayerItem();
|
|
79
|
-
|
|
76
|
+
var base64 = player === null || player === void 0 ? void 0 : player.api.snapshot();
|
|
77
|
+
|
|
78
|
+
if (base64) {
|
|
79
|
+
var _props$snapshot;
|
|
80
|
+
|
|
81
|
+
(_props$snapshot = props.snapshot) === null || _props$snapshot === void 0 ? void 0 : _props$snapshot.call(props, base64);
|
|
82
|
+
}
|
|
80
83
|
};
|
|
81
84
|
|
|
82
85
|
var ratechange = function ratechange(value) {
|
|
@@ -89,7 +92,10 @@ function RecordTools(_ref) {
|
|
|
89
92
|
|
|
90
93
|
_useUpdateEffect(function () {
|
|
91
94
|
var player = props.getPlayerItem();
|
|
92
|
-
|
|
95
|
+
|
|
96
|
+
if (player) {
|
|
97
|
+
isFpsPlay ? player.api.openFpsPlay() : player.api.closeFpsPlay();
|
|
98
|
+
}
|
|
93
99
|
}, [isFpsPlay]);
|
|
94
100
|
/**
|
|
95
101
|
* 定时获取play状态
|
|
@@ -141,7 +147,7 @@ function RecordTools(_ref) {
|
|
|
141
147
|
type: "lm-player-S_Device_shezhi",
|
|
142
148
|
style: mode === 2 ? {
|
|
143
149
|
color: 'var(--primary)'
|
|
144
|
-
} :
|
|
150
|
+
} : undefined,
|
|
145
151
|
className: "icon-chajian",
|
|
146
152
|
title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
|
|
147
153
|
})
|
|
@@ -152,7 +158,7 @@ function RecordTools(_ref) {
|
|
|
152
158
|
type: "lm-player-zhuzhenplay",
|
|
153
159
|
style: isFpsPlay ? {
|
|
154
160
|
color: 'var(--primary)'
|
|
155
|
-
} :
|
|
161
|
+
} : undefined,
|
|
156
162
|
title: "\u9010\u5E27\u64AD\u653E"
|
|
157
163
|
})
|
|
158
164
|
}), /*#__PURE__*/_jsx(RatePick, {
|
|
@@ -174,7 +180,9 @@ function RecordTools(_ref) {
|
|
|
174
180
|
}), /*#__PURE__*/_jsx(TimeSelect, {
|
|
175
181
|
time: time,
|
|
176
182
|
onChange: function onChange(time) {
|
|
177
|
-
|
|
183
|
+
var _props$onTimeChange;
|
|
184
|
+
|
|
185
|
+
return (_props$onTimeChange = props.onTimeChange) === null || _props$onTimeChange === void 0 ? void 0 : _props$onTimeChange.call(props, {
|
|
178
186
|
curentTime: time
|
|
179
187
|
});
|
|
180
188
|
}
|
|
@@ -11,9 +11,11 @@ function ScreenSelect(_ref) {
|
|
|
11
11
|
var screenNum = _ref.screenNum,
|
|
12
12
|
updateState = _ref.updateState;
|
|
13
13
|
var icon = useMemo(function () {
|
|
14
|
-
|
|
14
|
+
var _ScreenType$find;
|
|
15
|
+
|
|
16
|
+
return (_ScreenType$find = ScreenType.find(function (v) {
|
|
15
17
|
return v.name === screenNum;
|
|
16
|
-
}).icon;
|
|
18
|
+
})) === null || _ScreenType$find === void 0 ? void 0 : _ScreenType$find.icon;
|
|
17
19
|
}, [screenNum]);
|
|
18
20
|
return /*#__PURE__*/_jsx(CustomRenderSelect, {
|
|
19
21
|
value: screenNum,
|
|
@@ -18,8 +18,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
18
18
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
|
|
21
|
-
import React, { useMemo, useState } from 'react';
|
|
22
21
|
import moment from 'moment';
|
|
22
|
+
import React, { useMemo, useState } from 'react';
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
|
|
@@ -59,7 +59,7 @@ function TimeSelect(_ref) {
|
|
|
59
59
|
minutes: values[1],
|
|
60
60
|
seconds: values[2]
|
|
61
61
|
}).valueOf();
|
|
62
|
-
onChange
|
|
62
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newTime);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
_useUpdateEffect(function () {
|
package/es/ScreenPlayer/demo2.js
CHANGED
|
@@ -44,7 +44,7 @@ import RecordPlayer from "./Record";
|
|
|
44
44
|
import { completionSegments } from "./utils";
|
|
45
45
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
46
46
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
47
|
-
var token = "eyJhbGciOiJIUzI1NiJ9.
|
|
47
|
+
var token = "eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NSIsImV4dCI6MTY2OTM3MzQ3NDc2MywidWlkIjoiMTAxMDAwMDAwNjk5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTA1MTgsMTAwMDAwMTEwNzI4XSwidmFsaWRUaW1lIjoxNzA0MzgzOTk5MDAwLCJvcHRDZW50ZXJJZCI6IjEwMDEwMDAwMDIzMyIsInVzZXJUeXBlIjoxMDA3MDQsImlhdCI6MTY2OTExNDI3NDc2M30.Wy8ag8Nhw6_mdF6E4i2lPGDYzRVl-q9KMn49WMFL2Qs";
|
|
48
48
|
var cids = ['560077633', '560073578'];
|
|
49
49
|
|
|
50
50
|
var query = function query(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { ExportPlayerType, ISegmentType } from '../Player/player';
|
|
2
3
|
import type { PlayModeType } from '../PlayerExt';
|
|
3
|
-
import type { ISegmentType, ExportPlayerType } from '../Player/player';
|
|
4
4
|
|
|
5
5
|
export type RecordItem = {
|
|
6
6
|
type?: 'flv' | 'hls' | 'native';
|
|
@@ -120,7 +120,7 @@ export interface IRecordPlayerState {
|
|
|
120
120
|
currentTimes: { [key: string]: number };
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
*
|
|
124
124
|
*/
|
|
125
125
|
begins: { [key: string]: number };
|
|
126
126
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ISegmentType } from '../Player/player';
|
|
3
3
|
export interface ITimeSliderOptions {
|
|
4
|
-
hoursPer
|
|
5
|
-
begin
|
|
4
|
+
hoursPer: number;
|
|
5
|
+
begin: number;
|
|
6
6
|
segments?: TimeCellItem[];
|
|
7
|
-
currentTime
|
|
8
|
-
onTimeChange
|
|
7
|
+
currentTime: number;
|
|
8
|
+
onTimeChange: (options: {
|
|
9
9
|
currentTime?: number;
|
|
10
10
|
begin?: number;
|
|
11
11
|
}, outTimeline?: boolean) => void;
|
|
12
|
-
onHoursPerChange
|
|
12
|
+
onHoursPerChange: (hour: number) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare type ITimeSliderState = {
|
|
15
15
|
hoursPer: number;
|
|
16
16
|
begin: number;
|
|
17
17
|
currentTime: number;
|
|
18
18
|
hover: {
|
|
19
|
-
x
|
|
20
|
-
time
|
|
19
|
+
x?: number;
|
|
20
|
+
time?: number;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export declare type TimeCellItem = ISegmentType;
|
|
24
|
-
declare function useTimeSlider(canvasRef: React.
|
|
24
|
+
declare function useTimeSlider(canvasRef: React.RefObject<HTMLCanvasElement>, { hoursPer, begin, currentTime, segments, onTimeChange, onHoursPerChange }: ITimeSliderOptions): void;
|
|
25
25
|
export default useTimeSlider;
|
|
@@ -105,7 +105,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
105
105
|
currentTime: currentTime,
|
|
106
106
|
hover: {
|
|
107
107
|
x: 0,
|
|
108
|
-
time:
|
|
108
|
+
time: undefined
|
|
109
109
|
}
|
|
110
110
|
}),
|
|
111
111
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -113,7 +113,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
113
113
|
setState = _useState2[1];
|
|
114
114
|
|
|
115
115
|
var extRef = useRef({
|
|
116
|
-
mousedownTime:
|
|
116
|
+
mousedownTime: undefined,
|
|
117
117
|
mousedownX: 0
|
|
118
118
|
});
|
|
119
119
|
|
|
@@ -140,7 +140,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
var clearCanvas = function clearCanvas() {
|
|
143
|
-
return ctx.clearRect(0, 0, width, height);
|
|
143
|
+
return ctx === null || ctx === void 0 ? void 0 : ctx.clearRect(0, 0, width, height);
|
|
144
144
|
};
|
|
145
145
|
/**
|
|
146
146
|
* 绘制覆盖时间刻度颜色,表示有录像的部分
|
|
@@ -149,14 +149,17 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
149
149
|
|
|
150
150
|
var drawOverlay = function drawOverlay() {
|
|
151
151
|
segments.forEach(function (item) {
|
|
152
|
-
var _item$style;
|
|
153
|
-
|
|
154
152
|
var px_ms = width / (state.hoursPer * 60 * 60 * 1000); // px/ms
|
|
155
153
|
|
|
156
154
|
var beginX = (item.beginTime - state.begin) * px_ms;
|
|
157
155
|
var scale_width = (item.endTime - item.beginTime) * px_ms;
|
|
158
|
-
|
|
159
|
-
ctx
|
|
156
|
+
|
|
157
|
+
if (ctx) {
|
|
158
|
+
var _item$style;
|
|
159
|
+
|
|
160
|
+
ctx.fillStyle = item.url ? ((_item$style = item.style) === null || _item$style === void 0 ? void 0 : _item$style.background) || hoverLineColor : '#242C3D';
|
|
161
|
+
ctx.fillRect(beginX, height - 10, scale_width + 1, height);
|
|
162
|
+
}
|
|
160
163
|
});
|
|
161
164
|
};
|
|
162
165
|
/**
|
|
@@ -275,14 +278,16 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
275
278
|
|
|
276
279
|
|
|
277
280
|
var drawHoverLine = function drawHoverLine() {
|
|
281
|
+
var _state$hover$x, _state$hover$time, _state$hover$x2, _state$hover$x3;
|
|
282
|
+
|
|
278
283
|
drawText(ctx, {
|
|
279
284
|
fillStyle: hoverLineColor,
|
|
280
285
|
font: '12px Arial',
|
|
281
|
-
x: state.hover.x - 50,
|
|
286
|
+
x: (_state$hover$x = state.hover.x) !== null && _state$hover$x !== void 0 ? _state$hover$x : 0 - 50,
|
|
282
287
|
y: 12,
|
|
283
|
-
text: formartTimestemp(state.hover.time)
|
|
288
|
+
text: formartTimestemp((_state$hover$time = state.hover.time) !== null && _state$hover$time !== void 0 ? _state$hover$time : 0)
|
|
284
289
|
});
|
|
285
|
-
drawLine(ctx, state.hover.x, 20, state.hover.x, height, hoverLineColor, 1);
|
|
290
|
+
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);
|
|
286
291
|
};
|
|
287
292
|
/**
|
|
288
293
|
* 获取鼠标posx
|
|
@@ -311,7 +316,10 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
311
316
|
drawOverlay();
|
|
312
317
|
drawScale();
|
|
313
318
|
drawCurrentLine();
|
|
314
|
-
|
|
319
|
+
|
|
320
|
+
if (state.hover.time) {
|
|
321
|
+
drawHoverLine();
|
|
322
|
+
}
|
|
315
323
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
316
324
|
|
|
317
325
|
}, [canvas, state.begin, state.currentTime, state.hoursPer, segments, state.hover, size]);
|
|
@@ -387,7 +395,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
387
395
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
388
396
|
hover: {
|
|
389
397
|
x: 0,
|
|
390
|
-
time:
|
|
398
|
+
time: undefined
|
|
391
399
|
}
|
|
392
400
|
});
|
|
393
401
|
});
|
|
@@ -405,7 +413,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
405
413
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
406
414
|
hover: old.hover.time ? {
|
|
407
415
|
x: 0,
|
|
408
|
-
time:
|
|
416
|
+
time: undefined
|
|
409
417
|
} : old.hover
|
|
410
418
|
});
|
|
411
419
|
});
|
|
@@ -480,13 +488,13 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
480
488
|
} // 清楚拖拽关联信息
|
|
481
489
|
|
|
482
490
|
|
|
483
|
-
extRef.current.mousedownTime =
|
|
491
|
+
extRef.current.mousedownTime = undefined;
|
|
484
492
|
extRef.current.mousedownX = 0;
|
|
485
493
|
}, {
|
|
486
494
|
target: document
|
|
487
495
|
});
|
|
488
496
|
|
|
489
|
-
var moveTimerRef = useRef(
|
|
497
|
+
var moveTimerRef = useRef();
|
|
490
498
|
/**
|
|
491
499
|
* 拖动处理
|
|
492
500
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export default function useVideoFit(containerRef: React.
|
|
2
|
+
export default function useVideoFit(containerRef: React.RefObject<HTMLDivElement>, deps?: any[]): {
|
|
3
3
|
fit: string;
|
|
4
4
|
toggleFit: () => void;
|
|
5
5
|
};
|
|
@@ -8,7 +8,7 @@ export declare const ScreenType: {
|
|
|
8
8
|
export declare const TimeModeLibs: {
|
|
9
9
|
name: number;
|
|
10
10
|
}[];
|
|
11
|
-
export declare function mergeFill<T, S>(len: number, mergeArr: T[], fillItem: S): (T | S)[];
|
|
11
|
+
export declare function mergeFill<T, S>(len: number, mergeArr: T[] | undefined, fillItem: S): (T | S)[];
|
|
12
12
|
/**
|
|
13
13
|
* unix时间戳
|
|
14
14
|
* @param start
|
package/es/ScreenPlayer/utils.js
CHANGED
|
@@ -33,7 +33,9 @@ export var TimeModeLibs = [{
|
|
|
33
33
|
}, {
|
|
34
34
|
name: 24
|
|
35
35
|
}];
|
|
36
|
-
export function mergeFill(len
|
|
36
|
+
export function mergeFill(len) {
|
|
37
|
+
var mergeArr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
38
|
+
var fillItem = arguments.length > 2 ? arguments[2] : undefined;
|
|
37
39
|
return new Array(len).fill(fillItem).map(function (v, i) {
|
|
38
40
|
return mergeArr[i] ? mergeArr[i] : v;
|
|
39
41
|
});
|
|
@@ -80,6 +82,7 @@ export var completionSegments = function completionSegments(start, end, segments
|
|
|
80
82
|
return arr;
|
|
81
83
|
};
|
|
82
84
|
export function sleep(time) {
|
|
85
|
+
// eslint-disable-next-line no-promise-executor-return
|
|
83
86
|
return new Promise(function (reslove) {
|
|
84
87
|
return setTimeout(function () {
|
|
85
88
|
return reslove(time);
|
|
@@ -53,7 +53,7 @@ div {
|
|
|
53
53
|
.@{ant-prefix}-pagination-next:hover:not(.@{ant-prefix}-pagination-disabled) .@{ant-prefix}-pagination-item-link {
|
|
54
54
|
background-color: var(--form-active-bg);
|
|
55
55
|
border-color: var(--form-active-bg);
|
|
56
|
-
color:
|
|
56
|
+
color: #fff;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.@{ant-prefix}-pagination-disabled .@{ant-prefix}-pagination-item-link,
|
package/es/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { default as Input } from './Input';
|
|
|
21
21
|
export { default as InstanceHistory } from './InstanceHistory';
|
|
22
22
|
export { default as LabelValue } from './LabelValue';
|
|
23
23
|
export { default as List } from './List';
|
|
24
|
+
export { default as ListWithSizeAnimate } from './ListWithSizeAnimate';
|
|
24
25
|
export { default as LoaderApp } from './LoaderApp';
|
|
25
26
|
export { default as LoaderScript } from './LoaderScript';
|
|
26
27
|
export { default as Map } from './Map';
|
package/es/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { default as Input } from "./Input";
|
|
|
21
21
|
export { default as InstanceHistory } from "./InstanceHistory";
|
|
22
22
|
export { default as LabelValue } from "./LabelValue";
|
|
23
23
|
export { default as List } from "./List";
|
|
24
|
+
export { default as ListWithSizeAnimate } from "./ListWithSizeAnimate";
|
|
24
25
|
export { default as LoaderApp } from "./LoaderApp";
|
|
25
26
|
export { default as LoaderScript } from "./LoaderScript";
|
|
26
27
|
export { default as Map } from "./Map";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@cloud-app-dev/vidc",
|
|
4
4
|
"description": "Video Image Data Componennts",
|
|
5
|
-
"version": "3.2.
|
|
5
|
+
"version": "3.2.14",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
8
|
"build": "npm run entry && father build",
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
"docs:build": "dumi build",
|
|
15
15
|
"prepare": "husky install && dumi setup",
|
|
16
16
|
"doctor": "father doctor",
|
|
17
|
-
"lint": "npm run lint:es && npm run lint:css",
|
|
18
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
19
17
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\""
|
|
20
18
|
},
|
|
21
19
|
"main": "es/index.js",
|
|
@@ -31,7 +29,6 @@
|
|
|
31
29
|
"prettier --write --no-error-on-unmatched-pattern"
|
|
32
30
|
],
|
|
33
31
|
"*.{css,less}": [
|
|
34
|
-
"stylelint --fix",
|
|
35
32
|
"prettier --write"
|
|
36
33
|
],
|
|
37
34
|
"*.{js,jsx}": [
|
|
@@ -75,15 +72,13 @@
|
|
|
75
72
|
"react-router-dom": "^6.3.0",
|
|
76
73
|
"@commitlint/cli": "^17.1.2",
|
|
77
74
|
"@commitlint/config-conventional": "^17.1.0",
|
|
78
|
-
"@umijs/lint": "^4.0.32",
|
|
79
75
|
"eslint": "^8.28.0",
|
|
80
76
|
"father": "^4.1.0",
|
|
81
77
|
"husky": "^8.0.1",
|
|
82
78
|
"lint-staged": "^13.0.3",
|
|
83
79
|
"prettier": "^2.7.1",
|
|
84
80
|
"prettier-plugin-organize-imports": "^3.0.0",
|
|
85
|
-
"prettier-plugin-packagejson": "^2.2.18"
|
|
86
|
-
"stylelint": "^14.9.1"
|
|
81
|
+
"prettier-plugin-packagejson": "^2.2.18"
|
|
87
82
|
}
|
|
88
83
|
|
|
89
84
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Outlet, useOutletContext } from 'umi';
|
|
6
|
-
export default function EmptyRoute() {
|
|
7
|
-
const context = useOutletContext();
|
|
8
|
-
return <Outlet context={context} />;
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
interface IDefaultRuntimeConfig {
|
|
5
|
-
onRouteChange?: (props: { routes: any, clientRoutes: any, location: any, action:any }) => void;
|
|
6
|
-
patchRoutes?: (props: { routes: any }) => void;
|
|
7
|
-
patchClientRoutes?: (props: { routes: any }) => void;
|
|
8
|
-
render?: (oldRender: () => void) => void;
|
|
9
|
-
rootContainer?: (lastRootContainer: JSX.Element, args?: any) => void;
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export type RuntimeConfig = IDefaultRuntimeConfig
|
|
13
|
-
|
|
14
|
-
export function defineApp(config: RuntimeConfig): RuntimeConfig {
|
|
15
|
-
return config;
|
|
16
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import { createHashHistory, createMemoryHistory, createBrowserHistory, History } from '/Users/huang/project/vidc/node_modules/.pnpm/@umijs+renderer-react@4.0.32_ef5jwxihqo6n7gxfmzogljlgcm/node_modules/@umijs/renderer-react';
|
|
5
|
-
|
|
6
|
-
let history: History;
|
|
7
|
-
let basename: string = '/';
|
|
8
|
-
export function createHistory(opts: any) {
|
|
9
|
-
let h;
|
|
10
|
-
if (opts.type === 'hash') {
|
|
11
|
-
h = createHashHistory();
|
|
12
|
-
} else if (opts.type === 'memory') {
|
|
13
|
-
h = createMemoryHistory(opts);
|
|
14
|
-
} else {
|
|
15
|
-
h = createBrowserHistory();
|
|
16
|
-
}
|
|
17
|
-
if (opts.basename) {
|
|
18
|
-
basename = opts.basename;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
history = {
|
|
22
|
-
...h,
|
|
23
|
-
push(to, state) {
|
|
24
|
-
h.push(patchTo(to), state);
|
|
25
|
-
},
|
|
26
|
-
replace(to, state) {
|
|
27
|
-
h.replace(patchTo(to), state);
|
|
28
|
-
},
|
|
29
|
-
get location() {
|
|
30
|
-
return h.location;
|
|
31
|
-
},
|
|
32
|
-
get action() {
|
|
33
|
-
return h.action;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return h;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Patch `to` to support basename
|
|
41
|
-
// Refs:
|
|
42
|
-
// https://github.com/remix-run/history/blob/3e9dab4/packages/history/index.ts#L484
|
|
43
|
-
// https://github.com/remix-run/history/blob/dev/docs/api-reference.md#to
|
|
44
|
-
function patchTo(to: any) {
|
|
45
|
-
if (typeof to === 'string') {
|
|
46
|
-
return `${stripLastSlash(basename)}${to}`;
|
|
47
|
-
} else if (typeof to === 'object' && to.pathname) {
|
|
48
|
-
return {
|
|
49
|
-
...to,
|
|
50
|
-
pathname: `${stripLastSlash(basename)}${to.pathname}`,
|
|
51
|
-
};
|
|
52
|
-
} else {
|
|
53
|
-
throw new Error(`Unexpected to: ${to}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function stripLastSlash(path) {
|
|
58
|
-
return path.slice(-1) === '/' ? path.slice(0, -1) : path;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { history };
|
package/.dumi/tmp/core/plugin.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import * as Plugin_0 from '@@/dumi/meta/runtime.ts';
|
|
5
|
-
import * as Plugin_1 from '@@/dumi/locales/runtime.tsx';
|
|
6
|
-
import { PluginManager } from 'umi';
|
|
7
|
-
|
|
8
|
-
function __defaultExport (obj) {
|
|
9
|
-
if (obj.default) {
|
|
10
|
-
return typeof obj.default === 'function' ? obj.default() : obj.default
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
export function getPlugins() {
|
|
15
|
-
return [
|
|
16
|
-
{
|
|
17
|
-
apply: Plugin_0,
|
|
18
|
-
path: process.env.NODE_ENV === 'production' ? void 0 : '@@/dumi/meta/runtime.ts',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
apply: Plugin_1,
|
|
22
|
-
path: process.env.NODE_ENV === 'production' ? void 0 : '@@/dumi/locales/runtime.tsx',
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function getValidKeys() {
|
|
28
|
-
return ['patchRoutes','patchClientRoutes','modifyContextOpts','rootContainer','innerProvider','i18nProvider','accessProvider','dataflowProvider','outerProvider','render','onRouteChange',];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let pluginManager = null;
|
|
32
|
-
export function createPluginManager() {
|
|
33
|
-
pluginManager = PluginManager.create({
|
|
34
|
-
plugins: getPlugins(),
|
|
35
|
-
validKeys: getValidKeys(),
|
|
36
|
-
});
|
|
37
|
-
return pluginManager;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function getPluginManager() {
|
|
41
|
-
return pluginManager;
|
|
42
|
-
}
|