Template:YouTube: Difference between revisions

From VRChat Wiki
Hackebein (talk | contribs)
remove height parameter, add ratio parameter
Hackebein (talk | contribs)
Add more description for parameters
Line 28: Line 28:
| 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
|-
|-
| ratio || <code>3</code>|| Ratio (e.g. 16 / 9, 9 / 16, 1 / 1)
| ratio || <code>3</code>|| Ratio (e.g. 16 / 9, 9 / 16, 1 / 1), Default: 16 / 9
|-
|-
| style || <code>4</code>|| Custom CSS styles
| style || <code>4</code>|| Custom CSS styles

Revision as of 17:49, 9 April 2025

Documentation

Embeds a YouTube video.

{{Youtube|id|width|ratio|styles}}

Example Usage

{{YouTube|PWLPw4RE9Ig}}

{{YouTube|PWLPw4RE9Ig|200px}}

{{YouTube|PWLPw4RE9Ig|100%}}

{{YouTube|qivRiGWcowI|360px|9 / 16}}

{{YouTube|qivRiGWcowI|20%|9 / 16}}

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
ratio 3 Ratio (e.g. 16 / 9, 9 / 16, 1 / 1), Default: 16 / 9
style 4 Custom CSS styles