Skip to content

Commit 8e9e87b

Browse files
Keith BannisterKeith Bannister
authored andcommitted
Improve face detection speed
1 parent fcb7730 commit 8e9e87b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

public/game/js/game.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ function webcamVideo(self, headCanvas) {
780780
ctx.strokeRect(box.x, box.y, box.width, box.height);
781781
}
782782
}
783-
}, 500)
783+
}, 200)
784784

785785
// Send cutout - only happens once but we need to have done all
786786
// The face detection the first timea;sldkfj
@@ -936,6 +936,8 @@ function sendCutout(self) {
936936
self.cutoutSent= true;
937937

938938
console.log('Adding cutout video track to peer connection');
939+
// Get context - required to workaround
940+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1572422
939941
var ctx = cutout_video.getContext('2d');
940942
var stream = cutout_video.captureStream(30);
941943
var track = stream.getVideoTracks()[0];

0 commit comments

Comments
 (0)