1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 09:00:31 +00:00

make exoplayer default player

This commit is contained in:
Christian Schabesberger 2017-03-29 09:17:03 +02:00
parent c3c3a94593
commit e804647a65
4 changed files with 11 additions and 7 deletions

View File

@ -791,7 +791,11 @@ public class VideoItemDetailFragment extends Fragment {
} }
} else { } else {
Intent intent; 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 // ExoPlayer
if (streamThumbnail != null) ActivityCommunicator.getCommunicator().backgroundPlayerThumbnail = streamThumbnail; if (streamThumbnail != null) ActivityCommunicator.getCommunicator().backgroundPlayerThumbnail = streamThumbnail;
intent = new Intent(activity, ExoPlayerActivity.class) intent = new Intent(activity, ExoPlayerActivity.class)

View File

@ -11,7 +11,7 @@
<string name="use_external_video_player_key" translatable="false">use_external_video_player</string> <string name="use_external_video_player_key" translatable="false">use_external_video_player</string>
<string name="use_external_audio_player_key" translatable="false">use_external_audio_player</string> <string name="use_external_audio_player_key" translatable="false">use_external_audio_player</string>
<string name="autoplay_through_intent_key" translatable="false">autoplay_through_intent</string> <string name="autoplay_through_intent_key" translatable="false">autoplay_through_intent</string>
<string name="use_exoplayer_key" translatable="false">use_exoplayer</string> <string name="use_old_player_key" translatable="false">use_oldplayer</string>
<string name="default_resolution_key" translatable="false">default_resolution_preference</string> <string name="default_resolution_key" translatable="false">default_resolution_preference</string>
<string name="default_resolution_value" translatable="false">360p</string> <string name="default_resolution_value" translatable="false">360p</string>

View File

@ -152,8 +152,8 @@
<string name="error_querying_decoders">Unable to query device decoders</string> <string name="error_querying_decoders">Unable to query device decoders</string>
<string name="error_instantiating_decoder">Unable to instantiate decoder <xliff:g id="decoder_name">%1$s</xliff:g></string> <string name="error_instantiating_decoder">Unable to instantiate decoder <xliff:g id="decoder_name">%1$s</xliff:g></string>
<string name="storage_permission_denied">Permission to access storage was denied</string> <string name="storage_permission_denied">Permission to access storage was denied</string>
<string name="use_exoplayer_title">Use ExoPlayer</string> <string name="use_old_player_title">Use old player</string>
<string name="use_exoplayer_summary">Experimental</string> <string name="use_old_player_summary">Old build in Mediaframework player.</string>
<string name="videos">videos</string> <string name="videos">videos</string>
<string name="subscriber">subscriber</string> <string name="subscriber">subscriber</string>
<string name="subscribe">Subscribe</string> <string name="subscribe">Subscribe</string>

View File

@ -34,9 +34,9 @@
android:defaultValue="@string/default_audio_format_value"/> android:defaultValue="@string/default_audio_format_value"/>
<CheckBoxPreference <CheckBoxPreference
android:key="@string/use_exoplayer_key" android:key="@string/use_old_player_key"
android:title="@string/use_exoplayer_title" android:title="@string/use_old_player_title"
android:summary="@string/use_exoplayer_summary" android:summary="@string/use_old_player_summary"
android:defaultValue="false"/> android:defaultValue="false"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory