Skip to content

Instantly share code, notes, and snippets.

@flordefuego
Created August 13, 2025 22:24
Show Gist options
  • Save flordefuego/e899ed25fc2055add4842554e60752d6 to your computer and use it in GitHub Desktop.
Save flordefuego/e899ed25fc2055add4842554e60752d6 to your computer and use it in GitHub Desktop.
// Create the video manually
let vid = document.createElement('video')
vid.src = 'https://upload.wikimedia.org/wikipedia/commons/transcoded/4/46/John_Bauer_%E2%80%93_Illustrator_of_Folklore_and_Fairy_Tales.webm/John_Bauer_%E2%80%93_Illustrator_of_Folklore_and_Fairy_Tales.webm.1080p.vp9.webm'
vid.crossOrigin = 'anonymous'
vid.loop = true
vid.muted = false
vid.autoplay = false // we'll start it after a click
document.body.appendChild(vid) // optional, for debugging
// Wait for a user click/touch to allow audio
document.body.addEventListener('click', () => {
vid.play().then(() => {
console.log('Video playing with sound')
}).catch(err => console.error(err))
})
// Tell Hydra to use our video
s0.init({ src: vid })
src(s0).repeat(2,2).kaleid(3).rotate(0,0.1).modulate(osc()).out()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment