Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (24 sloc) 791 Bytes

<MediaDeviceSensor>

Uses MediaDevices to track user's connected media devices.

Usage

import {MediaDeviceSensor} from 'libreact/lib/MediaDeviceSensor';

<MediaDeviceSensor>{(state) =>
  JSON.stringify(state, null, 4)
}</MediaDeviceSensor>

withMediaDevices()

Higher order component that injects devices prop into your component.

import {withMediaDevices} from 'libreact/lib/MediaDeviceSensor';

const MyCompDevices = withMediaDevices(MyComp);

@withMediaDevices

Stateful component class decorator that injects devices prop into your component.

import {withMediaDevices} from 'libreact/lib/MediaDeviceSensor';

@withMediaDevices
class MyComp extends Component {

}