Template:YouTube: Difference between revisions

From VRChat Wiki
Patroll (talk | contribs)
Created page with "<span class="youtube" data-style="max-width: 100%; aspect-ratio: 16 / 9; width: {{{2 |}}}; height: {{{3 | auto}}}; {{{4}}}" data-video-id="{{{1|PWLPw4RE9Ig}}}"/> <noinclude> == Documentation == Embeds a YouTube video. <nowiki>{{Youtube|id|width|height|styles}</nowiki> === Example Usage === {{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki> <hr> {{YouTube|PWLPw4RE9Ig|200px}} <nowiki>{{YouTube|PWLPw4RE9Ig|200px}}</nowiki> <hr> {{YouTube|PWLPw4RE9Ig|300px|300..."
 
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<span class="youtube" data-style="max-width: 100%; aspect-ratio: 16 / 9; width: {{{2 |}}}; height: {{{3 | auto}}}; {{{4}}}" data-video-id="{{{1|PWLPw4RE9Ig}}}"/>
{{#ev:youtube|id={{{id|{{{1|PWLPw4RE9Ig}}}}}}|width={{{width|{{{2|560px}}}}}}|poster={{{thumb|{{{3|{{Thumbnail|{{{id|{{{1|PWLPw4RE9Ig}}}}}}}}}}}}}}|title={{{title|{{{4|}}}}}}}}
<noinclude>
<noinclude>
== Documentation ==
== Documentation ==
Embeds a YouTube video.
Embeds a YouTube video.


<nowiki>{{Youtube|id|width|height|styles}</nowiki>
<nowiki>{{Youtube|id|width|thumb}}</nowiki>
=== Example Usage ===
=== Example Usage ===
{{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki>
{{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki>
Line 10: Line 10:
{{YouTube|PWLPw4RE9Ig|200px}} <nowiki>{{YouTube|PWLPw4RE9Ig|200px}}</nowiki>
{{YouTube|PWLPw4RE9Ig|200px}} <nowiki>{{YouTube|PWLPw4RE9Ig|200px}}</nowiki>
<hr>
<hr>
{{YouTube|PWLPw4RE9Ig|300px|300px}} <nowiki>{{YouTube|PWLPw4RE9Ig|300px|300px}}</nowiki>
{{YouTube|PWLPw4RE9Ig|100%}} <nowiki>{{YouTube|PWLPw4RE9Ig|100%}}</nowiki>
<hr>
<hr>
{{YouTube|PWLPw4RE9Ig|100%}} <nowiki>{{YouTube|PWLPw4RE9Ig|100%}}</nowiki>
{{YouTube|PWLPw4RE9Ig|title=VRChat - Create, Share, Play|thumb=File:VRChat - Create, Share, Play Thumbnail.webp}} <nowiki>{{YouTube|PWLPw4RE9Ig|title=VRChat - Create, Share, Play|thumb=File:VRChat - Create, Share, Play Thumbnail.webp}}</nowiki>


=== Template parameters ===
=== Template parameters ===
Line 22: Line 22:
| id || <code>1</code>|| ID of the video
| id || <code>1</code>|| ID of the video
|-
|-
| width  || <code>2</code>|| Width in CSS units (e.g. 200px, 100%)
| width  || <code>2</code>|| Width in CSS units (e.g. 200px, 100%), Default: 560px, Recommended for 9 / 16 Ratio: 360px
|-
|-
| height || <code>3</code>|| Height in CSS units (e.g. 200px, 100%)
| thumb  || <code>3</code>|| Local file to use as thumbnail
|-
|-
| style || <code>4</code>|| Custom CSS styles
| title  || <code>4</code>|| Video title
|}
|}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 22:54, 2 February 2026

Documentation

Embeds a YouTube video.

{{Youtube|id|width|thumb}}

Example Usage

{{YouTube|PWLPw4RE9Ig}}

{{YouTube|PWLPw4RE9Ig|200px}}

{{YouTube|PWLPw4RE9Ig|100%}}

{{YouTube|PWLPw4RE9Ig|title=VRChat - Create, Share, Play|thumb=File:VRChat - Create, Share, Play Thumbnail.webp}}

Template parameters

Name Variable Description
id 1 ID of the video
width 2 Width in CSS units (e.g. 200px, 100%), Default: 560px, Recommended for 9 / 16 Ratio: 360px
thumb 3 Local file to use as thumbnail
title 4 Video title