1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-09-28 15:08:50 +00:00
NewPipe/app/src/main/res/xml/video_audio_settings.xml
James Straub d1b0cd74be Added the ability to limit video quality if using mobile data.
* Added a dropdown to video & audio settings
* Changes to ListHelper:
** Limits resolution when code requests the default video resolution
** Limits audio bitrate when code requests the default audio bitrate
** Removed some dead code and did some cleanup
** Make methods private/protected to help understand what was in use
** The code now chooses one format over an other using a simple raking system defined in array constants. I realized I needed to do this in order to choose the most efficient video stream. I did my best to evaluate the video and audio formats based on quality and efficiency. It's not an exact science.
** Made changes to the tests to support my changes
2018-04-21 12:35:04 -04:00

118 lines
5.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/settings_category_video_audio_title">
<ListPreference
android:defaultValue="@string/default_resolution_value"
android:entries="@array/resolution_list_description"
android:entryValues="@array/resolution_list_values"
android:key="@string/default_resolution_key"
android:summary="%s"
android:title="@string/default_resolution_title"/>
<ListPreference
android:defaultValue="@string/default_popup_resolution_value"
android:entries="@array/resolution_list_description"
android:entryValues="@array/resolution_list_values"
android:key="@string/default_popup_resolution_key"
android:summary="%s"
android:title="@string/default_popup_resolution_title"/>
<ListPreference
android:defaultValue="@string/limit_mobile_data_usage_value"
android:entries="@array/limit_data_usage_description_list"
android:entryValues="@array/limit_data_usage_values_list"
android:key="@string/limit_mobile_data_usage_key"
android:summary="%s"
android:title="@string/limit_mobile_data_usage_title" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/show_higher_resolutions_key"
android:summary="@string/show_higher_resolutions_summary"
android:title="@string/show_higher_resolutions_title"/>
<ListPreference
android:defaultValue="@string/default_video_format_value"
android:entries="@array/video_format_description_list"
android:entryValues="@array/video_format_values_list"
android:key="@string/default_video_format_key"
android:summary="%s"
android:title="@string/default_video_format_title"/>
<ListPreference
android:defaultValue="@string/default_audio_format_value"
android:entries="@array/audio_format_description_list"
android:entryValues="@array/audio_format_values_list"
android:key="@string/default_audio_format_key"
android:summary="%s"
android:title="@string/default_audio_format_title" />
<PreferenceCategory
android:layout="@layout/settings_category_header_layout"
android:title="@string/settings_category_player_title">
<SwitchPreference
android:defaultValue="false"
android:key="@string/use_external_video_player_key"
android:summary="@string/use_external_video_player_summary"
android:title="@string/use_external_video_player_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/use_external_audio_player_key"
android:title="@string/use_external_audio_player_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/use_old_player_key"
android:summary="@string/use_old_player_summary"
android:title="@string/use_old_player_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/show_play_with_kodi_key"
android:summary="@string/show_play_with_kodi_summary"
android:title="@string/show_play_with_kodi_title"/>
</PreferenceCategory>
<PreferenceCategory
android:layout="@layout/settings_category_header_layout"
android:title="@string/settings_category_player_behavior_title">
<ListPreference
android:defaultValue="@string/preferred_open_action_default"
android:entries="@array/preferred_open_action_description_list"
android:entryValues="@array/preferred_open_action_values_list"
android:key="@string/preferred_open_action_key"
android:summary="@string/preferred_open_action_settings_summary"
android:title="@string/preferred_open_action_settings_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/resume_on_audio_focus_gain_key"
android:summary="@string/resume_on_audio_focus_gain_summary"
android:title="@string/resume_on_audio_focus_gain_title"/>
<SwitchPreference
android:defaultValue="true"
android:key="@string/player_gesture_controls_key"
android:summary="@string/player_gesture_controls_summary"
android:title="@string/player_gesture_controls_title"/>
<SwitchPreference
android:defaultValue="true"
android:key="@string/popup_remember_size_pos_key"
android:summary="@string/popup_remember_size_pos_summary"
android:title="@string/popup_remember_size_pos_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/use_inexact_seek_key"
android:summary="@string/use_inexact_seek_summary"
android:title="@string/use_inexact_seek_title"/>
</PreferenceCategory>
</PreferenceScreen>