Commit Graph

146 Commits

Author SHA1 Message Date
litetex 72dbb9441e Improved streamType check and documentation 2021-09-25 10:31:42 +02:00
litetex bbc13756f3 Removed useless check for livestreams 2021-09-25 00:04:53 +02:00
litetex ba0876b43b Reformatted MediaSessionManager code 2021-09-24 23:55:06 +02:00
litetex c0d41661e8 Fixed performance problems with mediaSessionManager
* Built on top of Redirons changes
* MediaSessionManager-Metadata get's only update when metadata changes - not every second as it only changes when the metadata changes
* Reworked mediasessionmanager
2021-09-24 23:40:12 +02:00
Robin b2e2551e33 Two fixes for setMetadata 2021-09-24 23:28:55 +02:00
z3r0r4 70354eb73e
Add play next to long press menu & refactor enqueue methods (#6872)
* added mvp play next button in long press menu; new intent handling, new long press dialog entry, new dialog functions, new strings

* changed line length for checkstyle pass

* cleaned comments, moved strings

* Update app/src/main/res/values/strings.xml

to make long press entry more descriptive

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>

* Update app/src/main/res/values/strings.xml

Co-authored-by: Stypox <stypox@pm.me>

* replace redundant nextOnVideoPlayer methods

Co-authored-by: Stypox <stypox@pm.me>

* add enqueueNextOnPlayer and enqueueOnPlayer without selectOnAppend and RESUME_PLAYBACK/ deprecate enqueueNextOn*Player and enqueueOn*Player methods
add getPlayerIntent, getPlayerEnqueueIntent and getPlayerEnqueueNextIntent without selectOnAppend and RESUME_PLAYBACK/ deprecate those with
add section comments

* removed deprecated methods
removed redundant methods

* removed deprecated methods
removed redundant methods

* replaced APPEND_ONLY, removed SELECT_ON_APPEND / replaced remaining enqueueOn*Player methods

* now works with playlists

* renamed dialog entry

* checking for >1 items in the queue using the PlayerHolder

* making enqueue*OnPlayer safe to call when no video is playing (defaulting to audio)

* corrected strings

* improve getQueueSize in PlayerHolder

* long press to enqueue only if queue isnt empty

* add Whitespace

Co-authored-by: Stypox <stypox@pm.me>

* clarify comments / add spaces

* PlayerType as parameter of the enqueueOnPlayer method
add Helper method

* using the helper function everywhere (except for the background and popup long-press actions (also on playlists, history, ...)), so basically nowhere
/ passing checkstyle

* assimilated the enqueue*OnPlayer methods

* removed redundant comment, variable

* simplify code line

Co-authored-by: Stypox <stypox@pm.me>

* move if

* replace workaround for isPlayerOpen()

Co-authored-by: Stypox <stypox@pm.me>

* replaced workarounds (getType), corrected static access with getInstance

* remove unused imports

* changed method call to original, new method doesnt exist yet.

* Use getter method instead of property access syntax.

* improve conditional for play next entry

Co-authored-by: Stypox <stypox@pm.me>

* show play next btn in feed fragment

Co-authored-by: Stypox <stypox@pm.me>

* add play next to local playlist and statistics fragment

Co-authored-by: Stypox <stypox@pm.me>

* formating

Co-authored-by: Stypox <stypox@pm.me>

* correcting logic

Co-authored-by: Stypox <stypox@pm.me>

* remove 2 year old unused string, formating

Co-authored-by: Stypox <stypox@pm.me>

* correct enqueue (next) conditionals, default to background if no player is open. Dont generally default to background play.

* remove player open checks from button long press enqueue actions

* improve log msg

* Rename next to enqueue_next

* Refactor kotlin

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>
Co-authored-by: Stypox <stypox@pm.me>
2021-09-18 11:22:49 +02:00
Stypox 3c2ea7697c
Add option to directly open fullscreen when the main player starts 2021-09-01 20:08:37 +02:00
Robin f629a4d206
Merge pull request #6993 from Redirion/closeaudioeffectsession
Close audio effect control session properly
2021-08-31 12:37:20 +02:00
Stypox 039bd5d413
Rename string finish to ok, as its content was "OK" 2021-08-30 16:36:57 +02:00
Robin 8bfd380b89
Merge pull request #6515 from Redirion/buffersharmonization
Use ExoPlayer default values for buffers
2021-08-29 17:44:43 +02:00
Robin 43d0543b9f close audio effect control session properly 2021-08-27 10:53:44 +02:00
evermind 48c2c156cb convert PlayerHolder to Singleton, handle context within, bugfix ServiceConnection leak
- bugfix: have ServiceConnection created only once!

- select the context within the PlayerHolder to start, stop, bind or unbind the service
  -> we have to make sure the Service is started AND stopped within the same context
  -> so let PlayerHolder be the one to select the context

- remove removeListener() and replace the call with setListener(null)
- Compatibility: use ContextCompat.startForegroundService instead of startService()
2021-07-06 12:31:26 +02:00
Robin f5d015e8f9 Use ExoPlayer default values for buffers 2021-06-18 20:18:24 +02:00
Robin 3b0045917c
Increase buffer for playback after rebuffer 2021-06-07 09:25:49 +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
Stypox 8978187c64
Improve code style and fix some warnings
Removed a textTrack null check on a now- NonNull method
Added a error type switch case (TIMEOUT)
2021-02-16 16:54:44 +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
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
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
TacoTheDank ebd589c9cb Use AndroidX Media compat in AudioReactor 2020-12-30 17:10:57 -05:00
TobiGr 7a8dab2d58 Fix typos 2020-11-22 10:39:00 +01:00
Stypox 7476498823
[Regression] Revert "Removed remember popup properties setting"
This reverts commit 314615bfef.
2020-11-15 22:24:27 +01:00
Stypox 5a87cfc25d
Open mini player if player running on app open 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
Panorea 314615bfef Removed remember popup properties setting 2020-10-06 18:32:20 -04:00
vkay94 12f615c6da Enqueue: Removed unneeded dialog-entries and strings + adjustments 2020-10-06 17:22:12 +02:00
vkay94 ed6fc4d848 Enqueue: Replaced specific StreamDialogEntry items with one
The enqueue options won't be shown in the dialogs if the Player service is not running. When it's running one item (enqueue stream) will be shown and enqueues the item into the Player type which is currently selected.
2020-10-06 14:38:48 +02:00
vkay94 cd515993f5 Enqueue: Add auto-select StreamDialogEntry for current PlayerType 2020-10-06 13:33:44 +02:00
wb9688 f4bd20361a Fix auto-queue with no next videos 2020-09-29 10:43:17 +02:00
Avently 0370fa6c00 Merged 'dev' branch 2020-09-27 18:02:31 +03:00
Tobias Groza d5f603303d
Merge pull request #4259 from TeamNewPipe/pref_migration
Add settings migration, remove "Detail page" option from share dialog and minimize to background by default
2020-09-27 11:20:39 +02:00
Tobias Groza fc9c073a60
Merge pull request #3178 from cool-student/notificationImprovements
Notification Improvements
2020-09-27 10:43:11 +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
Tobias Groza e0f02d4080
Merge pull request #4246 from avently/preloading
Disabled preloading when switching streams
2020-09-25 21:22:31 +02:00
Avently 5b8eda4805 Increased performance of the UI. main thread is not as busy as before 2020-09-17 23:42:35 +03:00
Stypox 2017e6a3e3
Refactor MediaSessionManager 2020-09-10 20:36:52 +02:00
Stypox a13e6b69e3
Merge branch 'dev' into pr3178 2020-09-08 23:58:10 +02:00
Avently 31814b70da Disabled preloading when switching streams 2020-09-07 19:34:10 +03: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