streamTracking()
function streamTracking(game, options?): AsyncGenerator<MetricaFrame, void, undefined>;Defined in: packages/data-providers/src/metrica/load.ts:135
Stream a sample game's tracking frames, both teams merged, yielding each as it arrives.
The two teams' files are read side by side, a row from each per frame.
breaking out of the loop cancels both downloads.
const opening: MetricaFrame[] = [];
for await (const frame of streamTracking(1)) {
opening.push(frame);
if (opening.length >= 250) break; // ten seconds; both downloads stop here
}Parameters
| Parameter | Type |
|---|---|
game | number |
options | MetricaLoadOptions |
Returns
AsyncGenerator<MetricaFrame, void, undefined>