media-services
v0.0.12
Published
manage media devices in the modern browser
Downloads
29
Readme
mediaServices
media-devices wraps the native browser API and tries to normalize as many cross-browser quirks as possible (reference). It also provides a device list diffing observer that notifies you as devices are added, removed, or updated.
Installation
npm i media-services
API
import mediaServices from 'media-services';
// Get the user's camera
const mediaSer = mediaServices(opt)
// get the camera photo
mediaSer.getMediaData()
// change environment or user camera
mediaSer.changeCamera()