Skip to content

Youtube Video

The h-yt-video webcomponent is responsible for rendering a youtube video module with configurable settings.

Note: h- stands for headless. This is naming convention used for every webcomponent as they must have a two-part name.

Attributes

Attribute name Type Default Description
src string null Source of the video file
module-instance-id string null Module instance id, usually provided by moduleInstance variable
settings object null Object containing video settings

Example

In this example we render a youtube video.

HTML
<h-yt-video
    src="{{ src }}"
    module-instance-id="{{ options.moduleInstanceId }}"
    settings="{{ options|json_encode|e('html_attr') }}"
>
</h-yt-video>

Webcomponents reference