Browse Source

视频和xy视图

simplify_dependencies
巴林闲侠 2 years ago
parent
commit
bb462e850e
  1. 28
      console/client/src/sections/console/containers/index.js

28
console/client/src/sections/console/containers/index.js

@ -63,7 +63,9 @@ function Index (props) {
const flvPlayer = useRef() const flvPlayer = useRef()
const draw = (type, params = {}) => { const draw = (type, params = {}) => {
if (type == 'xz') {
return return
}
const canvasArea = document.getElementById('canvasArea') const canvasArea = document.getElementById('canvasArea')
const canvasHeight = canvasArea.clientHeight - 12 * 2 - 6 const canvasHeight = canvasArea.clientHeight - 12 * 2 - 6
const canvasWidth = canvasArea.clientWidth - 12 * 2 const canvasWidth = canvasArea.clientWidth - 12 * 2
@ -528,17 +530,26 @@ function Index (props) {
<div style={{ height: 'calc(80% - 40px)', padding: 8 }}> <div style={{ height: 'calc(80% - 40px)', padding: 8 }}>
<Row style={{ <Row style={{
height: '100%', height: '100%',
display: 'none'
}}> }}>
<Col span={12} id="canvasArea" style={{ paddingRight: 8, maxHeight: '100%' }}> <Col span={14} style={{ paddingRight: 8, maxHeight: '100%' }}>
<div className='card' style={cardStyle}> <div className='card' style={cardStyle}>
<canvas ref={xzCvs} id='xzCvs' height={120} width={120} style={{}}> <canvas ref={xzCvs} id='xzCvs' height={120} width={120} style={{ display: 'none' }}>
您的浏览器不支持canvas,请更换浏览器. 您的浏览器不支持canvas,请更换浏览器.
</canvas> </canvas>
<video
className='card'
id={'video-play'}
autoPlay
// muted
controls
style={{ height: '100%', width: '100%', }}
>
</video>
</div> </div>
</Col> </Col>
<Col span={12} style={{ paddingLeft: 8, }}> <Col span={10} style={{ paddingLeft: 8, }}>
<div className='card' style={cardStyle}> <div className='card' id="canvasArea" style={cardStyle}>
<canvas ref={xyCvs} id='xyCvs' height={120} width={120} style={{}}> <canvas ref={xyCvs} id='xyCvs' height={120} width={120} style={{}}>
您的浏览器不支持canvas,请更换浏览器. 您的浏览器不支持canvas,请更换浏览器.
</canvas> </canvas>
@ -546,14 +557,7 @@ function Index (props) {
</Col> </Col>
</Row> </Row>
<video
className='card'
id={'video-play'}
autoPlay muted controls
style={{ height: '100%', width: '100%', }}
>
</video>
</div> </div>
<div style={{ height: '20%' }}> <div style={{ height: '20%' }}>
<Row style={{ height: '100%' }}> <Row style={{ height: '100%' }}>

Loading…
Cancel
Save