Skip to content

Commit 2476bc7

Browse files
Merge pull request #98 from newrelic/develop
Merge develop to master - SDK 34, media3 1.2.0, bitrate fix
2 parents 0c30d62 + 55b5524 commit 2476bc7

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

NRExoPlayerTracker/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ plugins {
44
}
55
android {
66
compileSdkVersion 34
7-
buildToolsVersion "34.0.0"
7+
buildToolsVersion "34.0.0"
8+
89
defaultConfig {
910
minSdkVersion 16
1011
targetSdkVersion 34
@@ -37,7 +38,7 @@ dependencies {
3738
implementation 'androidx.appcompat:appcompat:1.2.0'
3839
implementation 'com.google.android.material:material:1.2.1'
3940
implementation project(path: ':NewRelicVideoCore')
40-
implementation 'androidx.media3:media3-exoplayer:1.1.0'
41+
implementation 'androidx.media3:media3-exoplayer:1.2.0'
4142
testImplementation 'junit:junit:4.13.2'
4243
testImplementation 'org.robolectric:robolectric:4.10.3'
4344
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

NRExoPlayerTracker/src/main/java/com/newrelic/videoagent/exoplayer/tracker/NRTrackerExoPlayer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,10 @@ public void onLoadCompleted(@NonNull EventTime eventTime, @NonNull LoadEventInfo
676676
if (mediaLoadData.dataType == C.DATA_TYPE_MEDIA
677677
&& mediaLoadData.trackType == C.TRACK_TYPE_VIDEO
678678
&& loadEventInfo.loadDurationMs > 0) {
679-
// Calculate the bitrate for this specific chunk in bits per second
680-
this.actualBitrate = (loadEventInfo.bytesLoaded * 8 * 1000) / loadEventInfo.loadDurationMs;
679+
// Use actual video bitrate from player's video format instead of download speed
680+
if (player != null && player.getVideoFormat() != null && player.getVideoFormat().bitrate != C.INDEX_UNSET) {
681+
this.actualBitrate = player.getVideoFormat().bitrate;
682+
}
681683
}
682684
}
683685

NRIMATracker/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ plugins {
44
}
55
android {
66
compileSdkVersion 34
7-
buildToolsVersion "34.0.0"
7+
buildToolsVersion "34.0.0"
8+
89
defaultConfig {
910
minSdkVersion 16
1011
targetSdkVersion 34
@@ -37,7 +38,7 @@ dependencies {
3738
implementation 'androidx.appcompat:appcompat:1.2.0'
3839
implementation 'com.google.android.material:material:1.3.0'
3940
implementation project(path: ':NewRelicVideoCore')
40-
implementation 'androidx.media3:media3-exoplayer-ima:1.1.0'
41+
implementation 'androidx.media3:media3-exoplayer-ima:1.2.0'
4142
testImplementation 'junit:junit:4.13.2'
4243
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
4344
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

NewRelicVideoCore/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ dependencies {
3737
implementation 'androidx.appcompat:appcompat:1.1.0'
3838
implementation 'com.google.android.material:material:1.1.0'
3939
implementation 'com.newrelic.agent.android:android-agent:7.6.3'
40-
implementation 'androidx.media3:media3-exoplayer:1.1.0'
41-
implementation 'androidx.media3:media3-exoplayer-ima:1.1.0'
40+
implementation 'androidx.media3:media3-exoplayer:1.2.0'
41+
implementation 'androidx.media3:media3-exoplayer-ima:1.2.0'
4242

4343
// Add androidx.leanback for accurate Android TV detection
4444
// implementation 'androidx.leanback:leanback:1.0.0'

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ dependencies {
6565
androidTestImplementation 'androidx.test:runner:1.5.2'
6666
androidTestImplementation 'androidx.test:rules:1.5.0'
6767

68-
implementation 'androidx.media3:media3-exoplayer:1.1.0'
69-
implementation 'androidx.media3:media3-ui:1.1.0'
70-
implementation 'androidx.media3:media3-exoplayer-ima:1.1.0'
71-
implementation 'androidx.media3:media3-exoplayer-dash:1.1.0'
68+
implementation 'androidx.media3:media3-exoplayer:1.2.0'
69+
implementation 'androidx.media3:media3-ui:1.2.0'
70+
implementation 'androidx.media3:media3-exoplayer-ima:1.2.0'
71+
implementation 'androidx.media3:media3-exoplayer-dash:1.2.0'
7272

7373
implementation 'com.android.support:multidex:1.0.3'
7474
}

0 commit comments

Comments
 (0)