@fakes/media-devices
TypeScript icon, indicating that this package has built-in type declarations

0.14.0 • Public • Published

media-devices-fake

The goal of this library is to provide a fake implementation of navigator.mediaDevices to ease unit testing device related code. Although the api is standardized, the actual implementation varies between browsers, even violating the standard. The current implementation focuses on reproducing the chromium implementation.

The implementation is driven by personal needs and by no means complete. Not implemented APIs / behaviour follows a fail fast approach throwing errors with additional information about the missing feature. In case you need not implemented behaviour feel free to open a pull request.

How to use it

The acceptance test should give you an impression on how to use the library and what is already implemented.

Package Sidebar

Install

npm i @fakes/media-devices

Weekly Downloads

565

Version

0.14.0

License

MIT

Unpacked Size

216 kB

Total Files

134

Last publish

Collaborators

  • catch-22