mwg API
    Preparing search index...

    Function reportUnderruns

    • Forwards audio underruns to a telemetry sink as audio_underrun events, counted and summed so a bad minute is one event, not a thousand: each event carries count, lateSeconds and source (stream, core, or mixed), and no more than one leaves per minIntervalMs. The sink's own consent gate still applies (TelemetryClient sends nothing before the player agrees). flush sends what is waiting; stop flushes and unsubscribes.

      Parameters

      Returns { flush(): void; stop(): void }

      import { TelemetryClient } from '@datamoc/mwg/core';
      import { reportUnderruns } from '@datamoc/mwg/audio';

      const telemetry = new TelemetryClient({ endpoint: 'https://example.com/api/telemetry' });
      const reporter = reportUnderruns(telemetry);
      reporter.stop();