Commit graph

1480 commits

Author SHA1 Message Date
Avently
38440abb30 AppBarLayout scrolling awesomeness, PlayQueue layout touches interception, player's controls' margin
- made scrolling in appBarLayout awesome
- PlayQueue layout was intercepting touches while it was in GONE visibility state. Now it's not gonna happen
- removed margin between two lines of player's controls
- when a user leaves the app with two back presses the app will not stop MainPlayer service if popup or background players play
2020-02-12 22:33:23 +03:00
Avently
c7c4c2172a Mini player, ExpandableSurfaceView with ZOOM support, popup
- mini player's title, image and author information will be updated in many situations but the main idea is that the info will be the same as currently playing stream. If nothing played then you'll see the info about currently opened stream in fragment. When MainPlayer service stops the info updates too
- made ExpandableSurfaceView to replace AspectRatioFrameLayout. The reason for that is to make possible to use aspect ratio mode ZOOM. It's impossible to show a stream inside AspectRatioFrameLayout with ZOOM mode and to fit the video view to a screen space at the same time. Now the new view able to do that and to show vertical videos in a slightly wide space for them
- refactored some methods to make the code more understandable
- made fixes for player view for landscape-to-landscape orientation change
- added Java docs
- adapted swipe tracking inside bottom sheet
- fixed PlayQueue crashes on clearing
- paddings for popup player now as small as possible
2020-02-05 08:59:30 +03:00
Avently
651f9f6fb2 Hotfix 2020-01-26 07:33:52 +03:00
Avently
51fe694a90 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
a1e1128f77 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
0f0f571455 Enhancements to background playback and media button handling 2020-01-15 21:32:29 +03:00
Avently
f1aea2c6f1 Another fix of VideoDetailFragment 2020-01-13 19:24:28 +03:00
Avently
0bace2bf3a Fixes of VideoDetailFragment 2020-01-10 17:32:05 +03:00
Avently
f82a22e2d7 Changed default autoplay type to "Only on WiFi" 2020-01-09 19:27:10 +03:00
Avently
033bd742c1 Autoplay enhancement and new button at the top left corner
- added a video close button to the top left corner
- autoplay will not work if stream plays in background or popup players
2020-01-09 18:28:06 +03:00
Avently
b190231a1d 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
Avently
1a3061d4d0 Fourth block of fixes for review
- wrote more methods to PlayQueue. Now it supports internal history of played items with ability to play previous() item. Also it has equals() to check whether queues has the same content or not
- backstack in fragment is more powerful now with help of PlayQueue's history and able to work great with playlists' PlayQueue and SinglePlayQueue at the same time
- simplified logic inside fragment. Easy to understand. New PlayQueue will be added in backstack from only one place; less number of setInitialData() calls
- BasePlayer now able to check PlayQueue and compare it with currently playing. And if it is the same queue it tries to not init() it twice. It gives possibility to have a great backstack in fragment since the same queue will not be played from two different instances and will not be added to backstack twice  with duplicated history inside
- better support of Player.STATE_IDLE
- worked with layouts of player and made them better and more universal
- service will be stopped when activity finishes by a user decision
- fixed a problem related to ChannelPlayQueue and PlaylistPlayQueue in initial start of fragment
- fixed crash in popup
2020-01-06 13:39:01 +03:00
Avently
06d34bfd85 Third block of fixes for review
- audio-only streams plays the same way as video streams
- fullscreen mode for tablet with controls on the right place
- hidden controls while swiping mini player down
- mini player works better
2020-01-03 19:19:14 +03:00
Avently
5bcfcf675e Second block of fixes for review
- hide/show controls with respect of SystemUI. In fullscreen mode controls will stay away from NavigationBar
- notification from running service will be hidden if a user disabled background playback
- fixed incorrect handling of a system method in API 19
- better MultiWindow support
2020-01-03 08:05:31 +03:00
Avently
04cf05c969 First block of fixes for review
- popup player click event changed to show/hide buttons
- queue panel WORKS. Finally
- removed theme overriding in fragment
- added scroll to top after stream selection
- adjusted padding/margin of buttons in player
- player will itself in fullscreen after user hides it in fullscreen mode and then expands it again while video still playing
2019-12-31 19:06:39 +03:00
Avently
85e9128745 Optimizations and fixes of rare situations
- popup after orientation change had incorrect allowed bounds for swiping
- popup could cause a crash after many quick switches to main player and back
- better method of setting fullscreen/non-fullscreen layout using thumbnail view. Also fixed thumbnail height in fullscreen layout
- global settings observer didn't work when a user closed a service manually via notification because it checked for service existing
- app will now exits from fullscreen mode when the user switches players
- playQueuePanel has visibility "gone" by default (not "invisible") because "invisible" can cause problems
2019-12-31 05:07:07 +03:00
Avently
efc10c8717 All players in one place
- main, background, popup players now connected via one service, one view, one fragment, one activity and one gesture listener
- playback position is synchronized between players. Easy to switch from one to another
- expandable player at the bottom of the screen with cool animation and additional features like long click to open channel of a video, play/pause/close buttons and swipe down to dismiss
- in-player integrated buttons for opening in browser, playing with Kodi, sharing a video
- better background playback that can be activated in settings. Allows to automatically switch to audio-only mode when going to background and then switching to video-mode when returning to the app.
2019-12-30 00:15:01 +03:00
Tobias Groza
400a93a4b4 Merge pull request #2868 from yausername/fix-add-instance-dialog
fix add instance dialog
2019-12-15 11:01:13 +01:00
yausername
f44cd776a3 fix add instance dialog 2019-12-15 01:30:47 +05:30
Markus
abc61fa14d Remove commented-out code and hide stacktraces in release mode 2019-12-13 21:46:19 +01:00
Markus
1572691233 Add trying out some more cipher suites which may be supported on non-standard Android 4.4.2 devices 2019-12-13 21:46:12 +01:00
Markus
7718801390 Fix formatting and remove unused code 2019-12-13 21:43:03 +01:00
Markus Richter
c13f0249c8 Enable TLS v1.1/1.2 for KitKat devices
This enables modern TLS versions in the collection browser, the Downloader and the Player.
This is neccessary because media.ccc.de rejects all older TLS connection attempts, see issue #2777.
2019-12-13 21:42:58 +01:00
Xiang Rong Lin
d9c74ae200 Rename "seek_duration_default_key" and use it in BasePlayer 2019-12-13 07:14:17 +01:00
Xiang Rong Lin
462a57d6ce Remove local variable for seek duration 2019-12-13 07:14:17 +01:00
Xiang Rong Lin
5cb9e0d51f Extract getting of seek duration into a function 2019-12-13 07:14:17 +01:00
Xiang Rong Lin
f06e7b71f9 Adjust BasePlayer to use seek duration of preferences.
Changes behaviour when double-tapping in video and clicking fast forward/rewind in background mode.
2019-12-13 07:14:17 +01:00
Tobias Groza
e2c9137a6d Merge pull request #2860 from spk/fix-cannot-resolv-symbol
Migrate annotation to androidx
2019-12-12 21:44:49 +01:00
Laurent Arnoud
b386ffeb4b Migrate annotation to androidx
release build is failing without this on android studio 3.5.3
2019-12-12 21:31:23 +01:00
Peter Hindes
f57a590882 fix last recomendation. syntax and imports 2019-12-10 12:18:49 -07:00
Peter Hindes
c07b3979da Update app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java
Co-Authored-By: Redirion <redirion@web.de>
2019-12-10 12:13:04 -07:00
Peter Hindes
1663f18a34 Merge branch 'dev' into dev 2019-12-10 09:59:12 -07:00
yausername
12596ea62c more grammar fix 2019-12-10 12:36:56 +05:30
yausername
7547dd59b3 merged upstream/dev 2019-12-10 01:37:33 +05:30
Peter Hindes
7c53290c95 Merge branch 'dev' into dev 2019-12-09 09:13:18 -07:00
Tobias Groza
e9867c7a5c Merge branch 'dev' into remember-subtitles 2019-12-09 16:55:37 +01:00
kapodamy
f719f8f38a add missing change after updating NPE
use +webm_opus instead of +opus
2019-12-07 00:16:01 -03:00
kapodamy
104ec70755 remove netbeans editor-fold comments 2019-12-06 16:30:07 -03:00
Peter Hindes
a17caf50e3 Merge branch 'dev' into dev 2019-12-06 08:57:43 -07:00
Peter Hindes
8f2abd8806 remove unused code pt2 2019-12-06 08:38:15 -07:00
Peter Hindes
8cfbb63f6c Removed redundant. Related to last merge 2019-12-06 08:36:57 -07:00
Peter Hindes
baf5cb2dfd Update app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java
Co-Authored-By: Redirion <redirion@web.de>
2019-12-06 08:35:14 -07:00
Peter Hindes
b0f23fdf55 Remove unused code pt1 2019-12-06 08:32:45 -07:00
kapodamy
67d8dc051f remove unused imports 2019-12-05 14:04:48 -03:00
yausername
7f835029fc grammar fix 2019-12-05 05:11:05 +05:30
yausername
d8f8849110 null check on share 2019-12-03 02:04:52 +05:30
yausername
d41ae244c1 update extractor, kiosk names and icons 2019-12-03 01:50:23 +05:30
kapodamy
4cc71a9c01 commit
* rebase fixup, add null check
* better ETA string
* drop connection read timeout, for HSDPA networks
* bump NPE version
2019-11-26 13:41:16 -03:00
kapodamy
1283148c86 Merge branch 'dev' into dl-last-features 2019-11-26 10:46:32 -03:00
kapodamy
fc4a892f45 code cleanup
* migrate few annotations to androidx
* mission recovery: better error handling (except StreamExtractor.getErrorMessage() method always returns an error)
* post-processing: more detailed progress

[file specific changes]

DownloadMission.java
* remove redundant/boilerplate code (again)
* make few variables volatile
* better file "length" approximation
* use "done" variable to count the amount of bytes downloaded (simplify percent calc in UI code)

Postprocessing.java
* if case of error use "ERROR_POSTPROCESSING" instead of "ERROR_UNKNOWN_EXCEPTION"
* simplify source stream init

DownloadManager.java
* move all "service message sending" code to DownloadMission
* remove not implemented method "notifyUserPendingDownloads()" also his unused strings

DownloadManagerService.java
* use START_STICKY instead of START_NOT_STICKY
* simplify addMissionEventListener()/removeMissionEventListener() methods (always are called from the main thread)

Deleter.java
* better method definition

MissionAdapter.java
* better method definition
* code cleanup
* the UI is now refreshed every 750ms
* simplify download progress calculation
* indicates if the download is actually recovering
* smooth download speed measure
* show estimated remain time

MainFragment.java:
* check if viewPager is null (issued by "Apply changes" feature of Android Studio)
2019-11-26 10:46:31 -03:00