forked from recloudstream/cloudstream
		
	fixed small player issue
This commit is contained in:
		
							parent
							
								
									f5482a8fb2
								
							
						
					
					
						commit
						03b2197bbc
					
				
					 3 changed files with 6 additions and 3 deletions
				
			
		|  | @ -88,6 +88,7 @@ const val DOUBLE_TAB_PAUSE_PERCENTAGE = 0.15        // in both directions | |||
| open class FullScreenPlayer : AbstractPlayerFragment() { | ||||
|     protected open var lockRotation = true | ||||
|     protected open var isFullScreenPlayer = true | ||||
|     protected open var isTv = false | ||||
| 
 | ||||
|     // state of player UI | ||||
|     protected var isShowing = false | ||||
|  | @ -1055,7 +1056,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { | |||
| 
 | ||||
|                     // netflix capture back and hide ~monke | ||||
|                     KeyEvent.KEYCODE_BACK -> { | ||||
|                         if (isShowing) { | ||||
|                         if (isShowing && isTv) { | ||||
|                             onClickChange() | ||||
|                             return true | ||||
|                         } | ||||
|  | @ -1257,6 +1258,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { | |||
|         player_intro_play?.setOnClickListener { | ||||
|             player_intro_play?.isGone = true | ||||
|             player.handleEvent(CSPlayerEvent.Play) | ||||
|             updateUIVisibility() | ||||
|         } | ||||
| 
 | ||||
|         // it is !not! a bug that you cant touch the right side, it does not register inputs on navbar or status bar | ||||
|  |  | |||
|  | @ -914,8 +914,9 @@ class GeneratorPlayer : FullScreenPlayer() { | |||
|         savedInstanceState: Bundle? | ||||
|     ): View? { | ||||
|         // this is used instead of layout-television to follow the settings and some TV devices are not classified as TV for some reason | ||||
|         isTv = context?.isTvSettings() == true | ||||
|         layout = | ||||
|             if (context?.isTvSettings() == true) R.layout.fragment_player_tv else R.layout.fragment_player | ||||
|             if (isTv) R.layout.fragment_player_tv else R.layout.fragment_player | ||||
| 
 | ||||
|         viewModel = ViewModelProvider(this)[PlayerGeneratorViewModel::class.java] | ||||
|         sync = ViewModelProvider(this)[SyncViewModel::class.java] | ||||
|  |  | |||
|  | @ -85,7 +85,6 @@ open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreen | |||
|         isFullScreenPlayer = fullscreen | ||||
|         lockRotation = fullscreen | ||||
|         player_fullscreen?.setImageResource(if (fullscreen) R.drawable.baseline_fullscreen_exit_24 else R.drawable.baseline_fullscreen_24) | ||||
|         uiReset() | ||||
|         if (fullscreen) { | ||||
|             enterFullscreen() | ||||
|             result_top_bar?.isVisible = false | ||||
|  | @ -106,6 +105,7 @@ open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreen | |||
|             exitFullscreen() | ||||
|         } | ||||
|         fixPlayerSize() | ||||
|         uiReset() | ||||
|     } | ||||
| 
 | ||||
|     override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue