https://github.com/gunthercox/jquery-network-camera
A jQuery plugin for rendering network camera feeds on an html canvas.
https://github.com/gunthercox/jquery-network-camera
camera-feed html-canvas jquery-plugin
Last synced: about 1 year ago
JSON representation
A jQuery plugin for rendering network camera feeds on an html canvas.
- Host: GitHub
- URL: https://github.com/gunthercox/jquery-network-camera
- Owner: gunthercox
- License: other
- Created: 2015-07-05T20:31:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T12:18:15.000Z (almost 2 years ago)
- Last Synced: 2025-03-18T08:22:22.245Z (about 1 year ago)
- Topics: camera-feed, html-canvas, jquery-plugin
- Language: JavaScript
- Size: 22.5 KB
- Stars: 6
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# JQuery Network Camera
[](https://www.npmjs.com/package/jquery-network-camera)
[](https://travis-ci.org/gunthercox/jquery-network-camera)
This is a jQuery plugin that makes it possible to stream the feed from an open network camera onto an element on a web page. This plugin handles the process of loading the image in the background to prevent breaks and flickering from appearing in the output stream. The output of the video stream will be applied to an html canvas which will automatically change size to fill the selected element.
### Options
| Name | type | default | description |
|------|------|---------|-------------|
| url | string | null | The url path to the streaming webcam image. |
| stream | boolean | true | If the webcam image should be streamed live. If false, only an single image will be rendered. |
### Methods
#### `.networkCamera(options)`
Activates your content as a camera feed. Accepts an optional options `object`.
```javascript
$('#myCamera').networkCamera({
'url': "http://192.168.1.12/image.jpg"
});
```
#### `.networkCamera('pause')`
Stops the process of refreshing the current image stream.
```javascript
$('#myCamera').networkCamera('pause');
```
#### `.networkCamera('stream')`
Starts the process of refreshing the current image stream.
```javascript
$('#myCamera').networkCamera('stream');
```
#### `.networkCamera('toggle')`
Toggles the state of the camera stream on or off.
```javascript
$('#myCamera').networkCamera('toggle');
```
### Events
| Event Type | Description |
|--------------|---------------|
| pause | Event triggered once the camera stream is paused. |
| stream | Event triggered once the camera stream is started. |
```javascript
$('#myCamera').on('pause', function () {
// do something...
});
```
## Bower
You can also install this package using [bower](http://bower.io/).
```
bower install jquery-network-camera
```