diff --git a/other/nostalgia/old movies and videos/karius/index.html b/other/nostalgia/old movies and videos/karius/index.html new file mode 100644 index 0000000..cdde17c --- /dev/null +++ b/other/nostalgia/old movies and videos/karius/index.html @@ -0,0 +1,23 @@ + + + + + + + Karius-og-Baktus + + + + +
+ + + +
+ + + \ No newline at end of file diff --git a/other/nostalgia/old movies and videos/karius/index.js b/other/nostalgia/old movies and videos/karius/index.js new file mode 100644 index 0000000..4148407 --- /dev/null +++ b/other/nostalgia/old movies and videos/karius/index.js @@ -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); \ No newline at end of file