Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ngx-simple-webcam
Advanced tools
A simple Angular 4+ Webcam-Component. Pure & minimal, no Flash-Fallback. See the Demo!
A simple Angular 4+ Webcam-Component. Pure & minimal, no Flash-Fallback. See the Demo!
Plug-and-play. This library contains a single webcam-module which can be imported into nearly every Angular 4+ project.
Simple to use. The one component gives you full control and lets you take snapshots via actions and event bindings.
Minimal. No unnecessary Flash-fallbacks, no bundle-size bloating.
Try out the Live-Demo or see the Demo-Project.
Runtime Dependencies:
^4.0.0 || ^5.0.0 || ^6.0.0
^5.0.0 || ^6.0.0
Client:
npm install --save ngx-simple-webcam
WebcamModule
into your Angular module:import {WebcamModule} from 'ngx-simple-webcam';
@NgModule({
imports: [
WebcamModule
...
],
...
})
export class AppModule { }
WebcamComponent
on your pages:<webcam></webcam>
As simple as that.
For more examples, see the code in the Demo-Project.
This section describes the basic inputs/outputs of the component. All inputs are optional.
trigger: Observable<void>
: An Observable
to trigger image capturing. When it fires, an image will be captured and emitted (see Outputs).width: number
: The maximal video width of the webcam live view.height: number
: The maximal video height of the webcam live view. The actual view will be placed within these boundaries, respecting the aspect ratio of the video stream.videoOptions: MediaTrackConstraints
: Defines constraints (MediaTrackConstraints) to apply when requesting the video track.mirrorImage: string | WebcamMirrorProperties
: Flag to control image mirroring. If the attribute is missing or null
and a webcam claims to be user-facing, the image will be mirrored (x-axis) to provide a better user experience. A string value of "never"
will prevent mirroring, whereas a value of "always"
will mirror every webcam stream, even if the webcam cannot be detected as user-facing. For future extensions, the WebcamMirrorProperties
object can also be used to set these values.allowCameraSwitch: boolean
: Flag to enable/disable camera switch. If enabled, a switch icon will be displayed if multiple cameras are found.switchCamera: Observable<boolean|string>
: Can be used to cycle through available cameras (true=forward, false=backwards), or to switch to a specific device by deviceId (string).imageCapture: EventEmitter<WebcamImage>
: Whenever an image is captured (i.e. triggered by [trigger]
), the image is emitted via this EventEmitter
. The image data is contained in the WebcamImage
data structure as both, plain Base64 string and data-url.imageClick: EventEmitter<void>
: An EventEmitter
to signal clicks on the webcam area.initError: EventEmitter<WebcamInitError>
: An EventEmitter
to signal errors during the webcam initialization.cameraSwitched: EventEmitter<string>
: Emits the active deviceId after the active video device has been switched.Here you can find instructions on how to start developing this library.
Run npm run packagr
to build the library. The build artifacts will be stored in the dist/
directory.
Run npm start
to build and run the surrounding webapp with the WebcamModule
. Essential for live-developing.
Run npm run docs
to generate the live-demo documentation pages in the docs/
directory.
Run npm run test
to run unit-tests.
FAQs
A simple Angular 4+ Webcam-Component. Pure & minimal, no Flash-Fallback. See the Demo!
We found that ngx-simple-webcam demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.