select.addEventListener('change', function() { const newRes = this.value; if (sources[newRes]) { const wasPlaying = !video.paused; const currentTime = video.currentTime; video.src = sources[newRes]; video.currentTime = currentTime; if (wasPlaying) video.play(); } }); </script>
// Store source URLs by resolution document.querySelectorAll('#myVideo source').forEach(source => { sources[source.getAttribute('data-res')] = source.getAttribute('src'); });
If you meant something else (e.g., building a full site like 1080pvideos.net from scratch), let me know and I’ll provide a structured development plan.
<video id="myVideo" controls> <source src="video-1080.mp4" type="video/mp4" data-res="1080"> <source src="video-720.mp4" type="video/mp4" data-res="720"> <source src="video-480.mp4" type="video/mp4" data-res="480"> </video> <select id="resolutionSelect"> <option value="1080">1080p</option> <option value="720">720p</option> <option value="480">480p</option> </select> <script> const video = document.getElementById('myVideo'); const select = document.getElementById('resolutionSelect'); const sources = {};
This is the patreon page for Trebuchet podcast and website. We publish a beautiful printed magazine biannually and release an irregular podcast on contemporary art every month (or so).
Our website is updated every other day with new art news, art criticism and much more. Become a backer and join us in discovering new forms of art that raise the heart rate and electrify the mind.