Documentation · ViewHelper reference

XSD schema file | vhs master

Media / YoutubeViewHelper

Renders HTML code to embed a video from YouTube. /

  • Tag usage example

    <v:media.youtube videoId="NULL" width="123" height="123" autoplay="1" legacyCode="1" showRelated="1" extendedPrivacy="1" hideControl="1" hideInfo="1" enableJsApi="1" playlist="NULL" loop="1" start="123" end="123" lightTheme="1" videoQuality="NULL" windowMode="NULL">
    	<!-- tag content - may be ignored! -->
    </v:media.youtube>
  • Inline usage example

    {v:media.youtube(videoId: 'NULL', width: 123, height: 123, autoplay: 1, legacyCode: 1, showRelated: 1, extendedPrivacy: 1, hideControl: 1, hideInfo: 1, enableJsApi: 1, playlist: 'NULL', loop: 1, start: 123, end: 123, lightTheme: 1, videoQuality: 'NULL', windowMode: 'NULL')}

Arguments

Argument Description Type
autoplay

Play the video automatically on load. Defaults to FALSE.

boolean
enableJsApi

Enable YouTube JavaScript API

boolean
end

Stop playing after seconds.

integer
extendedPrivacy

Whether to use cookie-less video player.

boolean
height

Height of the video in pixels. Defaults to 385 for 16:9 content.

integer
hideControl

Hide video player's control bar.

boolean
hideInfo

Hide video player's info bar.

boolean
legacyCode

Whether to use the legacy flash video code.

boolean
lightTheme

Use the YouTube player's light theme.

boolean
loop

Play the video in a loop.

boolean
playlist

Comma seperated list of video IDs to be played.

string
showRelated

Whether to show related videos after playing.

boolean
start

Start playing after seconds.

integer
videoId

YouTube id of the video to embed.

string
videoQuality

Set the YouTube player's video quality (hd1080,hd720,highres,large,medium,small).

string
width

Width of the video in pixels. Defaults to 640 for 16:9 content.

integer
windowMode

Set the Window-Mode of the YouTube player (transparent,opaque). This is necessary for z-index handling in IE10/11.

string
Required attribute

Revision history

commit 8e4466651776dbd739aefdf294f1f97230991d83
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Sun Jan 27 11:35:16 2013 +0100

    [FEATURE] Add ViewHelper for YouTube video embedding

commit 89121b925107e66ca4c031af5d69b934106657ec
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Fri Apr 5 11:37:17 2013 +0200

    [FEATURE] Add autoplay option to YouTube ViewHelper

commit 58b1fcc7264ec892037a4b871daf4303b6bf93ec
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Fri Apr 5 16:02:19 2013 +0200

    [TASK] Set correct video dimensions

commit 812925e3b1be49d9c8b7a75bab5fbc815c00601d
Author: Claus Due <*****@wildside.dk>
Date:   Wed May 22 00:06:43 2013 +0200

    [TASK] Cleanup as required by coding standards
    
    Excuse the not-using-PR-direct-to-master commit approach but this one is merely cosmetic in nature and the Travis build is failing because of it.

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 579b6b12438f6fa76269bf5c7d538fccd33db22f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jun 15 16:37:33 2014 +0200

    [TASK] Use // instead http to avoid errors/warnings with SSL - youtube

commit 5c0a530ba731e21e62f59b072635f6f4064ed1be
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Tue Jan 6 01:15:09 2015 +0100

    [TASK] Clone is a keyword and not a function

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file