Skip to content

Commit

Permalink
Mobile video play
Browse files Browse the repository at this point in the history
  • Loading branch information
collidingScopes authored Aug 14, 2024
1 parent 25feef8 commit 8bae407
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion ASCII.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var webcamVideoHeight = Math.floor(webcamVideoWidth * 3/4);

var defaultVideoWidth = 480;
var defaultVideoHeight = 848;
var canvasWidth = defaultVideoWidth;
var canvasWidth = defaultVideoWidth * 2;
var canvasHeight = defaultVideoHeight;

var pixelSize;
Expand Down Expand Up @@ -518,6 +518,9 @@ function renderText(){

function loop(){

if(counter==0){
console.log("start animation, first frame");
}
if (playAnimationToggle){
counter++;
render(ctx)
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@

<div id="canvasDiv">
<canvas id="canvas" class="displayCanvas"></canvas>
<video id="webcamVideo" class="displayCanvas hidden"></video>
<video id="userVideo" class="displayCanvas hidden" loop muted></video>
<video id="defaultVideo" class="displayCanvas hidden" width="480px" height="848px" loop muted>
<video id="webcamVideo" class="displayCanvas hidden" playsinline></video>
<video id="userVideo" class="displayCanvas hidden" loop muted playsinline></video>
<video id="defaultVideo" class="displayCanvas hidden" width="480px" height="848px" loop muted playsinline>
<source src="assets/waves.mp4" type="video/mp4" />
</video>

Expand Down

0 comments on commit 8bae407

Please sign in to comment.