{"id":18247296,"url":"https://github.com/xulihang/vue-vision-camera","last_synced_at":"2026-03-14T18:33:29.097Z","repository":{"id":42865526,"uuid":"510667613","full_name":"xulihang/vue-vision-camera","owner":"xulihang","description":"Vue Camera Component for Computer Vision","archived":false,"fork":false,"pushed_at":"2022-07-11T07:17:20.000Z","size":464,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T06:22:41.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xulihang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-05T09:22:04.000Z","updated_at":"2023-06-02T03:15:06.000Z","dependencies_parsed_at":"2022-09-20T08:10:23.257Z","dependency_job_id":null,"html_url":"https://github.com/xulihang/vue-vision-camera","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xulihang%2Fvue-vision-camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xulihang%2Fvue-vision-camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xulihang%2Fvue-vision-camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xulihang%2Fvue-vision-camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xulihang","download_url":"https://codeload.github.com/xulihang/vue-vision-camera/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247913163,"owners_count":21017107,"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":[],"created_at":"2024-11-05T09:30:05.918Z","updated_at":"2026-03-14T18:33:24.055Z","avatar_url":"https://github.com/xulihang.png","language":"Vue","funding_links":[],"categories":["Components \u0026 Libraries"],"sub_categories":["UI Components"],"readme":"Camera component for Vue 3. We can use this component for computer vision tasks like barcode scanning, text recognition, etc.\n\n[Online demo](https://lovely-squirrel-9abb74.netlify.app/)\n\n## Usage\n\n```vue\n\u003cVisionCamera \n  :isActive=\"isActive\" \n  :desiredResolution=\"{width:1280,height:720}\"\n  desiredCamera=\"back\"\n  facingMode=\"environment\"\n  @devicesLoaded=\"devicesLoaded\"\n  @closed=\"closed\"\n  @opened=\"opened\"\n\u003e\n```\n\n```js\nconst opened = (cam) =\u003e {\n  console.log(\"camera opened\");\n  //get the inner video element in the opened event\n}\n\nconst closed = () =\u003e {\n  console.log(\"camera closed\");\n}\n\nconst devicesLoaded = (devices) =\u003e {\n  console.log(devices); // get the list of existing camera devices\n}\n```\n\n## Installation\n\n```\nnpm install vue-vision-camera\n```\n\nThen import the component to use it.\n\n```js\nimport { VisionCamera } from 'vue-vision-camera'\n\nexport default {\n  name: 'App',\n  components: {\n    VisionCamera\n  }\n}\n```\n\n## Demos\n\n[Barcode Scanner](https://github.com/xulihang/vue-vision-camera/tree/main/example) using [Dynamsoft Barcode Reader](https://www.dynamsoft.com/barcode-reader/overview/)\n\n\n## FAQ\n\nHow to specify which camera to use?\n\n1. Use the `desiredCamera` prop. If one of the camera's name contains it, then it will be used. You can get the devices list in the `devicesLoaded` event.\n2. Use the `facingMode` prop. Set it to `environment` to use the back camera. Set it to `user` to use the front camera. Please note that this is not supported on Desktop.\n\nYou can use the two props together.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxulihang%2Fvue-vision-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxulihang%2Fvue-vision-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxulihang%2Fvue-vision-camera/lists"}