70 lines
2.0 KiB
HTML
70 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Eins Zwei Polizei seamless html5 loop</title>
|
|
<link rel="stylesheet" href="style.css"></link>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="source_info">
|
|
<span>Volume</span> <input id="volume" type="range" min="-1" max="0.1" step="0.01" value="-0.8"/>
|
|
</div>
|
|
|
|
<div id="myVideoLoop">
|
|
</div>
|
|
<div id="html5canloop">
|
|
<button onclick="change_css();">Reveal the magic</button> <button id="hidden_default" onclick="change_css_back();">Unreveal the magic</button><br />
|
|
</div>
|
|
<!-- Scripts -->
|
|
<script src="VideoLoop.js"></script>
|
|
<script>
|
|
|
|
window.onload = function() {
|
|
|
|
// Initialize video loop
|
|
videoLoopObj = new VideoLoop('myVideoLoop');
|
|
this.muted = true;
|
|
videoLoopObj.length = 13550;
|
|
videoLoopObj.transitionDelay = 10;
|
|
videoLoopObj.paths = ['fzkpmk.webm'];
|
|
videoLoopObj.types = ['video/webm'];
|
|
videoLoopObj.init();
|
|
}
|
|
|
|
</script>
|
|
<script src="yPXnf.js" type="text/javascript"></script>
|
|
<script>
|
|
|
|
loopify("fapadt.webm",ready);
|
|
|
|
function ready(err,loop){
|
|
if (err) {
|
|
console.warn(err);
|
|
}
|
|
|
|
loop.play();
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
function change_css(){
|
|
document.getElementById('myVideoLoop1').style.cssText = 'position:relative; object-fit: contain;padding-bottom: 150px;';
|
|
document.getElementById('myVideoLoop2').style.cssText = 'position:relative; object-fit: contain;padding-bottom: 150px;';
|
|
document.getElementById('hidden_default').style.cssText = 'visibility: visible;';
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
function change_css_back(){
|
|
document.getElementById('myVideoLoop2').style.cssText = 'position:absolute; z-index: 10000;';
|
|
document.getElementById('myVideoLoop1').style.cssText = 'position:absolute; z-index: 10001;';
|
|
document.getElementById('hidden_default').style.cssText = 'visibility: hidden;';
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
|