From ac99d60f931432d4f8df2d75435d4bb00b2e8fac Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:33:45 +0200 Subject: [PATCH] feat(*): extend SDK support to 21 till 34 --- build.gradle | 4 ++-- example/build.gradle | 6 +++--- player/build.gradle | 8 ++++---- .../api/player/ApiVideoPlayerNotificationController.kt | 5 +++-- .../api/player/models/ApiVideoMediaDescriptionAdapter.kt | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 3fead12..ef849e7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ buildscript { ext { kotlinVersion = '1.8.0' dokkaVersion = '1.8.20' - exoPlayerVersion = '1.1.0' - analyticsVersion = '1.4.0' + exoPlayerVersion = '1.1.1' + analyticsVersion = '2.0.0' } dependencies { diff --git a/example/build.gradle b/example/build.gradle index 62beae4..6489290 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -4,12 +4,12 @@ plugins { } android { - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "video.api.player.example" - minSdk 24 - targetSdk 33 + minSdk 21 + targetSdk 34 versionCode 1 versionName "1.0" diff --git a/player/build.gradle b/player/build.gradle index 3d2362e..cc4642f 100644 --- a/player/build.gradle +++ b/player/build.gradle @@ -6,11 +6,11 @@ plugins { apply from: 'maven-push.gradle' android { - compileSdk 33 + compileSdk 34 defaultConfig { - minSdk 24 - targetSdk 33 + minSdk 21 + targetSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArgument "INTEGRATION_TESTS_API_KEY", "${System.getenv("INTEGRATION_TESTS_API_KEY")}" @@ -77,6 +77,6 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - androidTestImplementation "video.api:android-api-client:1.3.0" + androidTestImplementation "video.api:android-api-client:1.5.2" } \ No newline at end of file diff --git a/player/src/main/java/video/api/player/ApiVideoPlayerNotificationController.kt b/player/src/main/java/video/api/player/ApiVideoPlayerNotificationController.kt index c49a3c0..6834e70 100644 --- a/player/src/main/java/video/api/player/ApiVideoPlayerNotificationController.kt +++ b/player/src/main/java/video/api/player/ApiVideoPlayerNotificationController.kt @@ -7,6 +7,7 @@ import androidx.annotation.DrawableRes import androidx.annotation.OptIn import androidx.annotation.StringRes import androidx.core.app.NotificationCompat +import androidx.core.content.ContextCompat import androidx.media3.common.util.UnstableApi import androidx.media3.exoplayer.ExoPlayer import androidx.media3.ui.PlayerNotificationManager @@ -45,7 +46,7 @@ constructor( setUseChronometer(true) if (notificationStyle.colorResourceId != 0) { setColorized(true) - setColor(context.getColor(notificationStyle.colorResourceId)) + setColor(ContextCompat.getColor(context, notificationStyle.colorResourceId)) } }, mediaSession @@ -72,7 +73,7 @@ constructor( } companion object { - private const val TAG = "ApiVideoPlayerNotificationController" + private const val TAG = "PlayerNotificationController" private const val DEFAULT_NOTIFICATION_ID = 3333 private const val DEFAULT_NOTIFICATION_CHANNEL_ID = "api.video.player.notification.channel" } diff --git a/player/src/main/java/video/api/player/models/ApiVideoMediaDescriptionAdapter.kt b/player/src/main/java/video/api/player/models/ApiVideoMediaDescriptionAdapter.kt index 3ff1b44..60b017a 100644 --- a/player/src/main/java/video/api/player/models/ApiVideoMediaDescriptionAdapter.kt +++ b/player/src/main/java/video/api/player/models/ApiVideoMediaDescriptionAdapter.kt @@ -67,6 +67,6 @@ class ApiVideoMediaDescriptionAdapter : PlayerNotificationManager.MediaDescripti } companion object { - private const val TAG = "ApiVideoMediaDescriptionAdapter" + private const val TAG = "MediaDescriptionAdapter" } } \ No newline at end of file