remove the limit HLS pref as HLS now follows the default resolution

This commit is contained in:
Bnyro 2022-11-16 19:11:07 +01:00
parent 2acea5fddc
commit 4aee2c35a1
3 changed files with 3 additions and 20 deletions

View File

@ -78,7 +78,6 @@ object PreferenceKeys {
const val PLAYER_RESIZE_MODE = "player_resize_mode" const val PLAYER_RESIZE_MODE = "player_resize_mode"
const val SB_SKIP_MANUALLY = "sb_skip_manually_key" const val SB_SKIP_MANUALLY = "sb_skip_manually_key"
const val SB_SHOW_MARKERS = "sb_show_markers" const val SB_SHOW_MARKERS = "sb_show_markers"
const val LIMIT_HLS = "limit_hls"
const val PROGRESSIVE_LOADING_INTERVAL_SIZE = "progressive_loading_interval" const val PROGRESSIVE_LOADING_INTERVAL_SIZE = "progressive_loading_interval"
const val ALTERNATIVE_PLAYER_LAYOUT = "alternative_player_layout" const val ALTERNATIVE_PLAYER_LAYOUT = "alternative_player_layout"
const val USE_HLS_OVER_DASH = "use_hls" const val USE_HLS_OVER_DASH = "use_hls"

View File

@ -1102,7 +1102,9 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
if (resolutions.any { if (resolutions.any {
it.resolution == vid.quality.toString().split("p").first().toInt() it.resolution == vid.quality.toString().split("p").first().toInt()
} }
) continue ) {
continue
}
resolutions.add( resolutions.add(
VideoResolution( VideoResolution(
@ -1228,18 +1230,6 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
) )
trackSelector.setParameters(params) trackSelector.setParameters(params)
// limit hls to full hd
if (
PreferenceHelper.getBoolean(
PreferenceKeys.LIMIT_HLS,
false
)
) {
val newParams = trackSelector.buildUponParameters()
.setMaxVideoSize(1920, 1080)
trackSelector.setParameters(newParams)
}
exoPlayer = ExoPlayer.Builder(requireContext()) exoPlayer = ExoPlayer.Builder(requireContext())
.setMediaSourceFactory(DefaultMediaSourceFactory(dataSourceFactory)) .setMediaSourceFactory(DefaultMediaSourceFactory(dataSourceFactory))
.setLoadControl(loadControl) .setLoadControl(loadControl)

View File

@ -76,12 +76,6 @@
android:title="@string/hls_instead_of_dash" android:title="@string/hls_instead_of_dash"
app:key="use_hls" /> app:key="use_hls" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:icon="@drawable/ic_play_filled"
android:title="@string/limit_hls"
app:key="limit_hls" />
<ListPreference <ListPreference
android:icon="@drawable/ic_loading" android:icon="@drawable/ic_loading"
app:defaultValue="64" app:defaultValue="64"