Audio-only related content works very similarly to our video related content implementation so we advise first to review this area of our documentation before moving forward with audio-only related content.
Video ads or audio ads can be played each time a new audio item is loaded within the player. The audio-only related content UI is fully compatible with mobile devices. A built-in error-recovery mechanism is also provided to skip audio related items that may be unavailable.
Supported audio-only streaming protocols are HLS, DASH and MP3/OGG/M4A progressive download. Other video related content features and restrictions generally apply to audio-only related content.
The audio-only related content can be initialised by passing to the
relatedLoc
setting
a URI to a
JSON file holding audio-only related content data. You will also need to set
relatedAudioOnly
player setting to true.
Here
is a full example
of a well-formatted JSON file that can be used for input to audio-only related content.
Read our general related documentation for a guide to JSON files compatible with our audio-only related content.
relatedAudioOnly: Boolean
This enables audio-only related content layout required to properly display
a list
of
audio-only content. Default: false
.
Other settings for video related content also apply for audio-only related content
The below code is used to display the audio-only related content example provided above:
Take note of the additional div elements required to display the audio-only related content UI.
<script src="https://cdn.radiantmediatechs.com/rmp/9.15.16/js/rmp.min.js"></script> <!-- Here is our specific markup for audio-only related content --> <div id="rmp"></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 related content settings relatedUpNextOffset: 10, relatedUpNextAutoplay: true, relatedEndedLoop: false, relatedLoc: 'https://www.radiantmediaplayer.com/media/playlist/audio-only/audio-related-hls.json', // our audio-only related content setting relatedAudioOnly: true }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
The video related content API also applies to audio-only related content.
The support notes for video related content also apply to audio-only related content.
©2015-2024 Radiant Media Player. All Rights Reserved.