svelte-audio-player
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Svelte Audio Player

Component that wraps html audio tag for building custom audio player.

Installation

npm install svelte-audio-player

or using yarn

yarn add svelte-audio-player

Usage

<script>
  import { AudioPlayer } from 'svelte-audio-player'
</script>

<AudioPlayer src="/BabyElephantWalk60.wav">
  <MyAudioPlayer />
</AudioPlayer>

MyAudioPlayer.svelte

<script>
  import { getAudioContext } from 'svelte-audio-player'

  const { 
    currentTime,
    repeat,
    duration,
    playing,
    volume,
    muted,
    ended,
    paused,
    playbackRate,
    seekBy,
    seekTo
  } = getAudioContext()
</script>

<!-- Your custom audio player component -->

Full documentation please visit Svelte Audio Player's website

Readme

Keywords

none

Package Sidebar

Install

npm i svelte-audio-player

Weekly Downloads

5

Version

0.0.1

License

none

Unpacked Size

6.61 kB

Total Files

18

Last publish

Collaborators

  • dandiws