Documentation · ViewHelper reference

XSD schema file | vhs 2.1.4

Media / YoutubeViewHelper

Renders HTML code to embed a video from YouTube

  • Tag usage example

    < additionalAttributes="{foo: 'bar'}" videoId="NULL" width="123" height="123" autoplay="1" legacyCode="1" showRelated="1" extendedPrivacy="1">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    { {foo: 'bar'}, videoId: 'NULL', width: 123, height: 123, autoplay: 1, legacyCode: 1, showRelated: 1, extendedPrivacy: 1)}


Argument Description Type

Additional tag attributes. They will be added directly to the resulting HTML tag.


Play the video automatically on load. Defaults to FALSE.


Whether to use cookie-less video player.


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


Whether to use the legacy flash video code.


Whether to show related videos after playing.


YouTube id of the video to embed.


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

Required attribute

Revision history

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

    [FEATURE] Add ViewHelper for YouTube video embedding

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

    [FEATURE] Add autoplay option to YouTube ViewHelper

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

    [TASK] Set correct video dimensions

commit 812925e3b1be49d9c8b7a75bab5fbc815c00601d
Author: Claus Due <*****>
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 <*****>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

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

    [TASK] Migrate to using namespace core class names

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

    [TASK] CGL compliance

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

    [TASK] Switch to namespaces

commit 579b6b12438f6fa76269bf5c7d538fccd33db22f
Author: Xaver Maierhofer <*****>
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 <*****>
Date:   Tue Jan 6 01:15:09 2015 +0100

    [TASK] Clone is a keyword and not a function

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

    [TASK] Reference Copyright to file