saved-position

Package: @playerstack/plugin-saved-position (source), not published to npm yet

Stores currentTime in localStorage (debounced) and restores it when the same video is loaded again. Clears storage on ended so finished videos don’t stale-resume. No backend required.

Quickstart

<player-stack
  src="https://example.com/lesson.mp4"
  data-config='{ "savedPosition": { "enabled": true } }'
>
</player-stack>

Config

config.savedPosition:

Field Type Default Description
enabled boolean false Plugin is a no-op unless true
keyPrefix string? "playerstack:pos" Full key is ${keyPrefix}:${src}
throttleMs number? 1000 Debounce window for save calls
endTolerance number? 5 Don’t restore if saved time is within endTolerance seconds of duration

How it works

No analytics, no PII

Position is just a number; nothing identifying. Per-browser, per-video.

Events

None.