From e804647a6519a6e23066a552147a27215c5d15bf Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 29 Mar 2017 09:17:03 +0200 Subject: [PATCH] make exoplayer default player --- .../org/schabi/newpipe/detail/VideoItemDetailFragment.java | 6 +++++- app/src/main/res/values/settings_keys.xml | 2 +- app/src/main/res/values/strings.xml | 4 ++-- app/src/main/res/xml/settings.xml | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java index f1e94ea8e..719a6bdbd 100644 --- a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java @@ -791,7 +791,11 @@ public class VideoItemDetailFragment extends Fragment { } } else { Intent intent; - if (PreferenceManager.getDefaultSharedPreferences(activity).getBoolean(activity.getString(R.string.use_exoplayer_key), false)) { + boolean useOldPlayer = PreferenceManager + .getDefaultSharedPreferences(activity) + .getBoolean(activity.getString(R.string.use_old_player_key), false) + || (Build.VERSION.SDK_INT < 16); + if (!useOldPlayer) { // ExoPlayer if (streamThumbnail != null) ActivityCommunicator.getCommunicator().backgroundPlayerThumbnail = streamThumbnail; intent = new Intent(activity, ExoPlayerActivity.class) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index bb2823cb9..99dd0f390 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -11,7 +11,7 @@ use_external_video_player use_external_audio_player autoplay_through_intent - use_exoplayer + use_oldplayer default_resolution_preference 360p diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 13ca6c2bc..9e992ec18 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -152,8 +152,8 @@ Unable to query device decoders Unable to instantiate decoder %1$s Permission to access storage was denied - Use ExoPlayer - Experimental + Use old player + Old build in Mediaframework player. videos subscriber Subscribe diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 7330643ee..88dc06e10 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -34,9 +34,9 @@ android:defaultValue="@string/default_audio_format_value"/>