Commit Graph

41 Commits

Author SHA1 Message Date
Stypox cf9b482be2
Completely close player when changing stream w/o autoplay 2021-09-01 20:13:27 +02:00
Stypox 2dfe837c35
Extract isLandscape and isInMultiWindow to DeviceUtils 2021-09-01 20:09:08 +02:00
evermind aaa3e20c5a service.onDestroy() should only be called from the system and not manually
instead use service.stopService() which inturn calls stopSelf() and
triggers hopefully onDestroy() to be called. Eventually we have to make
sure that all ServiceConnections are closed to successfully stop the service
now!

Cleanup within stopService() and not only onDestroy()

So we make sure that all listeners can react to onServiceStopped()
and close their ServiceConnections. Afterwards the android framework
is ready to stop the Service.
2021-06-24 10:15:07 +02:00
TiA4f8R 79e98db3bd
Apply the requested changes and little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.

Apply the requested changes and do little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.
2021-01-16 13:23:42 +01:00
vkay94 37aa41afae Add stream segments to player 2021-01-14 21:58:19 +01:00
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
Isira Seneviratne 0c86a4e608
Use view binding (PlayerBinding) in VideoPlayer. 2021-01-13 20:43:56 +01:00
bopol 2b8837609b dynamically get package name
it fixes issues with forks or debug builds, e.g. when you open two newpipe apps (with debug or fork apps), close one notification, it closes all newpipe notifications
fixes https://github.com/TeamNewPipe/NewPipe/issues/4653
2020-12-20 13:52:20 +01:00
Stypox 1b47a1a994
Fix switching to main player when MainActivity is closed 2020-11-08 10:00:28 +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
Stypox fbcdaa77e3
Initialize player notification asap
Otherwise Android's foreground services implementation would complain
2020-10-02 15:17:04 +02:00
Avently 609bf64856 Merged 'dev' branch 2020-09-27 15:04:20 +03:00
Stypox 814efbf8df
Remove ACTION_BUFFERING, update buffering only if needed
- ACTION_BUFFERING was just wrong: why should the user be able to trigger the internal onBuffering() state by pressing on the buffering button? So that was replaced by a null intent, doing nothing.
- Now updating notification in onBuffering() only when buffering actions are not already buffering, to prevent useless updates
2020-09-22 18:17:16 +02:00
Avently 92e13dafe5 Correct exit from fullscreen in case of error or close from notification, 2020-09-17 19:01:20 +03:00
Avently 883e4fcd7c Small fixes of issues with old devices support, brightness, etc 2020-09-11 20:52:38 +03:00
Stypox a13e6b69e3
Merge branch 'dev' into pr3178 2020-09-08 23:58:10 +02:00
Stypox 9cf0bc6c82
Make notification creation and cancelling more consistent 2020-09-08 22:00:28 +02:00
Stypox 71b32fe641
Add notification costumization settings menu 2020-09-08 22:00:24 +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
Avently 0a22f21410 Small fixes of issues with brightness, background playback, gestures 2020-09-04 05:39:55 +03:00
Stypox e08480f345
Completely remove old player notification 2020-08-15 22:03:32 +02:00
Stypox adef9a8acf
Rename notification functions: they are not background player only 2020-08-15 15:16:17 +02:00
Stypox 963ee4dbab
Merge branch 'dev' into pr3178 2020-08-02 22:59:43 +02:00
Avently e41218c46b Disable starting player service via media button when there is nothing to play (no active play queue) 2020-07-28 21:36:06 +03:00
Avently 68ed738dcd Renamed files 2020-07-25 09:45:33 +03:00
Avently 5293d17e32 Removed unused files, translations, styles, settings key 2020-07-25 09:39:42 +03:00
Avently f2e4b69466 Another part of UI improvements for Android TV
- focus will be hidden right after start of a video; fullscreen works like this too
- back button will not needed to be pressed one more time like before
- prev & next buttons for playqueue will be hidden with play/pause button before video be ready to play
2020-07-25 07:00:53 +03: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 b2164ce5fc Marked many (too many) variables as final 2020-07-12 03:59:47 +03:00
Avently a7fbe05a73 Changes for review 2020-06-27 06:25:50 +03:00
Avently 5c2ff9b777 Better implementation of old code 2020-02-29 02:57:54 +03:00
Avently f334a2740f 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 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 d1609cba90 Enhancements to background playback and media button handling 2020-01-15 21:32:29 +03:00
Avently a2d5314cf7 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 4519dd010d 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 c45514b989 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