37 lines
No EOL
1.1 KiB
HTML
37 lines
No EOL
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<style>
|
|
body{
|
|
margin:0;
|
|
background-color: black;
|
|
overflow: hidden;
|
|
}
|
|
video{
|
|
width:100vw;
|
|
max-height: 100vh;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<video controls id="main">
|
|
<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 = '/media/'+getUrlParameter('v');
|
|
document.getElementById('main').appendChild(source);
|
|
</script>
|
|
</body>
|
|
</html> |