Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix priority downlink policy bandwidth estimation metrics to work with Safari #1783

Merged
merged 1 commit into from Nov 12, 2021

Conversation

ltrung
Copy link
Contributor

@ltrung ltrung commented Nov 11, 2021

Issue #:
The current priority-based downlink policy uses webRTC's available downlink bandwidth estimate to calculate whether it should pause video tiles to reserve bandwidth. However, the current implementation only checks stats from Chrome and not from other browser.

Description of changes:
Update to read stats from Safari. Firefox did not support availableOutgoingBitrate at this point so update the guide to clarify that instead.

Testing:
Test priority-based downlink policy and check the bandwidth estimate to be correct (previously it is always null).

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

  • Join a meeting with multiple videos in Safari with priority-based downlink policy
  • Make sure if the bandwidth is good, it does not pause any video.
  • Throttle the network and verify that video will be paused.

Checklist:

  1. Have you successfully run npm run build:release locally? Yes

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? No

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -191,23 +192,23 @@ export default class VideoPriorityBasedPolicy implements VideoDownlinkBandwidthP
this.prevDownlinkStats = this.downlinkStats;
this.downlinkStats = new LinkMediaStats();
const metricReport = clientMetricReport.getObservableMetrics();
this.downlinkStats.bandwidthEstimateKbps = metricReport.availableReceiveBandwidth / 1000;
if (!isNaN(metricReport.availableOutgoingBitrate)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

hensmi-amazon
hensmi-amazon previously approved these changes Nov 11, 2021
@@ -191,23 +192,23 @@ export default class VideoPriorityBasedPolicy implements VideoDownlinkBandwidthP
this.prevDownlinkStats = this.downlinkStats;
this.downlinkStats = new LinkMediaStats();
const metricReport = clientMetricReport.getObservableMetrics();
this.downlinkStats.bandwidthEstimateKbps = metricReport.availableReceiveBandwidth / 1000;
if (!isNaN(metricReport.availableOutgoingBitrate)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@ltrung ltrung merged commit e408bed into master Nov 12, 2021
@ltrung ltrung deleted the update-metric-priority branch November 12, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants