Skip to content

feat: add frame capture and clipboard helper APIs#7745

Draft
shrey150 wants to merge 1 commit intovideo-dev:masterfrom
shrey150:shrey/copy-frame-helpers
Draft

feat: add frame capture and clipboard helper APIs#7745
shrey150 wants to merge 1 commit intovideo-dev:masterfrom
shrey150:shrey/copy-frame-helpers

Conversation

@shrey150
Copy link

@shrey150 shrey150 commented Mar 6, 2026

Summary

  • add Hls.captureFrame(media, type?, quality?) to capture current video frame as an image Blob
  • add Hls.copyFrameToClipboard(media, type?, quality?) to write captured frame to Clipboard
  • add unit tests for non-video rejection, canvas capture flow, and clipboard write flow

Motivation

Our dashboard player supports pausing and a right-click action to copy the current frame as an image. These helper APIs make this use-case reusable upstream for hls.js consumers.

Testing

  • npx eslint src/hls.ts tests/unit/hls.ts
  • npm run test:unit -- --grep "static frame helpers"

Notes

  • Clipboard image writes are subject to browser permission/user-gesture constraints.

@robwalch robwalch added the Wontdo label Mar 6, 2026
@robwalch
Copy link
Collaborator

robwalch commented Mar 6, 2026

Thank you for contributing a PR to HLS.js.

This is not a feature related to streaming HLS or supporting MSE based playback. As such it is not something we'll be willing to take at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants