No edit summary
(Simplify markup, improve detection of broken videos)
 
(84 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{link|}}}
<includeonly>{{#if:{{{1|{{{video|}}}}}}|<div class="template-video noprint template-video-{{{align|left}}} {{#invoke:Appropedia|videoService|1={{{1|{{{video}}}}}}}}" data-video-id="{{#invoke:Appropedia|videoID|1={{{1|{{{video}}}}}}}}">
|{{#if:{{{title|{{{2|}}}}}}
<div class="template-video-content">{{#switch:{{#invoke:Appropedia|videoService|1={{{1|{{{video}}}}}}}}
|[{{Video/URL|{{{platform|YouTube}}}|{{{id|{{{1}}}}}}}} {{{title|{{{2|}}}}}}]
| youtube = {{#tag:html|<img class="template-video-thumb" src="https://img.youtube.com/vi/{{#invoke:Appropedia|videoID|1={{{1|{{{video}}}}}}}}/mqdefault.jpg" width="640" height="360" /><img class="template-video-play" src="/w/images/4/4f/YouTube_icon.svg" width="80" height="55" />}}
|{{Video/URL|{{{platform|YouTube}}}|{{{id|{{{1}}}}}}}}
| vimeo = {{#tag:html|<img class="template-video-thumb" src="https://vumbnail.com/{{#invoke:Appropedia|videoID|1={{{1|{{{video}}}}}}}}.jpg" width="640" height="360" /><img class="template-video-play" src="/w/images/f/fd/Vimeo_play_button.png" width="80" height="52" />}}
}} {{#if:{{{description|}}}|- {{{description}}}}}
| {{#tag:html|<video src="{{filepath:{{PAGENAME:{{{1|{{{video}}}}}}}}}}" width="640" height="360" controls></video>}}
|{{#widget:{{{platform|YouTube}}}|id={{{id|{{{1}}}}}}}}
}}</div>{{#if:{{{2|}}}{{{title|}}}{{{description|}}}{{{keywords|}}}{{{authors|}}}{{{date|}}}{{{location|}}}{{{language|}}}{{{license|}}}{{{annotations|}}}|
}}{{#subobject:Video {{{id|{{{1}}}}}}
<div class="template-video-data">{{#if:{{{2|{{{title|}}}}}}|
|Has id = {{{id|{{{1}}}}}}
<div class="template-video-title">{{{2|{{{title|}}}}}}</div>}}{{#if:{{{description|}}}|
|Has platform = {{{platform|YouTube}}}
<div class="template-video-description">
|Has URL = {{Video/URL|{{{platform|YouTube}}}|{{{id|{{{1}}}}}}}}
{{{description}}}
|Has title = {{{title|{{{2|}}}}}}
</div>}}{{#if:{{{keywords|}}}|
|Has description = {{{description|}}}
<div class="template-video-keywords">Keywords: {{#arraymap:{{{keywords}}}|,|@|{{Search|@}}}}</div>}}{{#if:{{{authors|}}}|
|Has language = {{{language|English}}}
<div class="template-video-authors">Authors: {{#arraymap:{{{authors}}}|,|@|{{Real name|@}}}}</div>}}{{#if:{{{date|}}}|
|Has category = Videos
<div class="template-video-date">Date: {{{date}}}</div>}}{{#if:{{{location|}}}|
}}{{#if:{{NAMESPACE}}||[[Category:Pages with videos]]}}</includeonly><noinclude>{{Documentation}}</noinclude>
<div class="template-video-location">Location: {{#arraymap:{{{location}}}|,|@|[[@]]}}</div>}}{{#if:{{{language|}}}|
<div class="template-video-language">Language: {{Search|inlanguage:{{{language}}}|{{ucfirst:{{#language:{{{language}}}}}}}}} ({{{language}}})</div>}}{{#if:{{{license|}}}|
<div class="template-video-license">License: {{License|{{{license}}}}}</div>}}{{#if:{{{annotations|}}}|
<div class="template-video-annotations">Annotations:
{{{annotations}}}
</div>}}
</div>}}
</div><usescript src="TemplateVideo.js" /><templatestyles src="Video/styles.css" />|<div class="error">The video template requires the "video" parameter.</div>[[Category:Pages with broken templates]]}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 14:44, 9 February 2024

Template documentationedit documentation

v [[














]] Use this template to embed videos uploaded to Appropedia, Wikimedia Commons, YouTube or Vimeo.

USA just ge

Basic

  • {{V ideo|Growing tomatoes.mp4}} — Embed a video uploaded to Appropedia
  • {{Video|The Yakan Native Dance.webm}} — Embed a video uploaded to Wikimedia Commons
  • {{Video|431803145}} — Embed a Vimeo video by id
  • {{Video|PsP5IJT77fU}} — Embed a YouTube video by id
  • {{Video|video=https://www.youtube.com/watch?v=PsP5IJT77fU}} — Embed a YouTube video by URL (notice that the "video" parameter is required because else the = sign in the YouTube URL will confuse the template)

Parameters

  • videoRequired! File name, id or URL, for example:
    • https://www.youtube.com/watch?v=PsP5IJT77fU — YouTube URL
    • https://vimeo.com/431803145 — Vimeo URL
    • PsP5IJT77fU — YouTube id
    • 431803145 — Vimeo id
    • House wren in JBWR (50171).webm — Name of a file uploaded to Appropedia or to Wikimedia Commons
  • title — Title of the video, used for search results.
  • description — Description of the video content, used for search results.
  • keywords — Comma-separated list of keywords, for example 'solar, garden, recycle'.
  • authors — Authors names or usernames on Appropedia (including the 'User:' prefix).
  • date — Date when the video was made, for example '2020-09-23'.
  • location — Location where the video was made, for example 'Buenos Aires, Argentina'.
  • language — Language code of the language of the video, for example 'es' for Spanish ('en' for English is assumed).
  • license — License under which this video is released, for example 'CC-BY-SA-4.0'.
  • align — Alignment of the video, for example 'center'.

Example

{{Video
| video = https://vimeo.com/431803145
| align = center
| title = The Walking Fish
| description = A tragicomic short film about ambition, perfection and self-acceptance.
| keywords = ambition, perfection, self-acceptance, fish
| authors = Thessa Meijer
| date = 2020-07-05
| location = Netherlands
| language = es
| license = CC-BY-SA-4.0
| annotations =
* 00:00 Start
* 00:10 Tenth second
* 01:00 Minute mark
}}
431803145.jpgVimeo_play_button.png
The Walking Fish

A tragicomic short film about ambition, perfection and self-acceptance.

Authors: Thessa Meijer
Date: 2020-07-05
Location: Netherlands
Language: Español (es)
License: CC-BY-SA-4.0
Annotations:
  • 00:00 Start
  • 00:10 Tenth second
  • 01:00 Minute mark

See also

Template data

<templatedata> { "params": { "description": { "label": "Description", "description": "Video description", "type": "string" }, "authors": { "label": "Authors", "description": "Authors names or usernames on Appropedia (including the 'User:' prefix)", "example": "John Doe, User:Lonny, User:Emilio", "type": "string" }, "date": { "label": "Date", "description": "Date when the video was made", "example": "2020-09-23", "type": "date" }, "location": { "label": "Location", "description": "Location where the video was made", "example": "Buenos Aires, Argentina", "type": "string" }, "video": { "aliases": [ "1" ], "label": "Video", "description": "Video name, URL or id", "example": "https://www.youtube.com/watch?v=3R2gvgcdseI", "type": "string", "required": true }, "title": { "aliases": [ "2" ], "label": "Title", "description": "Video title", "example": "How to build an igloo", "type": "string" }, "keywords": { "label": "Keywords", "description": "Comma-separated list of keywords", "example": "solar, garden, recycle", "type": "string" }, "license": { "label": "Licence", "description": "License under which this video is released", "example": "CC-BY-SA 4.0", "type": "string",

           "suggestedvalues": [

"CC-BY-SA-4.0", "CC-BY-SA-3.0", "CC-BY-SA-2.0", "CC-BY-NC-SA-4.0", "CC-BY-NC-SA-3.0", "CC-BY-NC-SA-2.0", "CC-BY-4.0", "CC-BY-3.0", "CC-BY-2.0", "CC0-1.0", "Public domain", "Fair use", "Copyright", "Unknown" ] }, "align": { "label": "Align", "description": "Alignment of the video", "example": "center", "type": "string", "default": "left" }, "annotations": { "label": "Annotations", "description": "Annotations to navigate the video", "example": "00:00 Start", "type": "content" }, "language": { "label": "Language", "description": "Language code of the language of the video", "example": "es", "type": "string", "default": "en",

           "suggestedvalues": [

"en", "es", "de", "fr", "pt", "it" ] } }, "description": "Use this template to embed videos uploaded to Appropedia, Wikimedia Commons, YouTube or Vimeo.", "paramOrder": [ "video", "title", "align", "description", "keywords", "authors", "date ", "location", "language", "license", "annotations" ], "format": "block" } </templated ata>

Cookies help us deliver our services. By using our services, you agree to our use of cookies.