---
title: "Using Auto-play"
slug: "using-auto-play"
updated: 2024-02-29T22:40:21Z
published: 2024-02-29T22:40:21Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.tritondigital.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Auto-play

For measurement reasons, as well as user experience, the use of auto-play is **strongly discouraged**. Auto-play is defined as the station/stream playing without any user interaction to initiate the play.

The**autoplay**flag is used to indicate whether or not autoplay was used:

autoplay

Flag that indicates if the session has been initiated from a player auto-play. Possible values are**autoplay=0**(not initiated via auto-play) and**autoplay=1**(initiated via auto-play). Auto-play of audio content is strongly discouraged since in some cases, auto-played streams are not audible as the volume may be muted while the stream continues to be active. Triton Digital recommends that any initiation of audio content playback is determined by an overt user gesture, such as a tap or a click.

There are two valid scenarios for auto-play, as described below:

**Scenario 1 - Auto-play Not Implemented by Publisher**

- When the station is played *as a result of user interaction* then no further action is required by the publisher.
- The **absence** of the**autoplay:1**value in the****[**trackingParameters**](/v1/docs/javascript-sdk-reference#tracking-parameters)****object means that the station was started through user interaction.

**Scenario 2 - Autoplay Implemented by Publisher**

- When the publisher implements an autoplay strategy they **must** add the**autoplay:1**value to the**[trackingParameters](/v1/docs/javascript-sdk-reference#tracking-parameters)**object when calling the play function on the SDK.
- Example:

```javascript
player.play( {
 station: 'TRITONRADIOMUSIC',
 trackingParameters: {
         autoplay: 1
 }
});
```
