Using Auto-play

Prev Next

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 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 object when calling the play function on the SDK.
  • Example:
    player.play( {
     station: 'TRITONRADIOMUSIC',
     trackingParameters: {
             autoplay: 1
     }
    });