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

@spitch/reader

v0.2.6

Published

Embeddable audio reader component to render a rich audio reader player in African languages.

Readme

@spitch/reader

Embeddable audio reader component to render a rich audio reader player in African languages.

Installation

npm install @spitch/reader

Usage

React

import { AudioReader } from '@spitch/reader/react';

function App() {
  return (
    <AudioReader 
      readerId="your-reader-id"
    />
  );
}

With ref for programmatic control:

import { useRef } from 'react';
import { AudioReader, AudioReaderRef } from '@spitch/reader/react';

function App() {
  const readerRef = useRef<AudioReaderRef>(null);

  const handlePlay = () => {
    readerRef.current?.play();
  };

  return (
    <div>
      <button onClick={handlePlay}>Play</button>
      <AudioReader 
        ref={readerRef}
        readerId="your-reader-id"
      />
    </div>
  );
}

Vue

<template>
  <AudioReader 
    :reader-id="readerId"
    @play="onPlay"
    @pause="onPause"
  />
</template>

<script setup lang="ts">
import { AudioReader } from '@spitch/reader/vue';

const readerId = 'your-reader-id';

const onPlay = () => console.log('Started playing');
const onPause = () => console.log('Paused');
</script>

With ref for programmatic control:

<template>
  <div>
    <button @click="handlePlay">Play</button>
    <button @click="handlePause">Pause</button>
    <button @click="handleSeek">Seek to 30s</button>
    
    <AudioReader 
      ref="readerRef"
      :reader-id="readerId"
      @play="onPlay"
      @pause="onPause"
      @seek="onSeek"
      @rate-change="onRateChange"
    />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { AudioReader } from '@spitch/reader/vue';

const readerRef = ref();
const readerId = 'your-reader-id';

const handlePlay = () => readerRef.value?.play();
const handlePause = () => readerRef.value?.pause();
const handleSeek = () => readerRef.value?.seek(30);

const onPlay = () => console.log('Started playing');
const onPause = () => console.log('Paused');
const onSeek = (seconds: number) => console.log('Seeked to:', seconds);
const onRateChange = (rate: number) => console.log('Rate changed to:', rate);
</script>

Angular (Standalone)

// main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { Component, ViewChild } from '@angular/core';
import { AudioReaderComponent } from '@spitch/reader/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [AudioReaderComponent],
  template: `
    <spitch-audio-reader [readerId]="readerId" />
  `,
})
class AppComponent {
  readerId = 'your-reader-id';
}

bootstrapApplication(AppComponent);

Vanilla JavaScript/HTML

<script type="module">
  import '@spitch/reader';
</script>

<audio-reader 
  reader-id="your-reader-id"
></audio-reader>

Import Options

| Framework | Import Path | Component Name | |-----------|-------------|----------------| | React | @spitch/reader/react | AudioReader | | Vue | @spitch/reader/vue | AudioReader | | Angular | @spitch/reader/angular | AudioReaderComponent | | Vanilla JS | @spitch/reader | <audio-reader> |

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | readerId | string | ✅ | Unique identifier for the reader |

Events (Vue)

  • @play - Fired when audio starts playing
  • @pause - Fired when audio is paused
  • @stop - Fired when audio stops
  • @seek - Fired when seeking to a specific time
  • @rate-change - Fired when playback rate changes

Methods (React/Vue/Angular refs)

  • play() - Start playing audio
  • pause() - Pause audio
  • stop() - Stop audio
  • seek(seconds: number) - Seek to specific time
  • setPlaybackRate(rate: number) - Set playback speed

Framework-Specific Features

React

  • Full TypeScript support with AudioReaderProps and AudioReaderRef
  • Standard React props (className, style, etc.)
  • Ref-based programmatic control
  • Automatic cleanup on unmount

Vue

  • Vue 3 Composition API support
  • Reactive props and event emission
  • Template-based rendering
  • Exposed methods for programmatic control
  • Event handling for all audio state changes

Vanilla JS

  • Custom element <audio-reader>
  • Attribute-based configuration
  • Direct DOM manipulation
  • Framework-agnostic

Browser Support

  • Chrome 67+
  • Firefox 63+
  • Safari 11.1+
  • Edge 79+

License

MIT