@vtx/player 1.0.12 → 1.0.13

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 (108) hide show
  1. package/lib/api/fetch.js +75 -51
  2. package/lib/api/fetch.js.map +1 -1
  3. package/lib/api/index.js +62 -18
  4. package/lib/api/index.js.map +1 -1
  5. package/lib/api/types.d.ts +5 -5
  6. package/lib/bill-player/index.js +111 -59
  7. package/lib/bill-player/index.js.map +1 -1
  8. package/lib/bill-player/style/css.js +9 -0
  9. package/lib/bill-player/style/css.js.map +1 -1
  10. package/lib/bill-player/style/index.js +9 -0
  11. package/lib/bill-player/style/index.js.map +1 -1
  12. package/lib/components/set-tag-video/index.js +34 -6
  13. package/lib/components/set-tag-video/index.js.map +1 -1
  14. package/lib/components/set-tag-video/style/css.js.map +1 -1
  15. package/lib/components/set-tag-video/style/index.js.map +1 -1
  16. package/lib/components/split-screen/index.d.ts +1 -1
  17. package/lib/components/split-screen/index.js +14 -3
  18. package/lib/components/split-screen/index.js.map +1 -1
  19. package/lib/components/split-screen/style/css.js.map +1 -1
  20. package/lib/components/split-screen/style/index.js.map +1 -1
  21. package/lib/components/tag-video/index.js +38 -10
  22. package/lib/components/tag-video/index.js.map +1 -1
  23. package/lib/components/tag-video/style/css.js.map +1 -1
  24. package/lib/components/tag-video/style/index.js.map +1 -1
  25. package/lib/components/video-scale/index.d.ts +1 -1
  26. package/lib/components/video-scale/index.js +9 -2
  27. package/lib/components/video-scale/index.js.map +1 -1
  28. package/lib/components/video-scale/style/css.js.map +1 -1
  29. package/lib/components/video-scale/style/index.js.map +1 -1
  30. package/lib/context/index.js +4 -0
  31. package/lib/context/index.js.map +1 -1
  32. package/lib/controls/index.d.ts +3 -3
  33. package/lib/controls/index.js +97 -33
  34. package/lib/controls/index.js.map +1 -1
  35. package/lib/controls/style/css.js +5 -0
  36. package/lib/controls/style/css.js.map +1 -1
  37. package/lib/controls/style/index.js +5 -0
  38. package/lib/controls/style/index.js.map +1 -1
  39. package/lib/history-control/index.d.ts +2 -2
  40. package/lib/history-control/index.js +114 -57
  41. package/lib/history-control/index.js.map +1 -1
  42. package/lib/history-control/style/css.js +6 -0
  43. package/lib/history-control/style/css.js.map +1 -1
  44. package/lib/history-control/style/index.js +6 -0
  45. package/lib/history-control/style/index.js.map +1 -1
  46. package/lib/history-control-v2/components/grid-item/index.d.ts +2 -0
  47. package/lib/history-control-v2/components/grid-item/index.js +72 -32
  48. package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
  49. package/lib/history-control-v2/components/panel/index.js +111 -38
  50. package/lib/history-control-v2/components/panel/index.js.map +1 -1
  51. package/lib/history-control-v2/context.js +2 -0
  52. package/lib/history-control-v2/context.js.map +1 -1
  53. package/lib/history-control-v2/index.d.ts +4 -4
  54. package/lib/history-control-v2/index.js +169 -96
  55. package/lib/history-control-v2/index.js.map +1 -1
  56. package/lib/history-control-v2/interface.d.ts +2 -0
  57. package/lib/history-control-v2/style/css.js +10 -0
  58. package/lib/history-control-v2/style/css.js.map +1 -1
  59. package/lib/history-control-v2/style/index.js +10 -0
  60. package/lib/history-control-v2/style/index.js.map +1 -1
  61. package/lib/history-control-v2/utils.js +21 -1
  62. package/lib/history-control-v2/utils.js.map +1 -1
  63. package/lib/history-player/index.d.ts +1 -1
  64. package/lib/history-player/index.js +118 -73
  65. package/lib/history-player/index.js.map +1 -1
  66. package/lib/history-player/style/css.js +3 -0
  67. package/lib/history-player/style/css.js.map +1 -1
  68. package/lib/history-player/style/index.js +3 -0
  69. package/lib/history-player/style/index.js.map +1 -1
  70. package/lib/hooks/useSettings.js +6 -1
  71. package/lib/hooks/useSettings.js.map +1 -1
  72. package/lib/icons/index.js +171 -23
  73. package/lib/icons/index.js.map +1 -1
  74. package/lib/index.js +10 -0
  75. package/lib/index.js.map +1 -1
  76. package/lib/live-channel-player/index.js +67 -31
  77. package/lib/live-channel-player/index.js.map +1 -1
  78. package/lib/live-channel-player/style/css.js +1 -0
  79. package/lib/live-channel-player/style/css.js.map +1 -1
  80. package/lib/live-channel-player/style/index.js +1 -0
  81. package/lib/live-channel-player/style/index.js.map +1 -1
  82. package/lib/live-control/index.d.ts +2 -2
  83. package/lib/live-control/index.js +83 -32
  84. package/lib/live-control/index.js.map +1 -1
  85. package/lib/live-control/style/css.js +4 -0
  86. package/lib/live-control/style/css.js.map +1 -1
  87. package/lib/live-control/style/index.js +4 -0
  88. package/lib/live-control/style/index.js.map +1 -1
  89. package/lib/live-control-v2/index.d.ts +3 -3
  90. package/lib/live-control-v2/index.js +125 -53
  91. package/lib/live-control-v2/index.js.map +1 -1
  92. package/lib/live-control-v2/style/css.js +7 -0
  93. package/lib/live-control-v2/style/css.js.map +1 -1
  94. package/lib/live-control-v2/style/index.js +7 -0
  95. package/lib/live-control-v2/style/index.js.map +1 -1
  96. package/lib/live-player/index.js +56 -32
  97. package/lib/live-player/index.js.map +1 -1
  98. package/lib/live-player/style/css.js +2 -0
  99. package/lib/live-player/style/css.js.map +1 -1
  100. package/lib/live-player/style/index.js +2 -0
  101. package/lib/live-player/style/index.js.map +1 -1
  102. package/lib/player/index.d.ts +1 -1
  103. package/lib/player/index.js +119 -42
  104. package/lib/player/index.js.map +1 -1
  105. package/lib/utils/index.d.ts +1 -1
  106. package/lib/utils/index.js +81 -9
  107. package/lib/utils/index.js.map +1 -1
  108. package/package.json +1 -1
