Commit graph

591 commits

Author SHA1 Message Date
litetex
c32fd9a20c Changed the code accordingly
+ Removed some unused code
2022-07-15 19:55:19 +02:00
litetex
1706856f24 Merge pull request #8170 from Stypox/player-refactor
Refactor player and extract UI components
2022-07-15 19:41:23 +02:00
Stypox
a6cc11225d Rename dummy_* and more to placeholder_* 2022-07-14 14:27:33 +02:00
krlvm
6e3add060e Rename buddy.xml to dummy_person.xml 2022-07-14 14:14:32 +02:00
krlvm
175459cd4f Improve image placeholders
- Show placeholders until the image is loaded because timeout can be very long and missing profile pictures and video thumbnails make app inconvenient to use

- Adapt profile picture and video thumbnail placeholders to light theme

- Replace profile picture and video thumbnail placeholders with vector graphics
2022-07-14 14:14:32 +02:00
Stypox
d71da66cc5 Move PlayerType into its own class and add documentation
Also replace some `isPlayerOpen` with direct `playerType == null` checks.
2022-07-13 23:33:18 +02:00
Stypox
cf4a472b5c Move functions to get Android dimen to ThemeHelper 2022-07-13 23:33:18 +02:00
Stypox
5ba14c4b7c Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
litetex
4a4ca3c18e Clean up pre-Lollipop checks 2022-07-13 19:02:24 +02:00
nikita.artikhovich
a0ec49ebdd Add download option to long-press menu 2022-07-06 11:42:57 +02:00
litetex
f7e3a96aa7 Use correct `NonNull` 2022-06-22 19:54:46 +02:00
litetex
0297dba324 Fix compile errors 2022-06-22 19:47:03 +02:00
Stypox
321714eddc Remove misleading first "Non" from getNonUrlAndNonTorrentStreams 2022-06-18 18:52:32 +02:00
AudricV
ce58a2df30 Filter streams using Java 8 Stream's API instead of removing streams with list iterators and add a better toast when there is no audio stream for external players
This ensures to not remove streams from the StreamInfo lists themselves, and so to not have to create list copies.

The toast shown in RouterActivity, when there is no audio stream available for external players, is now shown, in the same case, when pressing the background button in VideoDetailFragment.
2022-06-17 22:01:29 +02:00
AudricV
c0b4c41aff Use StreamTypeUtil where possible and add isAudio and isVideo to this utility class 2022-06-17 22:01:26 +02:00
Stypox
5f2c519700 Code improvements here and there 2022-06-17 22:00:53 +02:00
AudricV
f7d2975ad1 Add support of other delivery methods than progressive HTTP (in the player only)
Detailed changes:

- External players:

  - Add a message instruction about stream selection;
  - Add a message when there is no stream available for external players;
  - Return now HLS, DASH and SmoothStreaming URL contents, in addition to progressive HTTP ones.

- Player:

  - Support DASH, HLS and SmoothStreaming streams for videos, whether they are content URLs or the manifests themselves, in addition to progressive HTTP ones;
  - Use a custom HttpDataSource to play YouTube contents, based of ExoPlayer's default one, which allows better spoofing of official clients (custom user-agent and headers (depending of the client used), use of range and rn (set dynamically by the DataSource) parameters);
  - Fetch YouTube progressive contents as DASH streams, like official clients, support fully playback of livestreams which have ended recently and OTF streams;
  - Use ExoPlayer's default retries count for contents on non-fatal errors (instead of Integer.MAX_VALUE for non-live contents and 5 for live contents).

- Download dialog:

  - Add message about support of progressive HTTP streams only for downloading;
  - Remove several duplicated code and update relevant usages;
  - Support downloading of contents with an unknown media format.

- ListHelper:

  - Catch NumberFormatException when trying to compare two video streams between them.

- Tests:

  - Update ListHelperTest and StreamItemAdapterTest to fix breaking changes in the extractor.

- Other places:

  - Fixes deprecation of changes made in the extractor;
  - Improve some code related to the files changed.

- Issues fixed and/or improved with the changes:

  - Seeking of PeerTube HLS streams (the duration shown was the one from the stream duration and not the one parsed, incomplete because HLS streams are fragmented MP4s with multiple sidx boxes, for which seeking is not supported by ExoPlayer) (the app now uses the HLS manifest returned for each quality, in the master playlist (not fetched and computed by the extractor));
  - Crash when loading PeerTube streams with a separated audio;
  - Lack of some streams on some YouTube videos (OTF streams);
  - Loading times of YouTube streams, after a quality change or a playback start;
  - View count of YouTube ended livestreams interpreted as watching count (this type of streams is not interpreted anymore as livestreams);
  - Watchable time of YouTube ended livestreams;
  - Playback of SoundCloud HLS-only tracks (which cannot be downloaded anymore because the workaround which was used is being removed by SoundCloud, so it has been removed from the extractor).
