Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ indent_style = tab

[*.json]
indent_style = tab

[*.md]
indent_style = tab
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ npm install rtp.js
const view = utils.stringToDataView('foo');
```

- CommonJS is also supported:

```ts
const { packets, utils } = require('rtp.js');
```

## Authors

- Iñaki Baz Castillo [[website](https://inakibaz.me)|[github](https://github.com/ibc/)]
Expand Down
10 changes: 10 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This is needed for Jest tests only.
*/

module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
};
2 changes: 1 addition & 1 deletion docs/assets/hierarchy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -991,14 +991,15 @@
vertical-align: text-top;
}
/*
We need to be careful to target the arrow indicating whether the accordion
is open, but not any other SVGs included in the details element.
*/
* We need to be careful to target the arrow indicating whether the accordion
* is open, but not any other SVGs included in the details element.
*/
.tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child,
.tsd-accordion:not([open]) > .tsd-accordion-summary > h1 > svg:first-child,
.tsd-accordion:not([open]) > .tsd-accordion-summary > h2 > svg:first-child,
.tsd-accordion:not([open]) > .tsd-accordion-summary > h3 > svg:first-child,
.tsd-accordion:not([open]) > .tsd-accordion-summary > h4 > svg:first-child {
.tsd-accordion:not([open]) > .tsd-accordion-summary > h4 > svg:first-child,
.tsd-accordion:not([open]) > .tsd-accordion-summary > h5 > svg:first-child {
transform: rotate(-90deg);
}
.tsd-index-content > :not(:first-child) {
Expand Down
94 changes: 47 additions & 47 deletions docs/classes/packets.ByePacket.html

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions docs/classes/packets.CompoundPacket.html

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions docs/classes/packets.DlrrExtendedReport.html

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions docs/classes/packets.DrleExtendedReport.html

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions docs/classes/packets.EcnExtendedReport.html

Large diffs are not rendered by default.

146 changes: 73 additions & 73 deletions docs/classes/packets.EcnPacket.html

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions docs/classes/packets.ExtendedJitterReportsPacket.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions docs/classes/packets.ExtendedReport.html

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions docs/classes/packets.FeedbackPacket.html

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions docs/classes/packets.GenericExtendedReport.html

Large diffs are not rendered by default.

100 changes: 50 additions & 50 deletions docs/classes/packets.GenericFeedbackPacket.html

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions docs/classes/packets.GenericPacket.html

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions docs/classes/packets.LrleExtendedReport.html

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions docs/classes/packets.NackPacket.html

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions docs/classes/packets.Packet.html

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions docs/classes/packets.PliPacket.html

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions docs/classes/packets.PrtExtendedReport.html

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions docs/classes/packets.ReceiverReportPacket.html

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions docs/classes/packets.ReceptionReport.html

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions docs/classes/packets.RpsiPacket.html

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions docs/classes/packets.RrtExtendedReport.html

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions docs/classes/packets.RtcpPacket.html

Large diffs are not rendered by default.

258 changes: 129 additions & 129 deletions docs/classes/packets.RtpPacket.html

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions docs/classes/packets.SdesChunk.html

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions docs/classes/packets.SdesPacket.html

Large diffs are not rendered by default.

134 changes: 67 additions & 67 deletions docs/classes/packets.SenderReportPacket.html

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions docs/classes/packets.Serializable.html

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions docs/classes/packets.SliPacket.html

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions docs/classes/packets.SrReqPacket.html

Large diffs are not rendered by default.

176 changes: 88 additions & 88 deletions docs/classes/packets.SsExtendedReport.html

Large diffs are not rendered by default.

236 changes: 118 additions & 118 deletions docs/classes/packets.VmExtendedReport.html

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions docs/classes/packets.XrPacket.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/documents/README.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>README | rtp.js - v0.13.1</title><meta name="description" content="Documentation for rtp.js"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1737630674700"/><link rel="stylesheet" href="../assets/highlight.css?cache=1737630674700"/><link rel="stylesheet" href="../assets/custom.css?cache=1737630674700"/><script defer src="../assets/main.js?cache=1737630674700"></script><script async src="../assets/icons.js?cache=1737630674700" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1737630674700" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1737630674700" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js?cache=1737630674700" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"><a href="https://github.com/versatica/rtp.js">GitHub</a><a href="https://www.npmjs.com/package/rtp.js">NPM</a></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">rtp.js - v0.13.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">rtp.js</a></li><li><a href="README.html">README</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="rtpjs" class="tsd-anchor"></a><h1 class="tsd-anchor-link">rtp.js<a href="#rtpjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://npmjs.org/package/rtp.js"><img src="https://img.shields.io/npm/v/rtp.js.svg" alt=""></a>
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>README | rtp.js - v0.13.1</title><meta name="description" content="Documentation for rtp.js"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1741811046720"/><link rel="stylesheet" href="../assets/highlight.css?cache=1741811046720"/><link rel="stylesheet" href="../assets/custom.css?cache=1741811046720"/><script defer src="../assets/main.js?cache=1741811046720"></script><script async src="../assets/icons.js?cache=1741811046720" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1741811046720" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1741811046720" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js?cache=1741811046720" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"><a href="https://github.com/versatica/rtp.js">GitHub</a><a href="https://www.npmjs.com/package/rtp.js">NPM</a></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">rtp.js - v0.13.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">rtp.js</a></li><li><a href="README.html">README</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="rtpjs" class="tsd-anchor"></a><h1 class="tsd-anchor-link">rtp.js<a href="#rtpjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://npmjs.org/package/rtp.js"><img src="https://img.shields.io/npm/v/rtp.js.svg" alt=""></a>
<a href="https://github.com/versatica/rtp.js/actions/workflows/rtp.js.yaml"><img src="https://github.com/versatica/rtp.js/actions/workflows/rtp.js.yaml/badge.svg" alt=""></a></p>
<p>RTP stack for Node.js and browser written in TypeScript. <strong>rtp.js</strong> provides with an API to parse, generate and modify RTP and RTCP packets.</p>
<a id="installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="text">npm install rtp.js
<a id="installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="text">npm install rtp.js
</code><button type="button">Copy</button></pre>

<a id="usage" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Usage<a href="#usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
<a id="usage" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Usage<a href="#usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
<li>
<p><a href="https://versatica.github.io/rtp.js">API documentation</a></p>
</li>
Expand All @@ -21,9 +21,9 @@

</li>
</ul>
<a id="authors" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Authors<a href="#authors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
<li>Iñaki Baz Castillo [<a href="https://inakibaz.me"> website </a>|<a href="https://github.com/ibc"> github </a>]</li>
<li>José Luis Millán [<a href="https://github.com/jmillan"> github </a>]</li>
<a id="authors" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Authors<a href="#authors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
<li>Iñaki Baz Castillo [<a href="https://inakibaz.me">website</a>|<a href="https://github.com/ibc/">github</a>]</li>
<li>José Luis Millán [<a href="https://github.com/jmillan/">github</a>]</li>
</ul>
<a id="license" class="tsd-anchor"></a><h2 class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><a href="../media/LICENSE">ISC</a></p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#rtpjs"><span>rtp.js</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#usage"><span>Usage</span></a></li><li><a href="#authors"><span>Authors</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/versatica/rtp.js" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/rtp.js" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">rtp.js - v0.13.1</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
<a id="license" class="tsd-anchor"></a><h2 class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><a href="../media/LICENSE">ISC</a></p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#rtpjs"><span>rtp.js</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#usage"><span>Usage</span></a></li><li><a href="#authors"><span>Authors</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/versatica/rtp.js" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/rtp.js" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">rtp.js - v0.13.1</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
Loading