saved-position

npm: @playerstack/plugin-saved-position

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:

FieldTypeDefaultDescription
enabledbooleanfalsePlugin is a no-op unless true
keyPrefixstring?"playerstack:pos"Full key is ${keyPrefix}:${src}
throttleMsnumber?1000Debounce window for save calls
endTolerancenumber?5Don’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.