Embedding - Advanced topics

4.1 Embed-Code Parameters

Most playout settings can be overridden by embed-code parameters.

Moreover, a selected subset of settings can be made exclusively by using an embed-code parameter. They are:

Name Type Value
dfp_adunit_l1 String level-1 ad unit *
dfp_adunit_l2 String level-2 ad unit *
dfp_adunit_l3 String level-3 ad unit *
dfp_adunit_l4 String level-4 ad unit *
dfp_adunit_l5 String level-5 ad unit *

4.1.1 Embed-Code Parameters for Commercial Targeting

Often when targeting commercials, custom macros are needed. Since v5.35, the player implements this facility, substituting %%<key>%% with the value part of the macro_<key>=<value> embed-code parameter.

An example: If we have an ad tag url
https://testsuite.acc.bbvms.com/mediaclip/692.xml?output=vast&targeting=%%foo%%
booked in the preroll position of the default playout, then embedding the player with
https://testsuite.acc.bbvms.com/p/default/c/213.js?macro_foo=bar
results in the player requesting a preroll ad from
https://testsuite.acc.bbvms.com/mediaclip/692.xml?output=vast&targeting=bar.

4.2 Responsive Design

The best way to make the player scale in a responsive design is setting its width and height to '100%' and wrap it inside a <div> that you control the dimensions of.

4.3 Embed dynamically

It is possible to place the player embed script at the bottom of the page and let place the player after a specific element on the page. For further information please refer to the Playout setting "Placement options" (Chapter 2.7.6)

4.4 Just-In-Time Embedding

Sometimes it is more convenient to have the player load on demand, for instance when preloading a player in the background once the page is complete.

Please refer to our Player API page to see an example.

4.5 Embedding using Zones

If your contract allows it, you can wrap your player in a 'zone' and embed the 'zone' using a zone-embed code.

4.6 Embedding on Facebook

To embed your video inline on Facebook, og-tags need to be added besides the player embed code on your website.
More information concerning og-tags can be found in the Public API: External metadata generator documentation.

4.7 Embedding of YouTube-hosted video

As of version 5.38, a dedicated embed code is available for YouTube hosted video. Upon request, designated playouts can be enabled for use with this embed code, which looks like: https://<publication>.bbvms.com/p/<playout>/y/<youtubeId>.html (mind the '/y/' where you would expect '/c/').