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

testing bug fix for android 11 freezing and other chromes not releasing camera #329

Merged
merged 2 commits into from
Feb 27, 2021

Conversation

ericblade
Copy link
Owner

  • also update several bits of the typescript spec that have not been
    updated when the relevant code changed
  • internal Quagga module stop() returns Promise instead of void,
    and external Quagga module returns same value -- this allows you to
    wait until the stop code has hopefully completely executed before
    continuing on with whatever you do next. You can also choose to ignore
    the return, just as we always have done.
  • internal Quagga module keeps track of the HTMLVideoElement that was
    last requested, and if there is one, it calls pause() on it, before
    calling stop() on the MediaStreamTrack
  • The stop() is called on MediaStreamTrack asynchronously, to give the
    browser a chance to actually pause, before disconnecting.
  • See Android 11 Hanging Chrome Fix: Call stop() on LiveStream <video> element before stopping video stream #266 and all linked
    issues on it for an incredible amount of detail related to this problem
  • I have to commit this before I can fully test it, as I don't have access
    to Android 11 or a Pixel device. I also need to test it on my production
    server, so this is going straight to a new version, without actual
    testing. My apologies, but this is one of those bits that are very
    difficult to test outside of real life because of the limitations of
    using cameras and such :|
  • QuaggaJSCameraAccess::stop() now also returns Promise.
  • Quagga.init() is marked to return Promise
  • QuaggaJSCameraAccess::request() is correctly marked as having optional
    videoConstraints now

…ng camera

- also update several bits of the typescript spec that have not been
  updated when the relevant code changed
- internal Quagga module stop() returns Promise<void> instead of void,
  and external Quagga module returns same value -- this allows you to
  wait until the stop code has hopefully completely executed before
  continuing on with whatever you do next.  You can also choose to ignore
  the return, just as we always have done.
- internal Quagga module keeps track of the HTMLVideoElement that was
  last requested, and if there is one, it calls pause() on it, before
  calling stop() on the MediaStreamTrack
- The stop() is called on MediaStreamTrack asynchronously, to give the
  browser a chance to actually pause, before disconnecting.
- See #266 and all linked
  issues on it for an incredible amount of detail related to this problem
- I have to commit this before I can fully test it, as I don't have access
  to Android 11 or a Pixel device.  I also need to test it on my production
  server, so this is going straight to a new version, without actual
  testing.  My apologies, but this is one of those bits that are very
  difficult to test outside of real life because of the limitations of
  using cameras and such :|
- QuaggaJSCameraAccess::stop() now also returns Promise<void>.
- Quagga.init() is marked to return Promise<void>
- QuaggaJSCameraAccess::request() is correctly marked as having optional
  videoConstraints now
@rollingversions
Copy link

rollingversions bot commented Feb 27, 2021

Change Log for @ericblade/quagga2 (1.2.6 → 1.3.0)

New Features

  • Quagga.stop() returns Promise

  • QuaggaJSCameraAccess.stop() returns Promise

Bug Fixes

Edit changelog

@ericblade ericblade merged commit 7cf932c into master Feb 27, 2021
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

Successfully merging this pull request may close these issues.

1 participant