@vtx/player 0.0.11 → 0.0.14
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.
- package/{dist/types → lib}/api/fetch.d.ts +0 -0
- package/lib/api/fetch.js +128 -0
- package/lib/api/fetch.js.map +1 -0
- package/{dist/types → lib}/api/index.d.ts +0 -0
- package/lib/api/index.js +124 -0
- package/lib/api/index.js.map +1 -0
- package/{dist/types → lib}/api/types.d.ts +0 -0
- package/lib/api/types.js +6 -0
- package/lib/api/types.js.map +1 -0
- package/{dist/types/components → lib}/bill-player/index.d.ts +1 -3
- package/lib/bill-player/index.js +410 -0
- package/lib/bill-player/index.js.map +1 -0
- package/lib/bill-player/style/css.js +22 -0
- package/lib/bill-player/style/css.js.map +1 -0
- package/lib/bill-player/style/index.css +55 -0
- package/lib/bill-player/style/index.d.ts +10 -0
- package/lib/bill-player/style/index.js +22 -0
- package/lib/bill-player/style/index.js.map +1 -0
- package/lib/bill-player/style/index.less +58 -0
- package/lib/components/live-control/images/empty.png +0 -0
- package/{dist/types → lib}/context/index.d.ts +0 -0
- package/lib/context/index.js +20 -0
- package/lib/context/index.js.map +1 -0
- package/lib/controls/images/arrow.png +0 -0
- package/lib/controls/images/error.png +0 -0
- package/{dist/types/components → lib}/controls/index.d.ts +9 -3
- package/lib/controls/index.js +474 -0
- package/lib/controls/index.js.map +1 -0
- package/lib/controls/style/css.js +4 -0
- package/lib/controls/style/css.js.map +1 -0
- package/lib/controls/style/index.css +185 -0
- package/lib/controls/style/index.d.ts +1 -0
- package/lib/controls/style/index.js +4 -0
- package/lib/controls/style/index.js.map +1 -0
- package/lib/controls/style/index.less +187 -0
- package/lib/history-control/images/collapse.png +0 -0
- package/lib/history-control/images/empty.png +0 -0
- package/{dist/types/components → lib}/history-control/index.d.ts +5 -2
- package/lib/history-control/index.js +506 -0
- package/lib/history-control/index.js.map +1 -0
- package/lib/history-control/style/css.js +6 -0
- package/lib/history-control/style/css.js.map +1 -0
- package/lib/history-control/style/index.css +195 -0
- package/lib/history-control/style/index.d.ts +2 -0
- package/lib/history-control/style/index.js +6 -0
- package/lib/history-control/style/index.js.map +1 -0
- package/lib/history-control/style/index.less +219 -0
- package/{dist/types/components → lib}/history-player/index.d.ts +7 -4
- package/lib/history-player/index.js +276 -0
- package/lib/history-player/index.js.map +1 -0
- package/lib/history-player/style/css.js +6 -0
- package/lib/history-player/style/css.js.map +1 -0
- package/lib/history-player/style/index.css +105 -0
- package/lib/history-player/style/index.d.ts +2 -0
- package/lib/history-player/style/index.js +6 -0
- package/lib/history-player/style/index.js.map +1 -0
- package/lib/history-player/style/index.less +98 -0
- package/{dist/types → lib}/hooks/useSettings.d.ts +0 -0
- package/lib/hooks/useSettings.js +28 -0
- package/lib/hooks/useSettings.js.map +1 -0
- package/lib/icons/index.css +28 -0
- package/{dist/types → lib}/icons/index.d.ts +0 -0
- package/lib/icons/index.js +788 -0
- package/lib/icons/index.js.map +1 -0
- package/lib/icons/index.less +27 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +64 -0
- package/lib/index.js.map +1 -0
- package/{dist/types/components → lib}/live-channel-player/index.d.ts +1 -2
- package/lib/live-channel-player/index.js +164 -0
- package/lib/live-channel-player/index.js.map +1 -0
- package/lib/live-channel-player/style/css.js +6 -0
- package/lib/live-channel-player/style/css.js.map +1 -0
- package/lib/live-channel-player/style/index.d.ts +2 -0
- package/lib/live-channel-player/style/index.js +6 -0
- package/lib/live-channel-player/style/index.js.map +1 -0
- package/lib/live-control/images/empty.png +0 -0
- package/{dist/types/components → lib}/live-control/index.d.ts +6 -3
- package/lib/live-control/index.js +381 -0
- package/lib/live-control/index.js.map +1 -0
- package/lib/live-control/style/css.js +6 -0
- package/lib/live-control/style/css.js.map +1 -0
- package/lib/live-control/style/index.css +73 -0
- package/lib/live-control/style/index.d.ts +2 -0
- package/lib/live-control/style/index.js +6 -0
- package/lib/live-control/style/index.js.map +1 -0
- package/lib/live-control/style/index.less +65 -0
- package/{dist/types/components → lib}/live-player/index.d.ts +6 -4
- package/lib/live-player/index.js +178 -0
- package/lib/live-player/index.js.map +1 -0
- package/lib/live-player/style/css.js +6 -0
- package/lib/live-player/style/css.js.map +1 -0
- package/lib/live-player/style/index.css +83 -0
- package/lib/live-player/style/index.d.ts +2 -0
- package/lib/live-player/style/index.js +6 -0
- package/lib/live-player/style/index.js.map +1 -0
- package/lib/live-player/style/index.less +70 -0
- package/{dist/types/components → lib}/player/index.d.ts +5 -0
- package/lib/player/index.js +476 -0
- package/lib/player/index.js.map +1 -0
- package/lib/player/style/css.js +2 -0
- package/lib/player/style/css.js.map +1 -0
- package/lib/player/style/index.d.ts +1 -0
- package/lib/player/style/index.js +2 -0
- package/lib/player/style/index.js.map +1 -0
- package/lib/typings/@vtx/utils/index.d.ts +27 -0
- package/lib/typings/h5player.d.ts +131 -0
- package/{dist/types → lib}/utils/index.d.ts +3 -3
- package/lib/utils/index.js +265 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/vite-env.d.ts +1 -0
- package/package.json +30 -10
- package/dist/index.d.ts +0 -221
- package/dist/index.es.js +0 -533
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -533
- package/dist/index.umd.js.map +0 -1
- package/dist/types/main.d.ts +0 -8
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.LivePlayer = void 0;
|
|
7
|
+
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _ahooks = require("ahooks");
|
|
13
|
+
|
|
14
|
+
var _space = _interopRequireDefault(require("antd/lib/space"));
|
|
15
|
+
|
|
16
|
+
var _icons = require("../icons");
|
|
17
|
+
|
|
18
|
+
var _utils = require("../utils");
|
|
19
|
+
|
|
20
|
+
var _controls = require("../controls");
|
|
21
|
+
|
|
22
|
+
var _player = _interopRequireDefault(require("../player"));
|
|
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 LivePlayer = function LivePlayer(props) {
|
|
39
|
+
var url = props.url,
|
|
40
|
+
_props$width = props.width,
|
|
41
|
+
width = _props$width === void 0 ? '100%' : _props$width,
|
|
42
|
+
_props$height = props.height,
|
|
43
|
+
height = _props$height === void 0 ? '100%' : _props$height,
|
|
44
|
+
captureName = props.captureName,
|
|
45
|
+
type = props.type,
|
|
46
|
+
talkUrl = props.talkUrl,
|
|
47
|
+
cloudParams = props.cloudParams,
|
|
48
|
+
_props$showInfo = props.showInfo,
|
|
49
|
+
showInfo = _props$showInfo === void 0 ? false : _props$showInfo,
|
|
50
|
+
_props$info = props.info,
|
|
51
|
+
info = _props$info === void 0 ? [] : _props$info;
|
|
52
|
+
var ref = (0, _react.useRef)(null);
|
|
53
|
+
var wrapRef = (0, _react.useRef)(null);
|
|
54
|
+
var controlsRef = (0, _react.useRef)(null);
|
|
55
|
+
var playerRef = (0, _react.useRef)();
|
|
56
|
+
|
|
57
|
+
var _useFullscreen = (0, _ahooks.useFullscreen)(wrapRef),
|
|
58
|
+
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
59
|
+
isFullscreen = _useFullscreen2[0],
|
|
60
|
+
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
61
|
+
|
|
62
|
+
var _useSetState = (0, _ahooks.useSetState)({
|
|
63
|
+
play: false,
|
|
64
|
+
error: false,
|
|
65
|
+
loading: false,
|
|
66
|
+
id: 'vtx_hk_player_' + (0, _utils.guidGenerator)(),
|
|
67
|
+
volume: 0,
|
|
68
|
+
showCloudPanel: false
|
|
69
|
+
}),
|
|
70
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
71
|
+
state = _useSetState2[0],
|
|
72
|
+
setState = _useSetState2[1];
|
|
73
|
+
|
|
74
|
+
(0, _react.useEffect)(function () {
|
|
75
|
+
var container = ref.current;
|
|
76
|
+
if (!url || !container) return;
|
|
77
|
+
var player = new _player["default"]({
|
|
78
|
+
url: url,
|
|
79
|
+
container: container,
|
|
80
|
+
type: type
|
|
81
|
+
});
|
|
82
|
+
playerRef.current = player;
|
|
83
|
+
setState({
|
|
84
|
+
loading: true
|
|
85
|
+
});
|
|
86
|
+
player.play().then(function () {
|
|
87
|
+
return setState({
|
|
88
|
+
play: true,
|
|
89
|
+
error: false
|
|
90
|
+
});
|
|
91
|
+
})["catch"](function () {
|
|
92
|
+
return setState({
|
|
93
|
+
error: true
|
|
94
|
+
});
|
|
95
|
+
})["finally"](function () {
|
|
96
|
+
return setState({
|
|
97
|
+
loading: false
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
return function () {
|
|
101
|
+
player.destroy();
|
|
102
|
+
setState({
|
|
103
|
+
error: false,
|
|
104
|
+
loading: false,
|
|
105
|
+
play: false
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
}, [url]);
|
|
109
|
+
|
|
110
|
+
var handleCapture = function handleCapture(e) {
|
|
111
|
+
var player = playerRef.current;
|
|
112
|
+
player && player.capture(captureName);
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var handleFullScreen = function handleFullScreen(e) {
|
|
117
|
+
toggleFullscreen();
|
|
118
|
+
var player = playerRef.current;
|
|
119
|
+
player && player.resize();
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
return (0, _jsxRuntime.jsxs)("div", Object.assign({
|
|
124
|
+
className: "vtx-live-player",
|
|
125
|
+
ref: wrapRef,
|
|
126
|
+
style: {
|
|
127
|
+
width: width,
|
|
128
|
+
height: height
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
132
|
+
ref: ref,
|
|
133
|
+
style: {
|
|
134
|
+
height: '100%',
|
|
135
|
+
width: '100%'
|
|
136
|
+
},
|
|
137
|
+
id: state.id
|
|
138
|
+
}), state.loading && (0, _jsxRuntime.jsx)(_controls.LoadingState, {}), state.showCloudPanel && cloudParams && (0, _jsxRuntime.jsx)(_controls.CloudControlPanel, Object.assign({}, cloudParams)), (0, _jsxRuntime.jsx)(_controls.InfoPanel, {
|
|
139
|
+
showInfo: showInfo,
|
|
140
|
+
info: info
|
|
141
|
+
}), (0, _jsxRuntime.jsx)("div", Object.assign({
|
|
142
|
+
className: "controls",
|
|
143
|
+
ref: controlsRef
|
|
144
|
+
}, {
|
|
145
|
+
children: (0, _jsxRuntime.jsxs)(_space["default"], Object.assign({
|
|
146
|
+
className: "right",
|
|
147
|
+
size: 12,
|
|
148
|
+
align: "center"
|
|
149
|
+
}, {
|
|
150
|
+
children: [(0, _jsxRuntime.jsx)(_controls.VolumeControl, {
|
|
151
|
+
player: playerRef.current,
|
|
152
|
+
container: controlsRef.current
|
|
153
|
+
}), (0, _jsxRuntime.jsx)(_icons.CaptureIcon, {
|
|
154
|
+
onClick: handleCapture
|
|
155
|
+
}), talkUrl && (0, _jsxRuntime.jsx)(_controls.TalkControl, {
|
|
156
|
+
player: playerRef.current,
|
|
157
|
+
url: talkUrl
|
|
158
|
+
}), cloudParams && (0, _jsxRuntime.jsx)(_icons.CloudControlIcon, {
|
|
159
|
+
active: state.showCloudPanel,
|
|
160
|
+
onClick: function onClick() {
|
|
161
|
+
return setState({
|
|
162
|
+
showCloudPanel: !state.showCloudPanel
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}), isFullscreen ? (0, _jsxRuntime.jsx)(_icons.ExitFullScreenIcon, {
|
|
166
|
+
onClick: handleFullScreen
|
|
167
|
+
}) : (0, _jsxRuntime.jsx)(_icons.FullScreenIcon, {
|
|
168
|
+
onClick: handleFullScreen
|
|
169
|
+
})]
|
|
170
|
+
}))
|
|
171
|
+
}))]
|
|
172
|
+
}));
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
exports.LivePlayer = LivePlayer;
|
|
176
|
+
var _default = LivePlayer;
|
|
177
|
+
exports["default"] = _default;
|
|
178
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["LivePlayer","props","url","width","height","captureName","type","talkUrl","cloudParams","showInfo","info","ref","useRef","wrapRef","controlsRef","playerRef","useFullscreen","isFullscreen","toggleFullscreen","useSetState","play","error","loading","id","guidGenerator","volume","showCloudPanel","state","setState","useEffect","container","current","player","Player","then","destroy","handleCapture","e","capture","stopPropagation","handleFullScreen","resize","_jsxs","Object","assign","className","style","children","_jsx","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 { useFullscreen, useSetState } from 'ahooks';\n// import { Space } from 'antd';\nimport Space from 'antd/lib/space';\nimport { CaptureIcon, CloudControlIcon, ExitFullScreenIcon, FullScreenIcon } from '../icons';\nimport { guidGenerator } from '../utils';\nimport { CloudControlPanel, InfoPanel, LoadingState, TalkControl, VolumeControl, } from '../controls';\nimport Player from '../player';\nexport const LivePlayer = (props) => {\n const { url, width = '100%', height = '100%', captureName, type, talkUrl, cloudParams, showInfo = false, info = [], } = 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 return;\n const player = new Player({ url, container, type });\n playerRef.current = player;\n setState({ loading: true });\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 const handleCapture = (e) => {\n const player = playerRef.current;\n player && player.capture(captureName);\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.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 }), _jsx(CaptureIcon, { onClick: handleCapture }), talkUrl && _jsx(TalkControl, { player: playerRef.current, url: talkUrl }), cloudParams && (_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;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AACO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAW;EACjC,IAAQC,GAAR,GAAwHD,KAAxH,CAAQC,GAAR;EAAA,mBAAwHD,KAAxH,CAAaE,KAAb;EAAA,IAAaA,KAAb,6BAAqB,MAArB;EAAA,oBAAwHF,KAAxH,CAA6BG,MAA7B;EAAA,IAA6BA,MAA7B,8BAAsC,MAAtC;EAAA,IAA8CC,WAA9C,GAAwHJ,KAAxH,CAA8CI,WAA9C;EAAA,IAA2DC,IAA3D,GAAwHL,KAAxH,CAA2DK,IAA3D;EAAA,IAAiEC,OAAjE,GAAwHN,KAAxH,CAAiEM,OAAjE;EAAA,IAA0EC,WAA1E,GAAwHP,KAAxH,CAA0EO,WAA1E;EAAA,sBAAwHP,KAAxH,CAA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D;YAAzB,CAAD,CAAd;UAAA;QAAzC,CAAvB,CAA/N,EAA8VT,YAAY,GAAI,IAAA+B,eAAA,EAAKa,yBAAL,EAAyB;UAAEJ,OAAO,EAAEjB;QAAX,CAAzB,CAAJ,GAAgE,IAAAQ,eAAA,EAAKc,qBAAL,EAAqB;UAAEL,OAAO,EAAEjB;QAAX,CAArB,CAA1a;MAAZ,CAAjE,CAAb;IAAZ,CAA3D,CAAZ,CAAlR;EAAZ,CAAxF,CAAb,CAAR;AACH,CA5CM;;;eA6CQxC,U"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["live-player/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.vtx-live-player {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: -webkit-box;
|
|
4
|
+
display: -ms-flexbox;
|
|
5
|
+
display: flex;
|
|
6
|
+
-webkit-box-align: center;
|
|
7
|
+
-ms-flex-align: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
-webkit-box-pack: center;
|
|
10
|
+
-ms-flex-pack: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
background-color: #2b3d51;
|
|
13
|
+
border: 1px solid transparent;
|
|
14
|
+
}
|
|
15
|
+
.vtx-live-player .controls {
|
|
16
|
+
position: absolute;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
display: -webkit-box;
|
|
19
|
+
display: -ms-flexbox;
|
|
20
|
+
display: flex;
|
|
21
|
+
-webkit-box-align: center;
|
|
22
|
+
-ms-flex-align: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 30px;
|
|
26
|
+
padding: 0 12px;
|
|
27
|
+
background-color: #131d27;
|
|
28
|
+
opacity: 0;
|
|
29
|
+
-webkit-transition: opacity 0.5s;
|
|
30
|
+
transition: opacity 0.5s;
|
|
31
|
+
}
|
|
32
|
+
.vtx-live-player .controls .right {
|
|
33
|
+
margin-left: auto;
|
|
34
|
+
}
|
|
35
|
+
.vtx-live-player .controls .right > div {
|
|
36
|
+
height: 24px;
|
|
37
|
+
}
|
|
38
|
+
.vtx-live-player:hover .controls {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
}
|
|
41
|
+
.vtx-live-player video {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
-o-object-fit: fill;
|
|
45
|
+
object-fit: fill;
|
|
46
|
+
}
|
|
47
|
+
.vtx-live-player .sub-wnd {
|
|
48
|
+
width: 100% !important;
|
|
49
|
+
height: 100% !important;
|
|
50
|
+
background-color: #2b3d51 !important;
|
|
51
|
+
border: 1px solid transparent !important;
|
|
52
|
+
}
|
|
53
|
+
.vtx-live-player .error-container {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 50%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
display: -webkit-box;
|
|
58
|
+
display: -ms-flexbox;
|
|
59
|
+
display: flex;
|
|
60
|
+
-webkit-box-orient: vertical;
|
|
61
|
+
-webkit-box-direction: normal;
|
|
62
|
+
-ms-flex-direction: column;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
-webkit-box-align: center;
|
|
65
|
+
-ms-flex-align: center;
|
|
66
|
+
align-items: center;
|
|
67
|
+
-webkit-transform: translate(-50%, -50%);
|
|
68
|
+
-ms-transform: translate(-50%, -50%);
|
|
69
|
+
transform: translate(-50%, -50%);
|
|
70
|
+
}
|
|
71
|
+
.vtx-live-player .error-container .text {
|
|
72
|
+
margin: 20px 0;
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
color: rgba(255, 255, 255, 0.65);
|
|
75
|
+
}
|
|
76
|
+
.vtx-live-player .loading-container {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 50%;
|
|
79
|
+
left: 50%;
|
|
80
|
+
-webkit-transform: translate(-50%, -50%);
|
|
81
|
+
-ms-transform: translate(-50%, -50%);
|
|
82
|
+
transform: translate(-50%, -50%);
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["live-player/style/index.js"],"sourcesContent":["import '../../controls/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
}
|