peerconnection-stats
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

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 => {
    ...
  });

Package Sidebar

Install

npm i peerconnection-stats

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

42.9 kB

Total Files

13

Last publish

Collaborators

  • poplark