35 lines
929 B
HTML
35 lines
929 B
HTML
|
<style>
|
||
|
body{
|
||
|
background-color: black;
|
||
|
}
|
||
|
header,footer{
|
||
|
display:none;
|
||
|
}
|
||
|
#main{
|
||
|
position: absolute;
|
||
|
top:0;
|
||
|
left: 0;
|
||
|
width:100vw;
|
||
|
height: 100vh;
|
||
|
max-height: 100vh;
|
||
|
max-width: initial;
|
||
|
}
|
||
|
</style>
|
||
|
<video controls id="main" class="video-player">
|
||
|
<source src="">
|
||
|
</video>
|
||
|
|
||
|
<script>
|
||
|
//https://davidwalsh.name/query-string-javascript
|
||
|
function getUrlParameter(name) {
|
||
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||
|
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||
|
var results = regex.exec(location.search);
|
||
|
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||
|
};
|
||
|
|
||
|
var source = document.createElement('source')
|
||
|
source.src = ''+getUrlParameter('v');
|
||
|
document.getElementById('main').appendChild(source);
|
||
|
</script>
|