{"id":20283165,"url":"https://github.com/bsonntag/react-user-media","last_synced_at":"2025-04-11T08:21:34.522Z","repository":{"id":42657711,"uuid":"138441586","full_name":"bsonntag/react-user-media","owner":"bsonntag","description":"A react component that wraps `getUserMedia`.","archived":false,"fork":false,"pushed_at":"2024-09-11T21:14:18.000Z","size":2050,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T05:51:17.383Z","etag":null,"topics":["componets","getusermedia","mediastream","react"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bsonntag.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-24T00:06:58.000Z","updated_at":"2024-01-12T18:06:48.000Z","dependencies_parsed_at":"2024-04-04T14:53:15.704Z","dependency_job_id":"9401511c-c7b6-47fd-bc70-b81cdaa47360","html_url":"https://github.com/bsonntag/react-user-media","commit_stats":{"total_commits":59,"total_committers":3,"mean_commits":"19.666666666666668","dds":0.5254237288135593,"last_synced_commit":"e38e60b0336a03b6dd035081407d1b3178a9fe84"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsonntag%2Freact-user-media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsonntag%2Freact-user-media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsonntag%2Freact-user-media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsonntag%2Freact-user-media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsonntag","download_url":"https://codeload.github.com/bsonntag/react-user-media/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360930,"owners_count":21090783,"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":["componets","getusermedia","mediastream","react"],"created_at":"2024-11-14T14:13:30.897Z","updated_at":"2025-04-11T08:21:34.496Z","avatar_url":"https://github.com/bsonntag.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @bsonntag/react-user-media\n\n\u003e A react component that wraps `getUserMedia`.\n\n## Installation\n\nUsing npm:\n\n```sh\n$ npm install --save @bsonntag/react-user-media\n```\n\nUsing yarn:\n\n```sh\n$ yarn add @bsonntag/react-user-media\n```\n\nThis module uses react's `createContext` API,\nso make sure you have at least version 16.3.0 installed.\n\n## Example usage\n\n```js\nimport UserMedia from '@bsonntag/react-user-media';\nimport React from 'react';\n\nconst constraints = { video: true };\n\nconst App = () =\u003e (\n  \u003cUserMedia constraints={constraints}\u003e\n    {stream =\u003e (\n      \u003cvideo\n        autoPlay\n        src={URL.createObjectURL(stream)}\n      /\u003e\n    )}\n  \u003c/UserMedia\u003e\n);\n```\n\n## Props\n\n- `children` - A function that receives the `MediaStream` and renders something.\n- `constraints` - A [`MediaStreamConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints).\n- `onError` - A function that is called when `getUserMedia` throws.\n- `onMediaStream` - A function that receives the `MediaStream`.\n- `placeholder` - An element that is rendered while `getUserMedia` is being called.\n- `renderError` - A function that receives the error thrown by `getUserMedia` and renders something.\n\n## Contributing\n\nPlease feel free to submit any issues or pull requests.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsonntag%2Freact-user-media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsonntag%2Freact-user-media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsonntag%2Freact-user-media/lists"}