Skip to content

Releases: EvandroLG/ts-audio

ts-audio v0.8.0

18 Jan 17:43

Choose a tag to compare

ts-audio

ts-audio is a lightweight, agnostic library that makes it easy to work with AudioContext and build audio playlists in the browser.

What's new?

  • Audio: Add isPlaying getter to check playback state (thanks, @stricoff92!)
  • Tooling: Migrate the entire project from Node to Bun (tests, scripts, demos, CI/CD)
  • Tooling: Upgrade ESLint to v9 and Husky to v9

ts-audio v0.8.0

04 Jan 20:19
b4db8c4

Choose a tag to compare

ts-audio

ts-audio is a lightweight, agnostic library that makes it easy to work with AudioContext and build audio playlists in the browser.

What's new?

  • Audio: Implement destroy() method for proper resource cleanup and memory management
  • AudioPlaylist: Implement destroy() method for proper resource cleanup and memory management
  • Audio: Enhanced seek() reliability - now works consistently before and after playback starts

Destroy method example

import { Audio } from 'ts-audio'

const audio = Audio({
  file: 'path/to/audio.mp3',
  volume: 1,
  loop: false
})

audio.play()

// When you're done with the audio instance, clean up resources
audio.destroy()

// The destroy method will:
// - Stop playback
// - Disconnect audio nodes
// - Remove all event listeners
// - Release references for garbage collection

ts-audio v0.7.9

30 Aug 09:40

Choose a tag to compare

ts-audio

ts-audio is a lightweight, agnostic library that makes it easy to work with AudioContext and build audio playlists in the browser.

What's new?

  • Audio: Implement seek() method for precise playback positioning
  • Audio: Enhanced currentTime tracking with more accurate timing calculations
  • Documentation: README.md improvements with better examples and usage guidance
  • CI/CD: Improved pipeline with automated branch cleanup and enhanced workflow

New Seek Method Example

import { Audio } from 'ts-audio'

const audio = Audio({
  file: 'path/to/audio.mp3',
  volume: 1,
  loop: false
})

audio.play()

// Jump to 30 seconds into the track
audio.seek(30)

// Get current playback position
console.log(audio.currentTime) // Returns precise current time
console.log(audio.duration)    // Returns total track duration

The new seek() method allows developers to programmatically jump to any point in an audio file, while the improved currentTime tracking provides more precise timing information for better audio control.

Full Changelog: v0.7.8...v0.7.9

ts-audio v0.7.8

23 May 09:42

Choose a tag to compare

ts-audio

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Audio: Add support for setting initial playback time
  • Audio: Add getter properties for currentTime and duration

ts-audio v0.7.7

10 Feb 20:02

Choose a tag to compare

ts-audio

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Refactored audio module to use a class-based structure.

ts-audio v0.7.6

25 Jan 11:34

Choose a tag to compare

ts-audio

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Refactored playlist module to use a class-based structure.

ts-audio v0.7.5

26 Dec 14:44

Choose a tag to compare

ts-audio

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Refactored EventEmitter and EventHandler to use a class-based structure
  • Updated ESlint rules to force consistent type imports and order imports per groups
  • Updated Prettier and TypeScript to align with modern standard

ts-audio v0.7.4

31 Jan 20:00

Choose a tag to compare

ts-audio

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Reduced package size from 2.2kB to 1.6kB (Gzipped)
  • Added support to CommonJS and UMD bundles

Full Changelog: v0.7.2...v0.7.4

ts-audio v0.7.2

29 Nov 10:44

Choose a tag to compare

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • Refactored out both Audio and AudioPlaylist modules
  • Updated the AudioPlaylist module adding logic to support weighted files.
    • Note: If you pass files with a weighted structure, the playlist will be played in a loop and shuffled.
import { AudioPlaylist } from 'ts-audio';
import songOne from './1.mp3';
import songTwo from './2.mp3';
import songThree from './3.mp3'; 

const playlist = AudioPlaylist({
 files: { [songOne]: 1, [songTwo]: 5, [songThree]: 1 },
});

playlist.play(); // `songTwo` will play five times more often than `songOne` and `songTree`

ts-audio v0.7.1

07 Aug 09:08

Choose a tag to compare

ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser.

What's new?

  • audio.audioCtx: AudioContext
    Returns AudioContext object as read-only property

  • playlist.audioCtx: AudioContext
    Returns AudioContext object as read-only property from the currently playing audio