@vtx/player 1.2.14 → 1.3.0

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.
@@ -1,238 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.LivePlayerImage = void 0;
7
-
8
- var _jsxRuntime = require("react/jsx-runtime");
9
-
10
- var _react = require("react");
11
-
12
- var _controls = require("../controls");
13
-
14
- var _icons = require("../icons");
15
-
16
- var _player = _interopRequireDefault(require("../player"));
17
-
18
- var _utils = require("../utils");
19
-
20
- var _ahooks = require("ahooks");
21
-
22
- var _space = _interopRequireDefault(require("antd/lib/space"));
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
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
-
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); }
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
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- var LivePlayerImage = function LivePlayerImage(props, selfRef) {
39
- var url = props.url,
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,
55
- loaded = props.loaded;
56
- var ref = (0, _react.useRef)(null);
57
- var wrapRef = (0, _react.useRef)(null);
58
- var controlsRef = (0, _react.useRef)(null);
59
- var playerRef = (0, _react.useRef)();
60
-
61
- var _useFullscreen = (0, _ahooks.useFullscreen)(wrapRef),
62
- _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
63
- isFullscreen = _useFullscreen2[0],
64
- toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
65
-
66
- var _useSetState = (0, _ahooks.useSetState)({
67
- play: false,
68
- error: false,
69
- loading: false,
70
- id: 'vtx_hk_player_' + (0, _utils.guidGenerator)(),
71
- volume: 0,
72
- showCloudPanel: false
73
- }),
74
- _useSetState2 = _slicedToArray(_useSetState, 2),
75
- state = _useSetState2[0],
76
- setState = _useSetState2[1];
77
-
78
- (0, _react.useImperativeHandle)(selfRef, function () {
79
- return {
80
- resize: function resize() {
81
- var player = playerRef.current;
82
- player && url && player.resize();
83
- }
84
- };
85
- });
86
- (0, _react.useEffect)(function () {
87
- var container = ref.current;
88
-
89
- if (!url || !container) {
90
- playerRef.current && playerRef.current.destroy();
91
- return;
92
- }
93
-
94
- var player = new _player["default"]({
95
- url: url,
96
- channelNum: channelNum,
97
- enableAgent: enableAgent,
98
- container: container,
99
- type: type
100
- });
101
- playerRef.current = player;
102
- setState({
103
- loading: true,
104
- error: false
105
- });
106
- player.play().then(function () {
107
- return setState({
108
- play: true,
109
- error: false
110
- });
111
- })["catch"](function () {
112
- return setState({
113
- error: true
114
- });
115
- })["finally"](function () {
116
- setState({
117
- loading: false
118
- }), loaded && loaded();
119
- });
120
- return function () {
121
- player.destroy();
122
- setState({
123
- error: false,
124
- loading: false,
125
- play: false
126
- });
127
- };
128
- }, [url]);
129
- (0, _react.useEffect)(function () {
130
- var canvas = document.getElementById('canvas');
131
- var ctx = canvas.getContext('2d');
132
- var i = 0;
133
- var timer = setInterval(function () {
134
- ctx.beginPath();
135
- var x = Math.random() * 300;
136
- var x2 = Math.random() * 150;
137
- var y = Math.random() * 300;
138
- var y2 = Math.random() * 150;
139
- ctx.strokeStyle = 'red';
140
- ctx.lineWidth = 3;
141
- ctx.rect(x, y, x2 > 20 ? x2 : 20, y2 > 20 ? y2 : 20);
142
- i++;
143
- ctx.stroke(); // ctx.closePath();
144
-
145
- if (i > 5) {
146
- timer && clearTimeout(timer);
147
- }
148
- }, 2000);
149
- return function () {
150
- timer && clearTimeout(timer);
151
- };
152
- }, []);
153
-
154
- var handleCapture = function handleCapture(e) {
155
- var player = playerRef.current;
156
- player && player.capture(captureName, screenshot);
157
- e.stopPropagation();
158
- };
159
-
160
- var handleFullScreen = function handleFullScreen(e) {
161
- toggleFullscreen();
162
- var player = playerRef.current;
163
- player && player.resize();
164
- e.stopPropagation();
165
- };
166
-
167
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
168
- className: "vtx-live-player",
169
- ref: wrapRef,
170
- style: {
171
- width: width,
172
- height: height,
173
- position: 'relative'
174
- }
175
- }, {
176
- children: [(0, _jsxRuntime.jsx)("div", {
177
- ref: ref,
178
- style: {
179
- height: '100%',
180
- width: '100%'
181
- },
182
- id: state.id
183
- }), (0, _jsxRuntime.jsx)("canvas", {
184
- id: "canvas",
185
- width: width,
186
- height: height,
187
- style: {
188
- position: 'absolute',
189
- top: 0,
190
- left: 0,
191
- right: 0,
192
- bottom: 0
193
- }
194
- }), state.error && (0, _jsxRuntime.jsx)(_controls.ErrorState, {}), state.loading && (0, _jsxRuntime.jsx)(_controls.LoadingState, {}), state.showCloudPanel && cloudParams && (0, _jsxRuntime.jsx)(_controls.CloudControlPanel, Object.assign({}, cloudParams)), (0, _jsxRuntime.jsx)(_controls.InfoPanel, {
195
- showInfo: showInfo,
196
- info: info
197
- }), (0, _jsxRuntime.jsx)("div", Object.assign({
198
- className: "controls",
199
- ref: controlsRef
200
- }, {
201
- children: (0, _jsxRuntime.jsxs)(_space["default"], Object.assign({
202
- className: "right",
203
- size: 12,
204
- align: "center"
205
- }, {
206
- children: [(0, _jsxRuntime.jsx)(_controls.VolumeControl, {
207
- player: playerRef.current,
208
- container: controlsRef.current
209
- }), !!screenshot && (0, _jsxRuntime.jsx)(_icons.CaptureIcon, {
210
- onClick: handleCapture
211
- }), channelNum && deviceId && (0, _jsxRuntime.jsx)(_controls.TalkControl, {
212
- player: playerRef.current,
213
- channelNum: channelNum,
214
- deviceId: deviceId
215
- }), (cloudParams === null || cloudParams === void 0 ? void 0 : cloudParams.type) !== 'none' && (0, _jsxRuntime.jsx)(_icons.CloudControlIcon, {
216
- active: state.showCloudPanel,
217
- onClick: function onClick() {
218
- return setState({
219
- showCloudPanel: !state.showCloudPanel
220
- });
221
- }
222
- }), isFullscreen ? (0, _jsxRuntime.jsx)(_icons.ExitFullScreenIcon, {
223
- onClick: handleFullScreen
224
- }) : (0, _jsxRuntime.jsx)(_icons.FullScreenIcon, {
225
- onClick: handleFullScreen
226
- })]
227
- }))
228
- }))]
229
- }));
230
- }; // LivePlayerImage.displayName = 'live-player';
231
-
232
-
233
- exports.LivePlayerImage = LivePlayerImage;
234
-
235
- var _default = /*#__PURE__*/(0, _react.forwardRef)(LivePlayerImage);
236
-
237
- exports["default"] = _default;
238
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["LivePlayerImage","props","selfRef","url","enableAgent","width","height","captureName","type","channelNum","deviceId","cloudParams","showInfo","info","screenshot","loaded","ref","useRef","wrapRef","controlsRef","playerRef","useFullscreen","isFullscreen","toggleFullscreen","useSetState","play","error","loading","id","guidGenerator","volume","showCloudPanel","state","setState","useImperativeHandle","resize","player","current","useEffect","container","destroy","Player","then","canvas","document","getElementById","ctx","getContext","i","timer","setInterval","beginPath","x","Math","random","x2","y","y2","strokeStyle","lineWidth","rect","stroke","clearTimeout","handleCapture","e","capture","stopPropagation","handleFullScreen","_jsxs","Object","assign","className","style","position","children","_jsx","top","left","right","bottom","ErrorState","LoadingState","CloudControlPanel","InfoPanel","Space","size","align","VolumeControl","CaptureIcon","onClick","TalkControl","CloudControlIcon","active","ExitFullScreenIcon","FullScreenIcon","forwardRef"],"sources":["live-player-image/index.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { forwardRef, useEffect, useImperativeHandle, 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 LivePlayerImage = (props, selfRef) => {\n const { url, enableAgent, width = '100%', height = '100%', captureName, type, channelNum, deviceId, cloudParams, showInfo = false, info = [], screenshot, loaded, } = 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 useImperativeHandle(selfRef, () => {\n return {\n resize: () => {\n const player = playerRef.current;\n player && url && player.resize();\n },\n };\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, channelNum, 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(() => {\n setState({ loading: false }), loaded && loaded();\n });\n return () => {\n player.destroy();\n setState({ error: false, loading: false, play: false });\n };\n }, [url]);\n useEffect(() => {\n const canvas = document.getElementById('canvas');\n const ctx = canvas.getContext('2d');\n let i = 0;\n const timer = setInterval(() => {\n ctx.beginPath();\n const x = Math.random() * 300;\n const x2 = Math.random() * 150;\n const y = Math.random() * 300;\n const y2 = Math.random() * 150;\n ctx.strokeStyle = 'red';\n ctx.lineWidth = 3;\n ctx.rect(x, y, x2 > 20 ? x2 : 20, y2 > 20 ? y2 : 20);\n i++;\n ctx.stroke();\n // ctx.closePath();\n if (i > 5) {\n timer && clearTimeout(timer);\n }\n }, 2000);\n return () => {\n timer && clearTimeout(timer);\n };\n }, []);\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, position: 'relative' } }, { children: [_jsx(\"div\", { ref: ref, style: { height: '100%', width: '100%' }, id: state.id }), _jsx(\"canvas\", { id: \"canvas\", width: width, height: height, style: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n } }), 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};\n// LivePlayerImage.displayName = 'live-player';\nexport default forwardRef(LivePlayerImage);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;;;;;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAQC,OAAR,EAAoB;EAC/C,IAAQC,GAAR,GAAsKF,KAAtK,CAAQE,GAAR;EAAA,IAAaC,WAAb,GAAsKH,KAAtK,CAAaG,WAAb;EAAA,mBAAsKH,KAAtK,CAA0BI,KAA1B;EAAA,IAA0BA,KAA1B,6BAAkC,MAAlC;EAAA,oBAAsKJ,KAAtK,CAA0CK,MAA1C;EAAA,IAA0CA,MAA1C,8BAAmD,MAAnD;EAAA,IAA2DC,WAA3D,GAAsKN,KAAtK,CAA2DM,WAA3D;EAAA,IAAwEC,IAAxE,GAAsKP,KAAtK,CAAwEO,IAAxE;EAAA,IAA8EC,UAA9E,GAAsKR,KAAtK,CAA8EQ,UAA9E;EAAA,IAA0FC,QAA1F,GAAsKT,KAAtK,CAA0FS,QAA1F;EAAA,IAAoGC,WAApG,GAAsKV,KAAtK,CAAoGU,WAApG;EAAA,sBAAs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,CAAZ,CANtG;EAAZ,CAA9G,CAAb,CAAR;AAOH,CAtFM,C,CAuFP;;;;;4BACe,IAAA4B,iBAAA,EAAW/F,eAAX,C"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- require("antd/lib/space/style/css");
4
-
5
- require("../../controls/style/css");
6
-
7
- require("./index.css");
8
- //# sourceMappingURL=css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.js","names":[],"sources":["live-player-image/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA"}
@@ -1,74 +0,0 @@
1
- .vtx-live-player {
2
- position: relative;
3
- background-color: #2b3d51;
4
- border: 1px solid transparent;
5
- }
6
- .vtx-live-player .controls {
7
- position: absolute;
8
- bottom: 0;
9
- display: -webkit-box;
10
- display: -ms-flexbox;
11
- display: flex;
12
- -webkit-box-align: center;
13
- -ms-flex-align: center;
14
- align-items: center;
15
- width: 100%;
16
- height: 30px;
17
- padding: 0 12px;
18
- background-color: #131d27;
19
- opacity: 0;
20
- -webkit-transition: opacity 0.5s;
21
- transition: opacity 0.5s;
22
- }
23
- .vtx-live-player .controls .right {
24
- margin-left: auto;
25
- }
26
- .vtx-live-player .controls .right > div {
27
- height: 24px;
28
- }
29
- .vtx-live-player:hover .controls {
30
- opacity: 1;
31
- }
32
- .vtx-live-player video {
33
- width: 100%;
34
- height: 100%;
35
- -o-object-fit: fill;
36
- object-fit: fill;
37
- }
38
- .vtx-live-player .sub-wnd {
39
- width: 100% !important;
40
- height: 100% !important;
41
- background-color: #2b3d51 !important;
42
- border: 1px solid transparent !important;
43
- }
44
- .vtx-live-player .error-container {
45
- position: absolute;
46
- top: 50%;
47
- left: 50%;
48
- display: -webkit-box;
49
- display: -ms-flexbox;
50
- display: flex;
51
- -webkit-box-orient: vertical;
52
- -webkit-box-direction: normal;
53
- -ms-flex-direction: column;
54
- flex-direction: column;
55
- -webkit-box-align: center;
56
- -ms-flex-align: center;
57
- align-items: center;
58
- -webkit-transform: translate(-50%, -50%);
59
- -ms-transform: translate(-50%, -50%);
60
- transform: translate(-50%, -50%);
61
- }
62
- .vtx-live-player .error-container .text {
63
- margin: 20px 0;
64
- font-size: 14px;
65
- color: rgba(255, 255, 255, 0.65);
66
- }
67
- .vtx-live-player .loading-container {
68
- position: absolute;
69
- top: 50%;
70
- left: 50%;
71
- -webkit-transform: translate(-50%, -50%);
72
- -ms-transform: translate(-50%, -50%);
73
- transform: translate(-50%, -50%);
74
- }
@@ -1,3 +0,0 @@
1
- import "antd/lib/space/style";
2
- import '../../controls/style';
3
- import './index.less';
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- require("antd/lib/space/style");
4
-
5
- require("../../controls/style");
6
-
7
- require("./index.less");
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["live-player-image/style/index.js"],"sourcesContent":["import \"antd/lib/space/style\";\nimport '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA"}
@@ -1,70 +0,0 @@
1
- .vtx-live-player {
2
- position: relative;
3
- // display: flex;
4
- // align-items: center;
5
- // justify-content: center;
6
- background-color: #2b3d51;
7
- border: 1px solid transparent;
8
- .controls {
9
- position: absolute;
10
- bottom: 0;
11
- display: flex;
12
- align-items: center;
13
- width: 100%;
14
- height: 30px;
15
- padding: 0 12px;
16
- background-color: #131d27;
17
- opacity: 0;
18
- transition: opacity 0.5s;
19
-
20
- .right {
21
- margin-left: auto;
22
-
23
- > div {
24
- height: 24px;
25
- }
26
- }
27
- }
28
-
29
- &:hover {
30
- .controls {
31
- opacity: 1;
32
- }
33
- }
34
-
35
- video {
36
- width: 100%;
37
- height: 100%;
38
- object-fit: fill;
39
- }
40
-
41
- .sub-wnd {
42
- width: 100% !important;
43
- height: 100% !important;
44
- background-color: #2b3d51 !important;
45
- border: 1px solid transparent !important;
46
- }
47
-
48
- .error-container {
49
- position: absolute;
50
- top: 50%;
51
- left: 50%;
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- transform: translate(-50%, -50%);
56
-
57
- .text {
58
- margin: 20px 0;
59
- font-size: 14px;
60
- color: rgba(255, 255 ,255 , .65);
61
- }
62
- }
63
-
64
- .loading-container {
65
- position: absolute;
66
- top: 50%;
67
- left: 50%;
68
- transform: translate(-50%, -50%);
69
- }
70
- }