@cloud-app-dev/vidc 3.1.20 → 3.1.21

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.
@@ -124,10 +124,10 @@ function LivePlayer(_a) {
124
124
  className: "player-layout",
125
125
  ref: domRef
126
126
  }, screenList.map(function (item, index) {
127
- var _a;
127
+ var _a, _b;
128
128
  return /*#__PURE__*/React.createElement(LivePlayerWithExt, Object.assign({}, item, {
129
129
  mode: (_a = state.modes[index]) !== null && _a !== void 0 ? _a : item.mode,
130
- key: "".concat(item.url, "-").concat(index),
130
+ key: (_b = item.url) !== null && _b !== void 0 ? _b : "".concat(index),
131
131
  updatePlayer: function updatePlayer(player) {
132
132
  return playerRef.current[index] = player;
133
133
  },
@@ -24,8 +24,8 @@ import SegmentTimeLine from './SegmentTimeLine';
24
24
  import useRecordList from './useRecordList';
25
25
  import useVideoFit from './useVideoFit';
26
26
  import DisableMark from '../DisableMark';
27
- import "./index.css";
28
27
  import { cloneDeep } from 'lodash-es';
28
+ import "./index.css";
29
29
  var defaultState = {
30
30
  screenNum: 4,
31
31
  selectIndex: 0,
@@ -80,6 +80,7 @@ function RecordPlayer(_a) {
80
80
  return v.name === screenNum;
81
81
  });
82
82
  }, [screenNum]);
83
+ // 填充数据扩充list.length
83
84
  var screenList = useMemo(function () {
84
85
  return mergeFill(screenNum, list, {
85
86
  recordType: 1
@@ -344,10 +345,10 @@ function RecordPlayer(_a) {
344
345
  className: "player-layout",
345
346
  ref: domRef
346
347
  }, screenList.map(function (item, index) {
347
- var _a, _b, _c, _d, _e, _f, _g, _h;
348
+ var _a, _b, _c, _d;
348
349
  return item.recordType === 1 ? /*#__PURE__*/React.createElement(SegmentPlayerWithExt, Object.assign({}, item, {
349
350
  segments: ((_a = recordList[index]) === null || _a === void 0 ? void 0 : _a.segments) || [],
350
- key: "".concat((_b = item === null || item === void 0 ? void 0 : item.date) !== null && _b !== void 0 ? _b : '', "-").concat((_c = item.cid) !== null && _c !== void 0 ? _c : '', "-").concat(index),
351
+ key: item.date && item.cid ? "".concat(item === null || item === void 0 ? void 0 : item.date, "-").concat(item.cid) : "".concat(index),
351
352
  className: state.selectIndex === index ? 'player-current-index' : '',
352
353
  updatePlayer: function updatePlayer(player) {
353
354
  return _updatePlayer(player, index);
@@ -363,13 +364,13 @@ function RecordPlayer(_a) {
363
364
  width: screenType.width,
364
365
  height: screenType.height
365
366
  },
366
- mode: (_d = state.modes[index]) !== null && _d !== void 0 ? _d : item.mode,
367
+ mode: (_b = state.modes[index]) !== null && _b !== void 0 ? _b : item.mode,
367
368
  fps: fps,
368
369
  fpsDelay: fpsDelay,
369
370
  httpLoading: state.winLoadingStatus[index]
370
371
  })) : /*#__PURE__*/React.createElement(FrontendPlayerWithExt, Object.assign({}, item, {
371
372
  className: state.selectIndex === index ? 'player-current-index' : '',
372
- segments: ((_e = recordList[index]) === null || _e === void 0 ? void 0 : _e.segments) || [],
373
+ segments: ((_c = recordList[index]) === null || _c === void 0 ? void 0 : _c.segments) || [],
373
374
  updatePlayer: function updatePlayer(player) {
374
375
  return _updatePlayer(player, index);
375
376
  },
@@ -380,8 +381,8 @@ function RecordPlayer(_a) {
380
381
  });
381
382
  });
382
383
  },
383
- mode: (_f = state.modes[index]) !== null && _f !== void 0 ? _f : item.mode,
384
- key: "".concat((_g = item === null || item === void 0 ? void 0 : item.date) !== null && _g !== void 0 ? _g : '', "-").concat((_h = item.cid) !== null && _h !== void 0 ? _h : '', "-").concat(index),
384
+ mode: (_d = state.modes[index]) !== null && _d !== void 0 ? _d : item.mode,
385
+ key: item.date && item.cid ? "".concat(item === null || item === void 0 ? void 0 : item.date, "-").concat(item.cid) : "".concat(index),
385
386
  style: {
386
387
  width: screenType.width,
387
388
  height: screenType.height
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.1.20",
5
+ "version": "3.1.21",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",