diff --git a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java
index 3d7352d..fa10209 100644
--- a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java
+++ b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java
@@ -93,6 +93,13 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
preference.setSummary(stringValue);
return true;
}
+ //check if video quality has changed & provide selected quality
+ else if (preference.getKey().equals("pref_quality")) {
+ Toast.makeText(preference.getContext(), "Quality changed", Toast.LENGTH_LONG).show();
+
+ preference.setSummary(stringValue);
+ return true;
+ }
preference.setSummary(stringValue);
@@ -201,6 +208,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
// guidelines.
bindPreferenceSummaryToValue(findPreference("pref_api_base"));
bindPreferenceSummaryToValue(findPreference("pref_theme"));
+ bindPreferenceSummaryToValue(findPreference("pref_quality"));
}
@Override
diff --git a/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java b/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java
index 1aba113..e1ca9d2 100644
--- a/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java
+++ b/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java
@@ -207,11 +207,34 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
assert videoMetaDataFragment != null;
videoMetaDataFragment.updateVideoMeta(video, mService);
- Log.v(TAG, "url : " + video.getFiles().get(0).getFileUrl());
-
- mService.setCurrentStreamUrl(video.getFiles().get(0).getFileUrl());
-
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context);
+
+ String videoQuality = sharedPref.getString("pref_quality", "");
+
+ //get video quality
+ if (video.getFiles().size() > 1 && videoQuality.equals("High")) {
+
+ mService.setCurrentStreamUrl(video.getFiles().get(0).getFileUrl());
+ Log.v(TAG, "urlHigh : " + video.getFiles().get(0).getFileUrl());
+
+ } else if (video.getFiles().size() >= 2 && videoQuality.equals("Medium")) {
+
+ mService.setCurrentStreamUrl(video.getFiles().get(1).getFileUrl());
+ Log.v(TAG, "urlMed : " + video.getFiles().get(1).getFileUrl());
+
+ } else if (video.getFiles().size() >= 3 && videoQuality.equals("Low")) {
+
+ mService.setCurrentStreamUrl(video.getFiles().get(2).getFileUrl());
+ Log.v(TAG, "urlLow : " + video.getFiles().get(2).getFileUrl());
+
+ } else {
+ //default quality
+ mService.setCurrentStreamUrl(video.getFiles().get(0).getFileUrl());
+ Log.v(TAG, "url : " + video.getFiles().get(0).getFileUrl());
+ }
+
+// Log.v(TAG, "url : " + video.getFiles().size());
+
if (sharedPref.getBoolean("pref_torrent_player", false)) {
torrentStatus.setVisibility(View.VISIBLE);
String stream = video.getFiles().get(0).getTorrentUrl();
diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml
new file mode 100644
index 0000000..97bc39a
--- /dev/null
+++ b/app/src/main/res/values-bn/strings.xml
@@ -0,0 +1,331 @@
+
+ PeerTube
+
+ VideoPlayActivity
+ সেটিং
+ সাইন ইন
+
+
+ সার্ভার
+ ইমেল / ইয়ুজারনেম
+ পাসওয়ার্ড
+ সাইন ইন
+ সাইন ইন
+ ভুল ইমেল আইডি
+ পাসওয়ার্ড খুব ছোট
+ ভুল পাসওয়ার্ড
+ এটি জরুরি ফিল্ড
+ "Contacts permissions are needed for providing email
+ completions."
+
+
+
+ সার্চ
+ সেটিং
+ " লগআউট"
+
+
+ হোম
+ "Trending"
+ Subscriptions
+ একাউন্ট
+
+
+ 1.0.0-alpha.7
+
+ https://troll.tv
+ PeerTube Server
+
+
+
+ \u0020-\u0020
+ \u0020Views
+ \@
+
+
+ Video Thumbnail
+ Account Avatar
+
+ NSFW দেখাও
+ NSFW content will be shown if enabled.
+ ভাষা ফিলটার
+ " ভিডিওর ভাষা পছন্দ করুন, কিছু পছন্দ না করলে সব ভাষার ভিডিও দেখা যাবে"
+ UrlVideoPlayActivity
+ Torrent Video Player
+ Video playback via a torrent stream. This requires Storage Permissions. (Alpha, not stable!)
+ লাইসেন্স
+ \nGNU Affero General Public License v3.0\n\nPermissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.
+ ভার্সন
+ সার্চ PeerTube
+ সার্চ
+ " কোন উত্তর নেই"
+ আরও
+ শেয়ার
+ PeerTube
+ Invalid Url!
+ ডার্ক মোড
+ Restart App for Dark Mode to take effect.
+ App Theme
+ Restart App for theme to take effect.
+
+ Abkhazian
+ Afar
+ Afrikaans
+ Akan
+ Albanian
+ American Sign Language
+ Amharic
+ Arabic
+ Aragonese
+ Armenian
+ Assamese
+ Avaric
+ Aymara
+ Azerbaijani
+ Bambara
+ Bashkir
+ Basque
+ Belarusian
+ বাংলা
+ Bislama
+ Bosnian
+ Brazilian Sign Language
+ Breton
+ British Sign Language
+ Bulgarian
+ Burmese
+ Catalan
+ Chamorro
+ Chechen
+ Chinese
+ Chinese Sign Language
+ Chuvash
+ Cornish
+ Corsican
+ Cree
+ Croatian
+ Czech
+ Czech Sign Language
+ Danish
+ Danish Sign Language
+ Dhivehi
+ Dutch
+ Dzongkha
+ ইংলিশ
+ Esperanto
+ Estonian
+ Ewe
+ Faroese
+ Fijian
+ Finnish
+ French
+ French Sign Language
+ Fulah
+ Galician
+ Ganda
+ Georgian
+ German
+ German Sign Language
+ Guarani
+ Gujarati
+ Haitian
+ Hausa
+ Hebrew
+ Herero
+ Hindi
+ Hiri Motu
+ Hungarian
+ Icelandic
+ Igbo
+ Indonesian
+ Inuktitut
+ Inupiaq
+ Irish
+ Italian
+ Japanese
+ Japanese Sign Language
+ Javanese
+ Kalaallisut
+ Kannada
+ Kanuri
+ Kashmiri
+ Kazakh
+ Khmer
+ Kikuyu
+ Kinyarwanda
+ Kirghiz
+ Klingon
+ Komi
+ Kongo
+ Korean
+ Kotava
+ Kuanyama
+ Kurdish
+ Lao
+ Latvian
+ Limburgan
+ Lingala
+ Lithuanian
+ Lojban
+ Luba-Katanga
+ Luxembourgish
+ Macedonian
+ Malagasy
+ Malay (macrolanguage)
+ Malayalam
+ Maltese
+ Manx
+ Maori
+ Marathi
+ Marshallese
+ Modern Greek (1453-)
+ Mongolian
+ Nauru
+ Navajo
+ Ndonga
+ Nepali (macrolanguage)
+ North Ndebele
+ Northern Sami
+ Norwegian
+ Norwegian Bokmål
+ Norwegian Nynorsk
+ Nyanja
+ Occitan
+ Ojibwa
+ Oriya (macrolanguage)
+ Oromo
+ Ossetian
+ Pakistan Sign Language
+ Panjabi
+ Persian
+ Polish
+ Portuguese
+ Pushto
+ Quechua
+ Romanian
+ Romansh
+ Rundi
+ Russian
+ Russian Sign Language
+ Samoan
+ Sango
+ Sardinian
+ Saudi Arabian Sign Language
+ Scottish Gaelic
+ Serbian
+ Serbo-Croatian
+ Shona
+ Sichuan Yi
+ Sindhi
+ Sinhala
+ Slovak
+ Slovenian
+ Somali
+ South African Sign Language
+ South Ndebele
+ Southern Sotho
+ Spanish
+ Sundanese
+ Swahili (macrolanguage)
+ Swati
+ Swedish
+ Swedish Sign Language
+ Tagalog
+ Tahitian
+ Tajik
+ Tamil
+ Tatar
+ Telugu
+ Thai
+ Tibetan
+ Tigrinya
+ Tonga (Tonga Islands)
+ Tsonga
+ Tswana
+ Turkish
+ Turkmen
+ Twi
+ Uighur
+ Ukrainian
+ Urdu
+ Uzbek
+ Venda
+ Vietnamese
+ Walloon
+ Welsh
+ Western Frisian
+ Wolof
+ Xhosa
+ Yiddish
+ Yoruba
+ Zhuang
+ Zulu
+
+ লাল
+ গোলাপি
+ বেগুনি
+ Indigo
+ নীল
+ হালকা নীল
+ Cyan
+ Teal
+ সবুজ
+ হালকা সবুজ
+ Lime
+ হলুদ
+ Amber
+ কমলা
+ Deep Orange
+ বাদামী
+ ধুসর
+ Bluegray
+ 0.5x
+ Normal
+ 1.5x
+ 2x
+
+
+ {faw-check}
+ {faw-expand}
+ {faw-compress}
+ {faw-ellipsis-v}
+ {faw-thumbs-up}
+ {faw-thumbs-down}
+ {faw-share}
+ {faw-download}
+ {faw-save}
+
+ Background Playback
+ If enabled, continues to play video in background.
+ Local
+
+ একাউন্ট
+ রিপোর্ট
+ Blacklist
+ Can not download video without write permission
+ Rating Failed
+ You must login to use this service
+
+ শেয়ার
+ ডাউনলোড
+ Privacy
+ Category
+ License
+ ভাষা
+ Tags
+
+
+
+ pref_token_access
+ pref_token_refresh
+ pref_token_expiration
+ pref_token_type
+ pref_auth_username
+ pref_auth_password
+ none
+ like
+ dislike
+ গাঢ় বেগুনি
+
+
+
diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml
index e842230..5936a02 100644
--- a/app/src/main/res/values/array.xml
+++ b/app/src/main/res/values/array.xml
@@ -435,4 +435,16 @@
+
+ - Low
+ - Medium
+ - High
+
+
+
+ - Low
+ - Medium
+ - High
+
+
diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml
index 98b1da9..cee8c5c 100644
--- a/app/src/main/res/xml/pref_general.xml
+++ b/app/src/main/res/xml/pref_general.xml
@@ -30,6 +30,14 @@
android:summary="@string/pref_description_language"
android:title="@string/pref_language" />
+
+