@cloud-app-dev/vidc 3.0.31 → 3.0.33
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/{RIO → ROI}/demo.d.ts +0 -0
- package/es/{RIO → ROI}/demo.js +2 -2
- package/es/{RIO → ROI}/index.css +0 -0
- package/es/{RIO → ROI}/index.d.ts +0 -0
- package/es/{RIO → ROI}/index.js +6 -6
- package/es/{RIO → ROI}/utils.d.ts +0 -0
- package/es/{RIO → ROI}/utils.js +0 -0
- package/es/ScreenPlayer/Record.js +5 -1
- package/es/ScreenPlayer/interface.d.ts +1 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- package/es/{useDrawRIO → useDrawROI}/index.d.ts +3 -3
- package/es/{useDrawRIO → useDrawROI}/index.js +2 -2
- package/es/useEventEmitterHandle/index.d.ts +2 -0
- package/es/useEventEmitterHandle/index.js +21 -0
- package/package.json +1 -1
package/es/{RIO → ROI}/demo.d.ts
RENAMED
|
File without changes
|
package/es/{RIO → ROI}/demo.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ROI from './index';
|
|
3
3
|
|
|
4
4
|
var App = function App() {
|
|
5
5
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -8,7 +8,7 @@ var App = function App() {
|
|
|
8
8
|
height: 400,
|
|
9
9
|
background: '#999'
|
|
10
10
|
}
|
|
11
|
-
}, /*#__PURE__*/React.createElement(
|
|
11
|
+
}, /*#__PURE__*/React.createElement(ROI, {
|
|
12
12
|
debug: true,
|
|
13
13
|
isOpen: true,
|
|
14
14
|
onChange: console.log
|
package/es/{RIO → ROI}/index.css
RENAMED
|
File without changes
|
|
File without changes
|
package/es/{RIO → ROI}/index.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
2
|
import React, { useEffect, useRef } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import useDrawROI from '../useDrawROI';
|
|
4
4
|
import "./index.css";
|
|
5
5
|
|
|
6
6
|
function RIO(_ref) {
|
|
@@ -13,14 +13,14 @@ function RIO(_ref) {
|
|
|
13
13
|
rowItems = _ref.rowItems;
|
|
14
14
|
var ref = useRef(null);
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _useDrawROI = useDrawROI(ref, {
|
|
17
17
|
row: row,
|
|
18
18
|
rowItems: rowItems
|
|
19
19
|
}),
|
|
20
|
-
open =
|
|
21
|
-
close =
|
|
22
|
-
clear =
|
|
23
|
-
rio =
|
|
20
|
+
open = _useDrawROI.open,
|
|
21
|
+
close = _useDrawROI.close,
|
|
22
|
+
clear = _useDrawROI.clear,
|
|
23
|
+
rio = _useDrawROI.rio; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
useEffect(function () {
|
|
File without changes
|
package/es/{RIO → ROI}/utils.js
RENAMED
|
File without changes
|
|
@@ -442,7 +442,11 @@ function RecordPlayer(_a) {
|
|
|
442
442
|
onClose: onClose,
|
|
443
443
|
onCloseAll: onCloseAll,
|
|
444
444
|
timeMode: state.timeMode,
|
|
445
|
-
download: download
|
|
445
|
+
download: download ? function () {
|
|
446
|
+
var _a;
|
|
447
|
+
|
|
448
|
+
return download((_a = segmentItem.segments) !== null && _a !== void 0 ? _a : []);
|
|
449
|
+
} : undefined,
|
|
446
450
|
snapshot: snapshot,
|
|
447
451
|
oneWinExtTools: oneWinExtTools,
|
|
448
452
|
allWinExtTools: allWinExtTools
|
package/es/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export { default as Picture } from './Picture';
|
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as PlayerExt } from './PlayerExt';
|
|
31
31
|
export { default as Progress } from './Progress';
|
|
32
|
-
export { default as
|
|
32
|
+
export { default as ROI } from './ROI';
|
|
33
33
|
export { default as ScreenPlayer } from './ScreenPlayer';
|
|
34
34
|
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
35
35
|
export { default as Service } from './Service';
|
|
@@ -37,7 +37,8 @@ export { default as TableLayout } from './TableLayout';
|
|
|
37
37
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
38
38
|
export { default as Timeout } from './Timeout';
|
|
39
39
|
export { default as Tree } from './Tree';
|
|
40
|
-
export { default as
|
|
40
|
+
export { default as useDrawROI } from './useDrawROI';
|
|
41
|
+
export { default as useEventEmitterHandle } from './useEventEmitterHandle';
|
|
41
42
|
export { default as useFullscreen } from './useFullscreen';
|
|
42
43
|
export { default as useHistory } from './useHistory';
|
|
43
44
|
export { default as useInfiniteScroll } from './useInfiniteScroll';
|
package/es/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export { default as Picture } from './Picture';
|
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as PlayerExt } from './PlayerExt';
|
|
31
31
|
export { default as Progress } from './Progress';
|
|
32
|
-
export { default as
|
|
32
|
+
export { default as ROI } from './ROI';
|
|
33
33
|
export { default as ScreenPlayer } from './ScreenPlayer';
|
|
34
34
|
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
35
35
|
export { default as Service } from './Service';
|
|
@@ -37,7 +37,8 @@ export { default as TableLayout } from './TableLayout';
|
|
|
37
37
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
38
38
|
export { default as Timeout } from './Timeout';
|
|
39
39
|
export { default as Tree } from './Tree';
|
|
40
|
-
export { default as
|
|
40
|
+
export { default as useDrawROI } from './useDrawROI';
|
|
41
|
+
export { default as useEventEmitterHandle } from './useEventEmitterHandle';
|
|
41
42
|
export { default as useFullscreen } from './useFullscreen';
|
|
42
43
|
export { default as useHistory } from './useHistory';
|
|
43
44
|
export { default as useInfiniteScroll } from './useInfiniteScroll';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BasicTarget } from 'ahooks/lib/utils/domTarget';
|
|
2
|
-
interface
|
|
2
|
+
interface ROIOptions {
|
|
3
3
|
row: number;
|
|
4
4
|
rowItems: number;
|
|
5
5
|
}
|
|
6
|
-
declare function
|
|
6
|
+
declare function useDrawROI(target: BasicTarget<HTMLCanvasElement>, { row, rowItems }: ROIOptions): {
|
|
7
7
|
open: () => void;
|
|
8
8
|
close: () => void;
|
|
9
9
|
clear: () => void;
|
|
10
10
|
rio: number[][];
|
|
11
11
|
status: string;
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default useDrawROI;
|
|
@@ -31,7 +31,7 @@ import lineToPolygon from '@turf/line-to-polygon';
|
|
|
31
31
|
import booleanDisjoint from '@turf/boolean-disjoint';
|
|
32
32
|
import { useHotkeys } from 'react-hotkeys-hook';
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function useDrawROI(target, _ref) {
|
|
35
35
|
var row = _ref.row,
|
|
36
36
|
rowItems = _ref.rowItems;
|
|
37
37
|
|
|
@@ -319,4 +319,4 @@ function useDrawRIO(target, _ref) {
|
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
export default
|
|
322
|
+
export default useDrawROI;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
2
|
+
import _useLatest from "ahooks/es/useLatest";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
function useEventEmitterHandle(eventName, handle) {
|
|
6
|
+
var handlerRef = _useLatest(handle);
|
|
7
|
+
|
|
8
|
+
useEffect(function () {
|
|
9
|
+
var eventListener = function eventListener(event) {
|
|
10
|
+
return handlerRef.current(event);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
_SocketEmitter.on(eventName, eventListener);
|
|
14
|
+
|
|
15
|
+
return function () {
|
|
16
|
+
return _SocketEmitter.off(eventName, eventListener);
|
|
17
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
|
+
}, [eventName]);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default useEventEmitterHandle;
|