Skip to content

Instantly share code, notes, and snippets.

@flordefuego
Created November 17, 2025 10:46
Show Gist options
  • Select an option

  • Save flordefuego/03c52bb635c6c08ff913c221eecfc136 to your computer and use it in GitHub Desktop.

Select an option

Save flordefuego/03c52bb635c6c08ff913c221eecfc136 to your computer and use it in GitHub Desktop.
//taken from the Hydra facebook group
setResolution(1920,1080)
navigator.mediaDevices.getUserMedia({
video: {
width: { ideal: 1920 },
height: { ideal: 1080 }
}
}).then(stream => {
const videoEl = document.createElement('video')
videoEl.srcObject = stream
videoEl.autoplay = true
videoEl.muted = true
videoEl.playsInline = true
videoEl.onloadedmetadata = () => {
s0.initCam({ src: videoEl })
}
})
src(s0).out()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment