Commit graph

3694 commits

Author SHA1 Message Date
ThetaDev
d57a2fd44e [YouTube] Improve download speed (#9948) 2023-05-01 19:26:42 +02:00
TobiGr
7a85c08b68 Apply new itag filter only to YouTube streams 2023-04-17 13:10:29 +02:00
TobiGr
672093ad7a Use a whitelist to filter all streams retrieved by the extractor.
NewPipe Extractor now extracts all YouTube Itags and therefore only those which can be handled by the player need to be retrieved from the list of all available streams.
2023-04-17 13:00:11 +02:00
Stypox
727de29bd6 Merge pull request #10021 from Isira-Seneviratne/PendingIntentCompat
Switch to AndroidX's PendingIntentCompat.
2023-04-14 14:20:47 +02:00
Isira Seneviratne
c91ffa4863 Use AndroidX's PendingIntentCompat class. 2023-04-13 10:53:46 +05:30
AudricV
445b0380b4 [Android 6+] Add ability to always use ExoPlayer's MediaVideoCodecRenderer setOutputSurface workaround
As some devices not present in ExoPlayer's list may not implement
MediaCodec.setOutputSurface(Surface) properly, this workaround could be useful
on these devices.

It forces ExoPlayer to fall back on releasing and re-instantiating video codec
instances, which is always used on Android 5 and lower due to addition of this
method in Android 6.

To do so, a CustomMediaCodecVideoRenderer, based on ExoPlayer's
MediaVideoCodecRenderer which always return true for the
codecNeedsSetOutputSurfaceWorkaround method has been added, which is used in
CustomRenderersFactory, a class based on DefaultRenderersFactory which always
returns our CustomMediaCodecVideoRenderer as the video renderers.

CustomRenderersFactory replaces DefaultRenderersFactory in the player, in the
case this setting is enabled.
2023-04-10 17:39:27 +02:00
AudricV
bc7758d29f Move media tunneling setting to ExoPlayer settings and make this setting available on release builds
Media tunneling may be not supported by more devices than the ones we
whitelisted before.

As a matter of fact, the list of devices on which media tunneling is disabled
could be not maintainable in the future, especially if the list of devices
grows more and more.

A preferable solution is to allow users to configure this setting themselves,
allowing them to not wait for their device(s) to be whitelisted in a future
NewPipe update.

This solution has been applied in this commit and works on every build type.

The corresponding preference in the debug settings has been of course removed
and the code used to prevent media tunneling activation on specific devices has
been removed.
2023-04-10 17:37:30 +02:00
AudricV
04ddd39233 Add ability to use ExoPlayer's decoder fallback option
This option could help to avoid decoder initialization issues, which falls back
to lower-priority decoders if decoder initialization fails. This may result in
poor playback performance than when using primary decoders.

It is disabled by default, but can be enabled in ExoPlayer settings.
2023-04-10 17:37:30 +02:00
AudricV
9ff218b97a Add ExoPlayerSettingsFragment and move playback load interval size setting into it
This fragment has been added into SettingsResourceRegistry, to allow searches
in its options.

It has been placed at the place of the previous playback load interval size
setting (so in Video and Audio settings).
2023-04-10 17:37:30 +02:00
Stypox
464a4433d5 Fix settings migration 2023-04-04 11:06:20 +02:00
Stypox
8d421ef0c3 Fix checkstyle 2023-04-04 10:02:01 +02:00
ge78fug
fcbebba712 Changed the default of the switches 2023-04-04 09:57:06 +02:00
Marius Wagner
efbb06fd84 Update app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
Co-authored-by: Stypox <stypox@pm.me>
2023-04-04 09:57:06 +02:00
ge78fug
ce0a36bf28 Added the migration 2023-04-04 09:57:06 +02:00
ge78fug
f8bd9ac05f Changed the naming 2023-04-04 09:57:06 +02:00
Marius Wagner
24036fa27e Made the requested changes 2023-04-04 09:57:06 +02:00
ge78fug
1908a477d3 Made two list options 2023-04-04 09:57:06 +02:00
ge78fug
f62884f0a1 Fixed a bug 2023-04-04 09:57:06 +02:00
ge78fug
a9a151f58b Updated the gesture-switch-toggle 2023-04-04 09:57:06 +02:00
ge78fug
1154e6acc9 Changed to val 2023-04-04 09:57:06 +02:00
Marius Wagner
9afaf13dcf Update app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
Co-authored-by: Stypox <stypox@pm.me>
2023-04-04 09:57:06 +02:00
ge78fug
c9b3dfda7e Created a setting to switch the sides of volume and brightness 2023-04-04 09:57:06 +02:00
Stypox
ab22704796 Merge pull request #9812 from TeamNewPipe/revert-8894-WindowCompat
Revert "Use WindowCompat."
2023-04-03 14:23:17 +02:00
Audric V
3c6c8ca257 Merge pull request #9968 from AudricV/fix-open-in-browser-without-browser
Use a system chooser when opening links in browser in the case there is no browser available
2023-03-26 12:41:42 +02:00
AudricV
2f3b066b84 Use a system chooser when opening links in browser in the case there is no browser available
This change makes the app using the behavior when there is no default browser
on Android 11 and lower, by opening a system chooser when there is no browser
available (on all Android versions).

Also catch any exception when the system chooser cannot be opened and show the
"No app on your device can open this" toast in this case, as an
`ActivityNotFoundException` could be thrown if no app is available to open a
given web link.
2023-03-26 00:04:38 +01:00
TobiGr
ae82ce5743 Remove wrong annotation 2023-03-03 11:58:44 +01:00
Stypox
65d0f89a09 Merge pull request #9707 from Jared234/1473_remove_duplicates_from_playlist
Remove duplicates from playlist feature
2023-02-28 22:14:01 +01:00
Stypox
6f5fec78fb Update app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java 2023-02-28 21:40:11 +01:00
Stypox
c04e2cda2c Update app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java 2023-02-28 21:35:57 +01:00
Stypox
7726a0434f Merge pull request #9747 from Jared234/9126_remove_partially_watched_from_feed
Added option to remove partially watched videos from the 'Whats new' feed
2023-02-28 19:10:11 +01:00
Jared Fantaye
31b9dddf8a Fixed some small issues 2023-02-28 17:30:17 +01:00
Jared Fantaye
2ac9258cde Merge remote-tracking branch 'origin/1473_remove_duplicates_from_playlist' into 1473_remove_duplicates_from_playlist 2023-02-28 16:44:13 +01:00
Jared Fantaye
e399847186 Refactoring removeDuplicates function and preventing concurrent calls. 2023-02-28 16:43:58 +01:00
Stypox
e71374c024 Merge pull request #9847 from Redirion/exo183
Update to ExoPlayer 2.18.3
2023-02-26 19:16:25 +01:00
Stypox
d54f9d7e30 Listen to ignore hardware buttons pref changes 2023-02-26 14:28:57 +01:00
Nyan Cat
686a079531 Implement Ignore hardware media button events option 2023-02-26 14:02:50 +01:00
Stypox
f6ef1d14f7 Merge pull request #9728 from mahendranv/channel_card
Larger channel cards in search results
2023-02-26 13:43:09 +01:00
Stypox
529c09e32c Merge pull request #8180 from Trust04zh/fix-4053-8176
Make UI behavior for playback information display more consistent
2023-02-26 13:22:13 +01:00
Stypox
964d753821 Merge pull request #9755 from Jared234/9458_faulty_playlist_thumbnail_update
Fixed a bug that caused erroneous updates of the playlist thumbnails
2023-02-26 13:13:12 +01:00
Jared Fantaye
34d3ee3a63 Made some small code improvements 2023-02-25 22:14:49 +01:00
Stypox
4a59ec5ebe Merge pull request #9850 from Stypox/fix-api33-links-again3
[Android 11+] Correctly open URLs in browser and fix opening downloads and external players
2023-02-25 14:33:41 +01:00
Stypox
38687fe75f Improve javadocs in ShareUtils 2023-02-25 13:14:31 +01:00
Stypox
ebda768674 Rename videoURL to streamUrl 2023-02-25 13:14:31 +01:00
Stypox
e8e04606f8 Use non-deprecated resolveActivity method on API 33+
But such method is not available before API 33
2023-02-25 13:14:31 +01:00
Stypox
de067fe798 Correctly open urls in browser on Android 11+
- Fix misconfiguration in manifest ('http|https|market' is not valid)
- Split ShareUtils functions taking a boolean parameter into pairs of functions with better names and less runtime checks
- Move all Kore-related functions to KoreUtils
- Remove the toast_no_player string
2023-02-25 09:13:59 +01:00
Robin
0f460841d8 Update to ExoPlayer 2.18.3 2023-02-23 12:46:05 +01:00
Stypox
d0ca51e954 Revert "Use WindowCompat." 2023-02-14 08:27:04 +01:00
pratyaksh1610
04546503ad Prevent NPEs when comment text is null 2023-02-14 08:18:13 +01:00
Jared Fantaye
0752461c77 Made some small code improvements 2023-02-09 23:17:36 +01:00
Jared Fantaye
2567a6d28c Implemented the suggested changes 2023-02-09 21:18:21 +01:00