Separate the evidence from the decision
Seeking is asynchronous. A requested time is an instruction, not proof that the intended picture is already available for drawing. Decoder seek behavior and variable cadence can also mean the presented picture's time differs from a naïve frame calculation. The artifact is a screenshot record with requested time, observed media time, asset revision and capture outcome. This is external custom-player behavior, not a documented AISwapLab screenshot control or a guarantee of exact source-frame retrieval.
Build the evidence
- 01
Establish the input evidence
Load an authorized video and establish the capture coordinate convention. Verify enough media metadata is available to seek within the actual duration. Attach listeners before changing the requested time so a fast completion cannot be missed. Handle invalid ranges, media errors and a request equal to the current position deliberately; a seeked event may not provide the same useful transition when no new seek occurs. Do not leave an old pending request attached to a later capture.
- 02
Run a controlled diagnostic
Use seeked to establish seek completion, then confirm newly presented picture evidence through the frame callback when available. Arrange that callback before triggering the seek so the relevant presentation is not missed. Bound the operation with a timeout and clean up event listeners and callback requests on failure. A fallback can wait for loaded frame data and use a declared weaker timing method, but it must not inherit the stronger presented-frame claim automatically.
- 03
Verify the actual handoff
Draw the observed picture only after the chosen completion conditions succeed. Record requested and actual media times rather than renaming the screenshot from the request alone. Check canvas cross-origin permission separately; a playable video may still be unreadable for export. Reopen the saved image and compare its visible action with the reported media position. If another capture supersedes the request, mark the old one canceled rather than allowing out-of-order completion to overwrite the newer evidence.
A bounded example
Illustrative failure: a review tool sets a later time and immediately draws the canvas. The saved screenshot shows an earlier clean pose, concealing the overlap the reviewer intended to capture. Waiting for the relevant presentation and retaining its mediaTime makes that discrepancy visible. The supplied sequence is an implementation checklist, not a browser-tested promise that all players seek to identical encoded pictures or that every screenshot has exact frame accuracy.
Local workflow example
Documentation sequence only. It was not implemented or tested in the shared browser; no exact-frame capture guarantee is made.
// Sequence for an authorized custom player, not a complete capture library:
// 1. Bind source revision and reject overlapping capture requests.
// 2. Register seeked/error listeners and a frame callback; start a timeout.
// 3. Assign video.currentTime = requestedTime.
// 4. After both seek completion and the relevant frame presentation,
// record metadata.mediaTime, draw/export, then clean up observers.
// 5. On timeout/error/cancellation: clean up and save no success image.Task evidence worksheet
| State | Evidence | Result |
|---|---|---|
| Requested | Target time assigned | Not yet a picture verdict |
| Seeked/presented | Observed frame mediaTime | Eligible for authorized capture |
| Timeout or superseded | Failure/cancellation record | Never reuse stale canvas |
Acceptance evidence
- Register completion observers before requesting the seek.
- Record requested time separately from presented media time.
- Treat timeout, cancellation and unreadable canvas as failed evidence capture.
Stop condition
Stop when the capture times out, the asset changes or the observed frame cannot be bound to the requested review interval. Report the failure and use an editor or a separately verified extraction path. Do not treat an old canvas image as a successful new capture, and do not bypass browser security to obtain pixels from an unauthorized source.
