Skip to content

Commit

Permalink
Fix content send with Send attendee capability (#2816)
Browse files Browse the repository at this point in the history
  • Loading branch information
hensmi-amazon committed Dec 14, 2023
1 parent 3afd784 commit 13196c2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Revert: Improve reconnection behavior on signaling disconnection mid call or during join/subscribe. This was leading to unexpected `AudioJoinedFromAnotherDevice` events in certain edge conditions. It will be re-released in a later version.

### Fixed
- Do not allow redundant audio worker to enqueue any audio payloads larger than 1000 bytes to avoid permanently stopping the audio flow
- Do not allow redundant audio worker to enqueue any audio payloads larger than 1000 bytes to avoid permanently stopping the audio flow.
- Make uplink loss estimation more accurate so that redundant audio does not turn off prematurely

## [3.18.2] - 2023-10-09
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/setremotedescriptiontask.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h3>constructor</h3>
<aside class="tsd-sources">
<p>Overrides <a href="basetask.html">BaseTask</a>.<a href="basetask.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L17">src/task/SetRemoteDescriptionTask.ts:17</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L18">src/task/SetRemoteDescriptionTask.ts:18</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -154,7 +154,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> task<wbr>Name</h3>
<aside class="tsd-sources">
<p>Overrides <a href="basetask.html">BaseTask</a>.<a href="basetask.html#taskname">taskName</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L15">src/task/SetRemoteDescriptionTask.ts:15</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L16">src/task/SetRemoteDescriptionTask.ts:16</a></li>
</ul>
</aside>
</section>
Expand All @@ -172,7 +172,7 @@ <h3>cancel</h3>
<aside class="tsd-sources">
<p>Overrides <a href="basetask.html">BaseTask</a>.<a href="basetask.html#cancel">cancel</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L23">src/task/SetRemoteDescriptionTask.ts:23</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L24">src/task/SetRemoteDescriptionTask.ts:24</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -288,7 +288,7 @@ <h3>run</h3>
<aside class="tsd-sources">
<p>Overrides <a href="basetask.html">BaseTask</a>.<a href="basetask.html#run">run</a></p>
<ul>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L29">src/task/SetRemoteDescriptionTask.ts:29</a></li>
<li>Defined in <a href="https://github.com/aws/amazon-chime-sdk-js/blob/main/src/task/SetRemoteDescriptionTask.ts#L30">src/task/SetRemoteDescriptionTask.ts:30</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
5 changes: 3 additions & 2 deletions src/task/SetLocalDescriptionTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ export default class SetLocalDescriptionTask extends BaseTask {
this.context.videoSendCodecPreferences.length > 0
) {
sdp = new SDP(sdp).withVideoSendCodecPreferences(
this.context.meetingSupportedVideoSendCodecPreferences ??
this.context.videoSendCodecPreferences
this.context.meetingSupportedVideoSendCodecPreferences !== undefined
? this.context.meetingSupportedVideoSendCodecPreferences
: this.context.videoSendCodecPreferences
).sdp;
}

Expand Down
5 changes: 4 additions & 1 deletion src/task/SetRemoteDescriptionTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import AudioVideoControllerState from '../audiovideocontroller/AudioVideoControllerState';
import DefaultModality from '../modality/DefaultModality';
import SDP from '../sdp/SDP';
import VideoCodecCapability from '../sdp/VideoCodecCapability';
import BaseTask from './BaseTask';

/*
Expand Down Expand Up @@ -61,7 +62,9 @@ export default class SetRemoteDescriptionTask extends BaseTask {
);
const videoTrack = mediaStream.getVideoTracks()[0];
if (isContent) {
if (this.context.currentVideoSendCodec.codecName === 'AV1') {
if (
this.context.currentVideoSendCodec?.codecName === VideoCodecCapability.av1Main().codecName
) {
// Based on our experiments: "text" contentHint gives good coding performance for content share using AV1
// @ts-ignore
videoTrack.contentHint = 'text';
Expand Down
12 changes: 12 additions & 0 deletions test/task/SetRemoteDescriptionTask.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,18 @@ describe('SetRemoteDescriptionTask', () => {
context.activeVideoInput.addTrack(track);
task.run().then(() => done());
});

it('can handle undefined current video send codec', done => {
context.sdpAnswer = SDPMock.CHROME_UNIFIED_PLAN_AUDIO_ONLY_WITH_VIDEO_CHECK_IN;
context.audioVideoController.configuration.credentials.attendeeId = 'attendee#content';
context.currentVideoSendCodec = undefined;
context.activeVideoInput = new MediaStream();
const track = new MediaStreamTrack();
// @ts-ignore
track.kind = 'video';
context.activeVideoInput.addTrack(track);
task.run().then(() => done());
});
});

describe('cancel', () => {
Expand Down

0 comments on commit 13196c2

Please sign in to comment.