0.2.1 • Published 8 years ago

m3ujs v0.2.1

Weekly downloads
7
License
MIT
Repository
github
Last release
8 years ago

m3ujs

GitHub license Travis Coveralls branch David David npm Commitizen friendly

Create m3u files.

Features

  • Write relative or absolute m3u files
  • Support m3u and extm3u format
  • Add extm3u displayName based on id3 tag info

Usage

Installation

Install as npm package:

npm install m3ujs --save

Install latest development version:

npm install m3ujs@next --save

API

import { Playlist } from 'm3ujs/playlist';
import { Mp3Entry } from 'm3ujs/mp3-entry';
import { TypeEXTM3U } from 'm3ujs/type';

const playlist = new Playlist(new TypeEXTM3U(entry => {
  if (entry instanceof Mp3Entry) {
    return `${entry.artist} - ${entry.album} - ${entry.track} - ${entry.title}`;
  }
  return entry.displayName;
}));
playlist.add(new Mp3Entry('/path/to/test.mp3'));
playlist.write('/pat/to/playlist.m3u');
0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago