​PageObject: YouTube video

​This PageObject renders an <iframe> which embeds an YouTube video player. By default the full screen option is activated (and cannot be deactivated).

The PageObject will render a minimal HTML setup, the visual appearance is controlled by the template's CSS. In other words: You need to declare proper CSS styles for this PageObject, otherwise it won't look good or be even usable.

HTML example (system generated)

<div class="fx_po_youtube">
    <iframe src="https://www.youtube.com/embed/YOUTUBE-VIDEO-ID" allowfullscreen></iframe>
</div>

​CSS example (boilerplate)

div.fx_po_youtube {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    padding-top: 25px;
    height: 0;
}
div.fx_po_youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
​This PageObject renders as block element.

​Demo content

Demo content is served as SVG wireframe image.

Available parameters:

  • width: [int] Width of demo image in pixel; required if not using url.
  • height: [int] Height of demo image in pixel; required if not using url.
  • url: [string] URL of the image to use as video preview. Can only be used in custom-flow. At export this property gets stripped and the images dimensions are used to set width and height

Example for demo content “YouTube”

Demo content YouTube

Configuration example

{{ fx_page.slot("SLOT_NAME", _context, {"content": [
   {"type": "youtube", "config": {"width": 400, "height": 225}}
] }) }}

Using wireframe images in your templates

Shape types:

  • rectangle: 0
  • circe: 1
  • icon: 2
  • video: 3
  • youtube: 4
<img src="{{ url('wireframe_image_type', {'width': 100, 'height': 100, 'type': 0}) }}">
​For more details how to implement demo content please refer to the Demo Content Documentation.