private loadWebCam()

in src/app/pages/game/game.component.ts [144:168]


  private loadWebCam() {
    navigator.mediaDevices
      .getUserMedia({video: true})
      .then((stream) => {
        this.stream = stream;
        return this.handposeManager.load();
      })
      .then((model) => {
        this.model = model;
        drawHandOnVideoCanvas(
          this.freezeVideo,
          this.gameHandler,
          this.video(),
          this.canvas(),
          this.stream,
          model,
          this.computerStrategy,
        );
        this.isLoadingCamera.set(false);
      })
      .catch((err) => {
        this.isLoadingTensorflowFailed.set(true);
        console.error(err);
      });
  }