{"id":18096633,"url":"https://github.com/bredele/media","last_synced_at":"2025-04-06T03:26:50.542Z","repository":{"id":16334333,"uuid":"19083991","full_name":"bredele/media","owner":"bredele","description":"WebRTC get user media made easy","archived":false,"fork":false,"pushed_at":"2016-07-01T16:45:37.000Z","size":17,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T09:49:52.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bredele.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":"2014-04-23T20:12:33.000Z","updated_at":"2016-07-01T18:24:50.000Z","dependencies_parsed_at":"2022-07-16T21:46:09.784Z","dependency_job_id":null,"html_url":"https://github.com/bredele/media","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fmedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fmedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fmedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bredele%2Fmedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bredele","download_url":"https://codeload.github.com/bredele/media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430071,"owners_count":20937798,"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-10-31T19:14:51.770Z","updated_at":"2025-04-06T03:26:50.524Z","avatar_url":"https://github.com/bredele.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"media\n====\n\n  `getUserMedia` but better.\n\n\n## Installation\n\n\t$ npm install bredele/media --save\n\n\n## Usage\n\n### shim\n\n`media` is a basic shim for `getUserMedia`. It works on all browsers supporting [webrtc](http://www.webrtc.org/) and automatically creates a blob url from the media stream if supported.\n\n\n```js\nvar media = require('media');\nmedia({\n\tvideo: true\n}, function(stream, url) {\n\t// do something with stream or url if exists\n});\n```\n\n### promises\n\n`media` returns a promise to be compliant with thee future API of `getUserMedia`\n\n```js\nvar media = require('media');\nmedia()\n  .then(function(stream) {\n    // do something with stream\n  })\n```\n\n### constraints\n\n  By default, media apply the following [constraints](http://src.chromium.org/svn/trunk/src/chrome/test/data/webrtc/manual/constraints.html):\n\n```\n{\n  \"audio\": true,\n  \"video\": {\n    \"mandatory\": {},\n    \"optional\": []\n  }\n}\n```\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Olivier Wietrich\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fmedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbredele%2Fmedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbredele%2Fmedia/lists"}