Merge pull request #785 from Bnyro/master

[SILENT] minor player UI fixes
This commit is contained in:
Bnyro 2022-07-14 19:58:36 +02:00 committed by GitHub
commit c23951a5b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -1196,9 +1196,10 @@ class PlayerFragment : Fragment() {
val defRes = PreferenceHelper.getString(
requireContext(),
"default_resolution",
"auto"
"hls"
)!!
if (defRes != "auto") {
if (defRes != "hls") {
videosNameArray.forEachIndexed { index, pipedStream ->
// search for quality preference in the available stream sources
if (pipedStream.contains(defRes)) {
@ -1210,6 +1211,7 @@ class PlayerFragment : Fragment() {
}
}
}
// if default resolution isn't set or available, use hls if available
if (streams.hls != null) {
val mediaItem: MediaItem = MediaItem.Builder()

View File

@ -147,6 +147,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:layout_weight="1"
android:visibility="invisible">

View File

@ -363,7 +363,7 @@
android:layout_height="0dp"
android:background="?attr/colorSurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.3"
app:layout_constraintHeight_percent="0.275"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@ -583,7 +583,7 @@
<item>144p</item>
</string-array>
<string-array name="defresValue">
<item></item>
<item>hls</item>
<item>1080p</item>
<item>720p</item>
<item>480p</item>