Skip to content

Commit

Permalink
Revert "Revert "Make server side network adaptation the default when …
Browse files Browse the repository at this point in the history
…creating `VideoPriorityBasedPolicy` (#2889)" (#2892)" (#2904)

This reverts commit 56ea0b7.
  • Loading branch information
hensmi-amazon authored Jun 25, 2024
1 parent 90baf99 commit 3870262
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 111 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Avoid subscribes when simulcast is enabled but not currently sending, or when using server side network adaptation.
- Made server side network adaptation the default when creating `VideoPriorityBasedPolicy`.

### Fixed

Expand Down
16 changes: 4 additions & 12 deletions demos/browser/app/meetingV2/meetingV2.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ <h5 class="modal-title" id="additional-options-modal-label">Additional Options</
<input type="checkbox" id="svc" class="form-check-input">
<label for="svc" class="form-check-label">Enable SVC for Chrome</label>
</div>
<div class="form-check" style="text-align: left;">
<input type="checkbox" id="priority-downlink-policy" class="form-check-input">
<label for="priority-downlink-policy" class="form-check-label">Enable remote video quality adaptation</label>
</div>
<label id="pagination-title" for="pagination-page-size" style="padding-top:5px">Paginate displayed video tiles</label>
<select id="pagination-page-size" class="form-select" style="width:100%;">
<option value="1">1</option>
Expand All @@ -220,18 +224,6 @@ <h5 class="modal-title" id="additional-options-modal-label">Additional Options</
<option value="16">16</option>
<option value="25" selected>25</option>
</select>
<div class="form-check" style="text-align: left;">
<input type="checkbox" id="priority-downlink-policy" class="form-check-input">
<label for="priority-downlink-policy" class="form-check-label">Use Priority-Based Downlink
Policy</label>
</div>
<label id="server-side-network-adaption-title" for="server-side-network-adaption" style="display: none; padding-top:5px">Server Side Network Adaption</label>
<select id="server-side-network-adaption" class="form-select" style="width:100%; display: none;">
<option value="default">Default</option>
<option value="none">None (Deprecated)</option>
<option value="enable-bandwidth-probing">Enable Bandwidth Probing (Deprecated)</option>
<option value="enable-bandwidth-probing-and-video-adaption" selected>Enable Bandwidth Probing and Video Quality Adaption</option>
</select>
<div class="form-check" style="text-align: left;">
<input type="checkbox" checked id="preconnect" class="form-check-input">
<label for="preconnect" class="form-check-label">Open signaling connection early</label>
Expand Down
35 changes: 1 addition & 34 deletions demos/browser/app/meetingV2/meetingV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {
NoOpVideoFrameProcessor,
VideoFxConfig,
RemovableAnalyserNode,
ServerSideNetworkAdaption,
SimulcastLayers,
Transcript,
TranscriptEvent,
Expand All @@ -63,7 +62,6 @@ import {
VideoFrameProcessor,
VideoInputDevice,
VideoPriorityBasedPolicy,
VideoPriorityBasedPolicyConfig,
VideoQualitySettings,
VoiceFocusDeviceTransformer,
VoiceFocusModelComplexity,
Expand Down Expand Up @@ -347,7 +345,6 @@ export class DemoMeetingApp
enableSimulcast = false;
enableSVC = false;
usePriorityBasedDownlinkPolicy = false;
videoPriorityBasedPolicyConfig = new VideoPriorityBasedPolicyConfig;
enablePin = false;
echoReductionCapability = false;
usingStereoMusicAudioProfile = false;
Expand Down Expand Up @@ -664,21 +661,6 @@ export class DemoMeetingApp

document.getElementById('priority-downlink-policy').addEventListener('change', e => {
this.usePriorityBasedDownlinkPolicy = (document.getElementById('priority-downlink-policy') as HTMLInputElement).checked;

const serverSideNetworkAdaption = document.getElementById(
'server-side-network-adaption'
) as HTMLSelectElement;
const serverSideNetworkAdaptionTitle = document.getElementById(
'server-side-network-adaption-title'
) as HTMLElement;

if (this.usePriorityBasedDownlinkPolicy) {
serverSideNetworkAdaption.style.display = 'block';
serverSideNetworkAdaptionTitle.style.display = 'block';
} else {
serverSideNetworkAdaption.style.display = 'none';
serverSideNetworkAdaptionTitle.style.display = 'none';
}
});

const echoReductionCheckbox = (document.getElementById('echo-reduction-checkbox') as HTMLInputElement);
Expand Down Expand Up @@ -1859,22 +1841,7 @@ export class DemoMeetingApp
configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = this.enableSimulcast;
configuration.enableSVC = this.enableSVC;
if (this.usePriorityBasedDownlinkPolicy) {
const serverSideNetworkAdaptionDropDown = document.getElementById('server-side-network-adaption') as HTMLSelectElement;
switch (serverSideNetworkAdaptionDropDown.value) {
case 'default':
this.videoPriorityBasedPolicyConfig.serverSideNetworkAdaption = ServerSideNetworkAdaption.Default;
break;
case 'none':
this.videoPriorityBasedPolicyConfig.serverSideNetworkAdaption = ServerSideNetworkAdaption.None;
break;
case 'enable-bandwidth-probing':
this.videoPriorityBasedPolicyConfig.serverSideNetworkAdaption = ServerSideNetworkAdaption.BandwidthProbing;
break;
case 'enable-bandwidth-probing-and-video-adaption':
this.videoPriorityBasedPolicyConfig.serverSideNetworkAdaption = ServerSideNetworkAdaption.BandwidthProbingAndRemoteVideoQualityAdaption;
break;
}
this.priorityBasedDownlinkPolicy = new VideoPriorityBasedPolicy(this.meetingLogger, this.videoPriorityBasedPolicyConfig);
this.priorityBasedDownlinkPolicy = new VideoPriorityBasedPolicy(this.meetingLogger);
configuration.videoDownlinkBandwidthPolicy = this.priorityBasedDownlinkPolicy;
this.priorityBasedDownlinkPolicy.addObserver(this);
} else {
Expand Down
Loading

0 comments on commit 3870262

Please sign in to comment.