1. Home
  2. Content Management
  3. Embedding a media clip

Embedding a media clip


In this article, we explain how to embed a Media Clip using JavaScript or an iFrame. We also offer advanced embedding options that you can learn more about here.  To begin, open a Media Clip from Media Library > Media Clips and then select the Embed tab.

1.0 | Javascript

Select a playout that the player should use on the webpage. This can be the default or a more customised playout. Select JavaScript from the dropdown menu on the right and copy the embed code that is generated.

<script type=”text/javascript” src=”//demo.bbvms.com/p/default/c/2734714.js” async=”true”></script>

What you see in the embed code

The yellow is the name of the publication
The
blue is the name of the playout used
The
green is the media clip number

2.0 | iFrame

To embed using iframe, select a playout on the left and select iFrame from the dropdown menu on the right. Copy the embed code that is generated.
Please note that using an iframe may is suboptimal for 360 video and fullscreen capabilities. We therefore recommend using Javascript.

Example:

<iframe  

onload="this.src += '#!referrer='+encodeURIComponent(location.href)+'&realReferrer='+encodeURIComponent(document.referrer)"  

src="//demo.bbvms.com/p/default/c/2734714.html?inheritDimensions=true" width="720" height="400"  

frameborder="0" webkitallowfullscreen mozallowFullscreen oallowFullscreen msallowFullscreen allowfullscreen >  

</iframe>
Responsive design

The best way to make the player scale in a responsive design when using an iframe is setting its width and height to ‘100%’ and wrapping it inside a <div> that you control the dimensions of.

Updated on August 25, 2020

Was this article helpful?

Related Articles