Configuration
The VOXA Player allows to enable certains features through a config object, at its core, only 3 attributes are required : audioUrl
, contentTier
and resourceId
Minimal config
This is all you need for the player to function
<script type='module'>
import { initETXPlayer } from 'https://player.voxa.majelan.com/voxa-player.js';
const config = {
audioUrl: 'https://my-audio-file.mp3',
resourceId: 'p-Ud0Ukn_f', // Replace with the id returned by the API
contentTier: 'free', // Replace with metered or premium for paywalled content
};
initETXPlayer(config)
</script>
<div id='voxa-player'></div>
html
In practice though, you'll probably want to enable advertising and customize the behavior of the player.
Kitchen sink
Here is an example of a configuration with every attribute
const config = {
audioUrl: 'https://my-audio-file.mp3',
resourceId: 'p-Ud0Ukn_f',
informationTooltip: true,
ad: {
enabled: true,
channelId: 'myChannelId',
keywords: 'sport, football'
},
duration: 195.7,
disabled: false,
sticky: false,
contentTier: 'free',
title: 'Écouter cet article'
};
javascript
On this page