update video

This commit is contained in:
lb 2023-11-06 17:00:35 +08:00
parent 3d80530ad6
commit 6894aba781
15 changed files with 50 additions and 13 deletions

View File

@ -37,13 +37,15 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/runtime": "^7.18.0", "@babel/runtime": "^7.18.0",
"@types/node": "^20.8.10",
"@types/react": "^17.0.0", "@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0", "@types/react-dom": "^17.0.0",
"@types/ws": "^8.5.8",
"@umijs/preset-react": "1.x", "@umijs/preset-react": "1.x",
"@umijs/test": "^3.5.23", "@umijs/test": "^3.5.23",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"prettier": "^2.2.0", "prettier": "^2.2.0",
"typescript": "^4.1.2", "typescript": "^4.9.5",
"yorkie": "^2.0.0" "yorkie": "^2.0.0"
} }
} }

BIN
public/video/1to2.webm Normal file

Binary file not shown.

BIN
public/video/2to1.webm Normal file

Binary file not shown.

BIN
public/video/enter.webm Normal file

Binary file not shown.

BIN
public/video/floor1.webm Normal file

Binary file not shown.

BIN
public/video/floor2.webm Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -90,20 +90,17 @@ function KilnCenter() {
<div <div
className="video-wrapper" className="video-wrapper"
style={{ style={{
// flex: 1, position: 'fixed',
// background: '#ccc3', top: 0,
left: 0,
width: '100%', width: '100%',
height: '736px', height: '100%',
}} // , top: '10%', left: '10%', position: 'absolute' }} zIndex: -1000,
}}
> >
<video <video muted preload="auto" autoPlay={true} width={'100%'}>
src={currentVideo} <source src="/video/enter.webm" type="video/mp4" />
muted </video>
preload="auto"
autoPlay={true}
width={'100%'}
ref={videoRef}
></video>
</div> </div>
<div className={cls.videoLayer2}></div> <div className={cls.videoLayer2}></div>

18
websocket/modules/kiln.ts Normal file
View File

@ -0,0 +1,18 @@
import utils from '../utils';
function genKilnInfo() {
return {
kilnPressure: utils.rand(0, 100) + 'Kpa',
waterTemp: utils.rand(0, 100) + '℃',
waterFlow: utils.rand(30, 90) + 'm³/h',
waterPressure: utils.rand(10, 50) + 'Kpa',
windPressure: utils.rand(10, 30) + 'Kpa',
gasPressure: utils.rand(10, 30) + 'Kpa',
// 碹顶加权温度
topTemp: utils.rand(30, 60) + '℃',
// 融化加权温度
meltTemp: utils.rand(100, 200) + '℃',
};
}
export default genKilnInfo;

View File

@ -0,0 +1,13 @@
// 天然气
import utils from '../utils';
function getNavGasInfo(type: 'history' | 'realtime') {
switch (type) {
case 'history':
break;
case 'realtime':
break;
}
}
export default getNavGasInfo;

7
websocket/utils/index.ts Normal file
View File

@ -0,0 +1,7 @@
function rand(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
export default {
rand,
};