@solid-primitives/devices

Primitive that enumerates media devices

Usage no npm install needed!

<script type="module">
  import solidPrimitivesDevices from 'https://cdn.skypack.dev/@solid-primitives/devices';
</script>

README

@solid-primitives/devices

lerna size size stage

Creates a primitive to get a list of media devices (microphones, speakers, cameras). There are filtered primitives for convenience reasons.

Installation

npm install @solid-primitives/devices
# or
yarn add @solid-primitives/devices

How to use it

const devices = createDevices();

const microphones = createMicrophones();
const speakers = createSpeakers();
const cameras = createCameras();

The filtered primitives are build so that they only triggered if the devices of their own kind changed.

Demo

TODO

Changelog

Expand Changelog

0.0.100

Initial release loosely adapted from https://github.com/microcipcip/vue-use-kit/blob/master/src/functions/useMediaDevices/useMediaDevices.ts.

1.0.1

Released official version, CJS and updated to Stage 3

1.0.3

Add proper build process and clean up docs. Added SSR and CJS support.

1.0.4

Updated to latest Solid.