@cloud-app-dev/vidc 3.2.13 → 3.2.15

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.
Files changed (162) hide show
  1. package/es/{List/DynamicGridList → DynamicGridList}/Demo.d.ts +0 -0
  2. package/es/{List/DynamicGridList → DynamicGridList}/Demo.js +7 -2
  3. package/es/{List/DynamicGridList → DynamicGridList}/index.d.ts +3 -3
  4. package/es/{List/DynamicGridList → DynamicGridList}/index.js +5 -5
  5. package/es/DynamicList/demo.d.ts +2 -0
  6. package/es/DynamicList/demo.js +60 -0
  7. package/es/{List/DynamicList → DynamicList}/index.d.ts +18 -1
  8. package/es/{List/DynamicList → DynamicList}/index.js +8 -7
  9. package/es/{List/DynamicList → DynamicList}/index.less +0 -0
  10. package/es/{List/DynamicList → DynamicList}/interface.d.ts +0 -0
  11. package/es/{List/DynamicList → DynamicList}/utils.d.ts +0 -0
  12. package/es/{List/DynamicList → DynamicList}/utils.js +0 -0
  13. package/es/{List/GridList → GridList}/Demo.d.ts +0 -0
  14. package/es/{List/GridList → GridList}/Demo.js +4 -3
  15. package/es/GridList/data.d.ts +16 -0
  16. package/es/GridList/data.js +609 -0
  17. package/es/{List/GridList → GridList}/hook.d.ts +0 -0
  18. package/es/{List/GridList → GridList}/hook.js +0 -0
  19. package/es/{List/GridList → GridList}/index.d.ts +0 -0
  20. package/es/{List/GridList → GridList}/index.js +0 -0
  21. package/es/{List/GridList → GridList}/index.less +0 -0
  22. package/es/{List/GridList → GridList}/interface.d.ts +0 -0
  23. package/es/{List/GridList → GridList}/utils.d.ts +0 -0
  24. package/es/{List/GridList → GridList}/utils.js +0 -0
  25. package/es/List/index.d.ts +28 -5
  26. package/es/List/index.js +6 -5
  27. package/es/ListWithSizeAnimate/demo.d.ts +2 -0
  28. package/es/ListWithSizeAnimate/demo.js +140 -0
  29. package/es/ListWithSizeAnimate/index.d.ts +14 -0
  30. package/es/ListWithSizeAnimate/index.js +112 -0
  31. package/es/ListWithSizeAnimate/index.less +14 -0
  32. package/es/Picture/interface.d.ts +0 -6
  33. package/es/Player/contraller_bar/volume.d.ts +1 -1
  34. package/es/PlayerExt/index.d.ts +1 -1
  35. package/es/PlayerExt/index.js +4 -5
  36. package/es/ScreenPlayer/Live.d.ts +1 -1
  37. package/es/ScreenPlayer/Live.js +24 -17
  38. package/es/ScreenPlayer/LiveTools.d.ts +2 -2
  39. package/es/ScreenPlayer/LiveTools.js +9 -6
  40. package/es/ScreenPlayer/PlayerWithExt.d.ts +2 -2
  41. package/es/ScreenPlayer/PlayerWithExt.js +7 -5
  42. package/es/ScreenPlayer/Record.d.ts +1 -1
  43. package/es/ScreenPlayer/Record.js +30 -21
  44. package/es/ScreenPlayer/RecordTools.d.ts +2 -2
  45. package/es/ScreenPlayer/RecordTools.js +20 -12
  46. package/es/ScreenPlayer/ScreenSelect.js +5 -3
  47. package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -1
  48. package/es/ScreenPlayer/SegmentTimeLine.js +1 -1
  49. package/es/ScreenPlayer/TimeSelect.js +2 -2
  50. package/es/ScreenPlayer/demo2.js +1 -1
  51. package/es/ScreenPlayer/interface.d.ts +2 -2
  52. package/es/ScreenPlayer/useTimeSlider.d.ts +8 -8
  53. package/es/ScreenPlayer/useTimeSlider.js +23 -15
  54. package/es/ScreenPlayer/useVideoFit.d.ts +1 -1
  55. package/es/ScreenPlayer/utils.d.ts +1 -1
  56. package/es/ScreenPlayer/utils.js +4 -1
  57. package/es/ThemeAntd/style/button.less +1 -1
  58. package/es/ThemeAntd/style/pagination.less +1 -1
  59. package/es/{List/VList → VList}/index.d.ts +0 -0
  60. package/es/{List/VList → VList}/index.js +5 -4
  61. package/es/{List/VList → VList}/index.less +0 -0
  62. package/es/{List/VList → VList}/utils.d.ts +0 -0
  63. package/es/{List/VList → VList}/utils.js +0 -0
  64. package/es/index.d.ts +5 -0
  65. package/es/index.js +5 -0
  66. package/package.json +2 -7
  67. package/.dumi/tmp/core/EmptyRoute.tsx +0 -9
  68. package/.dumi/tmp/core/defineApp.ts +0 -16
  69. package/.dumi/tmp/core/history.ts +0 -61
  70. package/.dumi/tmp/core/plugin.ts +0 -42
  71. package/.dumi/tmp/core/pluginConfig.d.ts +0 -276
  72. package/.dumi/tmp/core/polyfill.ts +0 -202
  73. package/.dumi/tmp/core/route.tsx +0 -38
  74. package/.dumi/tmp/core/terminal.ts +0 -38
  75. package/.dumi/tmp/dumi/exports.ts +0 -5
  76. package/.dumi/tmp/dumi/locales/config.ts +0 -56
  77. package/.dumi/tmp/dumi/locales/runtime.tsx +0 -38
  78. package/.dumi/tmp/dumi/meta/atoms.ts +0 -4
  79. package/.dumi/tmp/dumi/meta/index.ts +0 -186
  80. package/.dumi/tmp/dumi/meta/runtime.ts +0 -18
  81. package/.dumi/tmp/dumi/meta/tabs.ts +0 -8
  82. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +0 -41
  83. package/.dumi/tmp/dumi/theme/builtins/API.ts +0 -4
  84. package/.dumi/tmp/dumi/theme/builtins/Badge.ts +0 -4
  85. package/.dumi/tmp/dumi/theme/builtins/Container.ts +0 -4
  86. package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +0 -4
  87. package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +0 -4
  88. package/.dumi/tmp/dumi/theme/builtins/Table.ts +0 -4
  89. package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +0 -4
  90. package/.dumi/tmp/dumi/theme/slots/Content.ts +0 -4
  91. package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +0 -4
  92. package/.dumi/tmp/dumi/theme/slots/Features.ts +0 -4
  93. package/.dumi/tmp/dumi/theme/slots/Footer.ts +0 -4
  94. package/.dumi/tmp/dumi/theme/slots/Header.ts +0 -4
  95. package/.dumi/tmp/dumi/theme/slots/Hero.ts +0 -4
  96. package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +0 -4
  97. package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +0 -4
  98. package/.dumi/tmp/dumi/theme/slots/Logo.ts +0 -4
  99. package/.dumi/tmp/dumi/theme/slots/Navbar.ts +0 -4
  100. package/.dumi/tmp/dumi/theme/slots/NotFound.ts +0 -4
  101. package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +0 -4
  102. package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +0 -4
  103. package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +0 -4
  104. package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +0 -4
  105. package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +0 -4
  106. package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +0 -4
  107. package/.dumi/tmp/dumi/theme/slots/Toc.ts +0 -4
  108. package/.dumi/tmp/exports.ts +0 -15
  109. package/.dumi/tmp/testBrowser.tsx +0 -82
  110. package/.dumi/tmp/tsconfig.json +0 -35
  111. package/.dumi/tmp/typings.d.ts +0 -136
  112. package/.dumi/tmp/umi.ts +0 -77
  113. package/.dumi/tmp-production/core/EmptyRoute.tsx +0 -9
  114. package/.dumi/tmp-production/core/defineApp.ts +0 -16
  115. package/.dumi/tmp-production/core/history.ts +0 -61
  116. package/.dumi/tmp-production/core/plugin.ts +0 -42
  117. package/.dumi/tmp-production/core/pluginConfig.d.ts +0 -276
  118. package/.dumi/tmp-production/core/polyfill.ts +0 -202
  119. package/.dumi/tmp-production/core/route.tsx +0 -38
  120. package/.dumi/tmp-production/core/terminal.ts +0 -38
  121. package/.dumi/tmp-production/dumi/exports.ts +0 -5
  122. package/.dumi/tmp-production/dumi/locales/config.ts +0 -56
  123. package/.dumi/tmp-production/dumi/locales/runtime.tsx +0 -38
  124. package/.dumi/tmp-production/dumi/meta/atoms.ts +0 -4
  125. package/.dumi/tmp-production/dumi/meta/index.ts +0 -178
  126. package/.dumi/tmp-production/dumi/meta/runtime.ts +0 -18
  127. package/.dumi/tmp-production/dumi/meta/tabs.ts +0 -5
  128. package/.dumi/tmp-production/dumi/theme/ContextWrapper.tsx +0 -41
  129. package/.dumi/tmp-production/dumi/theme/builtins/API.ts +0 -4
  130. package/.dumi/tmp-production/dumi/theme/builtins/Badge.ts +0 -4
  131. package/.dumi/tmp-production/dumi/theme/builtins/Container.ts +0 -4
  132. package/.dumi/tmp-production/dumi/theme/builtins/Previewer.ts +0 -4
  133. package/.dumi/tmp-production/dumi/theme/builtins/SourceCode.ts +0 -4
  134. package/.dumi/tmp-production/dumi/theme/builtins/Table.ts +0 -4
  135. package/.dumi/tmp-production/dumi/theme/layouts/DocLayout.ts +0 -4
  136. package/.dumi/tmp-production/dumi/theme/slots/Content.ts +0 -4
  137. package/.dumi/tmp-production/dumi/theme/slots/ContentTabs.ts +0 -4
  138. package/.dumi/tmp-production/dumi/theme/slots/Features.ts +0 -4
  139. package/.dumi/tmp-production/dumi/theme/slots/Footer.ts +0 -4
  140. package/.dumi/tmp-production/dumi/theme/slots/Header.ts +0 -4
  141. package/.dumi/tmp-production/dumi/theme/slots/Hero.ts +0 -4
  142. package/.dumi/tmp-production/dumi/theme/slots/HeroTitle.ts +0 -4
  143. package/.dumi/tmp-production/dumi/theme/slots/LangSwitch.ts +0 -4
  144. package/.dumi/tmp-production/dumi/theme/slots/Logo.ts +0 -4
  145. package/.dumi/tmp-production/dumi/theme/slots/Navbar.ts +0 -4
  146. package/.dumi/tmp-production/dumi/theme/slots/NotFound.ts +0 -4
  147. package/.dumi/tmp-production/dumi/theme/slots/PreviewerActions.ts +0 -4
  148. package/.dumi/tmp-production/dumi/theme/slots/PreviewerActionsExtra.ts +0 -4
  149. package/.dumi/tmp-production/dumi/theme/slots/RtlSwitch.ts +0 -4
  150. package/.dumi/tmp-production/dumi/theme/slots/SearchBar.ts +0 -4
  151. package/.dumi/tmp-production/dumi/theme/slots/SearchResult.ts +0 -4
  152. package/.dumi/tmp-production/dumi/theme/slots/Sidebar.ts +0 -4
  153. package/.dumi/tmp-production/dumi/theme/slots/Toc.ts +0 -4
  154. package/.dumi/tmp-production/exports.ts +0 -14
  155. package/.dumi/tmp-production/testBrowser.tsx +0 -82
  156. package/.dumi/tmp-production/tsconfig.json +0 -35
  157. package/.dumi/tmp-production/typings.d.ts +0 -136
  158. package/.dumi/tmp-production/umi.ts +0 -77
  159. package/.stylelintrc +0 -3
  160. package/clear-cache.sh +0 -4
  161. package/es/List/GridList/data.json +0 -710
  162. package/es/List/interface.d.ts +0 -29
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { IRecordPlayerProps } from './interface';
3
2
  import './index.less';