@@ -4,63 +4,84 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = exports.LivePlayer = void 0;
7
+
7
8
  var _jsxRuntime = require("react/jsx-runtime");
9
+
8
10
  var _react = require("react");
11
+
9
12
  var _controls = require("../controls");
13
+
10
14
  var _icons = require("../icons");
15
+
11
16
  var _player = _interopRequireDefault(require("../player"));
17
+
12
18
  var _utils = require("../utils");
19
+
13
20
  var _ahooks = require("ahooks");
21
+
14
22
  var _space = _interopRequireDefault(require("antd/lib/space"));
23
+
15
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
16
26
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
17
28
  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."); }
29
+
18
30
  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); }
19
- 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; }
20
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
31
+
32
+ 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; }
33
+
34
+ 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; }
35
+
21
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
22
38
  var LivePlayer = function LivePlayer(props) {
23
39
  var url = props.url,
24
- enableAgent = props.enableAgent,
25
- _props$width = props.width,
26
- width = _props$width === void 0 ? '100%' : _props$width,
27
- _props$height = props.height,
28
- height = _props$height === void 0 ? '100%' : _props$height,
29
- captureName = props.captureName,
30
- type = props.type,
31
- channelNum = props.channelNum,
32
- deviceId = props.deviceId,
33
- cloudParams = props.cloudParams,
34
- _props$showInfo = props.showInfo,
35
- showInfo = _props$showInfo === void 0 ? false : _props$showInfo,
36
- _props$info = props.info,
37
- info = _props$info === void 0 ? [] : _props$info,
38
- screenshot = props.screenshot;
40
+ enableAgent = props.enableAgent,
41
+ _props$width = props.width,
42
+ width = _props$width === void 0 ? '100%' : _props$width,
43
+ _props$height = props.height,
44
+ height = _props$height === void 0 ? '100%' : _props$height,
45
+ captureName = props.captureName,
46
+ type = props.type,
47
+ channelNum = props.channelNum,
48
+ deviceId = props.deviceId,
49
+ cloudParams = props.cloudParams,
50
+ _props$showInfo = props.showInfo,
51
+ showInfo = _props$showInfo === void 0 ? false : _props$showInfo,
52
+ _props$info = props.info,
53
+ info = _props$info === void 0 ? [] : _props$info,
54
+ screenshot = props.screenshot;
39
55
  var ref = (0, _react.useRef)(null);
40
56
  var wrapRef = (0, _react.useRef)(null);
41
57
  var controlsRef = (0, _react.useRef)(null);
42
58
  var playerRef = (0, _react.useRef)();
59
+
43
60
  var _useFullscreen = (0, _ahooks.useFullscreen)(wrapRef),
44
- _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
45
- isFullscreen = _useFullscreen2[0],
46
- toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
61
+ _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
62
+ isFullscreen = _useFullscreen2[0],
63
+ toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
64
+
47
65
  var _useSetState = (0, _ahooks.useSetState)({
48
- play: false,
49
- error: false,
50
- loading: false,
51
- id: 'vtx_hk_player_' + (0, _utils.guidGenerator)(),
52
- volume: 0,
53
- showCloudPanel: false
54
- }),
55
- _useSetState2 = _slicedToArray(_useSetState, 2),
56
- state = _useSetState2[0],
57
- setState = _useSetState2[1];
66
+ play: false,
67
+ error: false,
68
+ loading: false,
69
+ id: 'vtx_hk_player_' + (0, _utils.guidGenerator)(),
70
+ volume: 0,
71
+ showCloudPanel: false
72
+ }),
73
+ _useSetState2 = _slicedToArray(_useSetState, 2),
74
+ state = _useSetState2[0],
75
+ setState = _useSetState2[1];
76
+
58
77
  (0, _react.useEffect)(function () {
59
78
  var container = ref.current;
79
+
60
80
  if (!url || !container) {
61
81
  playerRef.current && playerRef.current.destroy();
62
82
  return;
63
83
  }
84
+
64
85
  var player = new _player["default"]({
65
86
  url: url,
66
87
  enableAgent: enableAgent,
@@ -94,25 +115,27 @@ var LivePlayer = function LivePlayer(props) {
94
115
  play: false
95
116
  });
96
117
  };
97
- }, [url]);
98
- // useEffect(() => {
118
+ }, [url]); // useEffect(() => {
99
119
  // if (cloudParams?.type !== 'none') {
