Commit Graph

105 Commits

Author SHA1 Message Date
Stypox bc33322d4b Remove useless MediaSessionCallback
The player is now passed directly, it made no sense to wrap around it in a callback that was not really a callback but rather, actually, a wrapper.
2022-08-25 17:00:41 +02:00
litetex 8b209df253 Changed the code accordingly
+ Removed some unused code
2022-07-15 19:55:19 +02:00
Stypox a19073ec01
Restore checkstyle and solve its errors 2022-07-13 23:32:27 +02:00
Stypox 76ced59b62
Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
TacoTheDank 1404581e9b Update ExoPlayer to 2.18.0 2022-06-25 21:14:42 -04:00
karyogamy a00bc95acc updated: source loading error for FailedMediaSource to wait for 3 seconds before allowing retry.
updated: minor style fixes.
2022-03-27 13:24:37 -04:00
karyogamy d289dc8a53 updated: onPlayerError to not catch unspecified source errors so notifications are created.
updated: Throwable usage to Exceptions.
updated: minor styles and documentations.
2022-03-26 20:17:52 -04:00
karyogamy 4e459b3383 updated: ExoPlayer to 2.17.1.
added: MediaItemTag for ManagedMediaSources.
added: silent track for FailedMediaSource.
added: keyframe fast forward at initial playback buffer.
added: error notification on silently skipped streams.
2022-03-19 15:56:45 -04: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
Robin eae1f8b597 Update ExoPlayer to 2.14.2 2021-11-12 19:17:51 +01:00
ktprograms 34ab93c9bd Fix player controls not hiding if resumed from media button 2021-11-01 11:50:33 +08:00
evermind f78d2a5ed8 Prevent error msg: 'Unrecoverable player error occurred' while playing video during rotation (#6502)
Playing a video in VideoDetailFragment and rotating the screen to landscape (back and forth more often)
can trigger this error message. Especially if rotation for whatever reason takes long or
playing a high resolution (1080p) video.

The underlying logcat error messages:
05-12 16:38:38.251 24920 26037 E Surface : getSlotFromBufferLocked: unknown buffer: 0x923fc810
05-12 16:38:38.251 24920 26037 W ACodec  : [OMX.qcom.video.decoder.avc] can not return buffer 35 to native window

The problem is that that Exoplayer is trying to write to our -- during rotation -- no longer existant
(VideoDetailFragment) SurfaceView.

Solution:
Implementing SurfaceHolder.Callback and using DummySurface we can now handle the lifecycle of the Surface.

How?: In case we are no longer able to write to the Surface eg. through rotation/putting in
background we can set a DummySurface. Although it only works on API >= 23.
Result: we get a little video interruption (audio is still fine) but we won't get the
'Unrecoverable player error occurred' error message.

This implementation is based on and more background information:
 'ExoPlayer stuck in buffering after re-adding the surface view a few time 2703'

 -> exoplayer fix suggestion link
  https://github.com/google/ExoPlayer/issues/2703#issuecomment-300599981
2021-07-06 12:49:56 +02:00
Robin 95f61542b5 TEST: Downgrade ExoPlayer to 2.12 2021-05-14 14:47:53 +02:00
Robin 83d16932a4 Update to ExoPlayer 2.13.2 2021-03-31 10:05:44 +02:00
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
Stypox f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
TacoTheDank 39e5d8ccc2 Lint: Make a bunch of stuff final 2020-11-18 17:50:00 -05:00
Stypox 1605e50cef
Update notification when play queue is edited 2020-09-10 13:36:34 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Robin 145e0a0b7b Update to ExoPlayer 2.11.5 2020-06-06 15:29:52 +02:00
Stypox b4ddc8f96c
Update to ExoPlayer 2.11.4 2020-05-01 15:03:54 +02:00
Alexander-- d1d942f3fd Fix Checkstyle violations in MediaSourceManager 2020-04-11 09:51:50 +06:59
Alexander-- c42f5eca87 Merge remote-tracking branch 'newpipe/dev' into rebase 2020-04-11 08:24:05 +06:59
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
Mauricio Colli 1e7e8d4121
Fix for player access out of its creation thread 2019-12-31 02:52:16 -03:00
Alexander 6e76610f30 Eliminate bunch of ExoPlayer warnings 2019-12-01 12:41:11 +06:59
Redirion 7aeb1ec8d9
Apply suggestions from code review
Co-Authored-By: Tobias Groza <TobiGr@users.noreply.github.com>
2019-10-07 11:27:43 +02:00
Robin dcd5197a19 Update to ExoPlayer 2.10.5 2019-10-07 11:18:26 +02:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Alan Nelson ee9052ad3d Add title to additional metadata object 2019-07-11 00:48:28 -05:00
Alan Nelson ccdd450283 Add current and total track numbers to metadata 2019-07-09 22:37:03 -05:00
Alan Nelson 224a607bc3 Fix Bluetooth AVRCP duration metadata 2019-07-09 22:34:18 -05:00
kapodamy f6b32823ba Implement Storage Access Framework
* re-work finished mission database
* re-work DownloadMission and bump it Serializable version
* keep the classic Java IO API
* SAF Tree API support on Android Lollipop or higher
* add wrapper for SAF stream opening
* implement Closeable in SharpStream to replace the dispose() method

* do required changes for this API:
** remove any file creation logic from DownloadInitializer
** make PostProcessing Serializable and reduce the number of iterations
** update all strings.xml files
** storage helpers: StoredDirectoryHelper & StoredFileHelper
** best effort to handle any kind of SAF errors/exceptions
2019-06-03 18:16:41 -03:00
Robin 0763280196 Readd CustomTrackSelector 2019-04-28 01:45:19 +02:00
Robin 4d80bdcc9f Update ExoPlayer to 2.9.6, including httook dependency and deprecations 2019-03-05 18:05:44 +01:00
Robin 2c2c61b2fc Add Artist and Duration to MediaDescription 2019-01-31 16:47:33 +01:00
BO41 802b26e870 error handling + imports + unboxing 2018-09-11 19:18:50 +02:00
BO41 0ab86937d2 data flow issue + declaration redundancy
make final
unused methods
make final

BUILD SUCCESSFUL in 0s
39 actionable tasks: 39 up-to-date
2018-09-11 19:18:41 +02:00
BO41 27fbe69033 code cleanup
mainly removes throw statements

automated using Android Studio, staged by hand

BUILD SUCCESSFUL in 52s
39 actionable tasks: 37 executed, 2 up-to-date
2018-09-11 19:14:21 +02:00
John Zhen Mo bc6fdf81d2 -Refactored player media source resolution into external helpers.
-Baked resolved media metadata into media source for one-way data passing.
2018-06-28 11:58:32 -07:00
John Zhen Mo 7721098551 -Updated ExoPlayer to 2.8.0
-Updated MediaSource contracts in ManagedMediaSource.
-Changed PlaceholderMediaSource and FailedMediaSource to use built-in BaseMediaSource implementation.
-Changed deprecated DynamicConcatenatingMediaSource to ConcatenatingMediaSource.
-Removed manual playlist media source disposal in favor of player built-in disposal.
2018-06-28 11:58:32 -07:00
John Zhen Mo 740116356c -Fixed media session activation.
-Removed redundant setShuffle call in media session callback and its user.
-Removed unused dummy playback preparer.
2018-05-28 20:02:02 -07:00
Christian Schabesberger a099fe35d2 reorder playqueue/localPlaylist classes 2018-04-29 12:51:57 +02:00
Christian Schabesberger bcfd8a2450 rename playlist to player.playqueue 2018-04-29 12:49:52 +02:00
John Zhen Mo 42d19d98ad -Changed media source manager near edge loading to no longer load while player position is not progressing.
-Changed main video player to always self-destruct on stop.
-Extracted main video player lifecycle states into separate data class.
-Fixed play queue in full repeat mode does not load first item after expiring.
2018-04-11 20:27:39 -07:00
John Zhen Mo c9915bba18 -Reversed special seek logic for short buffer livestreams.
-Fixed loader cleaning potentially canceling existing correct loading items.
-Updated ExoPlayer to 2.7.3.
2018-04-11 20:27:39 -07:00
John Zhen Mo de534b58c5 -Removed playlist cleaning. 2018-04-11 20:27:38 -07:00
John Zhen Mo ece93cadd5 -Added better player exception handling to player.
-Added expired media source cleaning to media source manager.
2018-04-11 20:27:38 -07:00