Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grabFrame cannot be cancelled #276

Open
stephanreiter opened this issue Mar 16, 2021 · 1 comment
Open

grabFrame cannot be cancelled #276

stephanreiter opened this issue Mar 16, 2021 · 1 comment

Comments

@stephanreiter
Copy link

I'm using an ImageCapture and grabFrame to retrieve frames from a video stream. grabFrame returns a promise that I need to await to get a frame.

I don't see a way to cancel the grabFrame operation such that the promise is rejected. In response to a user action, I'd like to immediately abandon awaiting and not having it sit around until the next video frame (which may, in a bad situation, never come).

Could this be accomplished by allowing me to dispose the ImageCapture, which would in turn cancel all ongoing operations and reject associated promises?

@dontcallmedom
Copy link
Member

Sounds like a mission for AbortController?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants