m3u8-parser
m3u8-parser copied to clipboard
parse title from extinf
Hi there,
how can I parse title from the extint? reference
I create
parser.addParser({
expression: /#EXTINF/,
customType: 'audio',
segment: true,
dataParser: function (line) {
const valuePart = line.split(':')
const values = valuePart[1].split(',')
const duration = parseFloat(values[0])
const title = values[1]
return {
duration,
title
};
}
});
but only work for the last item, and the segment doesn't contain anything
Looks like we don't read it and set it out on the output here https://github.com/videojs/m3u8-parser/blob/07bd668ddb5070fff57f5e5fe86959e18f49c4e3/src/parser.js#L106-L131