streamTracking()
function streamTracking(match, options?): AsyncGenerator<SkillCornerFrame, void, undefined>;Defined in: packages/data-providers/src/skillcorner/load.ts:209
Stream a match's tracking frames, yielding each as it arrives.
A full file is around 90 MB and 60,000 frames at 10 fps, so this is the
default way to read one: the async iterator lets a caller stop early, and
breaking out aborts the underlying response rather than downloading the
rest.
const match = await fetchMatch(1874553);
const opening: SkillCornerFrame[] = [];
for await (const frame of streamTracking(match)) {
if (frame.period !== null) opening.push(frame);
if (opening.length >= 300) break; // 30 seconds; download stops here
}Parameters
| Parameter | Type |
|---|---|
match | SkillCornerMatch |
options | SkillCornerLoadOptions |
Returns
AsyncGenerator<SkillCornerFrame, void, undefined>