[![Build Status](https://travis-ci.org/Eyevinn/hls-ts-js.svg?branch=master)](https://travis-ci.org/Eyevinn/hls-ts-js) [![Coverage Status](https://coveralls.io/repos/github/Eyevinn/hls-ts-js/badge.svg?branch=master)](https://coveralls.io/github/Eyevinn/hls-ts-js?branch=master) A Javascript library to parse Apple HLS MPEG Transport Stream segments ## Usage (Node JS) ``` npm install --save hls-ts ``` The library implements the `Writable` stream interface and acts a a "sink". For example to download and parse an HLS MPEG Transport Stream segment: ``` const request = require("request"); const hlsTs = require("hls-ts"); request.get("http://example.com/seg10.ts") .pipe(hlsTs.parse()) .on("finish", function() { // Obtain all programs found in the Transport Stream const programs = hlsTs.programs; // Obtain all packets for a specific program stream const avcPackets = hlsTs.getPacketsByProgramType("avc"); // Obtain the payload for a program stream const avcPayload = hlsTs.getDataStreamByProgramType("avc"); // where avcPayload.data is a Uint8Array const avcParser = hlsTs.createAvcParser(avcPayload); // Obtain NAL units const nalUnits = avcParser.getNalUnits(); }); ``` ## Usage (Browser version) ``` ``` ## API Documentation Find API documentation here: https://inspect.eyevinn.technology/docs/index.html ## Contributing All contributions are welcome but before you submit a Pull Request make sure you follow the same code conventions and that you have written unit tests ## About Eyevinn Technology Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor. At Eyevinn, every software developer consultant has a dedicated budget reserved for open source development and contribution to the open source community. This give us room for innovation, team building and personal competence development. And also gives us as a company a way to contribute back to the open source community. Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!