Skip to content

Feature/expose bandwidth estimates - #892

Open
wvanhaevre wants to merge 11 commits into
developfrom
feature/expose-bandwidth-estimates
Open

Feature/expose bandwidth estimates#892
wvanhaevre wants to merge 11 commits into
developfrom
feature/expose-bandwidth-estimates

Conversation

@wvanhaevre

@wvanhaevre wvanhaevre commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Added the Metrics API, accessible through player.metrics, with currentBandwidthEstimate returning the player's estimated available bandwidth in bits per second. On iOS/tvOS this value is only reported for THEOlive/HESP streams.

Depends on unreleased iOS Native 11.8.0

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread example/ios/Podfile.lock Outdated
Comment thread src/internal/adapter/metrics/MetricsNativeAdapter.ts
@wvanhaevre
wvanhaevre force-pushed the feature/expose-bandwidth-estimates branch from 33d9c29 to 40e586b Compare August 24, 2026 08:52
wvanhaevre and others added 2 commits August 24, 2026 13:31
Use the {Feature}{Native,Web}Adapter convention (as with TheoLive,
MediaControl, THEOAds) so the native/web metrics adapters are consistent
with each other and the rest of the codebase.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@wvanhaevre
wvanhaevre marked this pull request as ready for review August 24, 2026 11:57
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread CHANGELOG.md
Comment thread doc/metrics.md
Comment thread ios/metrics/THEOplayerRCTMetricsAPI.swift Outdated
Comment thread ios/metrics/THEOplayerRCTMetricsAPI.swift Outdated
wvanhaevre and others added 2 commits August 25, 2026 10:30
Co-authored-by: francescopuglisi-dolby <francesco.puglisi@dolby.com>
Co-authored-by: francescopuglisi-dolby <francesco.puglisi@dolby.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

@objc(currentBandwidthEstimate:resolver:rejecter:)
func currentBandwidthEstimate(_ node: NSNumber, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void {
withViewAndPlayer(node) { _, player in
resolve(player.metrics.currentBandwidthEstimate)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 iOS may resolve NaN/Infinity across the bridge

resolve(player.metrics.currentBandwidthEstimate) forwards the raw SDK value. If the iOS SDK returns NaN/Infinity when no estimate exists rather than 0, the old-architecture bridge cannot serialize it — the same limitation documented for currentTime in THEOplayerAdapter.ts. The docs promise 0 when unavailable, so confirm the SDK never returns NaN/Infinity.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed.

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.

2 participants