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

Feat/initial bandwidth estimate override #509

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

saravanans-github
Copy link
Contributor

Description

Added support for the adaptationConfig.initialBandwidthEstimateOverride config parameter.

Changes

Android initialBandwidthEstimateOverride is type Long. No such type on JS hence converted from int to long. Hope that's ok. Max value of Int 2,147,483,647 should be sufficient for this usecase I believe.

Checklist

  • 🗒 CHANGELOG entry

@saravanans-github saravanans-github requested a review from a team as a code owner August 28, 2024 04:25
src/adaptationConfig.ts Outdated Show resolved Hide resolved
@@ -144,6 +144,7 @@ private fun String.toTimelineReferencePoint(): TimelineReferencePoint? = when (t
*/
private fun ReadableMap.toAdaptationConfig(): AdaptationConfig = AdaptationConfig().apply {
withInt("maxSelectableBitrate") { maxSelectableVideoBitrate = it }
withInt("initialBandwidthEstimateOverride") { initialBandwidthEstimateOverride = it.toLong(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

JS number is a double. Not sure why this is an Int 🤔 Should both be changes to withDouble?

Copy link
Contributor Author

@saravanans-github saravanans-github Aug 28, 2024

Choose a reason for hiding this comment

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

Good point; thank you.

OK if I'll leave it as-is for now please as this seems inline with the withInt implementation of both bandwidthEstimateWeightLimit and maxSelectableBitrate

* The initial bandwidth estimate in bits per second the player uses to select the optimal media tracks before actual bandwidth data is available. Overriding this value should only be done in specific cases and will most of the time not result in better selection logic.
*
* @platform Android
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html?query=var%20initialBandwidthEstimateOverride:%20Long?
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html?query=var%20initialBandwidthEstimateOverride:%20Long?
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html

Actually not sure if this is very helpful. The documentation here is the same as the linked one. I would suggest to not include the link, also as it could get outdated.

Co-authored-by: Kevin Rocard <kevin.rocard@bitmovin.com>
@saravanans-github saravanans-github merged commit cb1cd91 into development Aug 28, 2024
6 checks passed
@saravanans-github saravanans-github deleted the feat/initialBandwidthEstimateOverride branch August 28, 2024 05: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.

3 participants