-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpackets.RtcpPacket.html
More file actions
103 lines (102 loc) · 37.5 KB
/
packets.RtcpPacket.html
File metadata and controls
103 lines (102 loc) · 37.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RtcpPacket | 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="../modules/packets.html">packets</a></li><li><a href="packets.RtcpPacket.html">RtcpPacket</a></li></ul><h1>Class RtcpPacket<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>RTCP packet. Parent class of all RTCP packets.</p>
<pre><code class="text"> 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
header |V=2|P| SC | PT | length |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
</code><button type="button">Copy</button></pre>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link"><a id="see" class="tsd-anchor"></a>See<a href="#see" 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></h4><ul>
<li><a href="https://datatracker.ietf.org/doc/html/rfc3550#section-6.1">RFC 3550 section 6.1</a></li>
</ul>
</div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="349"><h4>Hierarchy (<a href="../hierarchy.html#packets.RtcpPacket">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="packets.Packet.html" class="tsd-signature-type tsd-kind-class">Packet</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">RtcpPacket</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="packets.ReceiverReportPacket.html" class="tsd-signature-type tsd-kind-class">ReceiverReportPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.SenderReportPacket.html" class="tsd-signature-type tsd-kind-class">SenderReportPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.ByePacket.html" class="tsd-signature-type tsd-kind-class">ByePacket</a></li><li class="tsd-hierarchy-item"><a href="packets.SdesPacket.html" class="tsd-signature-type tsd-kind-class">SdesPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.FeedbackPacket.html" class="tsd-signature-type tsd-kind-class">FeedbackPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.XrPacket.html" class="tsd-signature-type tsd-kind-class">XrPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.ExtendedJitterReportsPacket.html" class="tsd-signature-type tsd-kind-class">ExtendedJitterReportsPacket</a></li><li class="tsd-hierarchy-item"><a href="packets.GenericPacket.html" class="tsd-signature-type tsd-kind-class">GenericPacket</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/RTCP/RtcpPacket.ts#L198">packets/RTCP/RtcpPacket.ts:198</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="packets.RtcpPacket.html#clone" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clone</span></a>
<a href="packets.RtcpPacket.html#dump" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a>
<a href="packets.RtcpPacket.html#getbytelength" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Byte<wbr/>Length</span></a>
<a href="packets.RtcpPacket.html#getcount" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Count</span></a>
<a href="packets.RtcpPacket.html#getpackettype" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Packet<wbr/>Type</span></a>
<a href="packets.RtcpPacket.html#getpadding" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Padding</span></a>
<a href="packets.RtcpPacket.html#getview" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>View</span></a>
<a href="packets.RtcpPacket.html#needsserialization" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Serialization</span></a>
<a href="packets.RtcpPacket.html#padto4bytes" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pad<wbr/>To4<wbr/>Bytes</span></a>
<a href="packets.RtcpPacket.html#serialize" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>serialize</span></a>
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="clone" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Abstract</code><span>clone</span><a href="#clone" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="clone-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clone</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">buffer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">serializationBuffer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">serializationByteOffset</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="packets.Serializable.html" class="tsd-signature-type tsd-kind-class">Serializable</a><a href="#clone-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clone the packet or item. The cloned instance does not share any memory
with the original one. The cloned instance is a new class instance
referencing a different buffer.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">buffer</span>: <span class="tsd-signature-type">ArrayBuffer</span></span><div class="tsd-comment tsd-typography"><p>Buffer in which the content will be cloned. If not given, a
new one will internally allocated.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">byteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Byte offset of the given <code>buffer</code> where clonation will
start.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">serializationBuffer</span>: <span class="tsd-signature-type">ArrayBuffer</span></span><div class="tsd-comment tsd-typography"><p>Buffer in which the content will be serialized
in case serialization is needed. If not given, a new one will internally
allocated.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">serializationByteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Byte offset of the given
<code>serializationBuffer</code> where serialization (if needed) will start.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="packets.Serializable.html" class="tsd-signature-type tsd-kind-class">Serializable</a></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks" class="tsd-anchor"></a>Remarks<a href="#remarks" 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></h4><ul>
<li>The buffer is serialized if needed (to apply pending modifications) by
internally calling <a href="packets.Serializable.html#serialize" class="tsd-kind-method">serialize</a>.</li>
</ul>
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" 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></h4><ul>
<li>If serialization is needed and it fails.</li>
<li>If given <code>buffer</code> doesn't have space enough to clone the content.</li>
<li>If given <code>serializationBuffer</code> doesn't have space enough to serialize
the content.</li>
</ul>
</div></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#clone">clone</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Serializable.ts#L134">packets/Serializable.ts:134</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="dump" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dump</span><a href="#dump" 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></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dump-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dump</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../types/packets.RtcpPacketDump.html" class="tsd-signature-type tsd-kind-type-alias">RtcpPacketDump</a><a href="#dump-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Base RTCP packet dump.</p>
</div><h4 class="tsd-returns-title">Returns <a href="../types/packets.RtcpPacketDump.html" class="tsd-signature-type tsd-kind-type-alias">RtcpPacketDump</a></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-1" class="tsd-anchor"></a>Remarks<a href="#remarks-1" 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></h4><ul>
<li>Read the info dump type of each RTCP packet instead.</li>
</ul>
</div></div><aside class="tsd-sources"><p>Overrides <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#dump">dump</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/RTCP/RtcpPacket.ts#L245">packets/RTCP/RtcpPacket.ts:245</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="getbytelength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Abstract</code><span>get<wbr/>Byte<wbr/>Length</span><a href="#getbytelength" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="getbytelength-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getByteLength</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#getbytelength-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Computes total length of the content (in bytes) including padding if any.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-2" class="tsd-anchor"></a>Remarks<a href="#remarks-2" 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></h4><ul>
<li>This methods computes the effective byte length of the content as if it
was serialized at this moment, no matter modifications have been done
before.</li>
</ul>
</div></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#getbytelength">getByteLength</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Serializable.ts#L73">packets/Serializable.ts:73</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getcount" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Count</span><a href="#getcount" 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></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getcount-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getCount</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#getcount-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get the RTCP header count value.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-3" class="tsd-anchor"></a>Remarks<a href="#remarks-3" 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></h4><ul>
<li>Some RTCP packets do not use this byte (the second one in the common
RTCP header) for counting chunks or items.</li>
</ul>
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/RTCP/RtcpPacket.ts#L267">packets/RTCP/RtcpPacket.ts:267</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getpackettype" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Packet<wbr/>Type</span><a href="#getpackettype" 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></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getpackettype-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getPacketType</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../enums/packets.RtcpPacketType.html" class="tsd-signature-type tsd-kind-enum">RtcpPacketType</a><a href="#getpackettype-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get the RTCP packet type.</p>
</div><h4 class="tsd-returns-title">Returns <a href="../enums/packets.RtcpPacketType.html" class="tsd-signature-type tsd-kind-enum">RtcpPacketType</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/RTCP/RtcpPacket.ts#L256">packets/RTCP/RtcpPacket.ts:256</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="getpadding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Padding</span><a href="#getpadding" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="getpadding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getPadding</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#getpadding-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get the padding (in bytes) at the end of the packet.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#getpadding">getPadding</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Packet.ts#L48">packets/Packet.ts:48</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="getview" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>View</span><a href="#getview" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="getview-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getView</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">serializationBuffer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">serializationByteOffset</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DataView</span><a href="#getview-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get a buffer view containing the serialized content of the packet or item.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">serializationBuffer</span>: <span class="tsd-signature-type">ArrayBuffer</span></span><div class="tsd-comment tsd-typography"><p>Buffer in which the content will be serialized
in case serialization is needed. If not given, a new one will internally
allocated.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">serializationByteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Byte offset of the given <code>serializationBuffer</code>
where serialization (if needed) will start.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">DataView</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-4" class="tsd-anchor"></a>Remarks<a href="#remarks-4" 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></h4><ul>
<li>The internal buffer is serialized if needed (to apply pending
modifications) by internally calling <a href="packets.Serializable.html#serialize" class="tsd-kind-method">serialize</a>.</li>
</ul>
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-1" class="tsd-anchor"></a>Throws<a href="#throws-1" 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></h4><ul>
<li>If buffer serialization is needed and it fails due to invalid
content.</li>
</ul>
</div></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#getview">getView</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Serializable.ts#L54">packets/Serializable.ts:54</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="needsserialization" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>needs<wbr/>Serialization</span><a href="#needsserialization" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="needsserialization-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">needsSerialization</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#needsserialization-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether serialization is needed, meaning that the current buffer view
doesn't represent the current content of the packet or item (due to
modifications not applied yet). Calling <a href="packets.Serializable.html#serialize" class="tsd-kind-method">serialize</a> or <a href="packets.Serializable.html#getview" class="tsd-kind-method">getView</a>
will serialize the packet or the item.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#needsserialization">needsSerialization</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Serializable.ts#L81">packets/Serializable.ts:81</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="padto4bytes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pad<wbr/>To4<wbr/>Bytes</span><a href="#padto4bytes" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="padto4bytes-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">padTo4Bytes</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#padto4bytes-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pad the packet total length to 4 bytes. To achieve it, this method may add
or remove bytes of padding.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-5" class="tsd-anchor"></a>Remarks<a href="#remarks-5" 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></h4><ul>
<li>Serialization maybe needed after calling this method.</li>
</ul>
</div></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#padto4bytes">padTo4Bytes</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Packet.ts#L59">packets/Packet.ts:59</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="serialize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Abstract</code><span>serialize</span><a href="#serialize" 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></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="serialize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">serialize</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buffer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#serialize-1" 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></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Apply pending changes and serialize the content of the packet or item into
a new buffer.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">buffer</span>: <span class="tsd-signature-type">ArrayBuffer</span></span><div class="tsd-comment tsd-typography"><p>Buffer in which the content will be serialized. If not
given, a new one will internally allocated.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">byteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Byte offset of the given <code>buffer</code> where serialization
will start.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link"><a id="remarks-6" class="tsd-anchor"></a>Remarks<a href="#remarks-6" 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></h4><ul>
<li>In most cases there is no need to use this method since many setter
methods apply changes within the current buffer. To be sure, check
<a href="packets.Serializable.html#needsserialization" class="tsd-kind-method">needsSerialization</a> before.</li>
</ul>
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-2" class="tsd-anchor"></a>Throws<a href="#throws-2" 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></h4><ul>
<li>If serialization fails due to invalid content previously added.</li>
<li>If given <code>buffer</code> doesn't have space enough to serialize the content.</li>
<li>If the <code>buffer</code> member of the given <code>ArrayBuffer</code> is the same than the
internal buffer in this packet and the given <code>byteOffset</code> would make
the serialization happen in bytes currently used by the packet (this would
corrupt the packet).</li>
</ul>
</div></div><aside class="tsd-sources"><p>Inherited from <a href="packets.Packet.html">Packet</a>.<a href="packets.Packet.html#serialize">serialize</a></p><ul><li>Defined in <a href="https://github.com/versatica/rtp.js/blob/b68d65267ca9ee7ab7c8da9c4078309744ab0e39/src/packets/Serializable.ts#L107">packets/Serializable.ts:107</a></li></ul></aside></div></li></ul></section></section></details></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"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#clone" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clone</span></a><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#getbytelength" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Byte<wbr/>Length</span></a><a href="#getcount" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Count</span></a><a href="#getpackettype" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Packet<wbr/>Type</span></a><a href="#getpadding" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Padding</span></a><a href="#getview" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>View</span></a><a href="#needsserialization" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Serialization</span></a><a href="#padto4bytes" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pad<wbr/>To4<wbr/>Bytes</span></a><a href="#serialize" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>serialize</span></a></div></details></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>