Skip to content

Commit

Permalink
V2.3.3 fix error in Firefox (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
mebjas authored Nov 23, 2022
1 parent 9b253ff commit 9c5c54c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Version 2.3.3
Quick fix for - [issue#621](https://github.com/mebjas/html5-qrcode/issues/621). With this zoom & torch is not supported in firefox for now.

### Version 2.3.2

#### Features or bug fixes.
Expand Down
2 changes: 1 addition & 1 deletion minified/html5-qrcode.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "html5-qrcode",
"version": "2.3.2",
"version": "2.3.3",
"description": "A cross platform HTML5 QR Code & bar code scanner",
"main": "./cjs/index.js",
"module": "./esm/index.js",
Expand Down
6 changes: 6 additions & 0 deletions src/camera/core-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ abstract class AbstractCameraCapability<T> implements CameraCapability<T> {
}

public isSupported(): boolean {
// TODO(minhazav): Figure out fallback for getCapabilities()
// in firefox.
// https://developer.mozilla.org/en-US/docs/Web/API/Media_Capture_and_Streams_API/Constraints
if (!this.track.getCapabilities) {
return false;
}
return this.name in this.track.getCapabilities();
}

Expand Down

0 comments on commit 9c5c54c

Please sign in to comment.