Lo sentimos, este artículo está disponible en inglés
You can catch ad events via JS API if you enable the Track VAST events option in the API settings
Events come with the vast_ prefix
function PlayerjsEvents(event,id,info){
if(event=="vast_Impression"){
console.log(event, info);
}
if(event=="vast_Error"){
console.log(event, info); //there will be an error code in info
}
}
You can catch the end of an ad block using the vast_finish event and request information about current advertising with vastinfo
player.api("vastinfo");
The player will return an object with information in response.