From d52fd061b3824f768a9a9fe28253a4d78c1690fb Mon Sep 17 00:00:00 2001 From: mborges Date: Fri, 3 Jul 2015 00:07:37 +0200 Subject: [PATCH] Set the property autoplay to activate the video on chrome for anroid (maybe others) --- qr-scanner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/qr-scanner.js b/qr-scanner.js index 6f3a309..e4d5fa0 100644 --- a/qr-scanner.js +++ b/qr-scanner.js @@ -23,6 +23,7 @@ angular.module('qrScanner', ["ng"]).directive('qrScanner', ['$interval', '$windo var width = attrs.width || 250; var video = $window.document.createElement('video'); + video.setAttribute('autoplay', true); video.setAttribute('width', width); video.setAttribute('height', height); video.setAttribute('style', '-moz-transform:rotateY(-180deg);-webkit-transform:rotateY(-180deg);transform:rotateY(-180deg);');