# PlayerControlView.VisibilityListener

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/PlayerControlView.java+class:androidx.media3.ui.PlayerControlView.VisibilityListener)

*** ** * ** ***


```
interface PlayerControlView.VisibilityListener
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
>
> Register a `https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerView.ControllerVisibilityListener` via `https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerView#setControllerVisibilityListener(androidx.media3.ui.PlayerView.ControllerVisibilityListener)` instead. Using `https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerControlView` as a standalone class without `https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerView` is deprecated.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onVisibilityChange](https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerControlView.VisibilityListener#onVisibilityChange(int))(visibility: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Deprecated in Java |

## Public functions

### onVisibilityChange

```
fun [onVisibilityChange](https://developer.android.com/reference/kotlin/androidx/media3/ui/PlayerControlView.VisibilityListener#onVisibilityChange(int))(visibility: Int): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the visibility changes.

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