Skip to content

Video Field

The Video field extends the File Field and accepts the same settings.

video output

Provider Support

  • YouTube
  • Vimeo

video youtube

Preview:

video preview

Output:

php
{$video|print}

Array
(
    [provider] => youtube
    [title] => DEAD STRINGS VOL 3 | Epic Dramatic Violin Epic Music Mix | Best Dramatic Strings Orchestral
    [description] => 
    [thumbnail] => Array
        (
            [default] => Array
                (
                    [url] => https://i.ytimg.com/vi/u0_itJO_8Jw/default.jpg
                    [width] => 120
                    [height] => 90
                )

            [medium] => Array
                (
                    [url] => https://i.ytimg.com/vi/u0_itJO_8Jw/mqdefault.jpg
                    [width] => 320
                    [height] => 180
                )

            [high] => Array
                (
                    [url] => https://i.ytimg.com/vi/u0_itJO_8Jw/hqdefault.jpg
                    [width] => 480
                    [height] => 360
                )

            [standard] => Array
                (
                    [url] => https://i.ytimg.com/vi/u0_itJO_8Jw/sddefault.jpg
                    [width] => 640
                    [height] => 480
                )

            [maxres] => Array
                (
                    [url] => https://i.ytimg.com/vi/u0_itJO_8Jw/maxresdefault.jpg
                    [width] => 1280
                    [height] => 720
                )

        )

    [preview] => https://i.ytimg.com/vi/u0_itJO_8Jw/hqdefault.jpg
    [url] => https://www.youtube.com/watch?v=u0_itJO_8Jw
    [embed_video] => https://www.youtube.com/embed/u0_itJO_8Jw
    [video_id] => u0_itJO_8Jw
    [width] => 600
    [height] => 400
)

Examples

Youtube

html
<iframe src="{$video.embed_video}" frameborder="0" width="{$video.width}" height="{$video.height}"></iframe>

A regular video

html
<video width="{$video.width}" height="{$video.height}" poster="{$video.preview}" controls>
  <source src="{$video.url}" type="video/{$video.extension}">
</video>

© PageBlocks 2019-present