This template is protected from editing.

Difference between revisions of "Template:Youtube"

From Team Fortress Wiki
Jump to: navigation, search
(New YT template for new version of EmbedVideo)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="youtubebox ratio-{{{ratio|16x9}}} hd-{{#if:{{{hd|}}}|on|off}} widths-{{{widths|{{{width|512}}}}}}" style="margin:0.75em 0em;">
+
<div class="youtubebox ratio-{{{ratio|16x9}}} hd-{{#if:{{{hd|{{{audio|}}}}}}|on|off}} widths-{{{widths|{{{width|512}}}}}} {{#if:{{{audio|}}}|youtube-audio|}}" style="margin:0.75em 0em;">
{{#evp:youtube|{{{1|tax4e4hBBZc}}}|no do|{{{align|left}}}|{{{width|512}}}}}{{#if:{{{2|<noinclude>yes</noinclude>}}}
+
{{#if: {{{align|}}}|{{#ev:youtube|{{{1|tax4e4hBBZc}}}|{{{width|512}}}|{{{align}}}}}|{{#ev:youtube|{{{1|tax4e4hBBZc}}}|{{{width|512}}}}}}}{{#if:{{{2|<noinclude>yes</noinclude>}}}
 
| <br /><div style="margin-top:0.75em;">{{hatnote|1={{{2|Caption here.}}}}}</div>
 
| <br /><div style="margin-top:0.75em;">{{hatnote|1={{{2|Caption here.}}}}}</div>
}}</div><!--
+
}}</div><noinclude>{{Doc begin}}
// Auto language tracking
 
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{auto lang cat}}|}}<!--
 
--><noinclude>{{Doc begin}}
 
  
 
This template will embed a video inside an article.
 
This template will embed a video inside an article.
Line 17: Line 14:
  
 
;YouTube Video ID: The YouTube video id of the video to include.
 
;YouTube Video ID: The YouTube video id of the video to include.
;Width: Width of the video, in pixels. Height is calculated based on ratio. Default is 512px.
+
;{{code|width}}: Width of the video, in pixels. Height is calculated based on ratio. Default is 512px.
;Widths: If specified, must be a list of hyphen-separated integers representing possible video widths (Example: <code>460-500-700</code>). The video size will be based on the browser window size and the ratio of the video. If left unspecified, the video will stay at the value of the <code>width</code> attribute.
+
;{{code|widths}}: If specified, must be a list of hyphen-separated integers representing possible video widths (Example: <code>460-500-700</code>). The video size will be based on the browser window size and the ratio of the video. If left unspecified, the video will stay at the value of the <code>width</code> attribute.
;Align: Horizontal alignment of video. Default is left.
+
;{{code|align}}: Horizontal alignment of video. Default is left.
;Ratio: Ratio of embedded video, with <code>x</code> as separator (Example: <code>4x3</code>). Default is <code>16x9</code>.
+
;{{code|ratio}}: Ratio of embedded video, with <code>x</code> as separator (Example: <code>4x3</code>). Default is <code>16x9</code>.
;HD: Whether HD should be turned on or off by default. Default is to let YouTube decide. YouTube users may override this value in their YouTube preferences.
+
;{{code|hd}}: Whether HD should be turned on or off by default. Default is to let YouTube decide. YouTube users may override this value in their YouTube preferences.  This parameter can be set to {{code|on}} or {{code|off}}.
 +
;{{code|audio}}: Whether this video should be presented as an audio file (display only the seek bar, no video).  This parameter can be set to {{code|on}} or {{code|off}}.
  
 
=== See also ===
 
=== See also ===

Latest revision as of 19:28, 31 May 2013


Caption here.

Documentation for Youtube


This template will embed a video inside an article.

Syntax

Basic:

{{youtube|YouTube id}}

With a defined thumbnail width:

{{youtube|YouTube id|width=value|align=alignment}}
YouTube Video ID
The YouTube video id of the video to include.
width
Width of the video, in pixels. Height is calculated based on ratio. Default is 512px.
widths
If specified, must be a list of hyphen-separated integers representing possible video widths (Example: 460-500-700). The video size will be based on the browser window size and the ratio of the video. If left unspecified, the video will stay at the value of the width attribute.
align
Horizontal alignment of video. Default is left.
ratio
Ratio of embedded video, with x as separator (Example: 4x3). Default is 16x9.
hd
Whether HD should be turned on or off by default. Default is to let YouTube decide. YouTube users may override this value in their YouTube preferences. This parameter can be set to on or off.
audio
Whether this video should be presented as an audio file (display only the seek bar, no video). This parameter can be set to on or off.

See also