~/talk

Building a Green Screen with React and HTML Elements

Talkat React Day Bangalore 2021 · 2021-03-19..03-20· [react, web-platform]
links:none on file
slides:none on file

Builds a working green-screen by capturing webcam with navigator.mediaDevices.getUserMedia, rendering frames to a canvas 2D getImageData buffer, looping every frame (requestAnimationFrame / rapid refresh) and zeroing pixels where blue dominates then setting alpha = 0 with a blue > 100 threshold. Demo and slides are available (Live demo: sreetamdas.com/talks/greenscreen, Slides: react-greenscreen.netlify.app); solution needs a simple brightness threshold tweak to avoid false positives.

AI-written summary · about

  1. 0:00Intro
  2. 1:25Getting User Video
  3. 2:46Canvas Element
  4. 4:21Drawing on Canvas
  5. 4:54Understanding Pixels
  6. 5:48Analyzing the Data
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.