Skip to content

Commit

Permalink
Remove unwanted spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Mar 22, 2018
1 parent 5c373bc commit 6969690
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions media-recorder/mustache.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,18 @@
const ratio = Math.max(canvas.width / video.videoWidth, canvas.height / video.videoHeight);
context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight,
(canvas.width - video.videoWidth * ratio) / 2, 0,
video.videoWidth * ratio, video.videoHeight * ratio);
video.videoWidth * ratio, video.videoHeight * ratio);

if (!isDetectingFaces) {
// Detect faces.
console.count('Detecting faces');
isDetectingFaces = true;
faceDetector.detect(canvas).then(facesArray => {
faces = facesArray;
isDetectingFaces = false;
});
isDetectingFaces = false;
});
}

// Draw mustache and hat on previously detected face.
if (faces.length) {
const face = faces[0].boundingBox;
Expand Down Expand Up @@ -275,7 +275,7 @@

// Upload video to Google Cloud Storage.
const response = await fetch(url, {
method: 'POST',
method: 'POST',
body: blob,
headers: new Headers({
'Content-Type': 'video/webm',
Expand Down

0 comments on commit 6969690

Please sign in to comment.