Commit Graph

85 Commits

Author SHA1 Message Date
Stypox ef20d9b91a
Move stream's cache key generation in PlaybackResolver and improve PlaybackResolver's code 2022-06-17 22:00:51 +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 b8dbb3f073
Use 64 KiB as the default progressive load interval
This ensures a small value is used by default, solving buffering issues at the beginning of videos
2022-04-29 16:10:39 +02:00
opusforlife2 9b3e43ffc1
Merge pull request #8279 from TiA4f8R/set-maximum-allowed-opacity-for-close-overlay-android-12-and-higher
Adapt opacity of popup close button to allow touches in other apps on Android >=12
2022-04-23 17:39:15 +00:00
TiA4f8R d5a0f8f23c
Set opacity of the popup close button to 0.8 on Android 12 and higher
Setting this opacity should allow touches outside NewPipe when using the popup player.

See https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_NOT_TOUCHABLE for more details.
2022-04-22 15:09:20 +02:00
karyogamy 55fc3fc177 added: caption language stem utility to support language variant conversion between videos. 2022-04-08 18:21:30 -04:00
karyogamy ab45efceab - added: variable load check interval for progressive stream.
- added: preferences to allow user setting of above.
2022-03-01 20:14:53 +01:00
Robin 9c9730b152 Use DefaultLoadcontrol 2021-11-14 20:12:12 +01:00
Robin 1b9c2b37c5 Use Android11+ extractors 2021-11-12 19:17:52 +01:00
Robin eae1f8b597 Update ExoPlayer to 2.14.2 2021-11-12 19:17:51 +01:00
Stypox 3c2ea7697c
Add option to directly open fullscreen when the main player starts 2021-09-01 20:08:37 +02:00
Robin f5d015e8f9 Use ExoPlayer default values for buffers 2021-06-18 20:18:24 +02:00
Robin 95f61542b5 TEST: Downgrade ExoPlayer to 2.12 2021-05-14 14:47:53 +02:00
Robin c85b97a484
Fix: fragmentSize is below the minimum (#6238)
noticed logs " CacheDataSink: fragmentSize is below the minimum recommended value of 2097152. This may cause poor cache performance.

this fixes the issue by using ExoPlayers MIN_RECOMMENDED_FRAGMENT_SIZE. Unfortunately that field is private:
aeb306a164/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java (L123)
2021-05-04 19:08:25 +02:00
Fynn Godau c9766d25ef Rename related streams to related items 2021-03-31 22:33:22 +02:00
Robin 83d16932a4 Update to ExoPlayer 2.13.2 2021-03-31 10:05:44 +02:00
Stypox 86381696f4
Merge pull request #5457 from Redirion/exo123
Update to ExoPlayer 2.12.3
2021-03-18 18:59:56 +01:00
TobiGr 86fa629591 Fix last resize mode not being restored correctly
I think the settings key "last_resize_mode" is ambiguous. While it is used to get the recently used resize mode, someone thought while working on the resize mode switcher, that the old (to be replaced) resize mode should be stored. 
Fixes #5613
2021-03-08 09:46:33 +01:00
Robin eba0b07782
Update to ExoPlayer 2.12.3 2021-02-16 16:42:51 +01:00
Stypox fdb0f01b38
Add Objects.requireNotNull to warning which is surely not null 2021-01-28 14:35:47 +01:00
Stypox 376cba696e
Remove useless getString for default setting value 2021-01-28 14:35:00 +01:00
Stypox 4f828fbe00
Fix always minimizing to popup player 2021-01-28 14:33:12 +01:00
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
Stypox 7476498823
[Regression] Revert "Removed remember popup properties setting"
This reverts commit 314615bfef.
2020-11-15 22:24:27 +01:00
Stypox 2a2c82e73b
More fixes with opening VideoDetailFragment 2020-11-08 10:00:28 +01:00
TacoTheDank 31cffa68c5 Push conditionals inside branch expressions 2020-10-31 15:57:26 -04:00
Isira Seneviratne 58b720b004 Use ContextCompat.getSystemService() and the Context.getSystemService() extension function. 2020-10-09 08:52:05 +05:30
Panorea 314615bfef Removed remember popup properties setting 2020-10-06 18:32:20 -04:00
wb9688 f4bd20361a Fix auto-queue with no next videos 2020-09-29 10:43:17 +02:00
TobiGr 0e5f85db95
Remove "Detail Page" open action from share dialog under certain circumstances
With the new application workflow and unified player, video detail page and video player are the same activity. So show only one of these options based on whether autoplay is enabled or not, and show both if using external player
2020-09-26 21:58:34 +02:00
TacoTheDank 06d54ef77e
Clean up SDK version checks 2020-09-06 12:55:30 +02:00
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently 77cd3182f1 Removed unused line 2020-07-21 01:53:59 +03:00
Avently c7ccf9bab8 AndroidTvUtils -> DeviceUtils 2020-07-21 01:43:49 +03:00
Avently 06e70abb86 Merged the latest changes 2020-07-21 01:37:36 +03:00
wb9688 4274827dbe Use relatedItems instead of info.getRelatedStreams() 2020-07-15 18:52:36 +02:00
wb9688 7a30f4a7d2 Remove calls to getNextStream() 2020-07-14 21:27:59 +02:00
Avently d8f7db4715 Made checkStyle happy 2020-07-14 20:21:32 +03:00
Avently d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
Avently a7fbe05a73 Changes for review 2020-06-27 06:25:50 +03:00
wb9688 63bcc04eff Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Avently 398cbe9284 Better backstack, better tablet support, switching players confirmation, fix for background playback 2020-03-10 12:06:38 +03:00
Avently cc438fdb7b Player's elements positioning is better for tablet and in multiWindow mode
- status bar got a fix for situation when a phone vendor did not provide status bar height for landscape orientation
- popup will not be init'd twice
- also fixed some non-reproduceable bugs
2020-01-17 17:37:53 +03:00
Avently 92ff98d99a New logic for handling global orientation
- added a button to manually change an orientation of a video
- adapted UI for an automatic global orientation too
2020-01-16 14:20:22 +03:00
Avently 6fc91312d2 Changed default autoplay type to "Only on WiFi" 2020-01-09 19:27:10 +03:00
Avently 4c57893312 New features and fixes
- added autoplay options inside settings: always, only on wifi, never
- now statusbar will be shown in fullscreen mode
- playlists, channels can be autoplayed too (if enabled)
- changed title of background activity to Play queue
- fixed a crash
2020-01-08 19:16:50 +03:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Robin 4d80bdcc9f Update ExoPlayer to 2.9.6, including httook dependency and deprecations 2019-03-05 18:05:44 +01:00