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

1.2.6 • Public • Published

Solid Primitives Devices

@solid-primitives/devices

turborepo 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

Media Devices

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.

Device Motion

const accelerometer = createAccelerometer();
const gyroscope = createGyroscope();

Demo

You may view a working example here: https://primitives.solidjs.community/playground/devices/

Reference

createAccelerometer : devicemotion event createGyroscope : deviceorientation event

Changelog

See CHANGELOG.md

Package Sidebar

Install

npm i @solid-primitives/devices

Weekly Downloads

282

Version

1.2.6

License

MIT

Unpacked Size

19.2 kB

Total Files

8

Last publish

Collaborators

  • thetarnav.
  • lexlohr
  • davedbase