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

taleem-player-app

v1.0.5

Published

Runtime harness for Taleem Player (loop, timers, UI wiring)

Readme

taleem-player-app

Runtime harness for Taleem Player.

taleem-player-app wires together:

  • a player (taleem-player)
  • a timer (audio or silent)
  • a render loop (taleem-pam)
  • basic UI controls

It is not a full app or framework. It is a small orchestration utility that helps run a Taleem slide deck.


Installation

npm install taleem-player-app taleem-player taleem-pam howler

howler is required only if you use audio timers.


What this library does

This library connects four pieces:

player.renderAt(time)
        ↑
     timer.now()
        ↑
     renderLoop
        ↑
       UI

It provides a minimal runtime that:

  • runs the render loop
  • syncs time with a timer
  • connects play/pause/stop buttons
  • connects a timeline scrub bar
  • exposes a hook after each render

Basic Usage

import { createTaleemPlayer } from "taleem-player";
import { taleemPlayerApp, createSilentTimer } from "taleem-player-app";

const player = createTaleemPlayer(deck);

const timer = createSilentTimer();

taleemPlayerApp({
  player,
  timer,
  duration: deck.duration,
  ui: {
    playBtn: document.querySelector("#play"),
    pauseBtn: document.querySelector("#pause"),
    stopBtn: document.querySelector("#stop"),
    scrub: document.querySelector("#scrub"),
    timeEl: document.querySelector("#time")
  }
});

Audio Timer Example

If your slides are synchronized to audio:

import { createAudioTimer } from "taleem-player-app";

const timer = createAudioTimer("/lesson.mp3");

This uses howler.js for audio playback.


API

taleemPlayerApp

taleemPlayerApp({
  player,
  timer,
  duration,
  ui,
  afterRender
})

Parameters

| field | description | | ----------- | ------------------------------ | | player | Taleem player instance | | timer | timer adapter | | duration | deck duration in seconds | | ui | UI control elements | | afterRender | optional hook after each frame |


UI Contract

The ui object must contain:

{
  playBtn,
  pauseBtn,
  stopBtn,
  scrub,
  timeEl
}

Example HTML:

<button id="play">Play</button>
<button id="pause">Pause</button>
<button id="stop">Stop</button>

<input id="scrub" type="range">

<span id="time"></span>

afterRender Hook

The afterRender hook runs after every frame render.

Useful for:

  • math rendering
  • code highlighting
  • custom animations

Example:

taleemPlayerApp({
  player,
  timer,
  duration,
  ui,

  afterRender({ time }) {
    renderMathInElement(document.body);
  }
});

Timer Adapters

The player expects a timer with this interface:

{
  play()
  pause()
  seek(time)
  now()
}

Two adapters are included.

createSilentTimer()

Timeline-based timer.

const timer = createSilentTimer();

Used when slides control timing.


createAudioTimer(url)

Audio-driven timer.

const timer = createAudioTimer("/lesson.mp3");

Requires howler.


Design Philosophy

taleem-player-app is intentionally small.

Responsibilities are separated across libraries:

taleem-slides       → slide HTML
taleem-player       → rendering engine
taleem-player-app   → runtime harness
taleem-pam          → render loop

Each library does one job.


License

MIT