mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #3479 from Bnyro/master
Preference to not play videos automatically
This commit is contained in:
commit
31a0acf4f4
@ -95,6 +95,7 @@ object PreferenceKeys {
|
||||
const val AUTOPLAY_COUNTDOWN = "autoplay_countdown"
|
||||
const val LBRY_HLS = "lbry_hls"
|
||||
const val AUTO_FULLSCREEN_SHORTS = "auto_fullscreen_shorts"
|
||||
const val PLAY_AUTOMATICALLY = "play_automatically"
|
||||
|
||||
/**
|
||||
* Background mode
|
||||
|
@ -736,7 +736,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
trySeekToTimeStamp()
|
||||
|
||||
exoPlayer.prepare()
|
||||
if (!DataSaverMode.isEnabled(requireContext())) exoPlayer.play()
|
||||
if (PreferenceHelper.getBoolean(PreferenceKeys.PLAY_AUTOMATICALLY, true)) {
|
||||
exoPlayer.play()
|
||||
}
|
||||
|
||||
if (binding.playerMotionLayout.progress != 1.0f) {
|
||||
// show controllers when not in picture in picture mode
|
||||
|
@ -460,6 +460,8 @@
|
||||
<string name="new_group">New</string>
|
||||
<string name="group_name">Group name</string>
|
||||
<string name="edit_group">Edit group</string>
|
||||
<string name="play_automatically">Play automatically</string>
|
||||
<string name="play_automatically_summary">Start playing video automatically when selecting</string>
|
||||
|
||||
<!-- Notification channel strings -->
|
||||
<string name="download_channel_name">Download Service</string>
|
||||
|
@ -13,6 +13,13 @@
|
||||
app:key="data_saver_mode_key"
|
||||
app:title="@string/data_saver_mode" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_play_circle"
|
||||
android:summary="@string/play_automatically_summary"
|
||||
app:key="play_automatically"
|
||||
app:title="@string/play_automatically" />
|
||||
|
||||
<com.github.libretube.ui.views.SliderPreference
|
||||
android:icon="@drawable/ic_download"
|
||||
android:key="max_concurrent_downloads"
|
||||
|
Loading…
Reference in New Issue
Block a user