0.7.4 • Published 1 year ago

ts-audio v0.7.4

Weekly downloads
26
License
MIT
Repository
-
Last release
1 year ago

· Build Status license

ts-audio is an agnostic and easy-to-use library to work with the AudioContext API and create Playlists.

Features

  • Simple API that abstracts the complexity of the AudioContext API
  • Cross-browser support
  • Makes easy to create audio playlist
  • Works with any language that compiles to JavaScript
  • Supports to Types
  • Zero-dependecy

Installation

To install ts-audio, execute:

$ npm install ts-audio

or

$ yarn add ts-audio

Quickstart

ts-audio has two components at its core: Audio and AudioPlaylist. Both components are functions that you can call with certain parameters. Below is an example of how to use the Audio:

import { Audio } from 'ts-audio';

const audio = Audio({
  file: './song.mp3',
  loop: true,
  volume: 0.2,
});

audio.play();

To use the AudioPlaylist component is also quite simple:

import { AudioPlaylist } from 'ts-audio';

const playlist = AudioPlaylist({
  files: ['./songOne.mp3', './songTwo.mp3', './songThree.mp3'],
  volume: 0.7,
});

playlist.play();

Docs

License

MIT

0.7.4

1 year ago

0.7.3

1 year ago

0.7.2

1 year ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago