Skip to content

Commit 364726f

Browse files
committed
funciona con video normal, aun camara no hace swtich
1 parent 682f476 commit 364726f

File tree

1 file changed

+63
-4
lines changed

1 file changed

+63
-4
lines changed

videosOrginalFuncional.js

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ let myCamera; //WEB CAM
8383
var capture;
8484
var options;
8585

86+
let cameraON = false;
87+
var showCamera = 0;
88+
89+
let videoON = false;
90+
let showVideo = 0;
91+
8692

8793
//----------------------------------------------------------- VIDEO ----------
8894

@@ -132,7 +138,6 @@ let sourceText = ' ';
132138
let textSpeed = 0;
133139

134140

135-
//TEXTS
136141
//TEXTS
137142
let textToLoad;
138143
let txt;
@@ -143,7 +148,7 @@ let terminal = false;
143148
var showTerminal = 0;
144149

145150
let subtitle = false;
146-
showSubtitle = 0;
151+
let showSubtitle = 0;
147152

148153
// //--------------Connectors text XIX CENTURY TRAVELER
149154
// let entrance = [ 'I think this is a ', 'Sometimes when I find a ', 'Later on, I whould think of this ', 'Although I don\'t believe that this is a ', 'But, if you wander through the ', 'Last time I saw a ', 'I couldn\'t believe a ', 'I feel I already saw a ', 'Just after a ', 'Before this ', 'After encountering this ', 'Also, this ', 'Later on, the ', 'Above all, this ', ];
@@ -306,10 +311,64 @@ function draw() {
306311
text('click to start audio', width / 2, height / 2);
307312
}
308313

314+
// cameraON = true;
315+
// showCamera++;
316+
317+
// console.log('camera: ' + showCamera++);
318+
319+
// if (cameraON && !videoON) {
320+
// renderCamera();
321+
// // renderVideos();
322+
// // myCamera.hide();
323+
324+
// turnOffCamera();
325+
326+
327+
// showCamera++;
328+
// console.log('render camera');
329+
330+
// // terminal = false;
331+
332+
// if (showCamera == 200) {
333+
// cameraON = false;
334+
// videoON = true;
335+
// console.log('render camera is 200');
336+
337+
338+
// }
339+
// }
340+
341+
342+
343+
// if (videoON) {
344+
// renderVideos();
345+
// // renderCamera();
346+
347+
// showVideo++;
348+
// console.log('render video');
349+
350+
// }
351+
352+
// if (showVideo == 200) {
353+
// console.log('turn of camera');
354+
355+
// turnOffCamera();
356+
357+
// cameraON = true;
358+
// videoON = false;
359+
360+
// videoON = 0;
361+
// showCamera = 0;
362+
// }
363+
364+
365+
// switchCameraAndVIdeo();
366+
367+
309368
if (OnlyCamera) {
310-
renderCamera();
369+
renderCamera();
311370
} else {
312-
renderVideos();
371+
renderVideos();
313372
}
314373

315374
// extraText();

0 commit comments

Comments
 (0)