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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@convolver-player/vue

v0.5.1

Published

[![npm version](https://img.shields.io/npm/v/@convolver-player/vue.svg)](https://www.npmjs.com/package/@convolver-player/vue) [![npm downloads](https://img.shields.io/npm/dm/@convolver-player/vue.svg)](https://www.npmjs.com/package/@convolver-player/vue)

Downloads

294

Readme

@convolver-player/vue

npm version npm downloads License: MIT

A Vue component for playing audio through a convolution reverb.

Installation

npm install @convolver-player/vue

or

yarn add @convolver-player/vue

[!NOTE] The @convolver-player/core package is bundled with this component and does not need to be installed separately.

Usage

The ConvolverPlayer component is designed to be unstyled by default, giving you complete control over its appearance. You will need to provide your own CSS to style the component. The waveform display will attempt to use the browser's accent-color for the waveform, with a fallback to a default blue color if accent-color is not available.

Simple Usage

In its simplest form, you can use the ConvolverPlayer component by just providing the irFilePath prop. The component will handle the creation of the AudioContext.

<template>
  <ConvolverPlayer :irFilePath="'/path/to/your/ir.wav'" />
</template>

<script setup>
  import { ConvolverPlayer } from '@convolver-player/vue';
</script>

Advanced Usage: Shared AudioContext

For more complex scenarios where you have multiple ConvolverPlayer components on a page, it's recommended to use a shared AudioContext. This is more efficient as it avoids creating multiple AudioContext instances.

<template>
  <div>
    <ConvolverPlayer :irFilePath="'/path/to/your/ir1.wav'" :audioContext="sharedAudioContext" />
    <ConvolverPlayer :irFilePath="'/path/to/your/ir2.wav'" :audioContext="sharedAudioContext" />
  </div>
</template>

<script setup>
  import { ref, onMounted, onUnmounted } from 'vue';
  import { ConvolverPlayer } from '@convolver-player/vue';

  const sharedAudioContext = ref(null);

  onMounted(() => {
    const AudioContext = window.AudioContext || window.webkitAudioContext;
    if (AudioContext) {
      sharedAudioContext.value = new AudioContext();
    }
  });

  onUnmounted(() => {
    if (sharedAudioContext.value && sharedAudioContext.value.state !== 'closed') {
      sharedAudioContext.value.close();
    }
  });
</script>

Styling Guide

The ConvolverPlayer component is intentionally unstyled to give you full control over its appearance. You can apply styles using standard CSS, targeting its internal class structure.

Here's an example of how you might style the component:

.convolver-player {
  display: grid;
  grid-template-columns: 2fr 5fr;
  column-gap: 1em;
  row-gap: 0;
  padding: 3em;
  margin: 1em 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  height: fit-content;
  box-shadow: 0 0 0.95px ButtonBorder; /* Using system color for shadow */
}

.convolver-player .examples {
  display: grid;
  gap: 1em;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.convolver-player .examples button {
  height: 100%;
}

.convolver-player .ir {
  display: grid;
  align-items: center;
  row-gap: 0.5em;
}

.convolver-player .ir .info {
  align-content: center;
  height: 32px;
}

.convolver-player .ir .waveform-section .waveform-canvas {
  width: 100%;
  height: 100px;
  background-color: Canvas; /* Using system color for background */
  box-shadow: 0 0 0.95px ButtonBorder; /* Using system color for shadow */
}

.convolver-player .ir .controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

/* You can further style elements like labels, input[type="range"], and spans within .controls */

Props

| Prop | Type | Description | | -------------- | -------------- | ---------------------------------------------------------------------------------------------------- | | irFilePath | String | The path to the impulse response file. | | audioContext | AudioContext | An optional, pre-existing AudioContext to use. If not provided, the component will create its own. |

Contributing

Contributions are welcome! Please see the main contributing guide in the monorepo root.