Difference between revisions of "Template:Embed video"

goteach>Mlink-rodrigue
(Tag: 2017 source edit)
 


Embeds a single external video on the page.

Template parameters

Parameter Description Type Status
Hosting type hostingtype

Indicates if the video is stored on the wiki or on a video streaming service.

Default
external
Example
external, wiki
Auto value
external
Unknown required
Service service

Name of the video service (supported services only). For local videos use wiki

Default
empty
Example
youtube, wiki, vimeo, ted, facebook
Auto value
youtube
Unknown required
URL of the external video or file name of the internal video videopath

Path to the video

Default
empty
Example
empty
Auto value
Unknown required
Dimensions dimensions

Dimensions in pixelsto size the container for the player.

Default
640
Example
480, 480x320
Auto value
empty
Unknown optional
Alignment alignment

The video can be placed left, center, right, or inline. Inline allows to add multiple videos in one row. In mobile view, the videos are automatically aligned vertically.

Default
empty
Example
left, center, right, or inline
Auto value
empty
Unknown optional
Description description

Shows a description below the player container.

Default
empty
Example
Departure to Mars
Auto value
empty
Unknown optional
Container container

Determines the container type for the player. The value frame places the video player in a Mediawiki preview box.

Default
empty
Example
frame
Auto value
empty
Unknown optional
Autoresize autoresize

Automatically adjusts the video size if the video would extend beyond the size of the container.

Default
true
Example
true, false
Auto value
empty
Unknown optional
Vertical alignment valignment

Aligns the vertical placement of the video either to the top, middle, bottom, or baseline of the parent element. Using this parameter forces the alignment parameter to be inline.

Default
empty
Example
top, middle, bottom, baseline
Auto value
empty
Unknown optional
<includeonly>{{#ifeq: {{{hostingtype|}}}|external|{{#evt:service={{{service}}}
        
         |id={{{videopath}}}
        
         |dimensions={{{dimensions}}}
        
         |{{#if: {{{description|}}}|description={{{description}}}|}}
        
         |{{#if: {{{alignment|}}}|alignment={{{alignment}}}|}}
        
         |{{#if: {{{container|}}}|container={{{container}}}|}}
        
         |{{#if: {{{autoresize|}}}|autoresize={{{autoresize}}}|}}
        
         |{{#if: {{{valignment|}}}|valignment={{{valignment}}}|}}}}|{{#ifeq: {{{hostingtype|}}}|wiki|[[File:{{{videopath}}}|{{#ifeq: {{{dimensions|}}}|{{{dimensions}}}x{{{dimensions}}}px|}}|{{#if: {{{alignment|}}}|{{{alignment|}}}|}}|{{#if: {{{container|}}}|thumb|}}|{{#if: {{{description|}}}|{{{description}}}|}}]]|error}}
        
        }}</includeonly>
        
        
        <noinclude>
        
        
        <templatedata>
        
        {
        
        	"params": {
        
        		"hostingtype": {
        
        			"label": "Hosting type",
        
        			"description": "Indicates if the video is stored on the wiki or on a video streaming service.",
        
        			"example": "external, wiki",
        
        			"default": "external",
        
        			"autovalue": "external",
        
        			"required": true
        
        		},
        
        		"service": {
        
        			"label": "Service",
        
        			"description": "Name of the video service (supported services only). For local videos use wiki ",
        
        			"example": "youtube, wiki, vimeo, ted, facebook",
        
        			"autovalue": "youtube",
        
        			"required": true
        
        		},
        
        		"videopath": {
        
        			"label": "URL of the external video or file name of the internal video",
        
        			"description": "Path to the video",
        
        			"autovalue": "",
        
        			"required": true
        
        		},
        
        		"dimensions": {
        
        			"label": "Dimensions",
        
        			"description": "Dimensions in pixelsto size the container for the player.",
        
        			"example": "480, 480x320",
        
        			"default": "640"
        
        		},
        
        		"alignment": {
        
        			"label": "Alignment",
        
        			"description": "The video can be placed left, center, right, or inline. Inline allows to add multiple videos in one row. In mobile view, the videos are automatically aligned vertically.",
        
        			"example": "left, center, right, or inline"
        
        		},
        
        		"description": {
        
        			"label": "Description",
        
        			"description": "Shows a description below the player container.",
        
        			"example": "Departure to Mars"
        
        		},
        
        		"container": {
        
        			"label": "Container",
        
        			"description": "Determines the container type for the player. The value frame places the video player in a Mediawiki preview box.",
        
        			"example": "frame"
        
        		},
        
        		"autoresize": {
        
        			"label": "Autoresize",
        
        			"description": "Automatically adjusts the video size if the video would extend beyond the size of the container.",
        
        			"example": "true, false",
        
        			"default": "true"
        
        		},
        
        		"valignment": {
        
        			"label": "Vertical alignment",
        
        			"description": "Aligns the vertical placement of the video either to the top, middle, bottom, or baseline of the parent element. Using this parameter forces the alignment parameter to be inline.",
        
        			"example": "top, middle, bottom, baseline"
        
        		}
        
        },
        
        	"description": "Embeds a single external video on the page."
        
        }
        
        
        </templatedata>
        
        
        </noinclude>
(7 intermediate revisions by the same user not shown)
(No difference)

Attachments

Discussions