Add debug option to disable media tunneling
This commit is contained in:
parent
0ff675171b
commit
1d43a2362c
|
@ -495,7 +495,11 @@ public final class Player implements
|
||||||
simpleExoPlayer.addTextOutput(binding.subtitleView);
|
simpleExoPlayer.addTextOutput(binding.subtitleView);
|
||||||
|
|
||||||
// enable media tunneling
|
// enable media tunneling
|
||||||
if (DeviceUtils.shouldSupportMediaTunneling()) {
|
if (DEBUG && PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
.getBoolean(context.getString(R.string.disable_media_tunneling_key), false)) {
|
||||||
|
Log.d(TAG, "[" + Util.DEVICE_DEBUG_INFO + "] " +
|
||||||
|
"media tunneling disabled in debug preferences");
|
||||||
|
} else if (DeviceUtils.shouldSupportMediaTunneling()) {
|
||||||
trackSelector.setParameters(
|
trackSelector.setParameters(
|
||||||
trackSelector.buildUponParameters().setTunnelingEnabled(true));
|
trackSelector.buildUponParameters().setTunnelingEnabled(true));
|
||||||
} else if (DEBUG) {
|
} else if (DEBUG) {
|
||||||
|
|
|
@ -172,6 +172,7 @@
|
||||||
<string name="show_memory_leaks_key" translatable="false">show_memory_leaks_key</string>
|
<string name="show_memory_leaks_key" translatable="false">show_memory_leaks_key</string>
|
||||||
<string name="allow_disposed_exceptions_key" translatable="false">allow_disposed_exceptions_key</string>
|
<string name="allow_disposed_exceptions_key" translatable="false">allow_disposed_exceptions_key</string>
|
||||||
<string name="show_original_time_ago_key" translatable="false">show_original_time_ago_text_key</string>
|
<string name="show_original_time_ago_key" translatable="false">show_original_time_ago_text_key</string>
|
||||||
|
<string name="disable_media_tunneling_key" translatable="false">disable_media_tunneling_text_key</string>
|
||||||
<string name="crash_the_app_key" translatable="false">crash_the_app_key</string>
|
<string name="crash_the_app_key" translatable="false">crash_the_app_key</string>
|
||||||
|
|
||||||
<!-- THEMES -->
|
<!-- THEMES -->
|
||||||
|
|
|
@ -521,6 +521,8 @@
|
||||||
<string name="enable_disposed_exceptions_summary">Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal</string>
|
<string name="enable_disposed_exceptions_summary">Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal</string>
|
||||||
<string name="show_original_time_ago_title">Show original time ago on items</string>
|
<string name="show_original_time_ago_title">Show original time ago on items</string>
|
||||||
<string name="show_original_time_ago_summary">Original texts from services will be visible in stream items</string>
|
<string name="show_original_time_ago_summary">Original texts from services will be visible in stream items</string>
|
||||||
|
<string name="disable_media_tunneling_title">Disable media tunneling</string>
|
||||||
|
<string name="disable_media_tunneling_summary">Disable media tunneling if you experience a black screen or stuttering on video playback</string>
|
||||||
<string name="crash_the_app">Crash the app</string>
|
<string name="crash_the_app">Crash the app</string>
|
||||||
<!-- Subscriptions import/export -->
|
<!-- Subscriptions import/export -->
|
||||||
<string name="import_export_title">Import/export</string>
|
<string name="import_export_title">Import/export</string>
|
||||||
|
|
|
@ -30,6 +30,13 @@
|
||||||
android:title="@string/show_original_time_ago_title"
|
android:title="@string/show_original_time_ago_title"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="@string/disable_media_tunneling_key"
|
||||||
|
android:summary="@string/disable_media_tunneling_summary"
|
||||||
|
android:title="@string/disable_media_tunneling_title"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/crash_the_app_key"
|
android:key="@string/crash_the_app_key"
|
||||||
android:title="@string/crash_the_app"
|
android:title="@string/crash_the_app"
|
||||||
|
|
Loading…
Reference in New Issue