How to use ngx-webcam - 2 common examples

To help you get started, we’ve selected a few ngx-webcam examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-samples / aws-builders-fair-projects / reinvent-2019 / learn-languages-ai-ml / Buildersfair-Web / src / app / game / game-stage / game-stage.component.ts View on Github external
ngOnInit() {
    WebcamUtil.getAvailableVideoInputs()
      .then((mediaDevices: MediaDeviceInfo[]) => {
        this.multipleWebcamsAvailable = mediaDevices && mediaDevices.length > 1;
      });

    // Use enter key to get the current snapshot
    // tslint:disable-next-line:only-arrow-functions
    document.body.addEventListener('keypress', function(event) {
      if (event.keyCode === 13) {
          console.log('You pressed Enter key.');
          document.getElementById('buttonSnapshot').click();
      }
    });

    this.loadAudio();

    this.stageId = 1;
github basst314 / ngx-webcam-demo / src / app / app.component.ts View on Github external
public ngOnInit(): void {
    WebcamUtil.getAvailableVideoInputs()
      .then((mediaDevices: MediaDeviceInfo[]) => {
        this.multipleWebcamsAvailable = mediaDevices && mediaDevices.length > 1;
      });
  }

ngx-webcam

A simple Angular webcam component. Pure &amp; minimal, no Flash-fallback. <a href="https://basst314.github.io/ngx-webcam/?" target="_blank">See the Demo!</a>

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis