Skip to content

Commit

Permalink
FEM-2502 AndroidX migration + ExoPlayer upgrade (#546)
Browse files Browse the repository at this point in the history
* - AndroidX migration
- Upgraded gson to 2.8.5
- Upgraded okhttp to 3.14.2
- Upgraded ExoPlayer to 2.10.1

* - API change for 2.10.1 for roleFlag in Subtitles
- Refactored MediaPlayerWrapper

* - Updated CustomVideoCodecRenderer class.
- Keeping the old file for the track.

* - Removed CustomVideoCodecRendererOld
- Added CustomMediaCodecRenderer

* - Decoder re-usability on change media.
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ExoPlayer.html#setForegroundMode-boolean-

* - API Change : Added listener to bandwidth meter.

* - clean up

* - Restrict max supported bitrate to 5 Gbps
- ADAPTIVE support having -1 value is not supported in Exoplayer now, so changed the logic accordingly.

* - Issue Resolved: Lowest bitrate tracks was not being added.
- Now the isAdaptiveTrack is being analysed based on the flag present in the track.
- Removed the restriction of 5Gbps track. Logic is solely dependent on exoplayer now.

* - ExtractorMediaSource is deprecated.
- Code cleanup

* - Removed unused imports

* - Reverted track selection code
- google/ExoPlayer#5971

* - google/ExoPlayer#5991

Relying on Exoplayer for track selection

* - Role Flag was not being used
- Version updates for gson and okhttp
*     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
  • Loading branch information
GouravSna authored and giladna committed Jul 15, 2019
1 parent b937712 commit 69b1dd8
Show file tree
Hide file tree
Showing 48 changed files with 2,253 additions and 261 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jdk:
android:
components:
- tools
- build-tools-27.0.3
- build-tools-28.0.3
- android-28
before_script:
- curl https://kaltura.github.io/fe-tools/android/license.sh | sh
Expand Down
11 changes: 6 additions & 5 deletions playkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 16
targetSdkVersion 28
versionName playkitVersion // defined in version.gradle
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -35,7 +35,7 @@ tasks.withType(Javadoc) {

dependencies {

def exoPlayerVersion = '2.9.6'
def exoPlayerVersion = '2.10.1'

api 'com.google.code.gson:gson:2.8.2'

Expand All @@ -46,13 +46,14 @@ dependencies {
api "com.google.android.exoplayer:exoplayer-ui:$exoPlayerVersion"
api "com.google.android.exoplayer:extension-okhttp:$exoPlayerVersion"

implementation 'androidx.annotation:annotation:1.0.2'

// Ok is (optionally) used by ExoPlayer now
api("com.squareup.okhttp3:okhttp:3.12.1")
api('com.squareup.okhttp3:okhttp:3.12.1')

// Tests
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation "org.mockito:mockito-core:2.15.0"
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.android.support:support-annotations:28.0.0'
androidTestImplementation 'androidx.test:runner:1.1.1'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaltura.playkit.player;

import android.support.test.runner.AndroidJUnit4;
import androidx.test.runner.AndroidJUnit4;

import com.kaltura.playkit.PKDrmParams;
import com.kaltura.playkit.PKMediaEntry;
Expand Down
Loading

0 comments on commit 69b1dd8

Please sign in to comment.