Skip to content

Commit

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

This reverts commit 5354ada.
  • Loading branch information
hensmi-amazon authored May 10, 2024
1 parent 5354ada commit 56ea0b7
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 129 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ 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: 12 additions & 4 deletions demos/browser/app/meetingV2/meetingV2.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ <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 @@ -224,6 +220,18 @@ <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: 34 additions & 1 deletion demos/browser/app/meetingV2/meetingV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import {
NoOpVideoFrameProcessor,
VideoFxConfig,
RemovableAnalyserNode,
ServerSideNetworkAdaption,
SimulcastLayers,
Transcript,
TranscriptEvent,
Expand All @@ -62,6 +63,7 @@ import {
VideoFrameProcessor,
VideoInputDevice,
VideoPriorityBasedPolicy,
VideoPriorityBasedPolicyConfig,
VideoQualitySettings,
VoiceFocusDeviceTransformer,
VoiceFocusModelComplexity,
Expand Down Expand Up @@ -345,6 +347,7 @@ export class DemoMeetingApp
enableSimulcast = false;
enableSVC = false;
usePriorityBasedDownlinkPolicy = false;
videoPriorityBasedPolicyConfig = new VideoPriorityBasedPolicyConfig;
enablePin = false;
echoReductionCapability = false;
usingStereoMusicAudioProfile = false;
Expand Down Expand Up @@ -661,6 +664,21 @@ 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 @@ -1841,7 +1859,22 @@ export class DemoMeetingApp
configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = this.enableSimulcast;
configuration.enableSVC = this.enableSVC;
if (this.usePriorityBasedDownlinkPolicy) {
this.priorityBasedDownlinkPolicy = new VideoPriorityBasedPolicy(this.meetingLogger);
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);
configuration.videoDownlinkBandwidthPolicy = this.priorityBasedDownlinkPolicy;
this.priorityBasedDownlinkPolicy.addObserver(this);
} else {
Expand Down
Loading

0 comments on commit 56ea0b7

Please sign in to comment.