Skip to content

Commit 031b140

Browse files
committed
added an "init" debug message
It seems that we can't get the list of cameras on the ZTE Open C phone.
1 parent f219bb8 commit 031b140

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ window.addEventListener("load", function() {
44
var canvas = document.querySelector('canvas');
55
var debug = document.querySelector('#debug');
66
var context = canvas.getContext('2d');
7-
var cameras = navigator.mozCameras.getListOfCameras();
7+
var cameras;
88

99
function debug_msg(msg) {
1010
// because console.log doesn't work on my machine
@@ -21,7 +21,11 @@ window.addEventListener("load", function() {
2121
video.play();
2222
}
2323

24-
debug.innerHTML = 'about to get camera preview: ' + cameras[0];
24+
debug.innerHTML = 'init';
25+
26+
cameras = navigator.mozCameras.getListOfCameras();
27+
28+
debug_msg('about to get camera preview: ' + cameras[0]);
2529

2630
navigator.mozCameras.getCamera(
2731
cameras[0], {

0 commit comments

Comments
 (0)