100
120
  // setState({
101
121
  // showCloudPanel: true,
102
122
  // });
103
123
  // }
104
124
  // }, [cloudParams]);
125
+
105
126
  var handleCapture = function handleCapture(e) {
106
127
  var player = playerRef.current;
107
128
  player && player.capture(captureName, screenshot);
108
129
  e.stopPropagation();
109
130
  };
131
+
110
132
  var handleFullScreen = function handleFullScreen(e) {
111
133
  toggleFullscreen();
112
134
  var player = playerRef.current;
113
135
  player && player.resize();
114
136
  e.stopPropagation();
115
137
  };
138
+
116
139
  return (0, _jsxRuntime.jsxs)("div", Object.assign({
117
140
  className: "vtx-live-player",
118
141
  ref: wrapRef,
@@ -165,6 +188,7 @@ var LivePlayer = function LivePlayer(props) {
165
188
  }))]
166
189
  }));
167
190
  };
191
+
168
192
  exports.LivePlayer = LivePlayer;
169
193
  var _default = LivePlayer;
170
194
  exports["default"] = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_jsxRuntime","require","_react","_controls","_icons","_player","_interopRequireDefault","_utils","_ahooks","_space","obj","__esModule","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","len","length","arr2","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","isArray","LivePlayer","props","url","enableAgent","_props$width","width","_props$height","height","captureName","type","channelNum","deviceId","cloudParams","_props$showInfo","showInfo","_props$info","info","screenshot","ref","useRef","wrapRef","controlsRef","playerRef","_useFullscreen","useFullscreen","_useFullscreen2","isFullscreen","toggleFullscreen","_useSetState","useSetState","play","error","loading","id","guidGenerator","volume","showCloudPanel","_useSetState2","state","setState","useEffect","container","current","destroy","player","Player","then","handleCapture","e","capture","stopPropagation","handleFullScreen","resize","_jsxs","assign","className","style","children","_jsx","ErrorState","LoadingState","CloudControlPanel","InfoPanel","Space","size","align","VolumeControl","CaptureIcon","onClick","TalkControl","CloudControlIcon","active","ExitFullScreenIcon","FullScreenIcon","exports","_default"],"sources":["live-player/index.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useRef } from 'react';\nimport { CloudControlPanel, ErrorState, InfoPanel, LoadingState, TalkControl, VolumeControl, } from '../controls';\nimport { CaptureIcon, CloudControlIcon, ExitFullScreenIcon, FullScreenIcon } from '../icons';\nimport Player from '../player';\nimport { guidGenerator } from '../utils';\nimport { useFullscreen, useSetState } from 'ahooks';\n// import { Space } from 'antd';\nimport Space from 'antd/lib/space';\nexport const LivePlayer = (props) => {\n const { url, enableAgent, width = '100%', height = '100%', captureName, type, channelNum, deviceId, cloudParams, showInfo = false, info = [], screenshot, } = props;\n const ref = useRef(null);\n const wrapRef = useRef(null);\n const controlsRef = useRef(null);\n const playerRef = useRef();\n const [isFullscreen, { toggleFullscreen }] = useFullscreen(wrapRef);\n const [state, setState] = useSetState({\n play: false,\n error: false,\n loading: false,\n id: 'vtx_hk_player_' + guidGenerator(),\n volume: 0,\n showCloudPanel: false,\n });\n useEffect(() => {\n const container = ref.current;\n if (!url || !container) {\n playerRef.current && playerRef.current.destroy();\n return;\n }\n const player = new Player({ url, enableAgent, container, type });\n playerRef.current = player;\n setState({ loading: true, error: false });\n player\n .play()\n .then(() => setState({ play: true, error: false }))\n .catch(() => setState({ error: true }))\n .finally(() => setState({ loading: false }));\n return () => {\n player.destroy();\n setState({ error: false, loading: false, play: false });\n };\n }, [url]);\n // useEffect(() => {\n // if (cloudParams?.type !== 'none') {\n // setState({\n // showCloudPanel: true,\n // });\n // }\n // }, [cloudParams]);\n const handleCapture = (e) => {\n const player = playerRef.current;\n player && player.capture(captureName, screenshot);\n e.stopPropagation();\n };\n const handleFullScreen = (e) => {\n toggleFullscreen();\n const player = playerRef.current;\n player && player.resize();\n e.stopPropagation();\n };\n return (_jsxs(\"div\", Object.assign({ className: \"vtx-live-player\", ref: wrapRef, style: { width, height } }, { children: [_jsx(\"div\", { ref: ref, style: { height: '100%', width: '100%' }, id: state.id }), state.error && _jsx(ErrorState, {}), state.loading && _jsx(LoadingState, {}), state.showCloudPanel && cloudParams && _jsx(CloudControlPanel, Object.assign({}, cloudParams)), _jsx(InfoPanel, { showInfo: showInfo, info: info }), _jsx(\"div\", Object.assign({ className: \"controls\", ref: controlsRef }, { children: _jsxs(Space, Object.assign({ className: \"right\", size: 12, align: \"center\" }, { children: [_jsx(VolumeControl, { player: playerRef.current, container: controlsRef.current }), !!screenshot && _jsx(CaptureIcon, { onClick: handleCapture }), channelNum && deviceId && (_jsx(TalkControl, { player: playerRef.current, channelNum: channelNum, deviceId: deviceId })), (cloudParams === null || cloudParams === void 0 ? void 0 : cloudParams.type) !== 'none' && (_jsx(CloudControlIcon, { active: state.showCloudPanel, onClick: () => setState({ showCloudPanel: !state.showCloudPanel }) })), isFullscreen ? (_jsx(ExitFullScreenIcon, { onClick: handleFullScreen })) : (_jsx(FullScreenIcon, { onClick: handleFullScreen }))] })) }))] })));\n};\nexport default LivePlayer;\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,MAAA,GAAAH,sBAAA,CAAAL,OAAA;AAAmC,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,eAAAC,GAAA,EAAAC,CAAA,WAAAC,eAAA,CAAAF,GAAA,KAAAG,qBAAA,CAAAH,GAAA,EAAAC,CAAA,KAAAG,2BAAA,CAAAJ,GAAA,EAAAC,CAAA,KAAAI,gBAAA;AAAA,SAAAA,iBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,CAAAF,CAAA,EAAAC,MAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,KAAA,aAAAL,CAAA,iBAAAH,CAAA,CAAAS,WAAA,EAAAN,CAAA,GAAAH,CAAA,CAAAS,WAAA,CAAAC,IAAA,MAAAP,CAAA,cAAAA,CAAA,mBAAAQ,KAAA,CAAAC,IAAA,CAAAZ,CAAA,OAAAG,CAAA,+DAAAU,IAAA,CAAAV,CAAA,UAAAD,iBAAA,CAAAF,CAAA,EAAAC,MAAA;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I,EAACc,yBAAkB,EAAE;UAAEJ,OAAO,EAAEjB;QAAiB,CAAC,CAAC,GAAK,IAAAO,eAAI,EAACe,qBAAc,EAAE;UAAEL,OAAO,EAAEjB;QAAiB,CAAC,CAAE;MAAE,CAAC,CAAC;IAAE,CAAC,CAAC,CAAC;EAAE,CAAC,CAAC,CAAC;AACxtC,CAAC;AAACuB,OAAA,CAAA1E,UAAA,GAAAA,UAAA;AAAA,IAAA2E,QAAA,GACa3E,UAAU;AAAA0E,OAAA,cAAAC,QAAA"}
