# rtc-media

> A simple getUserMedia wrapper

Latest version **2.0.1** (published 2014-12-01) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install rtc-media
pnpm add rtc-media
yarn add rtc-media
bun add rtc-media
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2014-12-01 |
| First published | 2013-07-26 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Damon Oehlman |
| Maintainers | damonoehlman, silvia |
| Keywords | webrtc, rtc.io, getusermedia |

## Links

- npm: https://www.npmjs.com/package/rtc-media
- Repository: https://github.com/rtc-io/rtc-media
- Issues: https://github.com/rtc-io/rtc-media/issues
- npm.io page: https://npm.io/package/rtc-media

## Dependencies (3)

- [cog](https://npm.io/package/cog.md) ^1.0.0
- [rtc-attach](https://npm.io/package/rtc-attach.md) ^2.0.0
- [rtc-capture](https://npm.io/package/rtc-capture.md) ^1.0.2

## Recent versions

- 2.0.1 (latest) — 2014-12-01
- 2.0.0 — 2014-12-01
- 1.10.1 — 2014-11-25
- 1.10.0 — 2014-08-05
- 1.9.0 — 2014-06-30
- 1.8.0 — 2014-06-30
- 1.7.0 — 2014-06-29
- 1.6.6 — 2014-06-16
- 1.6.5 — 2014-05-30
- 1.6.4 — 2014-05-30
- 1.6.3 — 2014-05-29
- 1.6.2 — 2014-05-13
- 1.6.1 — 2014-04-24
- 1.6.0 — 2014-04-09
- 1.5.5 — 2014-02-27
- … 23 more at https://npm.io/package/rtc-media/versions

## README

# rtc-media

This is a convenience function for invoking media capture and rendering
using the [`rtc-capture`](https://github.com/rtc-io/rtc-capture) and
[`rtc-attach`](https://github.com/rtc-io/rtc-attach) packages respectively
within an application.


[![NPM](https://nodei.co/npm/rtc-media.png)](https://nodei.co/npm/rtc-media/)

[![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable) 
[![rtc.io google group](http://img.shields.io/badge/discuss-rtc.io-blue.svg)](https://groups.google.com/forum/#!forum/rtc-io)



## Example Usage

Default constraints `{ audio: true, video: true }` capture and rendering
an new video element within the document.body:

```js
// capture using default constraints and render a new video element
// in the document body
require('rtc-media')({ target: document.body });

```

In the event that you wish to make use of any of the rtc.io plugins, then
the following example demonstrates how to provide a single "capture and
render" call that will work with a plugin:

```js
var crel = require('crel');

// ensure we have a style tag that tells the video renderer what size it should be
document.body.appendChild(crel('style', [
  'body { margin: 0px; width: 100vw; height: 100vh; overflow: hidden }',
  'body > * { width: 100%; height: 100%; object-fit: contain }'
].join('\n')));

// specify a plugin
require('rtc-media')({
  target: document.body,
  plugins: [
    require('rtc-plugin-nicta-ios')
  ]
});

```

## License(s)

### Apache 2.0

Copyright 2014 National ICT Australia Limited (NICTA)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

---
_Source: https://npm.io/package/rtc-media · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
