From e57c7bda5df7d624d90b20620859b8a4eb3f76b7 Mon Sep 17 00:00:00 2001 From: Seyed Mostafa Hasani Date: Mon, 16 Sep 2024 15:24:51 +0330 Subject: [PATCH] feat(android): upgrade dependencies / media3 1.4.1 / androidxCore to 1.13.1 / androidxActivity 1.8.2 (#4173) --- android/build.gradle | 2 +- android/gradle.properties | 6 +++--- .../java/com/brentvatne/exoplayer/VideoPlaybackService.kt | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5492c667..d153c936 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -216,7 +216,7 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" - implementation "androidx.core:core:$androidxCore_version" + implementation "androidx.core:core-ktx:$androidxCore_version" implementation "androidx.activity:activity-ktx:$androidxActivity_version" // For media playback using ExoPlayer diff --git a/android/gradle.properties b/android/gradle.properties index 46daceb2..b474349b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -4,12 +4,12 @@ RNVideo_targetSdkVersion=34 RNVideo_compileSdkVersion=34 RNVideo_ndkversion=26.1.10909125 RNVideo_buildToolsVersion=34.0.0 -RNVideo_media3Version=1.3.1 +RNVideo_media3Version=1.4.1 RNVideo_useExoplayerIMA=false RNVideo_useExoplayerRtsp=false RNVideo_useExoplayerSmoothStreaming=true RNVideo_useExoplayerDash=true RNVideo_useExoplayerHls=true -RNVideo_androidxCoreVersion=1.9.0 -RNVideo_androidxActivityVersion=1.7.0 +RNVideo_androidxCoreVersion=1.13.1 +RNVideo_androidxActivityVersion=1.8.2 RNVideo_buildFromMedia3Source=false diff --git a/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt b/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt index 77bd4eaf..084099a2 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt +++ b/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt @@ -179,17 +179,17 @@ class VideoPlaybackService : MediaSessionService() { .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setSmallIcon(androidx.media3.session.R.drawable.media3_icon_circular_play) // Add media control buttons that invoke intents in your media service - .addAction(androidx.media3.session.R.drawable.media3_notification_seek_back, "Seek Backward", seekBackwardPendingIntent) // #0 + .addAction(androidx.media3.session.R.drawable.media3_icon_rewind, "Seek Backward", seekBackwardPendingIntent) // #0 .addAction( if (session.player.isPlaying) { - androidx.media3.session.R.drawable.media3_notification_pause + androidx.media3.session.R.drawable.media3_icon_pause } else { - androidx.media3.session.R.drawable.media3_notification_play + androidx.media3.session.R.drawable.media3_icon_play }, "Toggle Play", togglePlayPendingIntent ) // #1 - .addAction(androidx.media3.session.R.drawable.media3_notification_seek_forward, "Seek Forward", seekForwardPendingIntent) // #2 + .addAction(androidx.media3.session.R.drawable.media3_icon_fast_forward, "Seek Forward", seekForwardPendingIntent) // #2 // Apply the media style template .setStyle(MediaStyleNotificationHelper.MediaStyle(session).setShowActionsInCompactView(0, 1, 2)) .setContentTitle(session.player.mediaMetadata.title)