File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export class SimModel {
7676
7777 /** Activate a webcam recording as the current video source. */
7878 public activateRecording ( recording : WebcamRecording ) : void {
79+ this . tracking . reset ( ) ;
7980 this . sources . isUserVideoProperty . value = true ;
8081 this . playback . frameRateProperty . value = recording . fps ;
8182 this . playback . totalFrameCountProperty . value = 0 ;
@@ -84,6 +85,7 @@ export class SimModel {
8485
8586 /** Activate an uploaded video as the current video source. */
8687 public activateUpload ( upload : UploadedVideo ) : void {
88+ this . tracking . reset ( ) ;
8789 this . sources . isUserVideoProperty . value = true ;
8890 this . playback . frameRateProperty . value = upload . fps ;
8991 this . playback . totalFrameCountProperty . value = upload . frameCount ?? 0 ;
@@ -92,6 +94,7 @@ export class SimModel {
9294
9395 /** Activate a bundled (sample) video as the current video source. */
9496 public activateBundledVideo ( frameCount : number , fps : number ) : void {
97+ this . tracking . reset ( ) ;
9598 this . sources . isUserVideoProperty . value = false ;
9699 this . sources . currentWebcamBlobProperty . value = null ;
97100 this . playback . totalFrameCountProperty . value = frameCount ;
You can’t perform that action at this time.
0 commit comments