autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent b08d76aaa6
commit df6d9dd3b6

@ -357,12 +357,6 @@ var DragQuestions = function DragQuestions(_ref) {
setselectindex('');
},
children: "\u5728\u8BE5\u5904\u5220\u9664\u5185\u5BB9\uFF0C\u5E76\u4E0D\u4F1A\u540C\u6B65\u5C06\u8BE5\u6587\u7AE0\u7684\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF0C\u4EC5\u5728\u672C\u6708\u520A\u4E2D\u4E0D\u5C55\u793A\uFF0C\u786E\u5B9A\u662F\u5426\u5220\u9664\u8BE5\u5185\u5BB9\uFF0C \u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
title: "\u67E5\u770B\u56FE\u7247",
className: "modalXazy",
open: selectindex,
footer: null,
children: "\u5728\u8BE5\u5904\u5220\u9664\u5185\u5BB9\uFF0C\u5E76\u4E0D\u4F1A\u540C\u6B65\u5C06\u8BE5\u6587\u7AE0\u7684\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF0C\u4EC5\u5728\u672C\u6708\u520A\u4E2D\u4E0D\u5C55\u793A\uFF0C\u786E\u5B9A\u662F\u5426\u5220\u9664\u8BE5\u5185\u5BB9\uFF0C \u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002"
})]
});
};

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

@ -91,9 +91,9 @@ if (false) {}
/***/ }),
/***/ 84184:
/***/ 15887:
/*!************************************************************!*\
!*** ./src/pages/Equipment/Working/index.tsx + 12 modules ***!
!*** ./src/pages/Equipment/Working/index.tsx + 13 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -382,6 +382,94 @@ var laboratory = __webpack_require__(32089);
var useCustomRequest = __webpack_require__(64011);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(43391);
;// CONCATENATED MODULE: ./src/components/Video/MsePlayer/index.tsx
/* harmony default export */ var MsePlayer = (/*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (_ref) {
var src = _ref.src;
var videoRef = (0,_react_17_0_2_react.useRef)();
var mseQueue = [];
var mseSourceBuffer;
var mseStreamingStarted = false;
function startPlay(videoEl, url) {
var mse = new MediaSource();
videoRef.current.src = window.URL.createObjectURL(mse);
mse.addEventListener('sourceopen', function () {
var ws = new WebSocket(url);
ws.binaryType = 'arraybuffer';
ws.onopen = function (event) {
console.log('Connect to ws');
};
ws.onmessage = function (event) {
var data = new Uint8Array(event.data);
if (data[0] === 9) {
var mimeCodec;
var decodedArr = data.slice(1);
if (window.TextDecoder) {
mimeCodec = new TextDecoder('utf-8').decode(decodedArr);
} else {
mimeCodec = Utf8ArrayToStr(decodedArr);
}
mseSourceBuffer = mse.addSourceBuffer('video/mp4; codecs="' + mimeCodec + '"');
mseSourceBuffer.mode = 'segments';
mseSourceBuffer.addEventListener('updateend', pushPacket);
} else {
readPacket(event.data);
}
};
}, false);
}
function pushPacket() {
var packet;
if (!mseSourceBuffer.updating) {
if (mseQueue.length > 0) {
packet = mseQueue.shift();
mseSourceBuffer.appendBuffer(packet);
} else {
mseStreamingStarted = false;
}
}
if (videoRef.current.buffered.length > 0) {
if (typeof document.hidden !== 'undefined' && document.hidden) {
// no sound, browser paused video without sound in background
videoRef.current.currentTime = videoRef.current.buffered.end(videoRef.current.buffered.length - 1) - 0.5;
}
}
}
function readPacket(packet) {
if (!mseStreamingStarted) {
mseSourceBuffer.appendBuffer(packet);
mseStreamingStarted = true;
return;
}
mseQueue.push(packet);
if (!mseSourceBuffer.updating) {
pushPacket();
}
}
(0,_react_17_0_2_react.useEffect)(function () {
// fix stalled video in safari
videoRef.current.addEventListener('pause', function () {
if (videoRef.current.currentTime > videoRef.current.buffered.end(videoRef.current.buffered.length - 1)) {
videoRef.current.currentTime = videoRef.current.buffered.end(videoRef.current.buffered.length - 1) - 0.1;
videoRef.current.play();
}
});
startPlay(videoRef.current, src);
}, []);
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
position: 'relative'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
width: '100%',
controls: true,
ref: videoRef,
height: 500,
src: src
})
});
}));
;// CONCATENATED MODULE: ./src/pages/Equipment/Working/index.tsx
@ -409,6 +497,7 @@ var fetch = __webpack_require__(43391);
var IndexPage = function IndexPage(_ref) {
@ -597,7 +686,7 @@ var IndexPage = function IndexPage(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
//推流转换
getlist();
setitems();
// setitems()
}, []);
function getlist() {
return _getlist.apply(this, arguments);
@ -793,13 +882,8 @@ var IndexPage = function IndexPage(_ref) {
style: {
display: 'flex'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
id: "1",
muted: true,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("source", {
src: "http://192.168.1.22:8083/stream/1/channel/\u6D4B\u8BD5\u5BA4/hls/live/index.m3u8",
type: "application/x-mpegURL"
})
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MsePlayer, {
src: 'ws://192.168.1.22:8083/stream/4/channel/0/mse?uuid=4&channel=0'
})
})]
})

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