mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
make video responsive to container
This commit is contained in:
parent
e6c41788f5
commit
395a315068
@ -4,4 +4,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: var(--termpad);
|
padding-top: var(--termpad);
|
||||||
|
|
||||||
|
video {
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: center;
|
||||||
|
height: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ class SimpleMediaRenderer extends React.Component<
|
|||||||
let fullVideoUrl = GlobalModel.getBaseHostPort() + fileUrl;
|
let fullVideoUrl = GlobalModel.getBaseHostPort() + fileUrl;
|
||||||
const opts = this.props.opts;
|
const opts = this.props.opts;
|
||||||
const height = opts.idealSize.height - 10;
|
const height = opts.idealSize.height - 10;
|
||||||
const width = opts.idealSize.width - 10;
|
const width = opts.maxSize.width - 10;
|
||||||
return (
|
return (
|
||||||
<div className="media-renderer">
|
<div className="media-renderer" style={{ height: height, width: width }}>
|
||||||
<video width={width} height={height} controls>
|
<video controls>
|
||||||
<source src={fullVideoUrl} />
|
<source src={fullVideoUrl} />
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user