@iptv/playlist - v1.1.1
    Preparing search index...

    Function writeM3U

    • writeM3U

      Converts an M3uPlaylist object to an M3U file

      Parameters

      • playlist: M3uPlaylist

        The M3uPlaylist object to convert

      Returns string

      import { writeM3U } from "@iptv/playlist";

      const playlist = {
      headers: {
      "x-tvg-url": "http://example.com/tvg.xml",
      },
      channels: [{
      tvgId: "1",
      tvgName: "Channel 1",
      tvgLanguage: "English",
      tvgLogo: "http://example.com/logo.png",
      groupTitle: "News",
      name: "Channel 1",
      url: "http://server:port/channel1",
      }],
      };

      const m3u = writeM3U(playlist);