Another method to render Companion Ads is to declare block elements with class
vjs-companion on your HTML page. If adSlotId parameter not defined for certain Copmpanion in VAST document, or when element on an HTML page with matched ID not found, the plugin searches for HTML elements with
vjs-companion class name to render companions in hierarchical order. Both methods can be used simultaneously, just like in the example above. Two companions are rendered by adSlotId, three companions are rendered by
vjs-companion class name.
Unlike most of VAST solutions our plugin accepts percentage values and
Auto value for Companion's required width and height parameters. This gives more control over the website responsive layout when companions rendered. In the example above, companion with 540x82 banner is rendered inside element with 100% width and
auto height styles. 582px max-width and 82px max-height styles are also applied according to companion's expandedWidth and expandedHeight parameters. Rendered companion's banner remains responsive and is scaled down if required.