Commit e2d6d245 authored by nextime's avatar nextime

Secure video element uses all space available

parent 4319cea9
......@@ -32,8 +32,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
height: 100%;
}
video {
width: 100%;
height: 100%;
width: 100% !important;
height: 100% !important;
object-fit: contain;
}
</style>
......@@ -41,19 +41,29 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<body>
<div id="videoContainer">
<video id="videoPlayer" autoplay muted playsinline>
<source src="/video_feed" type="video/mp4">
<source type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
<script>
var player = videojs('videoPlayer', {
autoplay: true,
muted: true,
controls: true,
fluid: true,
responsive: true
});
window.onload = function() {
var player = videojs('videoPlayer', {
html5: {
vhs: {
overrideNative: !videojs.browser.IS_SAFARI
},
nativeAudioTracks: false,
nativeVideoTracks: false,
autoplay: true,
muted: true,
controls: false,
fluid: true,
respomsive: true
}});
player.src({ src: '{{ stream_url }}', type: 'application/x-mpegURL'});
player.play();
};
// Function to handle resize
function handleResize() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment