File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ window.addEventListener("load", function() {
4
4
var canvas = document . querySelector ( 'canvas' ) ;
5
5
var debug = document . querySelector ( '#debug' ) ;
6
6
var context = canvas . getContext ( '2d' ) ;
7
- var cameras = navigator . mozCameras . getListOfCameras ( ) ;
7
+ var cameras ;
8
8
9
9
function debug_msg ( msg ) {
10
10
// because console.log doesn't work on my machine
@@ -21,7 +21,11 @@ window.addEventListener("load", function() {
21
21
video . play ( ) ;
22
22
}
23
23
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 ] ) ;
25
29
26
30
navigator . mozCameras . getCamera (
27
31
cameras [ 0 ] , {
You can’t perform that action at this time.
0 commit comments