# SpatialMediaPlayerTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/SpatialMediaPlayerTester.kt+class:androidx.xr.scenecore.testing.SpatialMediaPlayerTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class SpatialMediaPlayerTester
```

<br />

*** ** * ** ***

A test utility for accessing and inspecting the spatial data associated with the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialMediaPlayer`.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/androidx/xr/scenecore/PointSourceParams` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#getPointSourceParams()()` The `https://developer.android.com/reference/androidx/xr/scenecore/PointSourceParams` that are currently set for this `https://developer.android.com/reference/android/media/MediaPlayer.html`. |
| `final https://developer.android.com/reference/androidx/xr/scenecore/SoundFieldAttributes` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#getSoundFieldAttributes()()` The `https://developer.android.com/reference/androidx/xr/scenecore/SoundFieldAttributes` that are currently set for this `https://developer.android.com/reference/android/media/MediaPlayer.html`. |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#isCurrentPointSource(androidx.xr.scenecore.Entity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Entity entity)` Checks whether the given `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#isCurrentPointSource(androidx.xr.scenecore.Entity)` is currently configured as the point source for the associated `https://developer.android.com/reference/android/media/MediaPlayer.html`. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getPointSourceParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final PointSourceParams getPointSourceParams()
```

The `https://developer.android.com/reference/androidx/xr/scenecore/PointSourceParams` that are currently set for this `https://developer.android.com/reference/android/media/MediaPlayer.html`.

This is useful for verifying if the `https://developer.android.com/reference/android/media/MediaPlayer.html` has been updated with the intended parameters via `https://developer.android.com/reference/androidx/xr/scenecore/SpatialMediaPlayer#setPointSourceParams(androidx.xr.runtime.Session,android.media.MediaPlayer,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity)`.

### getSoundFieldAttributes

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final SoundFieldAttributes getSoundFieldAttributes()
```

The `https://developer.android.com/reference/androidx/xr/scenecore/SoundFieldAttributes` that are currently set for this `https://developer.android.com/reference/android/media/MediaPlayer.html`.

This is useful for verifying if the `https://developer.android.com/reference/android/media/MediaPlayer.html` has been updated with the intended attributes via `https://developer.android.com/reference/androidx/xr/scenecore/SpatialMediaPlayer#setSoundFieldAttributes(androidx.xr.runtime.Session,android.media.MediaPlayer,androidx.xr.scenecore.SoundFieldAttributes)`.

### hashCode

```
public int hashCode()
```

### isCurrentPointSource

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final boolean isCurrentPointSource(@NonNull Entity entity)
```

Checks whether the given `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#isCurrentPointSource(androidx.xr.scenecore.Entity)` is currently configured as the point source for the associated `https://developer.android.com/reference/android/media/MediaPlayer.html`.

This returns `true` if the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#isCurrentPointSource(androidx.xr.scenecore.Entity)` was passed to `https://developer.android.com/reference/androidx/xr/scenecore/SpatialMediaPlayer#setPointSourceParams(androidx.xr.runtime.Session,android.media.MediaPlayer,androidx.xr.scenecore.PointSourceParams,androidx.xr.scenecore.Entity)` for this `https://developer.android.com/reference/android/media/MediaPlayer.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Entity entity` | The target `https://developer.android.com/reference/androidx/xr/scenecore/Entity` to check against. |

| Returns |
|---|---|
| `boolean` | `true` if the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#isCurrentPointSource(androidx.xr.scenecore.Entity)` is the point source for the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester#mediaPlayer()`, `false` otherwise. |