Skip to content
Snippets Groups Projects
Commit 05bee3f2 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Try a fix for IOS QR code reader problem

parent 4370ff4c
No related branches found
No related tags found
No related merge requests found
Pipeline #13913 passed
...@@ -249,6 +249,9 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) { ...@@ -249,6 +249,9 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
this._askPermission = true; this._askPermission = true;
this._loadingMessage = i18n.t('no-camera-access'); this._loadingMessage = i18n.t('no-camera-access');
let video = await createVideoElement(this._activeCamera); let video = await createVideoElement(this._activeCamera);
video.setAttribute('autoplay', '');
video.setAttribute('muted', '');
video.setAttribute('playsinline', '');
this._askPermission = false; this._askPermission = false;
let lastCode = null; let lastCode = null;
...@@ -352,7 +355,10 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) { ...@@ -352,7 +355,10 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
if (video !== null) { if (video !== null) {
video.setAttribute("playsinline", true); // required to tell iOS safari we don't want fullscreen video.setAttribute("playsinline", true); // required to tell iOS safari we don't want fullscreen
video.onloadedmetadata = function(e){
video.play(); video.play();
}
// video.play();
this._videoRunning = true; this._videoRunning = true;
console.assert(this._requestID === null); console.assert(this._requestID === null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment