0.7.1 • Published 2 months ago

@solid-primitives/stream v0.7.1

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

@solid-primitives/stream

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.7.1

2 months ago

0.7.0

5 months ago

0.6.14

1 year ago

0.6.13

1 year ago

0.6.12

1 year ago

0.6.11

2 years ago

0.6.9

2 years ago

0.6.10

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.8

2 years ago

0.6.6-beta.0

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.3.0

3 years ago

0.4.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.160

4 years ago

0.0.180

4 years ago

0.0.150

4 years ago

0.0.105

4 years ago

0.0.100

4 years ago