mirror of https://github.com/vladmandic/human
fix pause restart
parent
72836738b3
commit
da811353ab
|
@ -197,8 +197,10 @@ function runHumanDetect(input, canvas) {
|
|||
// if video not ready, just redo
|
||||
const live = (input.srcObject.getVideoTracks()[0].readyState === 'live') && (input.readyState > 2) && (!input.paused);
|
||||
if (!live) {
|
||||
if (!input.paused) log(`Video not ready: state: ${input.srcObject.getVideoTracks()[0].readyState} stream state: ${input.readyState}`);
|
||||
setTimeout(() => runHumanDetect(input, canvas), 500);
|
||||
if (!input.paused) {
|
||||
log(`Video not ready: state: ${input.srcObject.getVideoTracks()[0].readyState} stream state: ${input.readyState}`);
|
||||
setTimeout(() => runHumanDetect(input, canvas), 500);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (ui.useWorker) {
|
||||
|
|
Loading…
Reference in New Issue