npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sick-audio-player

v1.2.0

Published

The sick-audio-player is a versatile component for integrating audio playback functionalities into React applications. It is built using Howler.js.

Downloads

16

Readme

React Sick Audio Player

Overview

The sick-audio-player is a versatile component for integrating audio playback functionalities into React applications. It is built using Howler.js.

Source

Preview

Example.png

Features

  • Play, pause, stop audio playback
  • Navigate between tracks with next and previous buttons
  • Adjustable volume control
  • Customizable appearance with various icons and styling options

Installation

To install the library, use the following npm command:

npm install sick-audio-player

NPM

Visit the NPM

Usage

import AudioPlayer from '@your-namespace/react-audio-player';

import React from 'react';
import AudioPlayer from 'sick-audio-player';

const YourComponent = () => {
  // Your component

  return (
    <AudioPlayer
      audioSrcProp={yourAudioSource} // Provide the audio source URL or an array of URLs
      imageSrcProp={yourImageSource} // Optional: Image source URL for display
      sliderColorProp={yourSliderColor} // Optional: Customize the slider color
      bgColorProp={yourBackgroundColor} // Optional: Customize the background color
      playIconProp={yourPlayIcon} // Optional: Provide a custom play icon component
      stopIconProp={yourStopIcon} // Optional: Provide a custom stop icon component
      volumeIconProp={yourVolumeIcon} // Optional: Provide a custom volume icon component
      nextIconProp={yourNextIcon} // Optional: Provide a custom next track icon component
      prevIconProp={yourPrevIcon} // Optional: Provide a custom previous track icon component
    />
  );
};

Props

audioSrcProp (required)

Type: string | string[] Description: Specifies the source or an array of sources for the audio file(s).

imageSrcProp

Type: string Description: URL of the image to be displayed as the album cover.

sliderColorProp

Type: string Description: Color of the slider and thumb.

bgColorProp

Type: string Description: Background color of the player.

playIconProp

Type: ReactNode Description: Custom play icon component.

stopIconProp

Type: ReactNode Description: Custom stop icon component.

volumeIconProp

Type: ReactNode Description: Custom volume icon component.

nextIconProp

Type: ReactNode Description: Custom next track icon component.

prevIconProp

Type: ReactNode Description: Custom previous track icon component.

Styling

You can customize the player's appearance by providing styles through the respective prop or by editing the AudioPlayer.module.css

Hooks

The library utilizes custom hooks for managing audio playback and time conversion. You can find them in the Hooks directory.

useAudioPlayer: Manages audio player state and controls.

useSecondsToMinutes: Converts seconds to a readable time format.

License

This library is licensed under the MIT License.