# PlayerView.ControllerVisibilityListener

# PlayerView.ControllerVisibilityListener

Artifact:[androidx.media3:media3-ui](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/ui/PlayerView.java+class:androidx.media3.ui.PlayerView.ControllerVisibilityListener)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/ui/PlayerView.ControllerVisibilityListener "View this page in Java")

<br />

```
interface PlayerView.ControllerVisibilityListener
```

<br />

*** ** * ** ***

Listener to be notified about changes of the visibility of the UI controls.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onVisibilityChanged](https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerView.ControllerVisibilityListener#onVisibilityChanged(int))`(visibility: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the visibility changes. |

## Public functions

### onVisibilityChanged

```
fun onVisibilityChanged(visibility: Int): Unit
```

Called when the visibility changes.  

|                                        Parameters                                         |
|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `visibility: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The new visibility. Either[VISIBLE](https://developer.android.com/reference/android/view/View.html#VISIBLE())or[GONE](https://developer.android.com/reference/android/view/View.html#GONE()). |