2022-06-17 22:00:22 +02:00
Stypox
cb6f1340b6 Merge pull request #8404 from Isira-Seneviratne/Use_AppCompatResources
Use AppCompatResources.
2022-05-30 15:42:04 +02:00
Stypox
9ee456b908 Improvements to sharing content with thumbnail 2022-05-22 21:34:10 +02:00
Isira Seneviratne
c06115fc85 Merge branch 'dev' into Use_AppCompatResources
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
2022-05-16 12:36:00 +05:30
Isira Seneviratne
d02b988138 Use AppCompatResources. 2022-05-16 12:27:44 +05:30
TiA4f8R
f1307b32a3 [Android 10+] Add image preview of the content shared where possible
These previews will be only available for images cached in the cache used by Picasso.
The Bitmap of the content is compressed in JPEG 90 and saved inside the application cache folder under the name android_share_sheet_image_preview.jpg.
The current image will be, of course, always overwritten by the next one and cleared when the application cache is cleared.
2022-05-14 16:53:24 +02:00
litetex
ed6af3d94e Removed placeholder prefix 2022-05-07 15:08:37 +02:00
litetex
4a5e5e1b87 Use material icon 2022-05-07 15:08:37 +02:00
litetex
0dee6f9fd5 Converted placeholders to svg
* Required for SubscriptionFragment (otherwise the PopUp-menu uses half of the screen)
* Size reduction
* Fixed/Improved some images:
  * Bandcamp: Was facing in the wrong direction and used an incorrect logo
  * Media CCC: Update logo
  * YT: Added NewPipe logo so that it's not just a rectangle
2022-05-07 15:08:35 +02:00
Stypox
24567937cc Merge pull request #7989 from litetex/refactor-playback-parameter-dialog
Rewrote ``PlaybackParameterDialog``
2022-04-30 17:53:26 +02:00
Yingwei Zheng
836ee6079e Fix keyboard showing after the search box acquiring focus (#8227)
* Fix keyboard showing after the search box acquiring focus
* Fix the underlying problem as described in the issue #7647
2022-04-18 16:05:42 +02:00
litetex
284b44414b Merged `DrawableResolver into ThemeHelper` 2022-04-16 21:21:57 +02:00
litetex
1838c5b623 Update DrawableResolver.kt
Nicer import 😉
2022-04-16 21:21:55 +02:00
litetex
e6f59612b0 Use better Kotlin syntax
From the PR review
2022-04-16 21:21:54 +02:00
litetex
7723a51c9c Reworked switching to semitones
Using an expandable Tab-like component instead of a combobox
2022-04-16 21:21:51 +02:00
Robin
552e21ee20 Merge pull request #8127 from litetex/fix-SparseItemUtil
Fix `SparseItemUtil` so we don't enqueue twice
2022-04-07 17:21:18 +02:00
litetex
bd4740fa15 Better naming 2022-04-02 15:44:06 +02:00
Mauricio Colli
353f50296d Fix download dialog selector layout and add some tests 2022-04-02 15:25:08 +02:00
litetex
5f9fbb26de Fix SparseItemUtil loading
* Added a missing `return` statement
* `fetchUploaderUrlIfSparse` now has a similar layout to `fetchItemInfoIfSparse`
2022-03-30 21:11:15 +02:00
Stypox
6ead95b5d2 Merge branch 'dev' into pr2335 2022-03-19 22:29:10 +01:00
litetex
35871f7fa5 Merge pull request #8068 from TacoTheDank/lintCleaning
Some lint cleaning
2022-03-19 14:37:34 +01:00
litetex
4acc9c66eb Merge pull request #8066 from TacoTheDank/simpleSeekbarChange
Create stub implementation for OnSeekBarChangeListener
2022-03-19 14:37:10 +01:00
TacoTheDank
141ad361b0 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
TacoTheDank
3f9cd23979 Delete some unused code 2022-03-17 23:26:34 -04:00
TacoTheDank
550063f50f Create stub implementation for OnSeekBarChangeListener 2022-03-17 21:49:04 -04:00
litetex
f70d87d0b1 Merge pull request #7981 from Stypox/sparse-items-deduplic
Deduplicate code for fetching stream info when sparse
2022-03-16 15:18:10 +01:00
Stypox
2ca158ee30 Fix comments and rearrange code 2022-03-15 15:20:25 +01:00
TacoTheDank
bf800b348b Convert NewVersionWorker to Kotlin 2022-03-03 13:34:35 -05:00
TacoTheDank
15064830d2 Kotlin-ize ReleaseVersionUtil, merge with NewVersionManager 2022-03-03 13:21:50 -05:00
TacoTheDank
36c69cb3d6 Move utility methods out of CheckForNewAppVersion 2022-03-03 13:19:06 -05:00
Stypox
463c720a5c Deduplicate code for fetching stream info when sparse
Fixes #7941
2022-03-03 16:54:40 +01:00
litetex
e6b480fdbc Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
litetex
ae111a8850 Merge pull request #7349 from TiA4f8R/seamless-transition-players
Add seamless transition between background and video players when putting the app in background (for video-only streams and audio-only streams only)
2022-02-26 16:16:18 +01:00
Stypox
2a4add2571 Small code improvements
Removed some non-translatable strings and just hardcoded them in the code, like it's being done for other string separators. This also deduplicates some code by using Localization.
Used some Kotlin feature to reduce code.
2022-02-26 10:40:24 +01:00