Closed Cycymomo closed 3 years ago
During ad_start event, the adData Object is available in the player instance
ad_start
adData
player
<div id="player"></div> <script src="https://api.dmcdn.net/all.js"></script>
const player = DM.player('player', { video: 'x730nnd' })
- attach the listener to it
player.addEventListener('ad_start', () => { console.log(player.adData) })
=> as soon as the ad is displayed, you'll have the `adData` informations in the `player` instance
During
ad_start
event, theadData
Object is available in theplayer
instanceconst player = DM.player('player', { video: 'x730nnd' })
player.addEventListener('ad_start', () => { console.log(player.adData) })