{"id":13563981,"url":"https://github.com/tedconf/node-m3u8","last_synced_at":"2025-04-05T12:03:08.744Z","repository":{"id":5281200,"uuid":"6460450","full_name":"tedconf/node-m3u8","owner":"tedconf","description":"Streaming parser for m3u8 files in node","archived":false,"fork":false,"pushed_at":"2021-11-22T16:14:40.000Z","size":55,"stargazers_count":188,"open_issues_count":16,"forks_count":79,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-03-29T11:07:01.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tedconf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-30T16:24:02.000Z","updated_at":"2025-02-18T08:40:04.000Z","dependencies_parsed_at":"2022-09-16T11:32:15.136Z","dependency_job_id":null,"html_url":"https://github.com/tedconf/node-m3u8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedconf%2Fnode-m3u8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedconf%2Fnode-m3u8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedconf%2Fnode-m3u8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedconf%2Fnode-m3u8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedconf","download_url":"https://codeload.github.com/tedconf/node-m3u8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332560,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:25.224Z","updated_at":"2025-04-05T12:03:08.728Z","avatar_url":"https://github.com/tedconf.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"m3u8\n====\n\nnode-m3u8 is a streaming m3u8 parser tailored for dealing with [Apple's HTTP\nLive Streaming protocol](http://tools.ietf.org/html/draft-pantos-http-live-streaming).\nIt may work for other m3u files, but I have not tested it for those uses.\n\nexample\n-------\n\n``` js\nvar m3u8 = require('m3u8');\nvar fs   = require('fs');\n\nvar parser = m3u8.createStream();\nvar file   = fs.createReadStream('/path/to/file.m3u8');\nfile.pipe(parser);\n\nparser.on('item', function(item) {\n  // emits PlaylistItem, MediaItem, StreamItem, and IframeStreamItem\n});\nparser.on('m3u', function(m3u) {\n  // fully parsed m3u file\n});\n```\n\nAll items and the m3u object have `toString()` methods for conversion to m3u8.\nAttributes and properties have getter/setters on m3u and item objects:\n\n```\nparser.on('item', function(item) {\n  var duration = item.get('bandwidth');\n  item.set('uri', 'http://example.com/' + item.get('uri'));\n});\n```\n\nThe M3U and Item objects are available on m3u8:\n```\nvar m3u8 = require('m3u8');\n\nvar m3u = m3u8.M3U.create();\nm3u.addPlaylistItem({\n  duration : 10,\n  uri      : 'file'\n});\n```\n\nSee tests for more usage patterns.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedconf%2Fnode-m3u8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedconf%2Fnode-m3u8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedconf%2Fnode-m3u8/lists"}