> For the complete documentation index, see [llms.txt](https://docs.fluidplayer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluidplayer.com/api/utility-api.md).

# Utility API

You can use functions documented here to alter the behaviour of Fluid Player after initialisation as well as to access different features and internals of Fluid Player itself.

### setHtmlOnPauseBlock

If we wanted to set or change the HTML that's set for this we can do it using the following.

**html**: This is HTML we want to show when the player in paused

**width**: The width (in pixels) of the container for this HTML

**height**: The height (in pixels) of the container for this HTML

```javascript
player.setHtmlOnPauseBlock({html: "<i>This video is paused</i>", width: 100, height: 50});
```

### destroy

Destroy this instance of Fluid Player. Use this method to remove Fluid Player instance from the page.

```javascript
player.destroy();
```

### dashInstance

Access the current instance of [DASH.js](https://github.com/Dash-Industry-Forum/dash.js). Returns `null` if DASH streamer is not in use.

**NOTE:** avoid storing object reference returned by this function. It is possible for this object to change during lifecycle of the Fluid Player instance.

```javascript
player.dashInstance();
```

### hlsInstance

Access the current instance of [HLS.js](https://github.com/video-dev/hls.js/). Returns `null` if HLS streamer is not in use.

**NOTE:** avoid storing object reference returned by this function. It is possible for this object to change during lifecycle of the Fluid Player instance.

```javascript
player.hlsInstance();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluidplayer.com/api/utility-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
