mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Correct exit from fullscreen in case of error or close from notification,
This commit is contained in:
		| @@ -1902,10 +1902,11 @@ public class VideoDetailFragment | ||||
|     public void onPlayerError(final ExoPlaybackException error) { | ||||
|         if (error.type == ExoPlaybackException.TYPE_SOURCE | ||||
|                 || error.type == ExoPlaybackException.TYPE_UNEXPECTED) { | ||||
|             hideMainPlayer(); | ||||
|             // Properly exit from fullscreen | ||||
|             if (playerService != null && player.isFullscreen()) { | ||||
|                 player.toggleFullscreen(); | ||||
|             } | ||||
|             hideMainPlayer(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -2307,6 +2308,7 @@ public class VideoDetailFragment | ||||
|                                 && player.videoPlayerSelected()) { | ||||
|                             player.toggleFullscreen(); | ||||
|                         } | ||||
|                         setOverlayLook(appBarLayout, behavior, 1); | ||||
|                         break; | ||||
|                     case BottomSheetBehavior.STATE_COLLAPSED: | ||||
|                         moveFocusToMainFragment(true); | ||||
| @@ -2316,6 +2318,7 @@ public class VideoDetailFragment | ||||
|                         if (player != null) { | ||||
|                             player.onQueueClosed(); | ||||
|                         } | ||||
|                         setOverlayLook(appBarLayout, behavior, 0); | ||||
|                         break; | ||||
|                     case BottomSheetBehavior.STATE_DRAGGING: | ||||
|                     case BottomSheetBehavior.STATE_SETTLING: | ||||
|   | ||||
| @@ -220,6 +220,10 @@ public final class MainPlayer extends Service { | ||||
|         } | ||||
|  | ||||
|         if (playerImpl != null) { | ||||
|             // Exit from fullscreen when user closes the player via notification | ||||
|             if (playerImpl.isFullscreen()) { | ||||
|                 playerImpl.toggleFullscreen(); | ||||
|             } | ||||
|             removeViewFromParent(); | ||||
|  | ||||
|             playerImpl.setRecovery(); | ||||
|   | ||||
| @@ -39,7 +39,7 @@ public class CustomBottomSheetBehavior extends BottomSheetBehavior<FrameLayout> | ||||
|         } | ||||
|  | ||||
|         // Found that user still swiping, continue following | ||||
|         if (skippingInterception) { | ||||
|         if (skippingInterception || getState() == BottomSheetBehavior.STATE_SETTLING) { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Avently
					Avently