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;
|
||||
justify-content: center;
|
||||
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;
|
||||
const opts = this.props.opts;
|
||||
const height = opts.idealSize.height - 10;
|
||||
const width = opts.idealSize.width - 10;
|
||||
const width = opts.maxSize.width - 10;
|
||||
return (
|
||||
<div className="media-renderer">
|
||||
<video width={width} height={height} controls>
|
||||
<div className="media-renderer" style={{ height: height, width: width }}>
|
||||
<video controls>
|
||||
<source src={fullVideoUrl} />
|
||||
</video>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user