# PlayerAudioFocusContractTest.PlayerInfo

Artifact: [androidx.media3:media3-test-utils-robolectric](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.java+class:androidx.media3.test.utils.robolectric.PlayerAudioFocusContractTest.PlayerInfo)

*** ** * ** ***


```
public interface PlayerAudioFocusContractTest.PlayerInfo
```

<br />

*** ** * ** ***

Interface that allows access to a `https://developer.android.com/reference/androidx/media3/common/Player` instance and its internal `https://developer.android.com/reference/androidx/media3/common/util/Clock` and processing `https://developer.android.com/reference/android/os/Looper.html`.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/android/os/Looper.html` | `https://developer.android.com/reference/androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.PlayerInfo#getAudioFocusListenerLooper()()` |
| `abstract https://developer.android.com/reference/androidx/media3/common/util/Clock` | `https://developer.android.com/reference/androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.PlayerInfo#getClock()()` |
| `abstract https://developer.android.com/reference/android/os/Looper.html` | `https://developer.android.com/reference/androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.PlayerInfo#getPlaybackLooper()()` |
| `abstract https://developer.android.com/reference/androidx/media3/common/Player` | `https://developer.android.com/reference/androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.PlayerInfo#getPlayer()()` |
| `default void` | `https://developer.android.com/reference/androidx/media3/test/utils/robolectric/PlayerAudioFocusContractTest.PlayerInfo#setMediaItem(androidx.media3.common.MediaItem)(https://developer.android.com/reference/androidx/media3/common/MediaItem item)` Sets a `https://developer.android.com/reference/androidx/media3/common/MediaItem` on the `https://developer.android.com/reference/androidx/media3/common/Player`. |

## Public methods

### getAudioFocusListenerLooper

```
abstract Looper getAudioFocusListenerLooper()
```

### getClock

```
abstract Clock getClock()
```

### getPlaybackLooper

```
abstract Looper getPlaybackLooper()
```

### getPlayer

```
abstract Player getPlayer()
```

### setMediaItem

```
default void setMediaItem(MediaItem item)
```

Sets a `https://developer.android.com/reference/androidx/media3/common/MediaItem` on the `https://developer.android.com/reference/androidx/media3/common/Player`.

Only implement this method if the `https://developer.android.com/reference/androidx/media3/common/Player` implementation does not support `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEM()`.