Commit Graph

97 Commits

Author SHA1 Message Date
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
John Zhen Mo b0a09c7876 -Added "add to playlist" button to service player play queue item drop down.
-Refactored playlist manipulations out from media source manager.
-Fixed potential ArrayOutOfBound exception when checking if player window is live.
-Fixed service player play queue potentially not refreshing when current play queue is replaced.
2018-04-11 20:27:38 -07:00
John Zhen Mo 72eaff148c -Fixed main player paused video not abandoning audio focus after navigating away from activity during interruption, when resume on focus regain is enabled.
-Separated onPause and onPlay functions from onPlayPause.
-Renamed onVideoPlayPause to onPlayPause.
2018-03-22 18:12:11 -07:00
John Zhen Mo 5167fe078b -Refactored synchronization checks out from MediaSourceManager to ManagedMediaSource.
-Fixed null input causing potential NPE on PlayQueueItem.
2018-03-19 16:44:18 -07:00
John Zhen Mo bc7188c8a8 -Added media session implementation for all players.
-Extracted version numbers in gradle dependencies.
-Updated ExoPlayer to 2.7.1.
-Updated RxJava to 2.1.10, RxAndroid to 2.0.2 and RxBinding to 2.1.1.
-Removed deprecated implementation of media buttons.
2018-03-19 16:44:18 -07:00
John Zhen Mo 5a05cb96be -Changed start position seek to occur after media source window has been prepared.
-Fixed livestream not seeking to live when started from play queue.
-Fixed media source manager synchronization to only occur after timeline change has completed.
-Fixed auto queue not working when last item is replayed after the auto-queued item is removed.
-Updated ExoPlayer to 2.7.1.
2018-03-19 16:44:17 -07:00
John Zhen Mo 61b422502b -[#1060] Added toggle to disable thumbnail loading.
-Added button to wipe metadata cache.
-Added more paddings on player buttons.
-Added new animations to main player secondary controls and play queue expand/collapse.
-Refactored play queue item touch callback for use in all players.
-Improved MediaSourceManager to better handle expired stream reloading.
-[#1186] Changed live sync button text to "LIVE".
-Removed MediaSourceManager loader coupling on main players.
-Moved service dependent expiry resolution to ServiceHelper.
-[#1186] Fixed livestream timeline updates causing negative time position.
-[#1186] Fixed livestream not starting from live-edge.
-Fixed main player system UI not retracting on playback start.
2018-03-19 16:40:40 -07:00
Christian Schabesberger 96a327af17 made frontend combatible to latest extractor refactorings 2018-03-18 16:37:49 +01:00
John Zhen Mo 59558efed1 -Added seamless shuffling.
-Reenabled full window loading in MediaSourceManager.
2018-03-03 20:58:06 -08:00