On some phones (e.g. Oppo and Oneplus) the video player enters the STATE_IDLE 10 minutes after being paused. This causes the play button to stop working.
This happens because once a player has become idle, we need to call prepare() before playback can happen again.
But after I added prepare(), it would just skip to the end of the video. So now I'm executing the same code that happens when ERROR_CODE_UNSPECIFIED is done. This causes playback to resume normally.
androidx framework has bumped minSdk requirement to API 23. Most libs dependening
upon the framework as a result require us to bump API level or keep using outdated versions.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Javadoc comment at column 46 has parse error. Details: no viable alternative at input '<http:/' while parsing HTML_ELEMENT [UnusedImports]
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Currently translated at 63.3% (57 of 90 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 64.4% (58 of 90 strings)
Translated using Weblate (Swedish)
Currently translated at 99.8% (772 of 773 strings)
Translated using Weblate (Burmese)
Currently translated at 1.1% (1 of 90 strings)
Translated using Weblate (Latvian)
Currently translated at 97.6% (755 of 773 strings)
Translated using Weblate (Portuguese)
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Latvian)
Currently translated at 97.6% (755 of 773 strings)
Translated using Weblate (Latvian)
Currently translated at 18.8% (17 of 90 strings)
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 64.4% (58 of 90 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Russian)
Currently translated at 98.8% (764 of 773 strings)
Translated using Weblate (Indonesian)
Currently translated at 100.0% (773 of 773 strings)
Translated using Weblate (Latvian)
Currently translated at 97.5% (754 of 773 strings)
Deleted translation using Weblate (Aymara (Southern))
Deleted translation using Weblate (Mainfränkisch)
Deleted translation using Weblate (Azerbaijani (Southern))
Deleted translation using Weblate (Azerbaijani (Southern))
Deleted translation using Weblate (Kashmiri)
Deleted translation using Weblate (Sicilian)
Deleted translation using Weblate (Aymara)
Deleted translation using Weblate (Luri (Bakhtiari))
Deleted translation using Weblate (Yiddish)
Deleted translation using Weblate (Romany)
Deleted translation using Weblate (Corsican)
Deleted translation using Weblate (Gaelic)
Deleted translation using Weblate (Arabic (Tunisian))
Deleted translation using Weblate (French (Louisiana))
Deleted translation using Weblate (German (Low))
Deleted translation using Weblate (English (Old))
Deleted translation using Weblate (English (Middle))
Deleted translation using Weblate (Arabic (Najdi))
Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Mona Lisa <nickwick@users.noreply.hosted.weblate.org>
Co-authored-by: Morkovka21Vek <morkovka21vek@gmail.com>
Co-authored-by: Nicolás Pérez <nicoperez241@proton.me>
Co-authored-by: Omikorin <git@omikor.in>
Co-authored-by: Philip Goto <philip.goto@gmail.com>
Co-authored-by: TobiGr <TobiGr@users.noreply.github.com>
Co-authored-by: Tun Tun AUNG <tuntunaung@codingclassroom.org>
Co-authored-by: UDP <udp@users.noreply.hosted.weblate.org>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: ℂ𝕠𝕠𝕠𝕝 (𝕘𝕚𝕥𝕙𝕦𝕓.𝕔𝕠𝕞/ℂ𝕠𝕠𝕠𝕝) <coool@mail.lv>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/lv/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/my/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hant/
Translation: NewPipe/Metadata
Replace the previous string-based resolution/fps/etc. handling for VideoStreams
by parsing the 'getResolution()'-string to a data class to improve maintainability.
Video resolutions (e.g. "720p60") were previously compared and matched using
regex-based string manipulation all over the place. This was fragile,
required repeated parsing and made it difficult to extend the matching logic.
It can handle all the strings like before: "720p", "720p60"
Additionally this patch can also handle strings like: "720p60@123k", or "720p@2m"
Main changes:
- Introduce internal data class VideoQuality (resolution, fps, bitrate, formatRank).
- Introduce internal VideoStreamWithQuality to associate streams with parsed quality.
- Parse quality only once.
- Replace resolution string sorting with a comparator based on
resolution -> fps -> formatRank -> bitrate.
- Rework stream selection to use a priority-based matching algorithm
(format, resolution, fps, bitrate).
- Prefer candidates with bitrate closest to the requested one when multiple
streams match the same priority class.
- Completed the UI and logic for pending items of Debug screen using Jetpack Compose.
- Implemented a new navigation system for settings using the navigation3
lib as it is now stable.
- Reuses the `ScaffoldWithToolbar` composable and removed the previous
`Toolbar` composable to avoid redundancy in code.
- Refactored the `SettingsViewModel` to use a `BooleanPreference` helper
class to reuse and reducing boilerplate for state management.
- Created a shared `TextBase` composable to remove duplicated UI logic
between `SwitchPreference` and `TextPreference`.
- Move the build-variant-dependent logic for LeakCanary and reused it in
Compose and Fragment, this logic is used for ensuring the leak canary
fields are only enabled in debug variants.
- Fixed a layout bug in `SwitchPreference` where long summary text could
misalign the switch component and also adjusted the paddings for consistency.
Use getApplicationContext() instead of getContext() in ENQUEUE,
ENQUEUE_NEXT, START_HERE_ON_BACKGROUND, and START_HERE_ON_POPUP
entries to prevent NullPointerException when the fragment's activity
context becomes null during configuration changes (e.g. device rotation).
The fragment context can become null when the activity is destroyed
during rotation, but the async callback from fetchItemInfoIfSparse
still holds a reference to the now-detached fragment. Using
Application context ensures a stable, non-null context throughout
the async operation lifecycle.