Skip to content

Simple Angular 2+ wrapper for say-cheese to integrating a webcam and snapshots into your app.

Notifications You must be signed in to change notification settings

fxcosta/ngx-say-cheese

Repository files navigation

ngx-say-cheese (not for production yet)

Installation

To install this library, run:

$ npm install ngx-say-cheese --save

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { NgxSayCheeseModule } from 'ngx-say-cheese';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxSayCheeseModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its component and service in your Angular application:

<say-cheese [elementId]="'cameraElementId'"></say-cheese>

Once defined component in your template, you can use the SayCheeseService to init, stop, take snapshot and others methods:

import {SayCheeseService} from 'ngx-say-cheese';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  constructor(private cheeseService: SayCheeseService) {}

  someMethodToDispatchServiceEvents() {
    this.cheeseService.init();
  }
}

License

MIT © Felix Costa

About

Simple Angular 2+ wrapper for say-cheese to integrating a webcam and snapshots into your app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published