@cloud-app-dev/vidc 3.0.36 → 3.0.38
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.
|
@@ -12,8 +12,10 @@ export declare function LivePlayerWithExt({ mode, url, type, style, className, u
|
|
|
12
12
|
interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
13
13
|
segments?: ISegmentType[];
|
|
14
14
|
begin?: number;
|
|
15
|
+
fpsDelay?: number;
|
|
16
|
+
fps?: number;
|
|
15
17
|
}
|
|
16
|
-
export declare function SegmentPlayerWithExt({ begin, style, className, segments, updatePlayer, onClick, mode, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
|
|
18
|
+
export declare function SegmentPlayerWithExt({ begin, style, className, segments, updatePlayer, onClick, mode, fpsDelay, fps, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
|
|
17
19
|
interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
|
|
18
20
|
segments?: ISegmentType[];
|
|
19
21
|
begin?: number;
|
|
@@ -74,7 +74,9 @@ export function SegmentPlayerWithExt(_a) {
|
|
|
74
74
|
updatePlayer = _a.updatePlayer,
|
|
75
75
|
onClick = _a.onClick,
|
|
76
76
|
mode = _a.mode,
|
|
77
|
-
|
|
77
|
+
fpsDelay = _a.fpsDelay,
|
|
78
|
+
fps = _a.fps,
|
|
79
|
+
props = __rest(_a, ["begin", "style", "className", "segments", "updatePlayer", "onClick", "mode", "fpsDelay", "fps"]);
|
|
78
80
|
|
|
79
81
|
var forceUpdate = _useUpdate();
|
|
80
82
|
|
|
@@ -104,6 +106,8 @@ export function SegmentPlayerWithExt(_a) {
|
|
|
104
106
|
forwordRef: ref,
|
|
105
107
|
begin: begin,
|
|
106
108
|
onCanPlayerInit: update,
|
|
109
|
+
fps: fps,
|
|
110
|
+
fpsDelay: fpsDelay,
|
|
107
111
|
customTimeLine: /*#__PURE__*/React.createElement(React.Fragment, null)
|
|
108
112
|
}))));
|
|
109
113
|
}
|
|
@@ -6,5 +6,5 @@ import './index.less';
|
|
|
6
6
|
* @param param0
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
declare function RecordPlayer({ list, children, queryRecord, onIndexChange, onClose, onCloseAll, download, snapshot, defaultScreen, screenChange, defaultSelectIndex, oneWinExtTools, allWinExtTools, ...options }: IRecordPlayerProps): JSX.Element;
|
|
9
|
+
declare function RecordPlayer({ list, children, queryRecord, onIndexChange, onClose, onCloseAll, download, snapshot, defaultScreen, screenChange, defaultSelectIndex, oneWinExtTools, allWinExtTools, fpsDelay, fps, ...options }: IRecordPlayerProps): JSX.Element;
|
|
10
10
|
export default RecordPlayer;
|
|
@@ -72,7 +72,9 @@ function RecordPlayer(_a) {
|
|
|
72
72
|
defaultSelectIndex = _a.defaultSelectIndex,
|
|
73
73
|
oneWinExtTools = _a.oneWinExtTools,
|
|
74
74
|
allWinExtTools = _a.allWinExtTools,
|
|
75
|
-
|
|
75
|
+
fpsDelay = _a.fpsDelay,
|
|
76
|
+
fps = _a.fps,
|
|
77
|
+
options = __rest(_a, ["list", "children", "queryRecord", "onIndexChange", "onClose", "onCloseAll", "download", "snapshot", "defaultScreen", "screenChange", "defaultSelectIndex", "oneWinExtTools", "allWinExtTools", "fpsDelay", "fps"]);
|
|
76
78
|
|
|
77
79
|
var _useState = useState(Object.assign(Object.assign({}, cloneDeep(defaultState)), {
|
|
78
80
|
screenNum: defaultScreen !== null && defaultScreen !== void 0 ? defaultScreen : defaultState.screenNum
|
|
@@ -281,23 +283,32 @@ function RecordPlayer(_a) {
|
|
|
281
283
|
return _context.abrupt("return");
|
|
282
284
|
|
|
283
285
|
case 5:
|
|
286
|
+
if (!(time > Date.now())) {
|
|
287
|
+
_context.next = 8;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
console.warn('查询时间超出正常范围!');
|
|
292
|
+
return _context.abrupt("return");
|
|
293
|
+
|
|
294
|
+
case 8:
|
|
284
295
|
index = segmentItem.segments.findIndex(function (v) {
|
|
285
296
|
return time >= v.beginTime && time < v.endTime;
|
|
286
297
|
});
|
|
287
298
|
|
|
288
299
|
if (!(index === -1)) {
|
|
289
|
-
_context.next =
|
|
300
|
+
_context.next = 14;
|
|
290
301
|
break;
|
|
291
302
|
}
|
|
292
303
|
|
|
293
|
-
_context.next =
|
|
304
|
+
_context.next = 12;
|
|
294
305
|
return queryRecord({
|
|
295
306
|
cid: segmentItem.cid,
|
|
296
307
|
date: time,
|
|
297
308
|
recordType: segmentItem.recordType
|
|
298
309
|
});
|
|
299
310
|
|
|
300
|
-
case
|
|
311
|
+
case 12:
|
|
301
312
|
segments = _context.sent;
|
|
302
313
|
setState(function (old) {
|
|
303
314
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -305,7 +316,7 @@ function RecordPlayer(_a) {
|
|
|
305
316
|
});
|
|
306
317
|
});
|
|
307
318
|
|
|
308
|
-
case
|
|
319
|
+
case 14:
|
|
309
320
|
//更新time
|
|
310
321
|
setState(function (old) {
|
|
311
322
|
var mergeSegments = old.mergeSegments;
|
|
@@ -326,7 +337,7 @@ function RecordPlayer(_a) {
|
|
|
326
337
|
});
|
|
327
338
|
});
|
|
328
339
|
|
|
329
|
-
case
|
|
340
|
+
case 15:
|
|
330
341
|
case "end":
|
|
331
342
|
return _context.stop();
|
|
332
343
|
}
|
|
@@ -402,7 +413,9 @@ function RecordPlayer(_a) {
|
|
|
402
413
|
width: screenType.width,
|
|
403
414
|
height: screenType.height
|
|
404
415
|
},
|
|
405
|
-
mode: (_d = item.mode) !== null && _d !== void 0 ? _d : state.modes[index]
|
|
416
|
+
mode: (_d = item.mode) !== null && _d !== void 0 ? _d : state.modes[index],
|
|
417
|
+
fps: fps,
|
|
418
|
+
fpsDelay: fpsDelay
|
|
406
419
|
})) : /*#__PURE__*/React.createElement(FrontendPlayerWithExt, Object.assign({}, item, {
|
|
407
420
|
className: state.selectIndex === index ? 'player-current-index' : '',
|
|
408
421
|
segments: ((_e = recordList[index]) === null || _e === void 0 ? void 0 : _e.segments) || [],
|