diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-02 02:39:58 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-02 02:39:58 +0100 |
commit | 8816d144f5c6f238d20f9a3951b955532666d7b6 (patch) | |
tree | bd9aa6cc12494699aa63497402711454e25f0734 /core | |
parent | d18efcc3b178a6ae35344a90eed09b7b1ab51689 (diff) | |
download | AntennaPod-8816d144f5c6f238d20f9a3951b955532666d7b6.zip |
Upgrade AudioPlayer to latest version; Fallback
Diffstat (limited to 'core')
-rw-r--r-- | core/build.gradle | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/build.gradle b/core/build.gradle index 4ad4aa0ba..93f6f94db 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -57,5 +57,5 @@ dependencies { compile "de.greenrobot:eventbus:$eventbusVersion" compile "io.reactivex:rxandroid:$rxAndroidVersion" - compile "com.github.AntennaPod:AntennaPod-AudioPlayer:v1.0.2" + compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" } diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java index 7fdf443c2..e26ee32cb 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java @@ -1127,9 +1127,13 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre private final org.antennapod.audio.MediaPlayer.OnErrorListener audioErrorListener = new org.antennapod.audio.MediaPlayer.OnErrorListener() { @Override - public boolean onError(org.antennapod.audio.MediaPlayer mp, int what, - int extra) { - return genericOnError(mp, what, extra); + public boolean onError(org.antennapod.audio.MediaPlayer mp, int what, int extra) { + if(mp.canFallback()) { + mp.fallback(); + return true; + } else { + return genericOnError(mp, what, extra); + } } }; |