Skip to content

Commit

Permalink
Content constraint revert (#2751)
Browse files Browse the repository at this point in the history
* Revert resolution constraint for content share

* Revert resolution constraint for content share

* Remove unit tests for content share resolution constraint
  • Loading branch information
davidwj123 authored Sep 11, 2023
1 parent b29a0cb commit 8874e7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 58 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ 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).

## [3.18.0] - 2023-09-11

### Added

### Removed
- Resolution constraint for content share

### Changed

### Fixed

## [3.17.0] - 2023-08-15

### Added
Expand Down
21 changes: 0 additions & 21 deletions src/task/ReceiveVideoInputTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,6 @@ export default class ReceiveVideoInputTask extends BaseTask {
);
const trackSettings = videoTracks[0].getSettings();

// apply video track constraints for content share
if (isContentAttendee) {
const constraint = {
width: { ideal: 1920 },
height: { ideal: 1080 },
frameRate: { ideal: 30 },
};
this.context.logger.info(
`Video track (content = ${isContentAttendee}) with constraint: ${JSON.stringify(
constraint
)}, trackSettings: ${JSON.stringify(trackSettings)}`
);
try {
await videoTracks[0].applyConstraints(constraint);
} catch (error) {
this.context.logger.info(
'Could not apply constraint for video track (content = ${isContentAttendee})'
);
}
}

// For video, we currently enforce 720p for simulcast. This logic should be removed in the future.
if (this.context.enableSimulcast && !isContentAttendee) {
const constraint = this.context.videoUplinkBandwidthPolicy.chooseMediaTrackConstraints();
Expand Down
37 changes: 0 additions & 37 deletions test/task/ReceiveVideoInputTask.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,43 +96,6 @@ describe('ReceiveVideoInputTask', () => {
assert.exists(context.activeVideoInput);
});

it('will acquire the video input and query constraint (unicast - content with video track constraint)', async () => {
context.videoStreamIndex = new SimulcastVideoStreamIndex(new NoOpLogger());
context.enableSimulcast = false;
context.meetingSessionConfiguration.credentials.attendeeId = 'foo-attendee#content';
context.videoUplinkBandwidthPolicy = new DefaultSimulcastUplinkPolicy(
'attendee',
new NoOpLogger()
);
context.videoTileController.startLocalVideoTile();
context.mediaStreamBroker = new MockMediaStreamBroker({
acquireVideoInputDeviceSucceeds: true,
});

const task = new ReceiveVideoInputTask(context);
await task.run();
assert.exists(context.activeVideoInput);
});

it('will acquire the video input and query constraint (unicast - content without video track constraint)', async () => {
domMockBehavior.applyConstraintSucceeds = false;
context.videoStreamIndex = new SimulcastVideoStreamIndex(new NoOpLogger());
context.enableSimulcast = false;
context.meetingSessionConfiguration.credentials.attendeeId = 'foo-attendee#content';
context.videoUplinkBandwidthPolicy = new DefaultSimulcastUplinkPolicy(
'attendee',
new NoOpLogger()
);
context.videoTileController.startLocalVideoTile();
context.mediaStreamBroker = new MockMediaStreamBroker({
acquireVideoInputDeviceSucceeds: true,
});

const task = new ReceiveVideoInputTask(context);
await task.run();
assert.exists(context.activeVideoInput);
});

it('will acquire the video input and query constraint', async () => {
context.videoStreamIndex = new SimulcastVideoStreamIndex(new NoOpLogger());
context.enableSimulcast = true;
Expand Down

0 comments on commit 8874e7f

Please sign in to comment.