Added support for Flac.

This commit is contained in:
Antoine POPINEAU 2019-10-23 21:41:50 +02:00
parent e84455390b
commit 0fa0b5d212
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
5 changed files with 13 additions and 1 deletions

View File

@ -100,9 +100,12 @@ dependencies {
implementation("com.google.android.material:material:1.1.0-beta01")
implementation("com.android.support.constraint:constraint-layout:1.1.3")
implementation("com.google.android.exoplayer:exoplayer:2.10.3")
implementation("com.google.android.exoplayer:exoplayer:2.10.5")
implementation("com.google.android.exoplayer:extension-mediasession:2.10.6")
implementation("com.google.android.exoplayer:extension-cast:2.10.6")
implementation("com.github.PaulWoitaschek.ExoPlayer-Extensions:extension-flac:2.10.5") {
isTransitive = false
}
implementation("com.aliassadi:power-preference-lib:1.4.1")
implementation("com.github.kittinunf.fuel:fuel:2.1.0")
implementation("com.github.kittinunf.fuel:fuel-coroutines:2.1.0")

View File

@ -38,6 +38,11 @@ class LicencesActivity : AppCompatActivity() {
"Apache License 2.0",
"https://github.com/google/ExoPlayer/blob/release-v2/LICENSE"
),
Licence(
"ExoPlayer-Extensions",
"Apache License 2.0",
"https://github.com/PaulWoitaschek/ExoPlayer-Extensions/blob/master/LICENSE"
),
Licence(
"Fuel",
"MIT License",

View File

@ -403,6 +403,7 @@ class PlayerService : Service() {
}
override fun onPlayerError(error: ExoPlaybackException?) {
log(error.toString())
EventBus.send(
Event.PlaybackError(
getString(R.string.error_playback)

View File

@ -94,6 +94,8 @@ class QueueManager(val context: Context) {
val sources = tracks.map { track ->
val url = mustNormalizeUrl(track.bestUpload()?.listen_url ?: "")
log(url)
ProgressiveMediaSource.Factory(factory).createMediaSource(Uri.parse(url))
}

View File

@ -14,6 +14,7 @@ allprojects {
repositories {
google()
jcenter()
maven(url = "https://jitpack.io")
}
}