New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/audio

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/audio - npm Package Compare versions

Comparing version 1.1.0 to 1.1.5

6

dist/server.js

@@ -5,3 +5,3 @@ // src/server.ts

player: {},
state: () => ({}),
state: () => AudioState.LOADING,
setState: (_state) => {

@@ -17,3 +17,3 @@ }

},
state: () => ({}),
state: () => AudioState.LOADING,
player: {}

@@ -29,3 +29,3 @@ };

currentTime: () => 0,
state: () => ({}),
state: () => AudioState.LOADING,
duration: () => 0,

@@ -32,0 +32,0 @@ seek: () => {

{
"name": "@solid-primitives/audio",
"version": "1.1.0",
"version": "1.1.5",
"description": "Primitives to manage audio and single sounds.",

@@ -5,0 +5,0 @@ "author": "David Di Biase <dave.dibiase@gmail.com>",

@@ -7,24 +7,40 @@ # @solid-primitives/audio

Primitive to manage audio playback in the browser. This primitive is comprised of three composed primitives:
Primitive to manage audio playback in the browser. The primitives are easily composable and extended. To create your own audio element, consider using createAudioPlayer which allows you to supply a player instance that matches the built-in standard Audio API.
`createAudioPlayer` - Provides a very basic interface for wrapping listeners to a supplied or default audio player.
Each primitive also exposes the audio instance for further custom extensions. Within an SSR context this audio primitive performs noops but never interrupts the process. Time values and durations are zero'd and in LOADING state.
`createAudio` - Creates a very basic audio/sound player.
## Installation
`createAudioManager` - Creates a full featured audio manager.
```
npm install @solid-primitives/audio
# or
yarn add @solid-primitives/audio
```
The primitives are easily composable and extended. To create your own audio element, consider using createBaseAudio which allows you to supply a player instance that matches the built-in standard Audio API.
## How to use it
### createAudioPlayer
A foundational primitive with no player controls but exposes the raw player object.
```ts
const { play, pause } = createAudio("example.wav");
const { player } = createAudioPlayer("example.wav");
```
and
### createAudio
Provides a very basic interface for wrapping listeners to a supplied or default audio player.
```ts
const { play, duration, currentTime, seek, setVolume, pause } = createAudioManager("example.wav");
const { play, pause } = createAudioManager("example.wav");
```
### createAIdop
Creates a very basic audio/sound player.
```ts
const { play, pause, duration, currentTime, seek, setVolume } = createAudioManager("example.wav");
```
## Demo

@@ -51,3 +67,3 @@

1.1.0
1.1.5

@@ -54,0 +70,0 @@ Added proper SSR support.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc