|
|
@ -660,57 +660,6 @@ function Index (props) { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
// const container = document.getElementById('video-play');
|
|
|
|
// console.log(`准备播放`);
|
|
|
|
// // 播放方式 1
|
|
|
|
// // const jessibuca = new window.Jessibuca({
|
|
|
|
// // container: container,
|
|
|
|
// // videoBuffer: 0.2, // 缓存时长
|
|
|
|
// // isResize: false,
|
|
|
|
// // text: "",
|
|
|
|
// // loadingText: "加载中",
|
|
|
|
// // debug: true,
|
|
|
|
// // showBandwidth: false, // 显示网速
|
|
|
|
// // operateBtns: {
|
|
|
|
// // fullscreen: false,
|
|
|
|
// // screenshot: false,
|
|
|
|
// // play: false,
|
|
|
|
// // audio: false,
|
|
|
|
// // },
|
|
|
|
// // forceNoOffscreen: false,
|
|
|
|
// // controlAutoHide: true,
|
|
|
|
// // isNotMute: false,
|
|
|
|
// // });
|
|
|
|
// // jessibucas.current = jessibuca
|
|
|
|
// // jessibuca.play(
|
|
|
|
// // // `ws://221.230.55.27:8081/jessica/34020000001110000001/34020000001310000009.flv`
|
|
|
|
// // `ws://192.168.1.128:8081/jessica/34020000001320000001/34020000001320000001.flv`
|
|
|
|
// // );
|
|
|
|
|
|
|
|
// // 播放方式 2
|
|
|
|
// const flv = flvjs.createPlayer({
|
|
|
|
// type: 'flv',
|
|
|
|
// // url: `${res.payload.data.ws_flv}`,
|
|
|
|
// url: `http://192.168.1.128:8081/hdl/34020000001320000001/34020000001320000001.flv`,
|
|
|
|
// isLive: true,
|
|
|
|
// hasAudio: false,
|
|
|
|
// hasVideo: true,
|
|
|
|
// }, {
|
|
|
|
// enableWorker: false,
|
|
|
|
// enalleStashBuffer: true,
|
|
|
|
// stashInitialSize: 128,
|
|
|
|
// lazyLoadMaxDuration: 3 * 60,
|
|
|
|
// seekType: 'range',
|
|
|
|
// autoCleanupSourceBuffer: true,
|
|
|
|
// cors: true,
|
|
|
|
// });
|
|
|
|
// flv.attachMediaElement(container);
|
|
|
|
// flv.load();
|
|
|
|
// flv.play();
|
|
|
|
// flvPlayer.current = flv
|
|
|
|
// }, 500);
|
|
|
|
|
|
|
|
return () => { |
|
|
|
if (dataLiveWs) { |
|
|
|
window.clearInterval(dataLiveWsInterval); |
|
|
|