Commit Graph

866 Commits

Author SHA1 Message Date
Stypox 53f8415e9b
Use @SuppressWarnings for checkstyle suppressions & warnings
It's better to use @SuppressWarnings instead of the suppressions file, so that the warning suppression is at the place where it acts.
2022-03-18 23:57:11 +01:00
litetex 67651354d5 Fixed conflicts 2022-03-16 15:58:46 +01:00
litetex cefb52471f Better naming 2022-03-16 15:52:30 +01:00
litetex ee5e0e13b7 Made ``onClick`` less (cognitive) complex 2022-03-16 15:52:30 +01:00
litetex 30a8f25d52 Refactored code 2022-03-16 15:47:04 +01:00
XiangRongLin d348c2099e stupid checkstyle 2022-03-16 15:47:04 +01:00
XiangRongLin 6a400dda7b delete unused methods 2022-03-16 15:47:03 +01:00
XiangRongLin 080c4ba680 Extract 2 view click listeners from Player 2022-03-16 15:47:03 +01:00
litetex 00e4631b3b
Merge pull request #7963 from Stypox/android-tv-player
Improve player UI and navigability for Android TV
2022-03-15 21:41:48 +01:00
ktprograms 02fa5aa0fa
Implement appending queue to playlist in main player (#8008)
This also allows saving a remote playlist locally.

- Add an "Add to playlist" button to the queue menu in the Player.
- Move the appendAllToPlaylist functionality from PlayQueueActivity to
Player.

Fixes: #8004
2022-03-15 18:32:39 +01:00
Stypox af89f05011
Merge pull request #7341 from ktprograms/external-play-hide-controls
Fix player controls not hiding if resumed from media button
2022-03-15 13:43:35 +01:00
Stypox e588abd4e7
Restore handling SPACE as play-pause only in fullscreen
When not in fullscreen SPACE should be not handled by the player, and hence result in a scroll down
2022-03-03 10:14:58 +01: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
kt programs 62c0e6605c Remember adjustment step size for playback controls (speed and pitch)
- Add adjustment_step_key to settings_keys.xml to be used when
saving/loading the step size.
- Remove the global stepSize variable and the code that saves it to
outState/loads it from savedInstanceState because it's now saved to
Shared Preferences.
- Move initially setting step size to setupStepSizeSelector to be
consistent with the other view setup methods, using the value loaded
from Shared Preferences.
- Save the step size to Shared Preferences inside setStepSize.

Fixes: #7031
2022-03-01 16:27:20 +08:00
Stypox 146062d921
Fix player pop-ups not giving feedback on touch/focus 2022-02-27 18:49:16 +01:00
Stypox 96c4201929
Fix controls shown below queue/segments list when using DPAD
Also invert if
2022-02-27 18:49:16 +01:00
Stypox a0bbcd2fee
Fix player queue/segments list buttons not focusable with DPAD
Now the in-player play queue and the segments list are closeable
2022-02-27 18:49:16 +01:00
Stypox 3f7ba2e3d1
Merge pull request #7565 from haklc/dev
Change pitch by semitones
2022-02-27 09:58:38 +01:00
litetex ccc3d38c45
Merge pull request #7910 from avently/equalscheck
Better equals check
2022-02-26 16:20:27 +01:00
litetex a95318a4f9
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
litetex 5be40f62f3
Merge pull request #7904 from Stypox/fix-raw-use-of-parameterized-class
Solve Java warning "Raw use of parameterized class"
2022-02-26 16:14:23 +01:00
Avently 01e0dd50ad Added serviceId check while comparing PlayQueues 2022-02-23 00:53:39 +03:00
litetex 1030e09fc1
Merge pull request #7901 from Stypox/player-small-refactor
Small refactor in player class
2022-02-21 20:48:03 +01:00
TiA4f8R c5fc37150d
Update JavaDoc of VideoPlaybackResolver.getStreamSourceType() 2022-02-20 19:40:03 +01:00
TiA4f8R 8932adbf88
Apply suggested change and add a note about data consumption for HLS streams in background
ExoPlayer right now fetches HLS video tracks even if you disable them (with setRendererDisabled or setSelectionOverride).
See issue 9282 of ExoPlayer's issue tracker for more information.
2022-02-20 19:40:03 +01:00
TiA4f8R d27d36b76a
Adress requested changes 2022-02-20 19:40:02 +01:00
TiA4f8R ba804c7d4a
Use a enum to understand better what source type is used.
This commit also allows a seamless transition for livestreams.
2022-02-20 19:40:02 +01:00
TiA4f8R 3db37166b4
Apply suggestion 2022-02-20 19:40:02 +01:00
TiA4f8R bf02a569ee
Fix a NullPointerException when the current metadata is null
Reload the play queue manager and set the recovery in this case, like on the current behavior (without this PR).
2022-02-20 19:40:02 +01:00
TiA4f8R a1c5c94753
Add some comments and a JavaDoc 2022-02-20 19:40:01 +01:00
litetex bb27bf9d34
Resolver: Cleaned up ``isVideoStreamVideoOnly``
* Replaced by ``wasLastResolvedVideoAndAudioSeparated``
* Uses an ``Optional`` instead (we can't determine if the video and audio streams are separated when we did not fetch it)
2022-02-20 19:38:41 +01:00
TiA4f8R cc96ac173c
Apply suggestion 2022-02-20 19:38:40 +01:00
TiA4f8R 79f8270c35
Prefer video-only streams to video streams
Prefering video-only streams to video streams for our player will allow us to make seamless transitions on 360 and 720p qualities on YouTube.
External players and the downloader are not affected by this change.
2022-02-20 19:38:40 +01:00
TiA4f8R 336f9f3813
Add seamless transition between background player and video players (for video-only and audio-only streams only)
This is only available when playing video-only streams (and when there is no audio stream and only video streams with audio) and audio-only streams.
For more details about which conditions are required to get this transition, look at the changes in the useVideoSource(boolean) method of the Player class.
2022-02-20 19:38:39 +01:00
Avently 835c5e9d43 Better equals check
It ensures that queues are not the same. Without this check when you have multiple videos in the backstack and navigating back via Back button you'll get duplicated videos
2022-02-19 22:12:31 +03:00
Stypox 4789cf6c31
Use Java streams in AbstractInfoPlayQueue 2022-02-19 18:01:16 +01:00
Stypox 5f1f52b6ce
Remove useless constructor in *PlayQueue
Also removes unused <> parameter in AbstractInfoPlayQueue and deduplicates constructor code in extending classes
2022-02-19 17:49:43 +01:00
Stypox 62abfa96b8
Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +01:00
Stypox 3c23fb0b13
Small refactor in player class 2022-02-19 13:30:55 +01:00
Stypox da12b92d75
Fix fast seek arc not going under system ui 2022-02-19 11:29:33 +01:00
Stypox 00767f4bf3 Fix fast seek overlay arc not correctly centered
This happened in fullscreen player: while play-pause, brightness, volume, ... buttons were correctly centered in the app UI, the fast seek overlay was centered in the system UI, causing a mismatch between the two that looked ugly
2022-02-18 22:34:55 +01:00
Martin 616fb47983
Merge branch 'TeamNewPipe:dev' into dev 2022-02-17 10:20:44 +01:00
litetex be95d7fe0f
Merge pull request #7704 from Stypox/fix-stream-menu-crash
Fix crash when long-pressing stream while player is starting
2022-02-09 19:53:09 +01:00
martin 906ee75278 Fixed checkstyle violation 2022-02-05 12:31:07 +01:00
martin 4049abf2c0 Addressed comment in PR 2022-02-04 16:15:55 +01:00
martin 47798febed fetch and merge 2022-02-04 15:34:00 +01:00
TiA4f8R 52cc4a0a05
Add JavaDoc for PlayerDataSource.PLAYLIST_STUCK_TARGET_DURATION_COEFFICIENT 2022-01-30 20:42:02 +01:00
TiA4f8R e103e4817c
Apply suggested changes and remove the CustomHlsPlaylistTracker class 2022-01-30 20:42:02 +01:00
TiA4f8R d0637a8832
Suppress SonarLint NullPointerException warnings in CustomHlsPlaylistTracker
They seem to be wrong, by looking at the class work and at the return of CustomHlsPlaylistTracker's methods.
2022-01-30 20:42:02 +01:00
TiA4f8R 94f774b82d
Use a custom HlsPlaylistTracker, based on DefaultHlsPlaylistTracker to allow more stucking on HLS livestreams
ExoPlayer's default behavior is to use a multiplication of target segment by a coefficient (3,5).
This coefficient (and this behavior) cannot be customized without using a custom HlsPlaylistTracker right now.

New behavior is to wait 15 seconds before throwing a PlaylistStuckException.
This should improve a lot HLS live streaming on (very) low-latency livestreams with buffering issues, especially on YouTube with their HLS manifests.
2022-01-30 20:42:01 +01:00