@cloud-app-dev/vidc 3.1.15 → 3.1.17

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 (153) hide show
  1. package/es/Api/index.js +0 -23
  2. package/es/AppContext/Sync.js +1 -15
  3. package/es/AppContext/index.js +21 -52
  4. package/es/AppContext/static.js +0 -7
  5. package/es/Auth/index.js +2 -5
  6. package/es/AutoExit/index.js +1 -5
  7. package/es/Box/BetweenBox/index.js +6 -8
  8. package/es/Box/InfoBox/index.js +6 -8
  9. package/es/Box/TwoColumnBox/index.js +8 -18
  10. package/es/Box/deps/grid-factory.js +0 -12
  11. package/es/Box/index.js +4 -6
  12. package/es/CheckGroupFixed/index.js +19 -34
  13. package/es/Config/index.js +0 -4
  14. package/es/Config/utils.js +3 -18
  15. package/es/ConfigContext/index.js +1 -3
  16. package/es/CustomRenderSelect/index.js +13 -29
  17. package/es/DisableMark/index.js +2 -2
  18. package/es/DomMove/index.js +24 -37
  19. package/es/DomMove/utils.js +3 -8
  20. package/es/Drag/DragAndDropItem.js +19 -37
  21. package/es/Drag/DropItem.js +5 -15
  22. package/es/Drawer/Demo.js +3 -17
  23. package/es/Drawer/Footer.js +3 -5
  24. package/es/Drawer/index.js +28 -50
  25. package/es/ErrorFallback/index.js +1 -3
  26. package/es/FullScreen/index.js +8 -18
  27. package/es/HightLevel/index.js +1 -5
  28. package/es/IconFont/index.js +5 -11
  29. package/es/ImageView/index.js +8 -20
  30. package/es/Input/index.js +14 -27
  31. package/es/InstanceHistory/index.js +0 -2
  32. package/es/LabelValue/index.js +8 -10
  33. package/es/List/DynamicGridList/Demo.js +0 -11
  34. package/es/List/DynamicGridList/index.js +16 -25
  35. package/es/List/DynamicList/index.js +23 -38
  36. package/es/List/GridList/Demo.js +3 -16
  37. package/es/List/GridList/hook.js +34 -65
  38. package/es/List/GridList/utils.js +0 -1
  39. package/es/List/VList/index.js +10 -20
  40. package/es/List/VList/utils.js +2 -3
  41. package/es/List/index.js +5 -7
  42. package/es/LoaderApp/index.js +5 -22
  43. package/es/LoaderApp/loader.js +5 -13
  44. package/es/LoaderApp/sandbox.back.js +16 -81
  45. package/es/LoaderApp/sandbox.js +8 -22
  46. package/es/LoaderApp/utils.js +20 -49
  47. package/es/LoaderScript/index.js +8 -19
  48. package/es/LoaderScript/utils.js +0 -51
  49. package/es/Map/BasicMap/AMapInstance.js +0 -10
  50. package/es/Map/BasicMap/LeafletInstance.js +11 -20
  51. package/es/Map/BasicMap/index.js +6 -28
  52. package/es/Map/ClusterLayer/hook.js +10 -32
  53. package/es/Map/ClusterLayer/index.js +2 -6
  54. package/es/Map/Config/index.js +8 -21
  55. package/es/Map/Config/utils.js +0 -6
  56. package/es/Map/Context/index.js +2 -22
  57. package/es/Map/FindPio/index.js +0 -2
  58. package/es/Map/InfoWindow/MakerLikeWindow.js +9 -28
  59. package/es/Map/InfoWindow/demo.js +5 -22
  60. package/es/Map/InfoWindow/index.js +13 -29
  61. package/es/Map/LevelCenter/DragMarker/index.js +5 -9
  62. package/es/Map/LevelCenter/demo.js +6 -16
  63. package/es/Map/LevelCenter/index.js +8 -15
  64. package/es/Map/LoaderMap/index.js +10 -10
  65. package/es/Map/MapDrawSelect/demo.js +12 -23
  66. package/es/Map/MapDrawSelect/index.js +14 -21
  67. package/es/Map/MouseTool/index.js +16 -26
  68. package/es/Map/MouseTool/useMouseTools.js +6 -29
  69. package/es/Map/ResetTools/index.js +4 -8
  70. package/es/Map/SinglePoint/index.js +6 -13
  71. package/es/Map/hook/useMapEvent.js +3 -7
  72. package/es/Map/hook/useMapType.js +1 -2
  73. package/es/Map/useMarker/index.js +10 -24
  74. package/es/Map/withMap/index.js +0 -2
  75. package/es/Modal/index.d.ts +1 -1
  76. package/es/Modal/index.js +29 -50
  77. package/es/Picture/component/DefaultRects/RectInfo.js +11 -25
  78. package/es/Picture/component/DefaultRects/index.js +3 -5
  79. package/es/Picture/component/DrawRect/index.js +6 -8
  80. package/es/Picture/component/RectMenu/index.js +10 -16
  81. package/es/Picture/component/RectMenu/utils.js +3 -6
  82. package/es/Picture/component/Tools/index.js +6 -8
  83. package/es/Picture/component/WheelScale/index.js +3 -6
  84. package/es/Picture/dragBound.js +4 -17
  85. package/es/Picture/index.js +46 -87
  86. package/es/Picture/loadCaptureRectImage.js +10 -26
  87. package/es/Picture/useDraw.js +20 -39
  88. package/es/Picture/utils.js +2 -11
  89. package/es/Player/api/index.js +14 -78
  90. package/es/Player/context.js +1 -2
  91. package/es/Player/contraller_bar/bar.js +5 -9
  92. package/es/Player/contraller_bar/contraller_event.js +5 -23
  93. package/es/Player/contraller_bar/index.js +7 -9
  94. package/es/Player/contraller_bar/left_bar.js +15 -27
  95. package/es/Player/contraller_bar/right_bar.js +7 -18
  96. package/es/Player/contraller_bar/time.js +6 -16
  97. package/es/Player/contraller_bar/useBarStatus.js +5 -16
  98. package/es/Player/contraller_bar/volume.js +6 -26
  99. package/es/Player/demo.js +59 -75
  100. package/es/Player/event/errorEvent.js +14 -39
  101. package/es/Player/event/eventName.js +1 -1
  102. package/es/Player/event/index.js +19 -53
  103. package/es/Player/fps_play.js +10 -27
  104. package/es/Player/frontend_player.js +10 -19
  105. package/es/Player/frontend_timeline.js +25 -47
  106. package/es/Player/iconfont.js +2 -5
  107. package/es/Player/live_heart.js +2 -14
  108. package/es/Player/message.js +9 -29
  109. package/es/Player/segment_player.js +39 -77
  110. package/es/Player/segment_timeline.js +42 -68
  111. package/es/Player/single_player.js +64 -87
  112. package/es/Player/style/iconfont.js +10 -17
  113. package/es/Player/timeline.js +11 -28
  114. package/es/Player/util.js +0 -21
  115. package/es/PlayerExt/demo.js +11 -21
  116. package/es/PlayerExt/index.js +18 -43
  117. package/es/Progress/index.js +3 -15
  118. package/es/ROI/demo.js +0 -2
  119. package/es/ROI/index.js +15 -22
  120. package/es/ScreenPlayer/Live.js +35 -68
  121. package/es/ScreenPlayer/LiveTools.js +24 -37
  122. package/es/ScreenPlayer/PlayerWithExt.js +43 -78
  123. package/es/ScreenPlayer/RatePick.js +1 -3
  124. package/es/ScreenPlayer/Record.js +52 -123
  125. package/es/ScreenPlayer/RecordTools.js +32 -53
  126. package/es/ScreenPlayer/ScreenSelect.js +1 -3
  127. package/es/ScreenPlayer/SegmentTimeLine.js +8 -12
  128. package/es/ScreenPlayer/TimeMode.js +1 -3
  129. package/es/ScreenPlayer/TimeSelect.js +11 -26
  130. package/es/ScreenPlayer/demo.js +3 -1
  131. package/es/ScreenPlayer/demo2.js +10 -46
  132. package/es/ScreenPlayer/useRecordList.js +7 -72
  133. package/es/ScreenPlayer/useTimeSlider.js +40 -132
  134. package/es/ScreenPlayer/useVideoFit.js +5 -18
  135. package/es/ScreenPlayer/utils.js +0 -8
  136. package/es/Service/fetch-adapter.js +2 -37
  137. package/es/Service/http.js +8 -27
  138. package/es/TableLayout/index.js +3 -7
  139. package/es/ThemeAntd/demo.js +0 -2
  140. package/es/Timeout/index.js +10 -26
  141. package/es/Tree/demo.js +0 -2
  142. package/es/Tree/index.js +14 -21
  143. package/es/useDrawROI/index.js +51 -105
  144. package/es/useEventEmitterHandle/index.js +2 -6
  145. package/es/useFullscreen/demo.js +6 -16
  146. package/es/useFullscreen/index.js +5 -25
  147. package/es/useHistory/index.js +0 -2
  148. package/es/useInfiniteScroll/index.js +14 -39
  149. package/es/useRafInterval/index.js +2 -26
  150. package/es/useSimpleState/index.js +5 -16
  151. package/es/useVirtualList/index.js +19 -57
  152. package/es/utils.js +0 -28
  153. package/package.json +14 -14
