Documentation

Audio Playlist

Features

With the release of Radiant Media Player 5.3.0, we now offer audio playlist support (audio-only content). This works very similarly to our video playlist implementation so we advise first to review this area of our documentation before moving forward with audio playlist.

Video ads can be played each time a new audio item is loaded within the player. The audio playlist UI is fully compatible with mobile devices. A built-in error-recovery mechanism is also provided to skip audio playlist items that may be unavailable.

Supported audio-only streaming protocols are HLS, DASH and MP3/OGG/M4A progressive download. Other video playlist features and restrictions generally apply to audio playlist.

Audio playlist input data

The audio playlist can be initialised by passing to the playlistLoc setting a URI to a JSON file holding audio playlist data. You will also need to set playlistAudioOnly player setting to true. Here is a full example of a well-formatted JSON file that can be used for input to an audio playlist.

Read our general playlist documentation for a guide to JSON files compatible with our audio-only playlist content.

Audio playlist settings

playlistAudioOnly: Boolean

This enables audio playlist layout required to properly display a playlist of audio-only content. Default: false.

Other settings for video playlist also apply for audio playlist

Audio playlist code example - see this example live here

The below code is used to display the audio playlist example provided above:

Take note of the additional div elements required to display the audio playlist UI.

<script src="https://cdn.radiantmediatechs.com/rmp/9.15.3/js/rmp.min.js"></script>
<!-- Here is our specific markup for playlist -->
<div class="rmp-playlist-container">
  <div class="rmp-playlist-player-wrapper">
    <div id="rmp"></div>
  </div>
</div>
<script>
const settings = {
  licenseKey: 'your-license-key',
  // if you want ads to show uncomment this next setting (ad data for each playlist item can be passed in JSON file)
  // ads: true,
  // our playlist settings
  playlistUpNextAutoplay: true,
  playlistEndedLoop: false,
  playlistLoc: 'https://www.radiantmediaplayer.com/media/playlist/audio-only/audio-playlist-hls.json',
  // our audio playlist setting
  playlistAudioOnly: true
};
const rmp = new RadiantMP('rmp');
rmp.init(settings);
</script>

Audio playlist API

The video playlist API also applies to audio playlist.

Additional support notes

The support notes for video playlist also apply to audio playlist.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2024 Radiant Media Player. All Rights Reserved.