@giulia-di-veronica
<div id="video-wrapper">
<video id="player" controls autplay="true" preload="auto" width="1880px" height="980px" poster="poster.png">
<source src="video/tuovideo.mp4" type='video/mp4' />
<track kind="subtitles" src="/subtitles/tuovideo.vtt" srclang="en" label="Svenska"></track>
</video>
</div>
CSS
html, body {
height:100%;
}
body {
margin:0;
padding:0;
}
#video-wrapper {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
}
#video-wrapper > #player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor:pointer;
}
@media (min-aspect-ratio: 16/9) {
#video-wrapper > #player {
height: 300%;
top: -100%;
}
}
@media (max-aspect-ratio: 16/9) {
#video-wrapper > #player {
width: 300%;
left: -100%;
}
}