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
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/audio

Primitive to manage audio and sound

  • 0.0.100
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by237.58%
Maintainers
1
Weekly downloads
 
Created
Source

@solid-primitives/audio

lerna

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

createBaseAudio - 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.js')

or

const { play, duration, currentTime, seek, setVolume, pause } =
    createAudioManager('example.js')

Demo

You may view a working example here: https://codesandbox.io/s/solid-create-audio-6wc4c?file=/src/index.tsx

Changelog

Expand Changelog

1.0.0

First ported commit from react-use-localstorage.

Contributors

Ported from the amazing work by at https://github.com/dance2die/react-use-localstorage.

Keywords

FAQs

Package last updated on 17 Jul 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