Commit Graph

792 Commits

Author SHA1 Message Date
Stypox 6805c75c9c
Fix surface view not resizing video correctly
Also fix yet another random null pointer exception that could happen when adding the video player view
2022-08-26 18:54:51 +02:00
Isira Seneviratne 67669c286b Use ListAdapter in SuggestionListAdapter. 2022-08-18 19:52:51 +05:30
Isira Seneviratne fc46233baf Use toArray() with zero-length arrays. 2022-08-05 06:50:55 +05:30
Stypox 1a8f396e77
Merge pull request #8721 from Isira-Seneviratne/OnClickGesture_interface
Make OnClickGesture an interface.
2022-08-04 16:15:54 +02:00
Stypox 24ec642181
Merge pull request #8669 from Isira-Seneviratne/Remove_setBottomSheetCallback
Remove uses of setBottomSheetCallback().
2022-08-04 11:03:57 +02:00
Stypox ffc1d9a212
Merge pull request #8656 from Isira-Seneviratne/Use_WindowMetrics
Use WindowMetrics API.
2022-08-04 10:12:32 +02:00
Isira Seneviratne 7f018b90db Merge branch 'dev' into OnClickGesture_interface 2022-08-04 06:10:39 +05:30
Stypox 368c6c0ccb
Merge pull request #8709 from Isira-Seneviratne/Tags_case_insensitive
Sort tags case-insensitively.
2022-08-03 22:43:50 +02:00
Stypox 3420faab08
Merge pull request #8661 from Stypox/player-refactor-npe
Fix random NullPointerException when adding video player view
2022-08-02 11:09:50 +02:00
Isira Seneviratne 8a896114c1 Apply code review change. 2022-08-01 08:25:24 +05:30
Isira Seneviratne 47f58040d1 Make OnClickGesture an interface. 2022-08-01 06:47:00 +05:30
Isira Seneviratne 4d7a6fb6de Use WindowMetrics API in VideoDetailFragment and PopupPlayerUi. 2022-07-30 19:22:39 +05:30
Isira Seneviratne 69942003f7 Sort tags case-insensitively. 2022-07-29 09:21:48 +05:30
Isira Seneviratne 81fb44c45c Remove uses of setBottomSheetCallback(). 2022-07-25 18:44:30 +05:30
Isira Seneviratne 6d1c61407d Remove unnecessary method in ChannelFragment. 2022-07-21 08:02:23 +05:30
Stypox 344c33d9a1
Merge pull request #8631 from Isira-Seneviratne/Use_collection_factories
Use Java 9 collection factories.
2022-07-20 14:52:18 +02:00
Stypox 15947161e6
Merge pull request #8635 from Isira-Seneviratne/Use_stream_sort
Use stream sorting.
2022-07-20 11:06:56 +02:00
Isira Seneviratne 55a995c4cd Replace LinkedHashMap with List.of(). 2022-07-20 04:39:11 +05:30
Isira Seneviratne ca26fcb0eb Use List.of(). 2022-07-20 04:39:11 +05:30
Stypox 4eddd2c3d1
Fix random NullPointerException when adding video player view 2022-07-19 20:01:46 +02:00
Isira Seneviratne e772244440 Update app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java
Co-authored-by: Stypox <stypox@pm.me>
2022-07-19 05:13:38 +05:30
Isira Seneviratne f1de353b74 Use stream sorting. 2022-07-16 08:34:04 +05:30
litetex 3ba04f179f Fixed conflicts/build 2022-07-15 20:00:08 +02:00
litetex 8b209df253 Changed the code accordingly
+ Removed some unused code
2022-07-15 19:55:19 +02:00
litetex b7a44560f5
Merge pull request #8170 from Stypox/player-refactor
Refactor player and extract UI components
2022-07-15 19:41:23 +02:00
Stypox 0e8cc72b13
Fix random NullPointerException when adding video player view 2022-07-14 22:14:03 +02:00
Stypox 6ea85e6380
Rename dummy_* and more to placeholder_* 2022-07-14 14:27:33 +02:00
Stypox 7b9b9218dc
Remove bottom-sheet-thumbnail placeholder, clear the image instead 2022-07-14 14:14:33 +02:00
krlvm 35eeccd45a
Rename buddy.xml to dummy_person.xml 2022-07-14 14:14:32 +02:00
krlvm cc7a8fb1a6
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 8187a3bc04
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 61c1da144e
Some refactorings after review comments 2022-07-13 23:33:18 +02:00
Stypox a19073ec01
Restore checkstyle and solve its errors 2022-07-13 23:32:27 +02:00
Stypox b3f99645a3
Fix some crashes / issues after player refactor 2022-07-13 23:27:23 +02:00
Stypox 76ced59b62
Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
litetex 99104fc11d
Clean up pre-Lollipop checks 2022-07-13 19:02:24 +02:00
Stypox 4e87f5aabc
Remove misleading first "Non" from getNonUrlAndNonTorrentStreams 2022-06-18 18:52:32 +02:00
Stypox 4863084fa2
Improve code in VideoDetailFragment 2022-06-18 17:49:04 +02:00
Stypox 7ba79171c7
Refactor creation of DownloadDialog 2022-06-18 17:40:22 +02:00
AudricV 036196a487
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 7d6bf4b0ca
Improve dialog of streams for external players and fix use of the wrong codec in the list of available streams in it after a codec change in Video and Audio settings
The VideoDetailFragment will now get video streams dynamically instead of storing them as a field, so the good codec can be chosen by ListHelper.
To select a stream to play, user has now to select the quality in the list of available qualities and then press the new OK button in the alert dialog.
2022-06-17 22:00:50 +02:00
AudricV 210834fbe9
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 a59660f421
Merge pull request #8340 from litetex/fix-add-to-playlist
Fix "Add to playlist" not working and cleanup "RouterActivity" choice handling
2022-06-05 11:47:51 +02:00
litetex 2985258074 Bonus fix: Made ``single_choice_dialog_view`` scrollable + use viewbinding 2022-05-28 00:46:28 +02:00
Isira Seneviratne 21d2ae709f 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 c5e509f069 Use AppCompatResources. 2022-05-16 12:27:44 +05:30
petlyh fcaa787060 Add a "Add to playlist" item to the remote playlist menu 2022-05-10 08:48:21 +02:00
Stypox 71e46d1eca
Do not call showContentNotSupportedIfNeeded multiple times 2022-05-06 10:40:08 +02:00
Stypox 238aff7c31
channelContentNotSupported false by default 2022-05-06 10:38:47 +02:00
GGAutomaton 34468c16ad Show "content not supported" if needed 2022-05-04 23:34:07 +08:00