Skip to content

Commit

Permalink
Bugfix frozen screen on Chrome (Android) (#169)
Browse files Browse the repository at this point in the history
* Fixed issue where Chrome on Android would freeze when trying to stop the videoTrack without removing it from the stream first.

* Updated minified file.

* Rebuilt transpile files
  • Loading branch information
MrGussio authored Apr 26, 2021
1 parent 0424036 commit bef8d06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion minified/html5-qrcode.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/html5-qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ class Html5Qrcode {
}

$this._localMediaStream.getVideoTracks().forEach(videoTrack => {
$this._localMediaStream.removeTrack(videoTrack);
videoTrack.stop();
++tracksClosed;

Expand Down
2 changes: 2 additions & 0 deletions transpiled/html5-qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ var Html5Qrcode = /*#__PURE__*/function () {
};

$this._localMediaStream.getVideoTracks().forEach(function (videoTrack) {
$this._localMediaStream.removeTrack(videoTrack);

videoTrack.stop();
++tracksClosed;

Expand Down

0 comments on commit bef8d06

Please sign in to comment.