# AudioPlayer

One-shot playback handle.

Source: https://socketsvc.vercel.app/api/shared/AudioPlayer
<Callout title="Generated from source">
  Interface `com.socketsvc.api.AudioPlayer` — generated from [AudioPlayer.java](https://github.com/HippoDev03/SocketSVC/blob/main/common/core/src/main/java/com/socketsvc/api/AudioPlayer.java). Edit the Javadoc in the Java source, then run `pnpm gen:api`.
</Callout>

```java
package com.socketsvc.api;

public interface AudioPlayer extends AutoCloseable { ... }
```

One-shot playback handle. EOF, stop, failure and owner disable release the source and encoder.

## Methods

### isPlaying

```java
boolean isPlaying()
```

### completion

```java
CompletionStage<Void> completion()
```

Completes after resources close; exceptional on source/encoder failure. Callbacks may run inline or on the audio worker.

### close

```java
void close()
```