/tweakpane-plugin-audio-player

A mini audio player for Tweakpane.

Primary LanguageTypeScriptMIT LicenseMIT

Tweakpane plugin audio player

A mini audio player for Tweakpane. Sometimes you just want all of your UI in one place.

tweakpane-plugin-audio-player-title

Demo

Plugin demo on StackBlitz

Installation

Browser

<script src="tweakpane.min.js"></script>
<script src="tweakpane-plugin-audio-player.min.js"></script>
<script>
  const pane = new Tweakpane.Pane();
  pane.registerPlugin(TweakpaneAudioPlayerPlugin);
</script>

Package

import {Pane} from 'tweakpane';
import * as AudioPlayerPlugin from 'tweakpane-plugin-audio-player';

const pane = new Pane();
pane.registerPlugin(AudioPlayerPlugin);

Usage

const audioBlade = pane.addBlade({
  view: 'audio-player',
  label: 'track',
  source: 'drum-intro.mp3'
});

// access the <audio> element directly
// audioBlade.audio