Skip to content

Commit

Permalink
Update media3
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenzeck committed Nov 29, 2024
1 parent 4ef6d6b commit 45aac69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ androidx-datastore = "1.1.1"
androidx-fragment-ktx = "1.8.5"
androidx-legacy = "1.0.0"
androidx-lifecycle = "2.8.7"
androidx-media3 = "1.4.1"
androidx-media3 = "1.5.0"
androidx-navigation = "2.8.4"
androidx-paging = "3.3.4"
androidx-recyclerview = "1.3.2"
Expand Down Expand Up @@ -87,7 +87,7 @@ androidx-datastore-preferences = { group = "androidx.datastore", name = "datasto
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment-ktx" }
androidx-legacy-ui = { group = "androidx.legacy", name = "legacy-support-core-ui", version.ref = "androidx-legacy" }
androidx-lifecycle-common = { group = "androidx.lifecycle", name = "lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "androidx-media3" }
androidx-media3-common = { group = "androidx.media3", name = "media3-common-ktx", version.ref = "androidx-media3" }
androidx-media3-session = { group = "androidx.media3", name = "media3-session", version.ref = "androidx-media3" }
androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "androidx-media3" }
androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "androidx-navigation" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.media3.common.C
import androidx.media3.common.Player
import androidx.media3.common.util.Log
import androidx.media3.common.util.Util
import java.util.Objects
import org.readium.navigator.media.tts.session.AudioFocusManager.PlayerControl

@androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class)
Expand Down Expand Up @@ -134,7 +135,7 @@ internal class AudioFocusManager(
* managed automatically.
*/
fun setAudioAttributes(audioAttributes: AudioAttributes?) {
if (!Util.areEqual(this.audioAttributes, audioAttributes)) {
if (!Objects.equals(this.audioAttributes, audioAttributes)) {
this.audioAttributes = audioAttributes
focusGainToRequest = convertAudioAttributesToFocusGain(audioAttributes)
require(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,25 +343,10 @@ internal class TtsSessionAdapter<E : TtsEngine.Error>(
ttsPlayer.nextUtterance()
}

@Deprecated("Deprecated in Java", ReplaceWith("hasPreviousMediaItem()"))
override fun hasPrevious(): Boolean {
return hasPreviousMediaItem()
}

@Deprecated("Deprecated in Java", ReplaceWith("hasPreviousMediaItem()"))
override fun hasPreviousWindow(): Boolean {
return hasPreviousMediaItem()
}

override fun hasPreviousMediaItem(): Boolean {
return previousMediaItemIndex != INDEX_UNSET
}

@Deprecated("Deprecated in Java", ReplaceWith("TODO(\"Not yet implemented\")"))
override fun previous() {
seekToPreviousMediaItem()
}

@Deprecated("Deprecated in Java", ReplaceWith("TODO(\"Not yet implemented\")"))
override fun seekToPreviousWindow() {
seekToPreviousMediaItem()
Expand Down

0 comments on commit 45aac69

Please sign in to comment.