set default aspect ratio of w:h to 16:9

This commit is contained in:
Xiaofeng Wang 2024-06-23 23:23:49 +08:00
parent 631498b167
commit b17987dd53
No known key found for this signature in database
GPG Key ID: 02BCCBA25E63005B
1 changed files with 11 additions and 3 deletions

View File

@ -3,17 +3,25 @@
<head> <head>
<title>ZLM RTC demo</title> <title>ZLM RTC demo</title>
<script src="./ZLMRTCClient.js"></script> <script src="./ZLMRTCClient.js"></script>
<style>
video {
width: 40vw;
max-height: 50vh;
height: 22.5vw; /* 默认和宽:高为 16:9 */
object-fit: contain;
background-color: grey;
}
</style>
</head> </head>
<body> <body>
<div style="text-align: center;"> <div style="text-align: center;">
<div> <div>
<video id='video' controls autoplay style="text-align:left;width:40%;"> <video id='video' controls autoplay>
Your browser is too old which doesn't support HTML5 video. Your browser is too old which doesn't support HTML5 video.
</video> </video>
<video id='selfVideo' controls autoplay style="text-align:right;width:40%;"> <video id='selfVideo' controls autoplay>
Your browser is too old which doesn't support HTML5 video. Your browser is too old which doesn't support HTML5 video.
</video> </video>
</div> </div>