fit video

This commit is contained in:
2026-07-03 17:38:23 +05:00
parent 80772c8751
commit f61fd87bac

View File

@@ -4,9 +4,13 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>edge5 video relay</title> <title>edge5 video relay</title>
<script src="https://cdn.jsdelivr.net/npm/mpegts.js/dist/mpegts.js"></script> <script src="https://cdn.jsdelivr.net/npm/mpegts.js/dist/mpegts.js"></script>
<style>
body { margin: 0; background: #000; }
#v { display: block; width: 100vw; height: 100vh; object-fit: contain; }
</style>
</head> </head>
<body> <body>
<video id="v" controls autoplay muted style="width:100%"></video> <video id="v" controls autoplay muted></video>
<script> <script>
const wsUrl = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/ws`; const wsUrl = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/ws`;
const player = mpegts.createPlayer( const player = mpegts.createPlayer(