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

Primitives to manage audio and single sounds.

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
152
decreased by-84.8%
Maintainers
2
Weekly downloads
 
Created
Source

Name: audio Stage: 3 Package: "@solid-primitives/audio" Primitives: createAudio, createAudioPlayer, createAudioManager Category: Display & Media

@solid-primitives/audio

lerna size size

Primitive to manage audio playback in the browser. This primitive is comprised of three composed primitives:

createAudioPlayer - Provides a very basic interface for wrapping listeners to a supplied or default audio player.

createAudio - Creates a very basic audio/sound player.

createAudioManager - Creates a full featured audio manager.

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

const { play, pause } = createAudio("example.wav");

and

const { play, duration, currentTime, seek, setVolume, pause } = createAudioManager("example.wav");

Demo

You may view a working example here: https://codesandbox.io/s/solid-primitives-audio-5c9f3

Changelog

Expand Changelog

0.0.100

Pulling an early release of the package together and preparing for 1.0.0 release. No changes.

1.0.0

Minor clean-up, added tests and released.

1.0.1

Added testing and support for srcObject.

1.0.5

Added CJS support.

Keywords

FAQs

Package last updated on 01 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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