Merge pull request #2768 from wood1986/fix/playbutton
fix: fix the play button not shown after pausing video at the very first time
This commit is contained in:
		@@ -403,6 +403,15 @@ class ReactExoplayerView extends FrameLayout implements
 | 
				
			|||||||
        eventListener = new Player.Listener() {
 | 
					        eventListener = new Player.Listener() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onPlaybackStateChanged(int playbackState) {
 | 
					            public void onPlaybackStateChanged(int playbackState) {
 | 
				
			||||||
 | 
					                View playButton = playerControlView.findViewById(R.id.exo_play);
 | 
				
			||||||
 | 
					                View pauseButton = playerControlView.findViewById(R.id.exo_pause);
 | 
				
			||||||
 | 
					                if (playButton != null && playButton.getVisibility() == GONE) {
 | 
				
			||||||
 | 
					                    playButton.setVisibility(INVISIBLE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (pauseButton != null && pauseButton.getVisibility() == GONE) {
 | 
				
			||||||
 | 
					                    pauseButton.setVisibility(INVISIBLE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                reLayout(playPauseControlContainer);
 | 
					                reLayout(playPauseControlContainer);
 | 
				
			||||||
                //Remove this eventListener once its executed. since UI will work fine once after the reLayout is done
 | 
					                //Remove this eventListener once its executed. since UI will work fine once after the reLayout is done
 | 
				
			||||||
                player.removeListener(eventListener);
 | 
					                player.removeListener(eventListener);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user