Skip to content

Commit

Permalink
No longer try to reuse inactive transcievers to fix stale frame on FF (
Browse files Browse the repository at this point in the history
  • Loading branch information
hensmi-amazon authored Jan 24, 2022
1 parent 6149fd8 commit 3edc88b
Show file tree
Hide file tree
Showing 16 changed files with 3,498 additions and 2,892 deletions.
21 changes: 6 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Removed

### Fixed
- Fix the bug that the max bandwidth is ignored if the chooseVideoInputQuality API is called before starting a meeting.
- Fix the bug that the max bandwidth set by the chooseVideoInputQuality API is ignored when the Chime SDK retries the connection.
- Added additional pausing of `MonitorTask` and `ReceiveVideoStreamIndexTask` to avoid modifying mutable state mid-subscribe

### Changed

## [2.26.0] - 2022-01-14

### Added

### Removed

### Changed
- Made `SimulcastUplinkObserver.encodingSimulcastLayersDidChange` (*not* `AudioVideoObserver.encodingSimulcastLayersDidChange`) synchronous.

### Fixed
- Fixed delays in advertising simulcast stream switches due to asynchronous and out of order checks
- Fixed Firefox video tiles containing stale frames from previous transceivers by not attempting to reuse inactive transceivers. This switches to using `RTCRtpTransceiver.stop` when possible and may fix other incorrect tile bugs.
- Fix the bug that the max bandwidth set by the chooseVideoInputQuality API is ignored when the Chime SDK retries the connection.
- Added additional pausing of `MonitorTask` and `ReceiveVideoStreamIndexTask` to avoid modifying mutable state mid-subscribe
- Fix the bug that the max bandwidth is ignored if the chooseVideoInputQuality API is called before starting a meeting.

## [2.25.0] - 2022-01-11
### Added
Expand Down
5,636 changes: 2,822 additions & 2,814 deletions docs/assets/js/search.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/classes/defaultsdp.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ <h3>Methods</h3>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#preferh264ifexists" class="tsd-kind-icon">prefer<wbr>H264<wbr>IfExists</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#removeh264supportfromsendsection" class="tsd-kind-icon">remove<wbr>H264<wbr>Support<wbr>From<wbr>Send<wbr>Section</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#ssrcforvideosendingsection" class="tsd-kind-icon">ssrc<wbr>For<wbr>Video<wbr>Sending<wbr>Section</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#videosectiondirections" class="tsd-kind-icon">video<wbr>Section<wbr>Directions</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#videosendsectionhasdifferentssrc" class="tsd-kind-icon">video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#withaudiomaxaveragebitrate" class="tsd-kind-icon">with<wbr>Audio<wbr>Max<wbr>Average<wbr>Bitrate</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="defaultsdp.html#withbandwidthrestriction" class="tsd-kind-icon">with<wbr>Bandwidth<wbr>Restriction</a></li>
Expand Down Expand Up @@ -397,6 +398,24 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="videosectiondirections" class="tsd-anchor"></a>
<h3>video<wbr>Section<wbr>Directions</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">video<wbr>Section<wbr>Directions<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RTCRtpTransceiverDirection</span><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/sdp.html">SDP</a>.<a href="../interfaces/sdp.html#videosectiondirections">videoSectionDirections</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/sdp/DefaultSDP.ts#L623">src/sdp/DefaultSDP.ts:623</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">RTCRtpTransceiverDirection</span><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="videosendsectionhasdifferentssrc" class="tsd-anchor"></a>
<h3>video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</h3>
Expand Down Expand Up @@ -991,6 +1010,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="defaultsdp.html#ssrcforvideosendingsection" class="tsd-kind-icon">ssrc<wbr>For<wbr>Video<wbr>Sending<wbr>Section</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="defaultsdp.html#videosectiondirections" class="tsd-kind-icon">video<wbr>Section<wbr>Directions</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="defaultsdp.html#videosendsectionhasdifferentssrc" class="tsd-kind-icon">video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/defaulttransceivercontroller.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h3>get<wbr>Mid<wbr>For<wbr>Stream<wbr>Id</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#getmidforstreamid">getMidForStreamId</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L294">src/transceivercontroller/DefaultTransceiverController.ts:294</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L373">src/transceivercontroller/DefaultTransceiverController.ts:373</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -455,7 +455,7 @@ <h3>set<wbr>Stream<wbr>IdFor<wbr>Mid</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#setstreamidformid">setStreamIdForMid</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L298">src/transceivercontroller/DefaultTransceiverController.ts:298</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L377">src/transceivercontroller/DefaultTransceiverController.ts:377</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -571,7 +571,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> transceiver<wbr>IsV
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L308">src/transceivercontroller/DefaultTransceiverController.ts:308</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L387">src/transceivercontroller/DefaultTransceiverController.ts:387</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/simulcasttransceivercontroller.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ <h3>get<wbr>Mid<wbr>For<wbr>Stream<wbr>Id</h3>
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#getmidforstreamid">getMidForStreamId</a></p>
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#getmidforstreamid">getMidForStreamId</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L294">src/transceivercontroller/DefaultTransceiverController.ts:294</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L373">src/transceivercontroller/DefaultTransceiverController.ts:373</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -526,7 +526,7 @@ <h3>set<wbr>Stream<wbr>IdFor<wbr>Mid</h3>
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#setstreamidformid">setStreamIdForMid</a></p>
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#setstreamidformid">setStreamIdForMid</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L298">src/transceivercontroller/DefaultTransceiverController.ts:298</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L377">src/transceivercontroller/DefaultTransceiverController.ts:377</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -647,7 +647,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> transceiver<wbr>IsV
<aside class="tsd-sources">
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#transceiverisvideo">transceiverIsVideo</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L308">src/transceivercontroller/DefaultTransceiverController.ts:308</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L387">src/transceivercontroller/DefaultTransceiverController.ts:387</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/videoonlytransceivercontroller.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h3>get<wbr>Mid<wbr>For<wbr>Stream<wbr>Id</h3>
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#getmidforstreamid">getMidForStreamId</a></p>
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#getmidforstreamid">getMidForStreamId</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L294">src/transceivercontroller/DefaultTransceiverController.ts:294</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L373">src/transceivercontroller/DefaultTransceiverController.ts:373</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -471,7 +471,7 @@ <h3>set<wbr>Stream<wbr>IdFor<wbr>Mid</h3>
<p>Implementation of <a href="../interfaces/transceivercontroller.html">TransceiverController</a>.<a href="../interfaces/transceivercontroller.html#setstreamidformid">setStreamIdForMid</a></p>
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#setstreamidformid">setStreamIdForMid</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L298">src/transceivercontroller/DefaultTransceiverController.ts:298</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L377">src/transceivercontroller/DefaultTransceiverController.ts:377</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -592,7 +592,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> transceiver<wbr>IsV
<aside class="tsd-sources">
<p>Inherited from <a href="defaulttransceivercontroller.html">DefaultTransceiverController</a>.<a href="defaulttransceivercontroller.html#transceiverisvideo">transceiverIsVideo</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L308">src/transceivercontroller/DefaultTransceiverController.ts:308</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/transceivercontroller/DefaultTransceiverController.ts#L387">src/transceivercontroller/DefaultTransceiverController.ts:387</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
26 changes: 26 additions & 0 deletions docs/interfaces/sdp.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ <h3>Methods</h3>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#preferh264ifexists" class="tsd-kind-icon">prefer<wbr>H264<wbr>IfExists</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#removeh264supportfromsendsection" class="tsd-kind-icon">remove<wbr>H264<wbr>Support<wbr>From<wbr>Send<wbr>Section</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#ssrcforvideosendingsection" class="tsd-kind-icon">ssrc<wbr>For<wbr>Video<wbr>Sending<wbr>Section</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#videosectiondirections" class="tsd-kind-icon">video<wbr>Section<wbr>Directions</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#videosendsectionhasdifferentssrc" class="tsd-kind-icon">video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#withaudiomaxaveragebitrate" class="tsd-kind-icon">with<wbr>Audio<wbr>Max<wbr>Average<wbr>Bitrate</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="sdp.html#withbandwidthrestriction" class="tsd-kind-icon">with<wbr>Bandwidth<wbr>Restriction</a></li>
Expand Down Expand Up @@ -298,6 +299,28 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="videosectiondirections" class="tsd-anchor"></a>
<h3>video<wbr>Section<wbr>Directions</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">video<wbr>Section<wbr>Directions<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RTCRtpTransceiverDirection</span><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/sdp/SDP.ts#L91">src/sdp/SDP.ts:91</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>List of directions of video sections in order.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">RTCRtpTransceiverDirection</span><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="videosendsectionhasdifferentssrc" class="tsd-anchor"></a>
<h3>video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</h3>
Expand Down Expand Up @@ -522,6 +545,9 @@ <h4 class="tsd-returns-title">Returns <a href="sdp.html" class="tsd-signature-ty
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="sdp.html#ssrcforvideosendingsection" class="tsd-kind-icon">ssrc<wbr>For<wbr>Video<wbr>Sending<wbr>Section</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="sdp.html#videosectiondirections" class="tsd-kind-icon">video<wbr>Section<wbr>Directions</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="sdp.html#videosendsectionhasdifferentssrc" class="tsd-kind-icon">video<wbr>Send<wbr>Section<wbr>Has<wbr>DifferentSSRC</a>
</li>
Expand Down
25 changes: 25 additions & 0 deletions src/sdp/DefaultSDP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,4 +619,29 @@ export default class DefaultSDP implements SDP {
const newSDP = sections.join('');
return new DefaultSDP(newSDP);
}

videoSectionDirections(): RTCRtpTransceiverDirection[] {
const sections = DefaultSDP.splitSections(this.sdp);
const directions: RTCRtpTransceiverDirection[] = [];
for (let i = 0; i < sections.length; i++) {
if (/^m=video/.test(sections[i])) {
const lines = DefaultSDP.splitLines(sections[i]);
for (const line of lines) {
if (line.startsWith('a=inactive')) {
directions.push('inactive');
} else if (line.startsWith('a=sendonly')) {
directions.push('sendonly');
} else if (line.startsWith('a=recvonly')) {
directions.push('recvonly');
} else if (line.startsWith('a=sendrecv')) {
directions.push('sendrecv');
} else {
continue;
}
break;
}
}
}
return directions;
}
}
5 changes: 5 additions & 0 deletions src/sdp/SDP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,9 @@ export default interface SDP {
* Removes H.264 from the send section.
*/
removeH264SupportFromSendSection(): SDP;

/**
* List of directions of video sections in order.
*/
videoSectionDirections(): RTCRtpTransceiverDirection[];
}
Loading

0 comments on commit 3edc88b

Please sign in to comment.