Skip to content

Commit

Permalink
Stop preview earlier
Browse files Browse the repository at this point in the history
This allows to use Pi Camera for preview and for taking pictures.

Fixes the following Issue:
#68 (comment)
#68 (comment)
  • Loading branch information
andi34 committed Sep 19, 2019
1 parent cdf6760 commit 5b8e123
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ var photoBooth = (function () {
if (isdev) {
console.log('Take Picture:' + photoStyle);
}
if(useVideo){
var track = public.stream.getTracks()[0];
track.stop();
$('video').hide();
}
setTimeout(function () {
if(useVideo){
var track = public.stream.getTracks()[0];
track.stop();
$('video').hide();
}
if ((photoStyle=='photo')){
$('#counter').text('');
$('.spinner').show();
Expand Down

0 comments on commit 5b8e123

Please sign in to comment.