Nightly Perpetrated Mischief

    m3ujs
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.1 • Public • Published

    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');

    Keywords

    Install

    npm i m3ujs

    DownloadsWeekly Downloads

    12

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • knisterpeter