@@ -1,34 +1,20 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
-
3
2
  import _useUpdateEffect from "ahooks/es/useUpdateEffect";
4
3
  import "antd/lib/message/style";
5
4
  import _message from "antd/lib/message";
6
5
  import _usePrevious from "ahooks/es/usePrevious";
7
-
8
6
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
-
10
7
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11
-
12
8
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
13
-
14
9
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
-
16
10
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
-
18
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
-
20
12
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
-
22
13
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
-
24
14
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
-
26
15
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
-
28
16
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
29
-
30
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
-
32
18
  import { __awaiter, __rest } from "tslib";
33
19
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
34
20
  import { ScreenType, mergeFill, differenceWithIndexs, FILTER_KEY } from './utils';
@@ -56,41 +42,36 @@ var defaultState = {
56
42
  * @param param0
57
43
  * @returns
58
44
  */
59
-
60
45
  function RecordPlayer(_a) {
61
46
  var _this = this;
62
-
63
47
  var list = _a.list,
64
- children = _a.children,
65
- queryRecord = _a.queryRecord,
66
- onIndexChange = _a.onIndexChange,
67
- onClose = _a.onClose,
68
- onCloseAll = _a.onCloseAll,
69
- download = _a.download,
70
- snapshot = _a.snapshot,
71
- defaultScreen = _a.defaultScreen,
72
- screenChange = _a.screenChange,
73
- defaultSelectIndex = _a.defaultSelectIndex,
74
- oneWinExtTools = _a.oneWinExtTools,
75
- allWinExtTools = _a.allWinExtTools,
76
- fpsDelay = _a.fpsDelay,
77
- fps = _a.fps,
78
- queryRecordErrorHandle = _a.queryRecordErrorHandle,
79
- getLocalRecordUrl = _a.getLocalRecordUrl,
80
- pluginDownloadUrl = _a.pluginDownloadUrl,
81
- options = __rest(_a, ["list", "children", "queryRecord", "onIndexChange", "onClose", "onCloseAll", "download", "snapshot", "defaultScreen", "screenChange", "defaultSelectIndex", "oneWinExtTools", "allWinExtTools", "fpsDelay", "fps", "queryRecordErrorHandle", "getLocalRecordUrl", "pluginDownloadUrl"]);
82
-
48
+ children = _a.children,
49
+ queryRecord = _a.queryRecord,
50
+ onIndexChange = _a.onIndexChange,
51
+ onClose = _a.onClose,
52
+ onCloseAll = _a.onCloseAll,
53
+ download = _a.download,
54
+ snapshot = _a.snapshot,
55
+ defaultScreen = _a.defaultScreen,
56
+ screenChange = _a.screenChange,
57
+ defaultSelectIndex = _a.defaultSelectIndex,
58
+ oneWinExtTools = _a.oneWinExtTools,
59
+ allWinExtTools = _a.allWinExtTools,
60
+ fpsDelay = _a.fpsDelay,
61
+ fps = _a.fps,
62
+ queryRecordErrorHandle = _a.queryRecordErrorHandle,
63
+ getLocalRecordUrl = _a.getLocalRecordUrl,
64
+ pluginDownloadUrl = _a.pluginDownloadUrl,
65
+ options = __rest(_a, ["list", "children", "queryRecord", "onIndexChange", "onClose", "onCloseAll", "download", "snapshot", "defaultScreen", "screenChange", "defaultSelectIndex", "oneWinExtTools", "allWinExtTools", "fpsDelay", "fps", "queryRecordErrorHandle", "getLocalRecordUrl", "pluginDownloadUrl"]);
83
66
  var _useState = useState(Object.assign(Object.assign({}, cloneDeep(defaultState)), {
84
- screenNum: defaultScreen !== null && defaultScreen !== void 0 ? defaultScreen : defaultState.screenNum
85
- })),
86
- _useState2 = _slicedToArray(_useState, 2),
87
- state = _useState2[0],
88
- setState = _useState2[1]; // 若外部来控制screenNum 则由外部完全控制
89
-
90
-
67
+ screenNum: defaultScreen !== null && defaultScreen !== void 0 ? defaultScreen : defaultState.screenNum
68
+ })),
69
+ _useState2 = _slicedToArray(_useState, 2),
70
+ state = _useState2[0],
71
+ setState = _useState2[1];
72
+ // 若外部来控制screenNum 则由外部完全控制
91
73
  var screenNum = useMemo(function () {
92
74
  var _a;
93
-
94
75
  return (_a = options.screenNum) !== null && _a !== void 0 ? _a : state.screenNum;
95
76
  }, [options.screenNum, state.screenNum]);
96
77
  var domRef = useRef(null);
@@ -104,46 +85,38 @@ function RecordPlayer(_a) {
104
85
  recordType: 1
105
86
  });
106
87
  }, [screenNum, list]);
107
-
108
88
  var _useVideoFit = useVideoFit(domRef, []),
109
- fit = _useVideoFit.fit,
110
- toggleFit = _useVideoFit.toggleFit; // key变化
111
-
112
-
89
+ fit = _useVideoFit.fit,
90
+ toggleFit = _useVideoFit.toggleFit;
91
+ // key变化
113
92
  var listKey = useMemo(function () {
114
93
  return screenList.map(function (v) {
115
94
  var _a, _b;
116
-
117
95
  return v ? "".concat((_a = v.date) !== null && _a !== void 0 ? _a : 0, "|").concat((_b = v.cid) !== null && _b !== void 0 ? _b : 1) : FILTER_KEY;
118
96
  }).join('-');
119
97
  }, [screenList]);
120
-
121
- var prevListKey = _usePrevious(listKey); // 所有窗口播放信息
122
-
123
-
98
+ var prevListKey = _usePrevious(listKey);
99
+ // 所有窗口播放信息
124
100
  var recordList = useRecordList(state.mergeSegments, queryRecord, {
125
101
  errorCallback: queryRecordErrorHandle !== null && queryRecordErrorHandle !== void 0 ? queryRecordErrorHandle : function () {},
126
102
  loaddingCallback: function loaddingCallback(idx, loadding) {
127
103
  return setState(function (old) {
128
104
  var status = _toConsumableArray(old.winLoadingStatus);
129
-
130
105
  status[idx] = loadding;
131
106
  return Object.assign(Object.assign({}, old), {
132
107
  winLoadingStatus: status
133
108
  });
134
109
  });
135
110
  }
136
- }); // 缓存所有player对象
137
-
138
- var playerRef = useRef([]); // 获取选中player对象
139
-
111
+ });
112
+ // 缓存所有player对象
113
+ var playerRef = useRef([]);
114
+ // 获取选中player对象
140
115
  var getPlayerItem = function getPlayerItem() {
141
116
  var _a;
142
-
143
117
  return (_a = playerRef.current[state.selectIndex]) === null || _a === void 0 ? void 0 : _a.current;
144
- }; // 当前窗口信息
145
-
146
-
118
+ };
119
+ // 当前窗口信息
147
120
  var segmentItem = useMemo(function () {
148
121
  return recordList[state.selectIndex] || {};
149
122
  }, [state.selectIndex, recordList]);
