Skip to content

Commit

Permalink
Fixed error in live_example; Working for iOS in Safari 11 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
serratus committed Jun 7, 2017
1 parent 74ed8c0 commit e8352c7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
quaggaJS
========

- [Changelog](#changelog) (2017-06-06)
- [Changelog](#changelog) (2017-06-07)
- [Browser Support](#browser-support)
- [Installing](#installing)
- [Getting Started](#gettingstarted)
Expand Down Expand Up @@ -703,6 +703,13 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``.

## <a name="changelog">Changelog</a>

### 2017-06-07
- Improvements
- added `muted` and `playsinline` to `<video/>` to make it work for Safari 11
Beta (even iOS)
- Fixes
- Fixed [example/live_w_locator.js](https://github.com/serratus/quaggaJS/blob/master/example/live_w_locator.js)

### 2017-06-06
- Features
- Support for Standard 2of5 barcodes (See
Expand Down
6 changes: 4 additions & 2 deletions dist/quagga.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/quagga.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion example/live_w_locator.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ $(function() {
}
return;
}
node.parentNode.style.display = 'none';
},
initCameraSelection: function(){
var streamLabel = Quagga.CameraAccess.getActiveStreamLabel();
Expand Down
6 changes: 4 additions & 2 deletions lib/quagga.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/input/camera_access.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function initCamera(video, constraints) {
.then((stream) => {
return new Promise((resolve) => {
streamRef = stream;
video.setAttribute("autoplay", 'true');
video.setAttribute("autoplay", true);
video.setAttribute('muted', true);
video.setAttribute('playsinline', true);
video.srcObject = stream;
video.addEventListener('loadedmetadata', () => {
video.play();
Expand Down

0 comments on commit e8352c7

Please sign in to comment.