Uses MediaDevices
to track
user's connected media devices.
import {MediaDeviceSensor} from 'libreact/lib/MediaDeviceSensor';
<MediaDeviceSensor>{(state) =>
JSON.stringify(state, null, 4)
}</MediaDeviceSensor>
Higher order component that injects devices
prop into your component.
import {withMediaDevices} from 'libreact/lib/MediaDeviceSensor';
const MyCompDevices = withMediaDevices(MyComp);
Stateful component class decorator that injects devices
prop into your component.
import {withMediaDevices} from 'libreact/lib/MediaDeviceSensor';
@withMediaDevices
class MyComp extends Component {
}