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 🙏

© 2026 – Pkg Stats / Ryan Hefner

audioly

v1.0.1

Published

Library for audio controls, visualization, waveform and trimming/cutting

Readme

audioly

Library for audio controls, visualization, waveform and trimming/cutting

API (Usage)

Instantiate the audioly class const audioly = new Audioly(audio);

Sliders

  1. Fill slider
audioly.fillSlider(el, {
    options: {},
  });
  • el: html element to be used as a slider (required)
  • options:
    • thumb: boolean (optional)
    • thumbColor: string containing rgb or hex color (optional)
    • thumbWidth: string containing value in pixels. Should be "1", "2" etc, without px after the value(optional)
    • sliderRGBColor: Object with rgb color of the slider. Example, (optional)
    {
    r: "0",
    g: "0",
    b: "0",
    }
  1. Cut slider
audioly.cutSlider(el, {
    options: {},
  });

Same application as the fill slider with one additional option:

  • aud: an object with two keys {start, end}. The start key specifies the time in seconds where the audio should start playing, and the end key specifies the end of the audio play.

Times

  1. getCurrentTime This will get the audio's current time in the format (mins:secs)
  2. getDuration This will get the audio's full duration in the format (mins:secs)
  3. currentPosition This will get the current audio position in seconds while you change the audio position

Waveform

drawWaveform(
  canvas,
  opt = {}
)
  • canvas: The canvas html element (required)
  • opt: options for the customization of the wave form. This has two properties, (optional)
    • color: The color of the waveform
    • background: The background color of the the canvas

Icons audIcons(name) This works hand in hand with fontawesome icons to get the icons for the audio controls. The name property can be any of the following:

  • play: When the audio is paused
  • pause: When the audio is playing
  • mute: When the audio is not muted
  • zero volume: When the audio's volume is 0
  • unmute: When the audio is muted
  • loop: When the audio is not looped
  • back: The back button icon
  • next: The next button icon

Playing and pausing audio

playPause(
   el,
   options = {
     playStr: "play",
     pauseStr: "pause",
   },
   styles = { on: null, off: null }
 )
  • el: html element that acts as the playing and pausing button (required)
  • options: an object with two keys {playStr,pauseStr} (optional)
    • playStr: Is the string value use when the audio is playing (works best with audIcons(name))
    • pauseStr: Is the string value use when the audio is paused (works best with audIcons(name))
  • styles: an object with two keys {on,off} (optional)
    • on: The css styles for the specified html element when the audio is playing
    • off: The css styles for the specified html element when the audio is paused

Backward and Forward

  1. goBack(audList, { el: null, names: null })
  2. goForward(audList, { el: null, names: null })
  • audList: An array containing list of audios to navigate (required) The following are optional but once the "el" is specified, the names will be required
  • el: The element that displays the name of the playing audio (required)
  • names: An array containing list of audios' names to navigate (required)

Mute and Unmute muteNunmute(el, muteStr, unmuteStr)

  • el: The html element acting as the mute button
  • muteStr: Text/Icon to show when the audio is muted
  • unmuteStr: Text/Icon to show when the audio is not muted

Looping

loopNunloop(
    el,
    options = {
      loopStr: "loop",
      unloopStr: "unloop",
    },
    styles = { on: null, off: null }
  )

The application is the same as the one for playing and pausing the audio

Changing the volume changeVolume(el) el: The html element acting as the volume slider (should be a range input element) (required). This works oninput and onchange events in javascript

Changing the audio position changeAudPosition(el) el: The html element acting as the audio seek slider (should be a range input element) (required). This works oninput and onchange events in javascript

Updating the audio's time updateAudTime(el) el: The html element acting as the audio seek slider (should be a range input element) (required). This works ontimeupdate event on audio in javascript