Skip to content

Releases: yonaka15/embedwire

v0.4.0 — a gesture breaks following only when the panel had room

Choose a tag to compare

@yonaka15 yonaka15 released this 02 Sep 06:52

follow() now stops following the transcript only when the panel could actually have scrolled that way (room: true). A wheel or swipe over a panel already at its end scrolls the page, so it was never aimed at the transcript.

Why, measured. room shipped in 0.2.0 with a note in the source saying that if room: false turned out to be common, the listener was too eager rather than the reader. Two days of a live site (66 breaks, 60 readers) said it was 35 % of every break — 31 % of mobile swipes — a finger on its way down the page passing over the transcript. Only 20 % of readers who lost following ever turned it back on, so each spurious break lasted the rest of the visit.

New: onGesture(reason, extra) fires for every wheel/touchmove over the panel, ignored ones included, with extra.broke saying whether it stopped following. Ignoring an input has to stay observable — a listener that silently does nothing looks the same whether it is right or wrong.

Nothing in connect() changed; the wire is untouched.

npm i embedwire@0.4.0

v0.3.0 — renamed from yt-follow

Choose a tag to compare

@yonaka15 yonaka15 released this 01 Sep 02:08

Renamed yt-follow → embedwire. Same code as 0.2.0; the import path changes (embedwire, embedwire/follow).

Why: YouTube's API Services Branding Guidelines forbid "YouTube", "YT" or any derivative in an app's name, and the README/description used to call the library "the YouTube IFrame Player API over postMessage", which it is not. It is a zero-dependency client for the embed's postMessage wire that borrows the IFrame Player API's method and event names so code reads the same. yt-follow@0.2.0 stays on npm with a deprecation notice.

v0.2.0

Choose a tag to compare

@yonaka15 yonaka15 released this 31 Aug 08:13

Breaking (0.x): the package is now the core API, modelled on the IFrame Player API reference: player.playVideo() / pauseVideo() / seekTo() / mute() / setVolume() / loadVideoById() / …, getters getCurrentTime() / getDuration() / getPlayerState() / getVideoData() / getApiInterface() / … answered from the embed's own initialDelivery + infoDelivery, events ready / stateChange / timeUpdate / playbackRateChange / playbackQualityChange / volumeChange / error / info / load / stall / resume / gaveUp, and PlayerState.

  • seek() / play() / pause() → seekTo() / playVideo() / pauseVideo(); 'time' → 'timeUpdate'; 'gaveup' → 'gaveUp'.
  • follow() is no longer in the main export: import { follow } from 'yt-follow/follow' — it is the transcript example (examples/transcript.html), kept importable and tested.
  • examples/player.html: every method as a button, getters live.

v0.1.0

Choose a tag to compare

@yonaka15 yonaka15 released this 31 Aug 08:03

First release. connect() — the YouTube embed's postMessage wire without iframe_api; follow() — a transcript that follows the player. (A recording that was attached here was removed 2026-08-31; see v0.2.0 for a demo on Big Buck Bunny.)