Skip to content

fix: Add fallback for contentBitrate and convert adBitrate from KBPS to BPS#118

Open
avinash-newrelic wants to merge 1 commit intomasterfrom
fix/NR-525912
Open

fix: Add fallback for contentBitrate and convert adBitrate from KBPS to BPS#118
avinash-newrelic wants to merge 1 commit intomasterfrom
fix/NR-525912

Conversation

@avinash-newrelic
Copy link
Collaborator

Summary

  • contentBitrate was always reported as 0 when manifest-declared bitrate was unavailable. Added a fallback to calculate bitrate from actual download data.
  • adBitrate was incorrectly reported in KBPS instead of BPS. Applied conversion (×1000) to match the data model specification.

Changes

  • NRTrackerExoPlayer.java — Added fallback bitrate calculation using download speed when player.getVideoFormat().bitrate is unavailable
  • NRTrackerIMA.java — Multiplied getVastMediaBitrate() by 1000 to convert KBPS to BPS

Test Plan

  • Play content video and verify contentBitrate reports a non-zero value in BPS
  • Play content with HLS/DASH stream and verify manifest-declared bitrate is still preferred
  • Play video with IMA ads and verify adBitrate reports in BPS (e.g., 500000 instead of 500)
  • Verify cross-platform consistency with iOS bitrate values

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.

1 participant

Comments