mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-29 22:32:59 +00:00 
			
		
		
		
	Merged extremely similar code together / parity between video and popup player
* Removed ``player.getPlayPauseButton().requestFocus();`` as there is no reason why it was introduced there documented * Use the same delay to hide the controls on both players
This commit is contained in:
		| @@ -69,26 +69,22 @@ public class PlayerGestureListener | |||||||
|         if (DEBUG) { |         if (DEBUG) { | ||||||
|             Log.d(TAG, "onSingleTap called with playerType = [" + player.getPlayerType() + "]"); |             Log.d(TAG, "onSingleTap called with playerType = [" + player.getPlayerType() + "]"); | ||||||
|         } |         } | ||||||
|         if (playerType == MainPlayer.PlayerType.POPUP) { |  | ||||||
|  |  | ||||||
|             if (player.isControlsVisible()) { |         if (player.isControlsVisible()) { | ||||||
|                 player.hideControls(100, 100); |  | ||||||
|             } else { |  | ||||||
|                 player.getPlayPauseButton().requestFocus(); |  | ||||||
|                 player.showControlsThenHide(); |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|         } else /* playerType == MainPlayer.PlayerType.VIDEO */ { |             // -- Controls visible -- | ||||||
|  |  | ||||||
|             if (player.isControlsVisible()) { |             player.hideControls(150, 0); | ||||||
|                 player.hideControls(150, 0); |             return; | ||||||
|             } else { |         } | ||||||
|                 if (player.getCurrentState() == Player.STATE_COMPLETED) { |  | ||||||
|                     player.showControls(0); |         // -- Controls are not visible -- | ||||||
|                 } else { |  | ||||||
|                     player.showControlsThenHide(); |         // When player is completed show controls and don't hide them later | ||||||
|                 } |         if (player.getCurrentState() == Player.STATE_COMPLETED) { | ||||||
|             } |             player.showControls(0); | ||||||
|  |         } else { | ||||||
|  |             player.showControlsThenHide(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 litetex
					litetex