{"id":13937972,"url":"https://github.com/VinceG/vue-web-cam","last_synced_at":"2025-07-20T00:31:32.026Z","repository":{"id":22165340,"uuid":"95475949","full_name":"VinceG/vue-web-cam","owner":"VinceG","description":"Webcam component for VueJs.","archived":true,"fork":false,"pushed_at":"2022-12-09T19:03:52.000Z","size":836,"stargazers_count":262,"open_issues_count":33,"forks_count":112,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-19T21:22:46.754Z","etag":null,"topics":["vue","vuejs","webcam","webpack"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VinceG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-26T18:17:33.000Z","updated_at":"2025-07-17T13:45:19.000Z","dependencies_parsed_at":"2023-01-11T21:30:37.713Z","dependency_job_id":null,"html_url":"https://github.com/VinceG/vue-web-cam","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/VinceG/vue-web-cam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VinceG%2Fvue-web-cam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VinceG%2Fvue-web-cam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VinceG%2Fvue-web-cam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VinceG%2Fvue-web-cam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VinceG","download_url":"https://codeload.github.com/VinceG/vue-web-cam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VinceG%2Fvue-web-cam/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266048502,"owners_count":23868738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vue","vuejs","webcam","webpack"],"created_at":"2024-08-07T23:04:08.560Z","updated_at":"2025-07-20T00:31:26.982Z","avatar_url":"https://github.com/VinceG.png","language":"Vue","funding_links":[],"categories":["Vue","Components \u0026 Libraries","UI Components [🔝](#readme)"],"sub_categories":["UI Components"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"150\" src=\"assets/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/splash.png\"\u003e\n\u003c/p\u003e\n\n# vue-web-cam\n\n[![npm](https://img.shields.io/npm/v/vue-web-cam.svg)](https://www.npmjs.com/package/vue-web-cam)\n[![npm](https://img.shields.io/npm/dm/vue-web-cam.svg)](https://www.npmjs.com/package/vue-web-cam)\n![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nWebcam component for VueJs. See [this](http://caniuse.com/#feat=stream)\nfor browser compatibility.\n\n## Installation\n\n```bash\nnpm install vue-web-cam --save\n// or\nyarn add vue-web-cam\n```\n\n## Usage\n\n```js\nimport Vue from 'vue'\nimport WebCam from \"../../src\";\nVue.use(WebCam);\n\n\n\u003cvue-web-cam ... /\u003e\n\n// or\nimport { WebCam } from \"vue-web-cam\";\n\ncomponents: {\n    WebCam\n}\n\n\u003cweb-cam ... /\u003e\n\ncomponents: {\n    'vue-web-cam': WebCam\n}\n\n\u003cvue-web-cam ... /\u003e\n```\n\n## Nuxt.js\n\nAdd `vue-web-cam/nuxt` to modules section of `nuxt.config.js`\n\n```javascript\n{\n  modules: ['vue-web-cam/nuxt']\n}\n```\n\n## Testing \u0026 Dev\n\n```bash\nnpm run dev\n```\n\n### Props\n\n| prop              | type    | default      | notes                                              |\n| ----------------- | ------- | ------------ | -------------------------------------------------- |\n| height            | number  | 500          | height of video element                            |\n| width             | number  | 500          | width of video element                             |\n| autoplay          | boolean | true         | autoplay attribute                                 |\n| screenshotFormat  | string  | 'image/jpeg' | format of screenshot                               |\n| selectFirstDevice | boolean | false        | select first device when avaialble                 |\n| deviceId          | string  | null         | currently selected camera                          |\n| playsinline       | boolean | true         | playsinline of video element                       |\n| resolution        | object  | null         | object with width and height for camera resolution |\n\n### Events\n\n| name          | param    | notes                                                         |\n| ------------- | -------- | ------------------------------------------------------------- |\n| started       | stream   | emitted once the stream has started                           |\n| stopped       | stream   | emitted once the stream has stopped                           |\n| error         | error    | emitted if the stream failed to start with the error returned |\n| notsupported  | error    | emitted when the browser does not support this feature        |\n| cameras       | cameras  | emitted when a list of all cameras available is loaded        |\n| camera-change | deviceId | emitted when camera change occurs                             |\n| video-live    | stream   | emitted when video is started                                 |\n\n### Methods\n\n| name         | param    | notes                                                                                                 |\n| ------------ | -------- | ----------------------------------------------------------------------------------------------------- |\n| capture      | void     | Capture the current image through the webcam as a base64 encoded dataUri                                 |\n| changeCamera | deviceId | change the currently selected camera. Must pass in the device ID                                      |\n| start        | void     | Programmatically Start the camera after stopping it (relies on deviceId prop passed to the component) |\n| stop         | void     | Programmatically stop the camera                                                                      |\n| pause        | void     | Programmatically pause the camera                                                                     |\n| resume       | void     | Programmatically resume the camera after it was paused                                                |\n\n## Contributing\n\nIf you'd like to help make this project better you can help with the following tasks:\n\n- Tests - This project needs a way to test the functionality using a javascript testing solution (Jest as an example)\n- Examples - Additional Examples of usage might be helpful to others.\n- Project Website - Perhaps launch a project website (on Github Pages) that'll showcase the plugin, Demo, Usage instructions, configuration etc..\n\n## License\n\nMIT\n\n## Credits\n\nThis is based off [@smronju vue-webcam](https://github.com/smronju/vue-webcam) and [react-webcam](https://github.com/mozmorris/react-webcam)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVinceG%2Fvue-web-cam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVinceG%2Fvue-web-cam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVinceG%2Fvue-web-cam/lists"}