@cloud-app-dev/vidc 3.2.34 → 3.2.36
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/DomMove/index.js +2 -2
- package/es/Picture/demo.js +42 -6
- package/es/Picture/index.js +6 -1
- package/es/ScreenPlayer/Record.d.ts +1 -1
- package/es/ScreenPlayer/Record.js +2 -2
- package/package.json +2 -2
package/es/DomMove/index.js
CHANGED
|
@@ -149,8 +149,8 @@ function DomMove(_ref) {
|
|
|
149
149
|
DomMove.defaultProps = {
|
|
150
150
|
className: '',
|
|
151
151
|
size: {
|
|
152
|
-
width: '
|
|
153
|
-
height: '
|
|
152
|
+
width: '100%',
|
|
153
|
+
height: '100%'
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
package/es/Picture/demo.js
CHANGED
|
@@ -17,19 +17,21 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import Picture from '.';
|
|
20
|
-
import { useSimpleState } from '..';
|
|
20
|
+
import { Modal, useSimpleState } from '..';
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
23
|
export default function App() {
|
|
23
24
|
var _useSimpleState = useSimpleState({
|
|
24
|
-
open: false
|
|
25
|
+
open: false,
|
|
26
|
+
open2: false
|
|
25
27
|
}),
|
|
26
28
|
_useSimpleState2 = _slicedToArray(_useSimpleState, 2),
|
|
27
29
|
state = _useSimpleState2[0],
|
|
28
30
|
updateState = _useSimpleState2[1];
|
|
29
31
|
|
|
30
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/_jsxs(_ConfigProvider, {
|
|
31
33
|
prefixCls: "cloudapp",
|
|
32
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
34
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
33
35
|
style: {
|
|
34
36
|
width: 800,
|
|
35
37
|
height: 600,
|
|
@@ -43,7 +45,7 @@ export default function App() {
|
|
|
43
45
|
pathname: '/',
|
|
44
46
|
icon: ''
|
|
45
47
|
}],
|
|
46
|
-
imagePath: "http://192.168.100.246:
|
|
48
|
+
imagePath: "http://192.168.100.246:5463/oss/v1/100004008/objects/638da35805f5f0a8101021f9?client_token=100004008_0_1670313176_9a47a8459c120d977904c9feb2354a7e",
|
|
47
49
|
isOpenSelect: state.open,
|
|
48
50
|
rects: [{
|
|
49
51
|
type: 'face',
|
|
@@ -73,6 +75,40 @@ export default function App() {
|
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
})
|
|
76
|
-
})
|
|
78
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
79
|
+
style: {
|
|
80
|
+
width: 800,
|
|
81
|
+
height: 600,
|
|
82
|
+
background: '#000',
|
|
83
|
+
marginTop: 40
|
|
84
|
+
},
|
|
85
|
+
children: [/*#__PURE__*/_jsx(_Button, {
|
|
86
|
+
onClick: function onClick() {
|
|
87
|
+
return updateState({
|
|
88
|
+
open2: true
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
children: "\u6253\u5F00"
|
|
92
|
+
}), /*#__PURE__*/_jsx(Modal, {
|
|
93
|
+
title: "modal",
|
|
94
|
+
open: state.open2,
|
|
95
|
+
onCancel: function onCancel() {
|
|
96
|
+
return updateState({
|
|
97
|
+
open2: false
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
width: 844,
|
|
101
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
102
|
+
style: {
|
|
103
|
+
width: 800,
|
|
104
|
+
height: 600
|
|
105
|
+
},
|
|
106
|
+
children: /*#__PURE__*/_jsx(Picture, {
|
|
107
|
+
imagePath: "http://192.168.100.246:5463/oss/v1/100004008/objects/638da35805f5f0a8101021f9?client_token=100004008_0_1670313176_9a47a8459c120d977904c9feb2354a7e",
|
|
108
|
+
isOpenSelect: false
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
})]
|
|
112
|
+
})]
|
|
77
113
|
});
|
|
78
114
|
}
|
package/es/Picture/index.js
CHANGED
|
@@ -97,7 +97,6 @@ function Picture(_ref) {
|
|
|
97
97
|
return undefined;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
console.log(imagePath);
|
|
101
100
|
var localUrl;
|
|
102
101
|
fetch(imagePath).then(function (res) {
|
|
103
102
|
return res.blob();
|
|
@@ -106,6 +105,8 @@ function Picture(_ref) {
|
|
|
106
105
|
updateState({
|
|
107
106
|
localUrl: localUrl
|
|
108
107
|
});
|
|
108
|
+
}).catch(function (e) {
|
|
109
|
+
console.error(e);
|
|
109
110
|
});
|
|
110
111
|
return function () {
|
|
111
112
|
return URL.revokeObjectURL(localUrl);
|
|
@@ -363,6 +364,10 @@ function Picture(_ref) {
|
|
|
363
364
|
ref: domImgRef,
|
|
364
365
|
draggable: false,
|
|
365
366
|
src: state.localUrl,
|
|
367
|
+
style: {
|
|
368
|
+
width: state.baseXOrY === 'x' ? '100%' : 'auto',
|
|
369
|
+
height: state.baseXOrY === 'y' ? '100%' : 'auto'
|
|
370
|
+
},
|
|
366
371
|
"data-src": imagePath,
|
|
367
372
|
onLoad: loadImageSuccess
|
|
368
373
|
}), !isEmpty ? /*#__PURE__*/_jsx(DrawRect, {
|
|
@@ -35,12 +35,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
35
35
|
import { cloneDeep } from 'lodash-es';
|
|
36
36
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
37
37
|
import DisableMark from "../DisableMark";
|
|
38
|
-
import "./index.less";
|
|
39
38
|
import { FrontendPlayerWithExt, SegmentPlayerWithExt } from "./PlayerWithExt";
|
|
40
39
|
import RecordTools from "./RecordTools";
|
|
41
40
|
import SegmentTimeLine from "./SegmentTimeLine";
|
|
42
41
|
import useVideoFit from "./useVideoFit";
|
|
43
42
|
import { mergeFill, ScreenType, sleep } from "./utils";
|
|
43
|
+
import "./index.less";
|
|
44
44
|
import { createElement as _createElement } from "react";
|
|
45
45
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
46
46
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -492,7 +492,7 @@ function RecordPlayer(_ref) {
|
|
|
492
492
|
toggleFit: toggleFit,
|
|
493
493
|
getPlayerItem: getPlayerItem,
|
|
494
494
|
screenNum: screenNum,
|
|
495
|
-
mode: state.modes[
|
|
495
|
+
mode: segmentItem !== null && segmentItem !== void 0 && segmentItem.cid ? state.modes["".concat(segmentItem.cid, "-").concat(segmentItem.date)] : segmentItem === null || segmentItem === void 0 ? void 0 : segmentItem.mode,
|
|
496
496
|
containerRef: domRef,
|
|
497
497
|
updateState: updateState,
|
|
498
498
|
onTimeChange: onTimeChange,
|
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.36",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
8
|
"build": "npm run entry && father build",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/react-dom": "^18.0.6",
|
|
67
67
|
"antd": "^4.22.6",
|
|
68
68
|
"babel-plugin-import": "^1.13.5",
|
|
69
|
-
"dumi": "^2.0.
|
|
69
|
+
"dumi": "^2.0.10",
|
|
70
70
|
"gh-pages": "^4.0.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|