JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q29821F
  • License MIT

A getStats API of peerconnection with 'Standardized' and 'Legacy Non-Standard' reports.

Package Exports

  • peerconnection-stats

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (peerconnection-stats) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Peerconnection getStats API

English | 中文

A getStats API of peerconnection with Standardized and Legacy Non-Standard reports, and it will normalized the output.

Examples

For more APIs, see DOCS

getStats

getStats(peerconnection)
  .then((originalReports: OriginalReports) => {
    const reports: AudioInputReports = new AudioInputReports(originalReports);
    console.log(reports.bytesReceived);
    ...
  })
  .catch(err => {
    ...
  });

getLegacyStats

getLegacyStats(peerconnection)
  .then((originalReports: OriginalReports) => {
    const reports: AudioInputLegacyReports = new AudioInputLegacyReports(originalReports);
    console.log(reports.bytesReceived);
    ...
  })
  .catch(err => {
    ...
  });