mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
a
This commit is contained in:
parent
375f1f9d9f
commit
e0cf09c167
23
other/nostalgia/old movies and videos/karius/index.html
Normal file
23
other/nostalgia/old movies and videos/karius/index.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Karius-og-Baktus</title>
|
||||
<script src="index.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body style="background-color: #192127;">
|
||||
<div style="text-align: center;">
|
||||
<video id="video" controls width="400">
|
||||
<source src="https://data.boof.eu.org/Karius og Baktus h264.mp4" />
|
||||
<source src="https://data.boof.eu.org/Karius og Baktus.webm" />
|
||||
<source src="https://data.boof.eu.org/Karius og Baktus.ogv" />
|
||||
</video>
|
||||
<button id="cdn">My cdn</button>
|
||||
<button id="catbox">Catbox</button>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
30
other/nostalgia/old movies and videos/karius/index.js
Normal file
30
other/nostalgia/old movies and videos/karius/index.js
Normal file
@ -0,0 +1,30 @@
|
||||
var video = document.getElementById('video');
|
||||
|
||||
var sources = [
|
||||
{
|
||||
'mp4': 'https://data.boof.eu.org/Karius og Baktus h264.mp4',
|
||||
'webm':'https://data.boof.eu.org/Karius og Baktus.webm',
|
||||
'ogg':'https://data.boof.eu.org/Karius og Baktus.ogv'
|
||||
}
|
||||
];
|
||||
|
||||
function switchVideo(index) {
|
||||
var s = sources[index], source, i;
|
||||
video.innerHTML = '';
|
||||
for (i in s) {
|
||||
source = document.createElement('source');
|
||||
source.src = s[i];
|
||||
source.setAttribute('type', 'video/' + i);
|
||||
video.appendChild(source);
|
||||
}
|
||||
video.load();
|
||||
video.play();
|
||||
}
|
||||
|
||||
document.getElementById('cdn').addEventListener('click', function() {
|
||||
switchVideo(0);
|
||||
}, false);
|
||||
|
||||
document.getElementById('catbox').addEventListener('click', function() {
|
||||
switchVideo(1);
|
||||
}, false);
|
||||
Loading…
x
Reference in New Issue
Block a user