Skip to content

Commit 9f44c8b

Browse files
committed
refactor: move hls/dash preference to instance settings for convenience
1 parent 1f447b9 commit 9f44c8b

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

app/src/main/java/com/github/libretube/helpers/PlayerHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ object PlayerHelper {
372372
val useHlsOverDash: Boolean
373373
get() = PreferenceHelper.getBoolean(
374374
PreferenceKeys.USE_HLS_OVER_DASH,
375-
true
375+
false
376376
)
377377

378378
var repeatMode: Int

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@
331331
<string name="audio_track">Audio track</string>
332332
<string name="unsupported_file_format">Unsupported file format: %1$s</string>
333333
<string name="hls_instead_of_dash">Use HLS</string>
334-
<string name="hls_instead_of_dash_summary">Use HLS instead of DASH (will be slower, not recommended)</string>
334+
<string name="hls_instead_of_dash_summary">Use HLS instead of DASH for streaming media. Try toggling this option if video playback doesn't work.</string>
335335
<string name="auto_quality">Auto</string>
336336
<string name="limit_to_runtime">Limit to runtime</string>
337337
<string name="trends">Trends</string>

app/src/main/res/xml/audio_video_settings.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@
8686
app:title="@string/playerAudioFormat"
8787
app:useSimpleSummaryProvider="true" />
8888

89-
<SwitchPreferenceCompat
90-
android:defaultValue="true"
91-
android:icon="@drawable/ic_list"
92-
android:summary="@string/hls_instead_of_dash_summary"
93-
android:title="@string/hls_instead_of_dash"
94-
app:key="use_hls" />
95-
9689
<SwitchPreferenceCompat
9790
android:defaultValue="false"
9891
android:icon="@drawable/ic_library"

app/src/main/res/xml/instance_settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@
4141

4242
</PreferenceCategory>
4343

44+
<PreferenceCategory app:title="@string/audio_video">
45+
46+
<SwitchPreferenceCompat
47+
android:defaultValue="false"
48+
android:icon="@drawable/ic_list"
49+
android:summary="@string/hls_instead_of_dash_summary"
50+
android:title="@string/hls_instead_of_dash"
51+
app:key="use_hls" />
52+
53+
</PreferenceCategory>
54+
4455
<PreferenceCategory app:title="@string/account">
4556

4657
<Preference

0 commit comments

Comments
 (0)