@@ -156,31 +129,25 @@ function RecordPlayer(_a) {
156
129
  /**
157
130
  * @desc 用户缓存接收list的变化。
158
131
  */
159
-
160
132
  useEffect(function () {
161
133
  if (!prevListKey || !listKey) {
162
134
  return;
163
135
  }
164
-
165
136
  var diffIndexs = differenceWithIndexs(listKey.split('-'), prevListKey.split('-'));
166
-
167
137
  if (diffIndexs.length === 0) {
168
138
  return;
169
139
  }
170
-
171
140
  setState(function (old) {
172
141
  var mergeList = old.mergeSegments;
173
- var times = old.currentTimes; // 批量更新调整
174
-
142
+ var times = old.currentTimes;
143
+ // 批量更新调整
175
144
  var _iterator = _createForOfIteratorHelper(diffIndexs),
176
- _step;
177
-
145
+ _step;
178
146
  try {
179
147
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
180
148
  var dif = _step.value;
181
149
  var i = dif.idx;
182
150
  var item = list[i];
183
-
184
151
  if (!item) {
185
152
  // 可能是外部的关闭动作关闭
186
153
  mergeList[i] = undefined;
@@ -188,12 +155,11 @@ function RecordPlayer(_a) {
188
155
  if (!mergeList[i]) {
189
156
  mergeList[i] = cloneDeep(item);
190
157
  }
191
-
192
158
  mergeList[i].date = item.date;
193
159
  mergeList[i].segments = mergeList[i].cid !== item.cid ? [] : mergeList[i].segments;
194
160
  mergeList[i].cid = item.cid;
195
- mergeList[i].recordType = item.recordType; // 更新变化的currentTime
196
-
161
+ mergeList[i].recordType = item.recordType;
162
+ // 更新变化的currentTime
197
163
  times[i] = list[i].date;
198
164
  }
199
165
  }
@@ -202,7 +168,6 @@ function RecordPlayer(_a) {
202
168
  } finally {
203
169
  _iterator.f();
204
170
  }
205
-
206
171
  return Object.assign(Object.assign({}, old), {
207
172
  mergeSegments: _toConsumableArray(mergeList),
208
173
  currentTimes: _toConsumableArray(times)
@@ -213,58 +178,49 @@ function RecordPlayer(_a) {
213
178
  * @desc seek hook
214
179
  * 处理seek相关的包括索引和video current time
215
180
  */
216
-
217
181
  useEffect(function () {
218
182
  if (state.seekTo === 0) {
219
183
  return;
220
184
  }
221
-
222
185
  var item = recordList[state.selectIndex];
223
186
  var index = item.segments.findIndex(function (v) {
224
187
  return state.seekTo >= v.beginTime && state.seekTo < v.endTime;
225
188
  });
226
-
227
189
  if (index === -1) {
228
190
  return;
229
191
  }
230
-
231
192
  setState(function (old) {
232
193
  return Object.assign(Object.assign({}, old), {
233
194
  seekTo: 0
234
195
  });
235
196
  });
236
197
  var play = getPlayerItem();
237
- play.api.seekTo(state.seekTo); // eslint-disable-next-line react-hooks/exhaustive-deps
238
- }, [state.seekTo, state.selectIndex, recordList, segmentItem.recordType]); // 更新状态
239
-
198
+ play.api.seekTo(state.seekTo);
199
+ // eslint-disable-next-line react-hooks/exhaustive-deps
200
+ }, [state.seekTo, state.selectIndex, recordList, segmentItem.recordType]);
201
+ // 更新状态
240
202
  var updateState = function updateState(newState) {
241
203
  var obj = {};
242
-
243
204
  if (newState.hasOwnProperty('screenNum')) {
244
205
  if (options.screenNum) {
245
206
  // 若外部控制,不需要update state
246
207
  screenChange === null || screenChange === void 0 ? void 0 : screenChange(newState.screenNum);
247
208
  } else {
248
209
  obj.screenNum = newState.screenNum;
249
- } // 修正选中索引
250
-
251
-
210
+ }
211
+ // 修正选中索引
252
212
  if (newState.screenNum < state.selectIndex) {
253
213
  obj.selectIndex = 0;
254
214
  }
255
215
  }
256
-
257
216
  if (newState.hasOwnProperty('mode')) {
258
217
  var newModes = _toConsumableArray(state.modes);
259
-
260
218
  newModes[state.selectIndex] = newState.mode;
261
219
  obj.modes = newModes;
262
220
  }
263
-
264
221
  if (newState.hasOwnProperty('timeMode')) {
265
222
  obj.timeMode = newState.timeMode;
266
223
  }
267
-
268
224
  setState(function (old) {
269
225
  return Object.assign(Object.assign({}, old), obj);
270
226
  });
@@ -274,8 +230,6 @@ function RecordPlayer(_a) {
274
230
  * 1:time在片断内,修改cuurentTime,更新seekTo交给seek hook去处理;
275
231
  * 2:不在片断内,查询新的片段,更新mergeSegments和seekTo后交给seek hook处理
276
232
  */
277
-
278
-
279
233
  var onTimeChange = useCallback(function (time, outTimeline) {
280
234
  return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
281
235
  var index, segments;
@@ -287,46 +241,36 @@ function RecordPlayer(_a) {
287
241
  _context.next = 2;
288
242
  break;
289
243
  }
290
-
291
244
  return _context.abrupt("return");
292
-
293
245
  case 2:
294
246
  if (!(outTimeline && segmentItem.recordType === 1)) {
295
247
  _context.next = 5;
296
248
  break;
297
249
  }
298
-
299
250
  // 云录像 若点击了缺失的片段,直接忽略
300
251
  _message.warning('当前录像片段缺失!');
301
-
302
252
  return _context.abrupt("return");
303
-
304
253
  case 5:
305
254
  if (!(time > Date.now())) {
306
255
  _context.next = 8;
307
256
  break;
308
257
  }
309
-
310
258
  console.warn('查询时间超出正常范围!');
311
259
  return _context.abrupt("return");
312
-
313
260
  case 8:
314
261
  index = segmentItem.segments.findIndex(function (v) {
315
262
  return time >= v.beginTime && time < v.endTime;
316
263
  });
317
-
318
264
  if (!(index === -1)) {
319
265
  _context.next = 14;
320
266
  break;
321
267
  }
322
-
323
268
  _context.next = 12;
324
269
  return queryRecord({
325
270
  cid: segmentItem.cid,
326
271
  date: time,
327
272
  recordType: segmentItem.recordType
328
273
  });
329
-
330
274
  case 12:
331
275
  segments = _context.sent;
332
276
  setState(function (old) {
@@ -334,19 +278,15 @@ function RecordPlayer(_a) {
334
278
  loading: true
335
279
  });
336
280
  });
337
-
338
281
  case 14:
339
282
  //更新time
340
283
  setState(function (old) {
341
284
  var mergeSegments = old.mergeSegments;
342
-
343
285
  if (segments) {
344
286
  mergeSegments[old.selectIndex].segments = segments;
345
287
  mergeSegments = _toConsumableArray(mergeSegments);
346
288
  }
347
-
348
289
  var currentTimes = _toConsumableArray(old.currentTimes);
349
-
350
290
  currentTimes[old.selectIndex] = time;
351
291
  return Object.assign(Object.assign({}, old), {
352
292
  currentTimes: currentTimes,
@@ -355,7 +295,6 @@ function RecordPlayer(_a) {
355
295
  seekTo: time
356
296
  });
357
297
  });
358
-
359
298
  case 15:
360
299
  case "end":
361
300
  return _context.stop();
@@ -363,9 +302,9 @@ function RecordPlayer(_a) {
363
302
  }
364
303
  }, _callee);
365
304
  }));
366
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
305
+ },
306
+ // eslint-disable-next-line react-hooks/exhaustive-deps
367
307
  [segmentItem.cid, segmentItem.recordType, segmentItem.segments, state.loading]);
368
-
369
308
  var _updatePlayer = function updatePlayer(player, index) {
370
309
  playerRef.current[index] = player;
371
310
  setState(function (old) {
@@ -375,37 +314,30 @@ function RecordPlayer(_a) {
375
314
  /**
376
315
  * 同步外部的selectIndex变化
377
316
  */
378
-
379
-
380
317
  useEffect(function () {
381
318
  if (typeof defaultSelectIndex !== 'number') {
382
319
  return;
383
320
  }
384
-
385
321
  setState(function (old) {
386
322
  if (old.selectIndex !== defaultSelectIndex) {
387
323
  return Object.assign(Object.assign({}, old), {
388
324
  selectIndex: defaultSelectIndex
389
325
  });
390
326
  }
391
-
392
327
  return old;
393
328
  });
394
- }, [defaultSelectIndex]); // index变化同步到父组件
329
+ }, [defaultSelectIndex]);
330
+ // index变化同步到父组件
395
331
  // eslint-disable-next-line react-hooks/exhaustive-deps
396
-
397
332
  _useUpdateEffect(function () {
398
333
  return onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(state.selectIndex);
399
334
  }, [state.selectIndex]);
400
335
  /**
401
336
  * 通知screenNum变化
402
337
  */
403
-
404
-
405
338
  _useUpdateEffect(function () {
406
339
  return screenChange === null || screenChange === void 0 ? void 0 : screenChange(state.screenNum);
407
340
  }, [state.screenNum]);
408
-
409
341
  return /*#__PURE__*/React.createElement("div", {
410
342
  className: "split-screen-player-wrapper split-screen-player-wrapper-record"
411
343
  }, /*#__PURE__*/React.createElement("div", {
@@ -413,7 +345,6 @@ function RecordPlayer(_a) {
413
345
  ref: domRef
414
346
  }, screenList.map(function (item, index) {
415
347
  var _a, _b, _c, _d, _e, _f, _g, _h;
416
-
417
348
  return item.recordType === 1 ? /*#__PURE__*/React.createElement(SegmentPlayerWithExt, Object.assign({}, item, {
418
349
  segments: ((_a = recordList[index]) === null || _a === void 0 ? void 0 : _a.segments) || [],
419
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),
@@ -432,7 +363,7 @@ function RecordPlayer(_a) {
432
363
  width: screenType.width,
433
364
  height: screenType.height
434
365
  },
435
- mode: (_d = item.mode) !== null && _d !== void 0 ? _d : state.modes[index],
366
+ mode: (_d = state.modes[index]) !== null && _d !== void 0 ? _d : item.mode,
436
367
  fps: fps,
437
368
  fpsDelay: fpsDelay,
438
369
  httpLoading: state.winLoadingStatus[index]
@@ -449,7 +380,7 @@ function RecordPlayer(_a) {
449
380
  });
450
381
  });
451
382
  },
452
- mode: (_f = item.mode) !== null && _f !== void 0 ? _f : state.modes[index],
383
+ mode: (_f = state.modes[index]) !== null && _f !== void 0 ? _f : item.mode,
453
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),
454
385
  style: {
455
386
  width: screenType.width,
@@ -479,7 +410,6 @@ function RecordPlayer(_a) {
479
410
  timeMode: state.timeMode,
480
411
  download: download ? function () {
481
412
  var _a;
482
-
483
413
  return download((_a = segmentItem.segments) !== null && _a !== void 0 ? _a : []);
484
414
  } : undefined,
485
415
  snapshot: snapshot,
@@ -498,5 +428,4 @@ function RecordPlayer(_a) {
498
428
  selectIndex: state.selectIndex
499
429
  }));
500
430
  }
501
-
502
431
  export default RecordPlayer;
@@ -2,88 +2,71 @@ 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
-
6
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
7
-
8
6
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
-
10
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
-
12
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13
-
14
9
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
15
-
16
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
-
18
11
  import React from 'react';
19
12
  import IconFont from '../Player/iconfont';
20
13
  import ScreenSelect from './ScreenSelect';
21
- import TimeSelect from './TimeSelect'; // import TimeMode from './TimeMode';
22
-
14
+ import TimeSelect from './TimeSelect';
15
+ // import TimeMode from './TimeMode';
23
16
  import useFullscreen from '../useFullscreen';
24
17
  import Volume from '../Player/contraller_bar/volume';
25
18
  import RatePick from './RatePick';
26
-
27
19
  function RecordTools(_ref) {
28
20
  var containerRef = _ref.containerRef,
29
- updateState = _ref.updateState,
30
- download = _ref.download,
31
- screenNum = _ref.screenNum,
32
- timeMode = _ref.timeMode,
33
- getPlayerItem = _ref.getPlayerItem,
34
- mode = _ref.mode,
35
- toggleFit = _ref.toggleFit,
36
- fit = _ref.fit,
37
- time = _ref.time,
38
- onTimeChange = _ref.onTimeChange,
39
- onClose = _ref.onClose,
40
- onCloseAll = _ref.onCloseAll,
41
- snapshot = _ref.snapshot,
42
- oneWinExtTools = _ref.oneWinExtTools,
43
- allWinExtTools = _ref.allWinExtTools;
44
-
21
+ updateState = _ref.updateState,
22
+ download = _ref.download,
23
+ screenNum = _ref.screenNum,
24
+ timeMode = _ref.timeMode,
25
+ getPlayerItem = _ref.getPlayerItem,
26
+ _ref$mode = _ref.mode,
27
+ mode = _ref$mode === void 0 ? 1 : _ref$mode,
28
+ toggleFit = _ref.toggleFit,
29
+ fit = _ref.fit,
30
+ time = _ref.time,
31
+ onTimeChange = _ref.onTimeChange,
32
+ onClose = _ref.onClose,
33
+ onCloseAll = _ref.onCloseAll,
34
+ snapshot = _ref.snapshot,
35
+ oneWinExtTools = _ref.oneWinExtTools,
36
+ allWinExtTools = _ref.allWinExtTools;
45
37
  var _a;
46
-
47
38
  var _useFullscreen = useFullscreen(containerRef),
48
- _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
49
- isFullscreen = _useFullscreen2[0],
50
- toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
51
-
39
+ _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
40
+ isFullscreen = _useFullscreen2[0],
41
+ toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
52
42
  var _useToggle = _useToggle3(false),
53
- _useToggle2 = _slicedToArray(_useToggle, 2),
54
- isFpsPlay = _useToggle2[0],
55
- toggle = _useToggle2[1].toggle;
56
-
57
- var update = _useUpdate(); // 播放状态控制
58
-
59
-
43
+ _useToggle2 = _slicedToArray(_useToggle, 2),
44
+ isFpsPlay = _useToggle2[0],
45
+ toggle = _useToggle2[1].toggle;
46
+ var update = _useUpdate();
47
+ // 播放状态控制
60
48
  var playToggle = function playToggle() {
61
- var player = getPlayerItem(); // eslint-disable-next-line @typescript-eslint/no-unused-expressions
62
-
49
+ var player = getPlayerItem();
50
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
63
51
  player ? player.video.paused ? player.api.play() : player.api.pause() : undefined;
64
52
  update();
65
- }; // 重连
66
-
67
-
53
+ };
54
+ // 重连
68
55
  var reload = function reload() {
69
- var player = getPlayerItem(); // eslint-disable-next-line @typescript-eslint/no-unused-expressions
70
-
56
+ var player = getPlayerItem();
57
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
71
58
  player ? player.reload ? player.reload() : player.api.reload() : undefined;
72
59
  };
73
-
74
60
  var snapshotaction = function snapshotaction() {
75
61
  var player = getPlayerItem();
76
62
  snapshot === null || snapshot === void 0 ? void 0 : snapshot(player === null || player === void 0 ? void 0 : player.api.snapshot());
77
63
  };
78
-
79
64
  var ratechange = function ratechange(value) {
80
65
  var player = getPlayerItem();
81
66
  player === null || player === void 0 ? void 0 : player.api.setPlaybackRate(value);
82
67
  update();
83
68
  };
84
-
85
69
  var player = getPlayerItem();
86
-
87
70
  _useUpdateEffect(function () {
88
71
  var player = getPlayerItem();
89
72
  isFpsPlay ? player.api.openFpsPlay() : player.api.closeFpsPlay();
@@ -91,12 +74,9 @@ function RecordTools(_ref) {
91
74
  /**
92
75
  * 定时获取play状态
93
76
  */
94
-
95
-
96
77
  _useRafInterval(function () {
97
78
  return update();
98
79
  }, 2000);
99
-
100
80
  return /*#__PURE__*/React.createElement("div", {
101
81
  className: "player-tools"
102
82
  }, /*#__PURE__*/React.createElement("div", {
@@ -206,5 +186,4 @@ function RecordTools(_ref) {
206
186
  title: "\u5168\u5C4F"
207
187
  }))));
208
188
  }
209
-
210
189
  export default RecordTools;
@@ -4,10 +4,9 @@ import React, { useMemo } from 'react';
4
4
  import CustomRenderSelect from '../CustomRenderSelect';
5
5
  import { ScreenType } from './utils';
6
6
  import IconFont from '../Player/iconfont';
7
-
8
7
  function ScreenSelect(_ref) {
9
8
  var screenNum = _ref.screenNum,
10
- updateState = _ref.updateState;
9
+ updateState = _ref.updateState;
11
10
  var icon = useMemo(function () {
12
11
  return ScreenType.find(function (v) {
13
12
  return v.name === screenNum;
@@ -45,5 +44,4 @@ function ScreenSelect(_ref) {
45
44
  })), item.name, "\u5206\u5C4F");
46
45
  }));
47
46
  }
48
-
49
47
  export default ScreenSelect;