1
+ {"version":3,"file":"index.js","names":["LivePlayer","props","url","enableAgent","width","height","captureName","type","channelNum","deviceId","cloudParams","showInfo","info","screenshot","ref","useRef","wrapRef","controlsRef","playerRef","useFullscreen","isFullscreen","toggleFullscreen","useSetState","play","error","loading","id","guidGenerator","volume","showCloudPanel","state","setState","useEffect","container","current","destroy","player","Player","then","handleCapture","e","capture","stopPropagation","handleFullScreen","resize","_jsxs","Object","assign","className","style","children","_jsx","ErrorState","LoadingState","CloudControlPanel","InfoPanel","Space","size","align","VolumeControl","CaptureIcon","onClick","TalkControl","CloudControlIcon","active","ExitFullScreenIcon","FullScreenIcon"],"sources":["live-player/index.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useRef } from 'react';\nimport { CloudControlPanel, ErrorState, InfoPanel, LoadingState, TalkControl, VolumeControl, } from '../controls';\nimport { CaptureIcon, CloudControlIcon, ExitFullScreenIcon, FullScreenIcon } from '../icons';\nimport Player from '../player';\nimport { guidGenerator } from '../utils';\nimport { useFullscreen, useSetState } from 'ahooks';\n// import { Space } from 'antd';\nimport Space from 'antd/lib/space';\nexport const LivePlayer = (props) => {\n const { url, enableAgent, width = '100%', height = '100%', captureName, type, channelNum, deviceId, cloudParams, showInfo = false, info = [], screenshot, } = props;\n const ref = useRef(null);\n const wrapRef = useRef(null);\n const controlsRef = useRef(null);\n const playerRef = useRef();\n const [isFullscreen, { toggleFullscreen }] = useFullscreen(wrapRef);\n const [state, setState] = useSetState({\n play: false,\n error: false,\n loading: false,\n id: 'vtx_hk_player_' + guidGenerator(),\n volume: 0,\n showCloudPanel: false,\n });\n useEffect(() => {\n const container = ref.current;\n if (!url || !container) {\n playerRef.current && playerRef.current.destroy();\n return;\n }\n const player = new Player({ url, enableAgent, container, type });\n playerRef.current = player;\n setState({ loading: true, error: false });\n player\n .play()\n .then(() => setState({ play: true, error: false }))\n .catch(() => setState({ error: true }))\n .finally(() => setState({ loading: false }));\n return () => {\n player.destroy();\n setState({ error: false, loading: false, play: false });\n };\n }, [url]);\n // useEffect(() => {\n // if (cloudParams?.type !== 'none') {\n // setState({\n // showCloudPanel: true,\n // });\n // }\n // }, [cloudParams]);\n const handleCapture = (e) => {\n const player = playerRef.current;\n player && player.capture(captureName, screenshot);\n e.stopPropagation();\n };\n const handleFullScreen = (e) => {\n toggleFullscreen();\n const player = playerRef.current;\n player && player.resize();\n e.stopPropagation();\n };\n return (_jsxs(\"div\", Object.assign({ className: \"vtx-live-player\", ref: wrapRef, style: { width, height } }, { children: [_jsx(\"div\", { ref: ref, style: { height: '100%', width: '100%' }, id: state.id }), state.error && _jsx(ErrorState, {}), state.loading && _jsx(LoadingState, {}), state.showCloudPanel && cloudParams && _jsx(CloudControlPanel, Object.assign({}, cloudParams)), _jsx(InfoPanel, { showInfo: showInfo, info: info }), _jsx(\"div\", Object.assign({ className: \"controls\", ref: controlsRef }, { children: _jsxs(Space, Object.assign({ className: \"right\", size: 12, align: \"center\" }, { children: [_jsx(VolumeControl, { player: playerRef.current, container: controlsRef.current }), !!screenshot && _jsx(CaptureIcon, { onClick: handleCapture }), channelNum && deviceId && (_jsx(TalkControl, { player: playerRef.current, channelNum: channelNum, deviceId: deviceId })), (cloudParams === null || cloudParams === void 0 ? void 0 : cloudParams.type) !== 'none' && (_jsx(CloudControlIcon, { active: state.showCloudPanel, onClick: () => setState({ showCloudPanel: !state.showCloudPanel }) })), isFullscreen ? (_jsx(ExitFullSc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AAE;YAAA,OAAM9B,QAAQ,CAAC;cAAEF,cAAc,EAAE,CAACC,KAAK,CAACD;YAAzB,CAAD,CAAd;UAAA;QAAzC,CAAvB,CAA1W,EAAyeT,YAAY,GAAI,IAAA+B,eAAA,EAAKc,yBAAL,EAAyB;UAAEJ,OAAO,EAAElB;QAAX,CAAzB,CAAJ,GAAgE,IAAAQ,eAAA,EAAKe,qBAAL,EAAqB;UAAEL,OAAO,EAAElB;QAAX,CAArB,CAArjB;MAAZ,CAAjE,CAAb;IAAZ,CAA3D,CAAZ,CAAvT;EAAZ,CAAxF,CAAb,CAAR;AACH,CArDM;;;eAsDQ3C,U"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/lib/space/style/css");
4
+
4
5
  require("../../controls/style/css");
6
+
5
7
  require("./index.css");
6
8
  //# sourceMappingURL=css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"css.js","names":["require"],"sources":["live-player/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["live-player/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/lib/space/style");
4
+
4
5
  require("../../controls/style");
6
+
5
7
  require("./index.less");
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["require"],"sources":["live-player/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["live-player/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA"}
@@ -5,7 +5,7 @@ declare global {
5
5
  }
6
6
  }
7
7
  /** 视频流格式 */
8
- export type VideoType = 'flv' | 'hls' | 'hk_ws';
8
+ export declare type VideoType = 'flv' | 'hls' | 'hk_ws';
9
9
  interface ConstructorParams {
10
10
  url: string;
11
11
  /**是否开启代理 */