3
+ import type { IRecordPlayerProps } from './interface';
4
4
  /**
5
5
  * @desc 录像设计的时间全部需要到毫秒
6
6
  * @param param0
@@ -32,15 +32,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
32
32
 
33
33
  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; }
34
34
 
35
+ import { cloneDeep } from 'lodash-es';
35
36
  import React, { useEffect, useMemo, useRef, useState } from 'react';
36
- import { ScreenType, mergeFill, sleep } from "./utils";
37
- import { SegmentPlayerWithExt, FrontendPlayerWithExt } from "./PlayerWithExt";
37
+ import DisableMark from "../DisableMark";
38
+ import "./index.less";
39
+ import { FrontendPlayerWithExt, SegmentPlayerWithExt } from "./PlayerWithExt";
38
40
  import RecordTools from "./RecordTools";
39
41
  import SegmentTimeLine from "./SegmentTimeLine";
40
42
  import useVideoFit from "./useVideoFit";
41
- import DisableMark from "../DisableMark";
42
- import { cloneDeep } from 'lodash-es';
43
- import "./index.less";
43
+ import { mergeFill, ScreenType, sleep } from "./utils";
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";
@@ -113,7 +113,7 @@ function RecordPlayer(_ref) {
113
113
  var _playerRef$current, _playerRef$current2;
114
114
 
115
115
  var item = screenList[state.selectIndex];
116
- return item ? (_playerRef$current = playerRef.current) === null || _playerRef$current === void 0 ? void 0 : (_playerRef$current2 = _playerRef$current["".concat(getKey(item))]) === null || _playerRef$current2 === void 0 ? void 0 : _playerRef$current2.current : null;
116
+ return item ? (_playerRef$current = playerRef.current) === null || _playerRef$current === void 0 ? void 0 : (_playerRef$current2 = _playerRef$current["".concat(getKey(item))]) === null || _playerRef$current2 === void 0 ? void 0 : _playerRef$current2.current : undefined;
117
117
  }; // 当前窗口信息
118
118
 
119
119
 
@@ -121,9 +121,9 @@ function RecordPlayer(_ref) {
121
121
  return screenList[state.selectIndex] || {};
122
122
  }, [state.selectIndex, screenList]);
123
123
  var timeBegin = useMemo(function () {
124
- var _state$begins;
124
+ var _state$begins, _segmentItem$date;
125
125
 
126
- return (_state$begins = state.begins["".concat(getKey(segmentItem))]) !== null && _state$begins !== void 0 ? _state$begins : segmentItem.date - state.timeMode / 2 * 3600 * 1000;
126
+ return (_state$begins = state.begins["".concat(getKey(segmentItem))]) !== null && _state$begins !== void 0 ? _state$begins : ((_segmentItem$date = segmentItem === null || segmentItem === void 0 ? void 0 : segmentItem.date) !== null && _segmentItem$date !== void 0 ? _segmentItem$date : 0) - state.timeMode / 2 * 3600 * 1000;
127
127
  }, [segmentItem, state.begins, state.timeMode]);
128
128
  var currentTime = useMemo(function () {
129
129
  var _state$currentTimes;
@@ -142,11 +142,17 @@ function RecordPlayer(_ref) {
142
142
  */
