« Modèle:Video » : différence entre les versions

De Guide de l'Installation Electrique
Aller à :navigation, rechercher
(move to MW1.39)
(Added new parameter to indicate the closed-caption language to use - info added to the YouTube link in the embedded videos using this template (same as deployed in DE wiki))
 
Ligne 1 : Ligne 1 :
<includeonly><div class="col-12 col-sm-5 {{#ifeq: {{{float|{{{3|}}}}}}|left|video-float-left|video-float-right clearfix}}">{{#ev:youtube|id={{{id|{{{1|}}}}}}|alignment=center|urlArgs=cc_load_policy=1&rel=0&modestbranding=1&controls=1{{#if: {{{playlist|{{{2|}}}}}} | &listType=playlist&list={{{playlist|{{{2|}}}}}} |}} }}</div>[[Category:Eig-pages-with-video|{{PAGENAME}}]]<div>{{#addbodyclass:vd0}}</div></includeonly><noinclude>
<includeonly><div class="col-12 col-sm-5 {{#ifeq: {{{float|{{{3|}}}}}}|left|video-float-left|video-float-right clearfix}}">{{#ev:youtube|id={{{id|{{{1|}}}}}}|alignment=center|urlArgs=cc_load_policy=1{{#if: {{{cc_lang|{{{4|}}}}}} | &cc_lang_pref={{{cc_lang|{{{4|}}}}}} | }}&rel=0&modestbranding=1&controls=1{{#if: {{{playlist|{{{2|}}}}}} | &listType=playlist&list={{{playlist|{{{2|}}}}}} |}} }}</div>[[Category:Eig-pages-with-video|{{PAGENAME}}]]<div>{{#addbodyclass:vd0}}</div></includeonly><noinclude>


[[Category:Eig-other-templates|{{PAGENAME}}]]
[[Category:Eig-other-templates|{{PAGENAME}}]]
Ligne 38 : Ligne 38 :
"default": "right",
"default": "right",
"suggested": true
"suggested": true
},
"cc_lang": {
"aliases": [
"4"
],
"label": "Closed caption language",
"description": "The subtitle language to add in the url link",
"example": "de",
"type": "string",
"suggestedvalues": [
"en"
],
"default": "en"
}
}
},
},
"description": "Used to embed a YouTube video inside a page (as a right floating element)"
"description": "Used to embed a YouTube video inside a page (as a right floating element)",
"paramOrder": [
"id",
"playlist",
"float",
"cc_lang"
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Dernière version du 25 novembre 2024 à 13:05


Used to embed a YouTube video inside a page (as a right floating element)

Paramètres du modèle

ParamètreDescriptionTypeÉtat
IDid 1

YouTube video ID

Par défaut
W_AtINVj5x0
Exemple
W_AtINVj5x0
Chaîneobligatoire
Playlistplaylist 2

Optionally add this parameter (YouTube playlist ID) to view in "playlist" mode, eg next video starts automatically

Par défaut
PLa7UGrWOTyjnuRAZcaIVEtgbmQ61qYzT_
Exemple
PLa7UGrWOTyjnuRAZcaIVEtgbmQ61qYzT_
Chaînesuggéré
Floatfloat 3

Optional parameter for video float position (left/right)

Par défaut
right
Exemple
left
Chaînesuggéré
Closed caption languagecc_lang 4

The subtitle language to add in the url link

Valeurs suggérées
en
Par défaut
en
Exemple
de
Chaînefacultatif