Skip to content

Commit

Permalink
fix(QrcodeStream): iOS PWA background stream kill
Browse files Browse the repository at this point in the history
Apparently, when QrcodeStream is used in an iOS PWA and goes into
the background, the stream on the video element is stopped. When
the user returns, the stream is not restarted automatically. To fix
this we try keep track whether the page/app is in the foreground
and stop/start the stream when this state changes.

Incidentally, this commit makes the demo page is now PWA installable
to make this testable.

Closes #298
  • Loading branch information
gruhn committed Jul 17, 2023
1 parent 2924cf0 commit ae2222d
Show file tree
Hide file tree
Showing 4 changed files with 2,479 additions and 28 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"devDependencies": {
"@tsconfig/node20": "1.0.1",
"@types/node": "20.3.1",
"@vite-pwa/vitepress": "^0.2.0",
"@vitejs/plugin-vue": "4.2.3",
"@vue/compiler-sfc": "3.3.4",
"@vue/eslint-config-prettier": "7.1.0",
Expand Down
Loading

0 comments on commit ae2222d

Please sign in to comment.