Glass SDK · phase 4

glass.watch() — beside a real YouTube iframe

A real third-party YouTube player (loaded via the public IFrame API — no key, $0) wrapped with Glass.adapters.youtube(player) and handed to glass.watch({ player, videoId, mount, vttUrl }). The GlassWatch companion mounts beside the iframe: interactive transcript, tap-to-explain terms, and a catch-me-up recap.

YouTube IFrame · cross-origin player companion: loading YouTube API…
In-caption isn't available on iframe players — by design. A YouTube player is a cross-origin iframe, so the page cannot reach its inner <video> or its captions. The companion therefore runs companion-only: the host's own captions stay on the video, and the interactive transcript comes from a supplied vttUrl. Where Glass can reach the player's <video> (native, JW, Brightcove), in-caption tapping is possible instead.

Programmatic control

Event log

Waiting for events… (turn on the companion, tap a term, or toggle catch-me-up)