ENGLISH·COURSE API
    Preparing search index...
    • The player's pointer gestures: a single tap toggles playback with a mouse and brings the control bar in or out with a finger, a double tap in the middle toggles fullscreen, a double tap on an edge starts a seek run — where every further tap on that edge adds a step and an indicator counts them — and a press held on the frame runs the lesson at double speed until it is released. All of them are the YouTube app's conventions, which the learner's thumbs already know.

      Returns Element

      The single tap's action is chosen here, from the pointer the player reports, not by the two media queries the Default Layout uses to show one of a pair of gestures. A meaning left to a stylesheet is lost with it: a missing or stale sheet leaves both gestures live, and one tap then pauses the lesson and toggles the bar. LessonVideoPlayer says why touch needs a centre play control beside it.

      A tap that brings the bar in gives it back to the idle timer. The library's toggle:controls shows the bar with show(0), which clears that timer, and flags the tap as a gesture so the idle tracker ignores it — so over a playing lesson the bar would stay up for good. onTrigger re-arms the hide at the library's own defaultDelay, and only while the lesson plays: a paused player keeps its controls in view. Every Gesture listens on the provider element and checks the event's coordinates against its own box, so these are regions, not targets: the component sets them pointer-events: none itself, and the geometry the layout's stylesheet would give them comes from lesson-video-player.css, which finds the two edge regions by SEEK_ZONE_CLASS — never by the step their action spells.

      The library detects the double tap; the run seeks. Vidstack's dbl gesture carries the guards a raw listener would have to copy — an open menu, a touch that scrolled, a pinch, the pointer button — so the seek gestures keep their event and action and only hand the tap over in will-trigger, with the library's own seek cancelled. Every seek in a run then goes through one path, counted from the run's anchor rather than from a currentTime the provider may not have updated yet.

      While a run is active every gesture is disabled and a pointerup listener on the player owns the taps. The library resets its press counter after a double tap, so left enabled it would read the third tap as a single one and pause the video 250 ms later. The listener decides the side by hit-testing against the seek gestures' own boxes, so the stylesheet stays the single source of the edge geometry; a tap outside both is absorbed. When the run lapses the gestures come back with their counters untouched.

      The step is the learner's, read fresh on every tap. useSeekStep holds it, SeekStepMenu changes it, and it reaches both the gesture actions and the run from here — no number is spelled in this file. A run already under way keeps the step it started with; extendSeekRun says why.

      Pointer events are enough for the run's taps: a pan ends in pointercancel rather than pointerup, and Vidstack's touch-action: manipulation on the blocker already keeps a double tap from zooming the page.

      The hold is this app's own gesture, and it disables the others the same way. The library has no press-and-hold event — useSpeedHold says why it is timed here — so this component only decides when one may start and what it does. It may start while the lesson is playing, while the provider will take a rate change, and while no seek run owns the taps; useDoubleSpeedWhileHolding applies the rate and puts the learner's own one back. While a hold is armed every Gesture is disabled, so the release that ends it is never counted as a tap and never toggles playback or the control bar — the same mechanism, and the same reason, as during a run.