{"id":14384993,"url":"https://github.com/otalk/getUserMedia","last_synced_at":"2025-08-23T18:31:22.626Z","repository":{"id":9207048,"uuid":"11016916","full_name":"otalk/getUserMedia","owner":"otalk","description":"Cross-browser getUserMedia shim with a node.js style error-first API","archived":true,"fork":false,"pushed_at":"2017-02-07T16:48:09.000Z","size":80,"stargazers_count":233,"open_issues_count":1,"forks_count":41,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-09T06:58:59.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/otalk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2013-06-28T05:43:38.000Z","updated_at":"2023-01-28T19:21:09.000Z","dependencies_parsed_at":"2022-08-31T09:22:50.630Z","dependency_job_id":null,"html_url":"https://github.com/otalk/getUserMedia","commit_stats":null,"previous_names":["henrikjoreteg/getusermedia"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/otalk/getUserMedia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otalk%2FgetUserMedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otalk%2FgetUserMedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otalk%2FgetUserMedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otalk%2FgetUserMedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otalk","download_url":"https://codeload.github.com/otalk/getUserMedia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otalk%2FgetUserMedia/sbom","scorecard":{"id":62118,"data":{"date":"2025-08-04","repo":{"name":"github.com/otalk/getUserMedia","commit":"3dec644ae8d682c6973201c20b44b8ba01fce929"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 4/23 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T01:56:15.610Z","repository_id":9207048,"created_at":"2025-08-15T01:56:15.610Z","updated_at":"2025-08-15T01:56:15.610Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271762947,"owners_count":24816839,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-28T18:01:50.757Z","updated_at":"2025-08-23T18:31:22.349Z","avatar_url":"https://github.com/otalk.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# getUserMedia\n\n## What is this?\n\nA tiny browser module that gives us a simple API for getting access to a user's camera or microphone by wrapping the `navigator.getUserMedia` API in modern browsers.\n\nThis is important because as of right now, all browsers return errors differently. More on that below.\n\nThis lib also gracefully handles the lack of support in a browser. So you never have to check first (see error handling below).\n\nIt gives us a cleaner node.js-style, error-first API and cross-browser handling. No browser support checking necessary, lack of support is treated in the same way as when the user rejects the request: the callback gets passed an error as the first argument.\n\nSuitable for use with browserify/CommonJS on the client. \n\nIf you're not using browserify or you want AMD support use `getusermedia.bundle.js`. Note that if no module system is detected it simply attaches a function called `getUserMedia` to `window`.\n\n\n\n## Installing\n\n```\nnpm install getusermedia\n```\n\n## How to use it\n\n\nWith this helper it's clean/simple to get access to a user's camera, mic, etc.\n\n```js\nvar getUserMedia = require('getusermedia');\n\ngetUserMedia(function (err, stream) {\n    // if the browser doesn't support user media\n    // or the user says \"no\" the error gets passed\n    // as the first argument.\n    if (err) {\n       console.log('failed');\n    } else {\n       console.log('got a stream', stream);  \n    }\n});\n```\n\nPassing in options is optional. It defaults to `{video: true, audio: true}`;\n\n```js\n// optionally pass constraints as the first argument\n// they just passed through.\ngetUserMedia({video: true, audio: false}, function (err, stream) { ... });\n```\n\n\n## Why? Because it's super ugly without this tool\n\n```js\n// first deal with browser prefixes\nvar getUserMedia = navigator.getUserMedia || \n    navigator.mozGetUserMedia || \n    navigator.webkitGetUserMedia;\n\n// make sure it's supported and bind to navigator\nif (getUserMedia) {\n    getUserMedia = getUserMedia.bind(navigator);\n} else {\n    // have to figure out how to handle the error somehow\n}\n\n// then deal with a weird, positional error handling API\ngetUserMedia(\n    // media constraints\n    {video: true, audio: true}, \n    // success callback\n    function (stream) {\n        // gets stream if successful\n    }, \n    // error callback\n    function (error) {\n        // called if failed to get media\n    }\n)\n```\n\n\n## Handling errors (summary)\n\nAll failed calls to `getusermedia` in this library will return an error object (of type `NavigatorUserMediaError`) as the first argument to the callback. All will have a `.name` according to [the specification](http://w3c.github.io/mediacapture-main/getusermedia.html#mediastreamerror)\n\n## License\n\nMIT\n\n## Created By\n\nIf you like this, follow: [@HenrikJoreteg](http://twitter.com/henrikjoreteg) on twitter.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotalk%2FgetUserMedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotalk%2FgetUserMedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotalk%2FgetUserMedia/lists"}