143
143
 
144
144
  useEffect(function () {
145
- var _item$segments$findIn, _item$segments;
145
+ var _state$seekTo, _item$segments$findIn, _item$segments;
146
146
 
147
- // 寻找需要seek的item
148
- var key = Object.keys(state.seekTo).find(function (k) {
149
- return state.seekTo[k] !== 0;
147
+ if (!state.seekTo) {
148
+ return;
149
+ } // 寻找需要seek的item
150
+
151
+
152
+ var key = Object.keys((_state$seekTo = state.seekTo) !== null && _state$seekTo !== void 0 ? _state$seekTo : {}).find(function (k) {
153
+ var _state$seekTo2;
154
+
155
+ return ((_state$seekTo2 = state.seekTo) === null || _state$seekTo2 === void 0 ? void 0 : _state$seekTo2[k]) !== 0;
150
156
  });
151
157
 
152
158
  if (!key) {
@@ -154,7 +160,7 @@ function RecordPlayer(_ref) {
154
160
  }
155
161
 
156
162
  var seekTime = state.seekTo[key];
157
- var item = list.find(function (v) {
163
+ var item = list === null || list === void 0 ? void 0 : list.find(function (v) {
158
164
  return !!v && "".concat(v.cid, "-").concat(v.date) === key;
159
165
  });
160
166
  var index = (_item$segments$findIn = item === null || item === void 0 ? void 0 : (_item$segments = item.segments) === null || _item$segments === void 0 ? void 0 : _item$segments.findIndex(function (v) {
@@ -219,7 +225,10 @@ function RecordPlayer(_ref) {
219
225
  }
220
226
 
221
227
  getPlay(key).then(function (play) {
222
- play && play.api.seekTo(seekTime);
228
+ if (play) {
229
+ play.api.seekTo(seekTime);
230
+ }
231
+
223
232
  setState(function (old) {
224
233
  return _objectSpread(_objectSpread({}, old), {}, {
225
234
  seekTo: _objectSpread(_objectSpread({}, old.seekTo), {}, _defineProperty({}, key, 0))
@@ -242,7 +251,7 @@ function RecordPlayer(_ref) {
242
251
  } // 修正选中索引
243
252
 
244
253
 
245
- if (newState.screenNum < state.selectIndex) {
254
+ if (newState.screenNum && newState.screenNum < state.selectIndex) {
246
255
  obj.selectIndex = 0;
247
256
  }
248
257
  }
@@ -439,8 +448,8 @@ function RecordPlayer(_ref) {
439
448
  });
440
449
  },
441
450
  style: {
442
- width: screenType.width,
443
- height: screenType.height
451
+ width: screenType === null || screenType === void 0 ? void 0 : screenType.width,
452
+ height: screenType === null || screenType === void 0 ? void 0 : screenType.height
444
453
  },
445
454
  mode: (_state$modes = state.modes["".concat(item === null || item === void 0 ? void 0 : item.date, "-").concat(item.cid)]) !== null && _state$modes !== void 0 ? _state$modes : item.mode,
446
455
  fps: fps,
@@ -463,8 +472,8 @@ function RecordPlayer(_ref) {
463
472
  mode: (_state$modes2 = state.modes["".concat(item === null || item === void 0 ? void 0 : item.date, "-").concat(item.cid)]) !== null && _state$modes2 !== void 0 ? _state$modes2 : item.mode,
464
473
  key: item.date && item.cid ? "".concat(item === null || item === void 0 ? void 0 : item.date, "-").concat(item.cid) : "".concat(index),
465
474
  style: {
466
- width: screenType.width,
467
- height: screenType.height
475
+ width: screenType === null || screenType === void 0 ? void 0 : screenType.width,
476
+ height: screenType === null || screenType === void 0 ? void 0 : screenType.height
468
477
  },
469
478
  httpLoading: item.loading,
470
479
  getLocalRecordUrl: props.getLocalRecordUrl,
@@ -491,9 +500,9 @@ function RecordPlayer(_ref) {
491
500
  onCloseAll: onCloseAll,
492
501
  timeMode: state.timeMode,
493
502
  download: props.download ? function () {
494
- var _segmentItem$segments;
503
+ var _props$download, _segmentItem$segments;
495
504
 
496
- return props.download((_segmentItem$segments = segmentItem.segments) !== null && _segmentItem$segments !== void 0 ? _segmentItem$segments : []);
505
+ return (_props$download = props.download) === null || _props$download === void 0 ? void 0 : _props$download.call(props, (_segmentItem$segments = segmentItem.segments) !== null && _segmentItem$segments !== void 0 ? _segmentItem$segments : []);
497
506
  } : undefined,
498
507
  snapshot: props.snapshot,
499
508
  oneWinExtTools: oneWinExtTools,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ExportPlayerType } from '../Player/player';
3
3
  import { PlayModeType } from '../PlayerExt';
4
4
  interface IToolsProps {
5
- containerRef: React.MutableRefObject<HTMLDivElement>;
5
+ containerRef: React.RefObject<HTMLDivElement>;
6
6
  screenNum: number;
7
7
  mode: PlayModeType;
8
8
  fit?: string;
@@ -33,5 +33,5 @@ interface IToolsProps {
33
33
  allWinExtTools?: JSX.Element;
34
34
  hasPlugin?: boolean;
35
35
  }
36
- declare function RecordTools({ containerRef, screenNum, timeMode, mode, fit, time, oneWinExtTools, allWinExtTools, hasPlugin, ...props }: IToolsProps): JSX.Element;
36
+ declare function RecordTools({ containerRef, screenNum, mode, fit, time, oneWinExtTools, allWinExtTools, hasPlugin, ...props }: IToolsProps): JSX.Element;
37
37
  export default RecordTools;
@@ -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", "timeMode", "mode", "fit", "time", "oneWinExtTools", "allWinExtTools", "hasPlugin"];
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
- (_props$snapshot = props.snapshot) === null || _props$snapshot === void 0 ? void 0 : _props$snapshot.call(props, player === null || player === void 0 ? void 0 : player.api.snapshot());
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
- isFpsPlay ? player.api.openFpsPlay() : player.api.closeFpsPlay();
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
- } : null,
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
- } : null,
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
- return props.onTimeChange({
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
  }
@@ -2,8 +2,8 @@ import "antd/lib/select/style";
2
2
  import _Select from "antd/lib/select";
3
3
  import React, { useMemo } from 'react';
4
4
  import CustomRenderSelect from "../CustomRenderSelect";
5
- import { ScreenType } from "./utils";
6
5
  import IconFont from "../Player/iconfont";
6
+ import { ScreenType } from "./utils";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
 
@@ -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
- return ScreenType.find(function (v) {
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,
@@ -3,7 +3,7 @@ import { ISegmentType } from '../Player/player';
3
3
  interface ISegmentTimeLineProps {
4
4
  begin?: number;
5
5
  segments?: ISegmentType[];
6
- onTimeChange?: (options: {
6
+ onTimeChange: (options: {
7
7
  currentTime?: number;
8
8
  begin?: number;
9
9
  }) => void;
@@ -13,7 +13,7 @@ function SegmentTimeLine(_ref) {
13
13
  timeMode = _ref.timeMode,
14
14
  updateState = _ref.updateState,
15
15
  currentTime = _ref.currentTime;
16
- var ref = useRef();
16
+ var ref = useRef(null);
17
17
 
18
18
  var _useThrottleFn = _useThrottleFn2(onTimeChange, {
19
19
  wait: 300
@@ -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 && onChange(newTime);
62
+ onChange === null || onChange === void 0 ? void 0 : onChange(newTime);
63
63
  };
64
64
 
65
65
  _useUpdateEffect(function () {
@@ -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.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NSIsImV4dCI6MTY2ODg1NzQ3Mjc4NiwidWlkIjoiMTAxMDAwMDAwNjk5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTA1MTgsMTAwMDAwMTEwNzI4XSwidmFsaWRUaW1lIjoxNzA0MzgzOTk5MDAwLCJvcHRDZW50ZXJJZCI6IjEwMDEwMDAwMDIzMyIsInVzZXJUeXBlIjoxMDA3MDQsImlhdCI6MTY2ODU5ODI3Mjc4Nn0.F0R_k3GRQfZ5yoL5MMUS4O2ghw0boWgnVs0Spf0pa0Q";
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?: number;
5
- begin?: number;
4
+ hoursPer: number;
5
+ begin: number;
6
6
  segments?: TimeCellItem[];
7
- currentTime?: number;
8
- onTimeChange?: (options: {
7
+ currentTime: number;
8
+ onTimeChange: (options: {
9
9
  currentTime?: number;
10
10
  begin?: number;
11
11
  }, outTimeline?: boolean) => void;
12
- onHoursPerChange?: (hour: number) => void;
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: number;
20
- time: number;
19
+ x?: number;
20
+ time?: number;
21
21
  };
22
22
  };
23
23
  export declare type TimeCellItem = ISegmentType;
24
- declare function useTimeSlider(canvasRef: React.MutableRefObject<HTMLCanvasElement>, { hoursPer, begin, currentTime, segments, onTimeChange, onHoursPerChange }: ITimeSliderOptions): void;
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: null
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: null,
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
- ctx.fillStyle = item.url ? ((_item$style = item.style) === null || _item$style === void 0 ? void 0 : _item$style.background) || hoverLineColor : '#242C3D';
159
- ctx.fillRect(beginX, height - 10, scale_width + 1, height);
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
- state.hover.time && drawHoverLine();
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: null
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: null
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 = null;
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(null);
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.MutableRefObject<HTMLDivElement>, deps?: any[]): {
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
@@ -33,7 +33,9 @@ export var TimeModeLibs = [{
33
33
  }, {
34
34
  name: 24
35
35
  }];
36
- export function mergeFill(len, mergeArr, fillItem) {
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);
@@ -51,7 +51,7 @@ div {
51
51
  .@{ant-prefix}-btn-danger:focus {
52
52
  background: var(--danger-dark);
53
53
  border-color: var(--danger-dark);
54
- color:var(--color);
54
+ color: var(--color);
55
55
  }
56
56
 
57
57
  .@{ant-prefix}-btn-background-ghost.@{ant-prefix}-btn-danger {
@@ -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: var(--color);
56
+ color: #fff;
57
57
  }
58
58
 
59
59
  .@{ant-prefix}-pagination-disabled .@{ant-prefix}-pagination-item-link,
File without changes
@@ -11,17 +11,18 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
 
13
13
  import React, { useRef } from 'react';
14
- import useVirtualList from "../../useVirtualList";
14
+ import useVirtualList from "../useVirtualList";
15
15
  import "./index.less";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
 
18
18
  function VList(_ref) {
19
19
  var className = _ref.className,
20
20
  rowHeight = _ref.rowHeight,
21
- data = _ref.data,
21
+ _ref$data = _ref.data,
22
+ data = _ref$data === void 0 ? [] : _ref$data,
22
23
  renderItem = _ref.renderItem;
23
- var containerRef = useRef();
24
- var wrapperRef = useRef();
24
+ var containerRef = useRef(null);
25
+ var wrapperRef = useRef(null);
25
26
 
26
27
  var _useVirtualList = useVirtualList(data, {
27
28
  containerTarget: containerRef,
File without changes
File without changes
File without changes
package/es/index.d.ts CHANGED
@@ -11,9 +11,12 @@ export { default as DisableMark } from './DisableMark';
11
11
  export { default as DomMove } from './DomMove';
12
12
  export { default as Drag } from './Drag';
13
13
  export { default as Drawer } from './Drawer';
14
+ export { default as DynamicGridList } from './DynamicGridList';
15
+ export { default as DynamicList } from './DynamicList';
14
16
  export { default as ErrorFallback } from './ErrorFallback';
15
17
  export { default as FrontendPlayer } from './FrontendPlayer';
16
18
  export { default as FullScreen } from './FullScreen';
19
+ export { default as GridList } from './GridList';
17
20
  export { default as HightLevel } from './HightLevel';
18
21
  export { default as IconFont } from './IconFont';
19
22
  export { default as ImageView } from './ImageView';
@@ -21,6 +24,7 @@ export { default as Input } from './Input';
21
24
  export { default as InstanceHistory } from './InstanceHistory';
22
25
  export { default as LabelValue } from './LabelValue';
23
26
  export { default as List } from './List';
27
+ export { default as ListWithSizeAnimate } from './ListWithSizeAnimate';
24
28
  export { default as LoaderApp } from './LoaderApp';
25
29
  export { default as LoaderScript } from './LoaderScript';
26
30
  export { default as Map } from './Map';
@@ -37,6 +41,7 @@ export { default as TableLayout } from './TableLayout';
37
41
  export { default as ThemeAntd } from './ThemeAntd';
38
42
  export { default as Timeout } from './Timeout';
39
43
  export { default as Tree } from './Tree';
44
+ export { default as VList } from './VList';
40
45
  export { default as useDrawROI } from './useDrawROI';
41
46
  export { default as useEventEmitterHandle } from './useEventEmitterHandle';
42
47
  export { default as useFullscreen } from './useFullscreen';
package/es/index.js CHANGED
@@ -11,9 +11,12 @@ export { default as DisableMark } from "./DisableMark";
11
11
  export { default as DomMove } from "./DomMove";
12
12
  export { default as Drag } from "./Drag";
13
13
  export { default as Drawer } from "./Drawer";
14
+ export { default as DynamicGridList } from "./DynamicGridList";
15
+ export { default as DynamicList } from "./DynamicList";
14
16
  export { default as ErrorFallback } from "./ErrorFallback";
15
17
  export { default as FrontendPlayer } from "./FrontendPlayer";
16
18
  export { default as FullScreen } from "./FullScreen";
19
+ export { default as GridList } from "./GridList";
17
20
  export { default as HightLevel } from "./HightLevel";
18
21
  export { default as IconFont } from "./IconFont";
19
22
  export { default as ImageView } from "./ImageView";
@@ -21,6 +24,7 @@ export { default as Input } from "./Input";
21
24
  export { default as InstanceHistory } from "./InstanceHistory";
22
25
  export { default as LabelValue } from "./LabelValue";
23
26
  export { default as List } from "./List";
27
+ export { default as ListWithSizeAnimate } from "./ListWithSizeAnimate";
24
28
  export { default as LoaderApp } from "./LoaderApp";
25
29
  export { default as LoaderScript } from "./LoaderScript";
26
30
  export { default as Map } from "./Map";
@@ -37,6 +41,7 @@ export { default as TableLayout } from "./TableLayout";
37
41
  export { default as ThemeAntd } from "./ThemeAntd";
38
42
  export { default as Timeout } from "./Timeout";
39
43
  export { default as Tree } from "./Tree";
44
+ export { default as VList } from "./VList";
40
45
  export { default as useDrawROI } from "./useDrawROI";
41
46
  export { default as useEventEmitterHandle } from "./useEventEmitterHandle";
42
47
  export { default as useFullscreen } from "./useFullscreen";