Repository navigation
Releases: yonaka15/embedwire
Release list
v0.4.0 — a gesture breaks following only when the panel had room
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
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
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.