Skip to content

Commit

Permalink
Corrigindo distorção no video
Browse files Browse the repository at this point in the history
  • Loading branch information
SonanFarr committed Nov 15, 2023
1 parent 83943b4 commit a766f42
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ <h1 style="display: none" id="counter-right-t"><span id="reps-right-t">0</span>
</progress>
</div>
</div>
<div style="display: inline-block" >
<canvas class="canvas" id="output"></canvas>
<video class="video" id="video"></video>
</div>
<canvas class="canvas" id="output"></canvas>
<video class="video" id="video"></video>
<div id="msg" class="hide"></div>
<div id="bar-tablet">

Expand Down Expand Up @@ -344,8 +342,15 @@ <h1>Sons</h1>
// output.height = width;
//});
window.addEventListener("orientationchange", function(event) {
$( "#video" ).load(window.location.href + " #video" );
$( "#output" ).load(window.location.href + " #output" );
var video = document.getElementById('video');
var canvas = document.getElementById('output');

video.load();
video.play();

const ctx = canvas.getContext("2d");
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
});
</script>
</body>
Expand Down

0 comments on commit a766f42

Please sign in to comment.