autoUpdataFile

dev_local_v9_brain_cloud_competitions
eduauto 11 months ago
parent 4d5aba22f1
commit d2f5aaf735

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.56f79d06.js"></script>
<script src="/react/build/umi.a07ace62.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -313,6 +313,10 @@ var competitionsPage = function competitionsPage(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
var video = videoRef.current;
var urlHls = "https://p2hs.vzan.com/1005362/994297253641030125/live.m3u8?zbid=1005362&tpid=1141665985";
if (!video) {
setIsSuccess(true);
return;
}
if (dist_hls/* default.isSupported */.ZP.isSupported()) {
var hlsInstance = new dist_hls/* default */.ZP();
setHls(hlsInstance);
@ -324,7 +328,9 @@ var competitionsPage = function competitionsPage(_ref) {
hlsInstance.loadSource(urlHls);
hlsInstance.on(dist_hls/* default.Events */.ZP.Events.MANIFEST_PARSED, function () {
video.play()["catch"](function (e) {
setIsSuccess(false);
console.log("失败");
// setIsSuccess(false);
});
});
hlsInstance.on(dist_hls/* default.Events */.ZP.Events.ERROR, function (event, data) {
@ -359,7 +365,7 @@ var competitionsPage = function competitionsPage(_ref) {
hls.destroy();
}
};
}, []);
}, [videoRef.current]);
var handleFullscreen = function handleFullscreen() {
if (videoRef.current.requestFullscreen) {
videoRef.current.requestFullscreen();
@ -685,35 +691,19 @@ var competitionsPage = function competitionsPage(_ref) {
},
src: xcsp_namespaceObject
})
}), isSuccess ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
}), isSuccess ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: "1200px",
margin: "0 auto"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("video", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
ref: videoRef,
controls: true,
style: {
width: '100%',
backgroundColor: '#000'
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "controls",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("button", {
onClick: function onClick() {
videoRef.current.play();
},
children: "\u64AD\u653E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("button", {
onClick: function onClick() {
videoRef.current.pause();
},
children: "\u6682\u505C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("button", {
onClick: handleFullscreen,
children: "\u5168\u5C4F"
})]
})]
})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
align: "middle",
justify: "center",

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save