Releases: profullstack/player
Release list
v0.7.0 — take entries as they parse, instead of holding the catalogue
parseM3uStream never held the file, but it did hold every entry it kept. On the list that prompted this, 583MB and roughly 2.6 million entries, that array alone is more heap than a container has. The byte ceiling the two sites enforce upstream was really guarding this array, so it was a heap ceiling wearing a disguise.
Now: pass onEntries and the parse holds nothing across chunks. It is handed what each chunk produced and then forgets it, and it is awaited rather than called per entry, because push is synchronous and a consumer writing to a database has to be able to make the parse wait. That is what bounds an import to one batch of memory whatever the size of the list. drain() is the same thing on the line-at-a-time parser, and kept counts across drains so a drained parser does not forget it was full and start the ceiling again from zero.
max of 0 or NaN now means unlimited rather than keep-nothing. An unset PLAYLIST_MAX_CHANNELS parses to 0, and reading that literally would turn a missing config line into an import that succeeds and stores no channels, which is the one failure mode nothing reports.
A caller that passes neither onEntries nor max sees no change: MAX_CHANNELS still defaults to 300,000.
Full detail in #8. pnpm test: 125 pass, 0 fail. tsc --noEmit clean.
v0.6.0 — an audio option, for a station that is HLS but has no picture
The audio shape was inferred from the source alone: an .mp3 got the compact bar and everything else got a 16:9 stage. A SiriusXM channel is an .m3u8 whose playlist carries nothing but AAC, and it was drawn as a black stage with a LIVE badge over a picture that never arrives.
Now: createPlayer takes audio: true, and infers it when the element passed as media is an <audio>. A caller that passes neither sees no change.
Full detail in #7. pnpm test: 119 pass, 0 fail.