User story
As a developer, I want the SDK to emit playback events so that I can build a custom seek bar and responsive UI without polling internal state or querying the DOM
Motivation & context
We're building a read-only preview player and don't want to use the timeline view that's provided because we're generating the shotstack json with our own UI.
We ended up implementing manual polling for time position, end detection (and also canvas sizing) because the SDK appears to expose playback state as properties rather than events. A timeupdate event (like an HTML5 video player) and a canvas loaded event with natural dimensions would unblock most of this.
Acceptance criteria
Implementation notes
No response
Additional Context
No response
User story
As a developer, I want the SDK to emit playback events so that I can build a custom seek bar and responsive UI without polling internal state or querying the DOM
Motivation & context
We're building a read-only preview player and don't want to use the timeline view that's provided because we're generating the shotstack json with our own UI.
We ended up implementing manual polling for time position, end detection (and also canvas sizing) because the SDK appears to expose playback state as properties rather than events. A
timeupdateevent (like an HTML5 video player) and a canvasloadedevent with natural dimensions would unblock most of this.Acceptance criteria
edit.eventsemits aplayback:timeupdateevent with{ currentTime: number }during active playback at a consistent interval (≥10fps)edit.eventsemits aplayback:endedevent when playback reaches the end of the timelineedit.eventsemits aplayback:seekingevent with{ target: number }when a seek is initiatededit.eventsemits aplayback:seekedevent with{ currentTime: number }when a seek operation has resolved and playback is ready to resumeedit.eventsemitsplayback:bufferingandplayback:readyevents when playback stalls and resumes due to media loadingcanvas.load()resolves with{ width: number, height: number }reflecting the natural output dimensions of the edit, or acanvas:loadedevent carries those dimensionsTEventPayloadMappattern and are included in TypeScript type definitionsedit.events.on(...)returns an unsubscribe function consistent with the existing APIImplementation notes
No response
Additional Context
No response