📚 Course contents

AI & Computer Vision, lesson 27 of 52

Browser Detection & Triggers in JavaScript

intermediate24 min readFull course

Introduction

Seeing boxes is nice; making something happen is the point. Today you'll run a detector in a web page and draw a zone on the screen. When a person steps into it, the page reacts once: a banner, a log line and a sound, like a shop door chime, not a car alarm.

By the end of this lesson you'll be able to:

  • Run COCO-SSD on a webcam in the browser and read its output
  • Draw detection boxes on a canvas laid over the video
  • Test whether a point is inside a zone, and choose the right point (the feet, not the box centre)
  • Explain edge-triggered events versus "on every frame", and why a cooldown is needed
  • Fire a custom DOM event and react to it with a banner, a log line and a sound
  • Explain why browsers block sound until the user clicks, and how that affects the design
Browser Detection & Triggers in JavaScript | Electronics Simplified