0.6.14 • Published 3 months ago

@solid-primitives/stream v0.6.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@solid-primitives/stream

turborepo size size stage

Creates primitives to work with media streams from microphones, cameras or the screen.

Installation

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

How to use it

const [stream, { mutate, refetch, stop } = createStream(constraints: MediaDeviceInfo | MediaStreamConstraints);

stream: Accessor<MediaStream | undefined> & { loading: boolean, error: any }
mutate: (stream: MediaStream | undefined) => void // overwrite the stream
refetch: () => void // refetch the stream without changing the constraints
stop: () => void // stop the current stream

const [amplitude, { mutate, refetch, stop } = createAmplitudeStream(device: MediaDeviceInfo);

amplitude: Accessor<number> & { loading: boolean, error: any }
// otherwise like createStream

createMediaPermissionRequest(target?: 'audio' | 'video' | MediaStreamConstraints);
// use the createPermission primitive to watch the permissions.

Demo

https://primitives.solidjs.community/playground/stream

Changelog

See CHANGELOG.md

0.6.14

3 months ago

0.6.13

3 months ago

0.6.12

4 months ago

0.6.11

10 months ago

0.6.9

1 year ago

0.6.10

1 year ago

0.6.7

1 year ago

0.6.6

1 year ago

0.6.8

1 year ago

0.6.6-beta.0

1 year ago

0.6.5

1 year ago

0.6.4

1 year ago

0.6.3

1 year ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.3.0

2 years ago

0.4.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.160

2 years ago

0.0.180

2 years ago

0.0.150

3 years ago

0.0.105

3 years ago

0.0.100

3 years ago