Veidne:Listen/doc
Šī ir veidnes Veidne:Listen dokumentācijas apakšlapa. Tā satur lietošanas piemērus, kategorijas un citu saistīto informāciju, kas nav pamatlapas daļa. |
Šajā veidnē tiek izmantots skripts, kas uzrakstīts programmēšanas valodā Lua. Skatīt lapu Vikipēdija:Lua, lai uzzinātu vairāk. |
{{Listen}} allows audio and video files to be embedded in articles. It should be used for audio files that are set off from the text, such as music clips or sound recordings.
For non-free, fair-use media samples, a description of the media is required to provide contextual significance, and thus satisfy item No. 8 of the Policy section of Wikipedia:Non-free content criteria. Do not position non-free audio or video files in the infobox.
Simple usage
labot šo sadaļu{{Listen | filename = | title = | description = | pos = }}
- filename (Required): the pagename of the media file, Veidne:Em the
File:
(formerlyImage:
) prefix - title (Required): the title of the audio file, to be displayed. Do not use wikilinks in the title – they will not work.
- description: a description of the audio file. For non-free, fair-use audio, this must include a textual description of what is heard in the sample.
- pos: right (default), left, or center
Multiple files
labot šo sadaļuAdditional files can be embedded in an article with one template by appending a number to each parameter.
{{Listen | filename = | title = | alt = | description = | filename2 = | title2 = | alt2 = | description2 = | filename3 = | title3 = | alt3 = | description3 = }}
- filename (Required): the pagename of the media file, without the File: (formerly Image:) prefix
- title (Required): the title of the audio file, to be displayed.
- alt: alt text for the image displayed for the file, for visually impaired readers; see Wikipedia:Alternative text for images. This is needed for file formats such as Ogg's
.ogv
format that include video as well as sound. The alt text should describe just the initial static image, not the entire video or its sound. - description: a description of the audio file
Style parameters
labot šo sadaļuThe template also takes a number of style parameters to control its appearance:
- type: can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are music, speech and sound (default)
- header: can be used to add a header to the box.
- help: if set to
|help=no
, suppresses the help text that normally appears at the bottom of the box. Only do this if there are other audio files on the page which do have the help link; it must be provided on at least the first file on the article. - pos: by default the box floats to the right side of the screen. Setting this to left or center will float the box on the left-hand side, or center it, respectively.
- image: define a different image. E.g.
|image=[[File:Example.jps|50px]]
. You can set|image=none
to disable the image entirely. - style: can be used to pass specific style instructions to the box. Setting this to float:none will anchor the box when this is convenient. Setting this to float:none; clear:none will enable the anchored box to co-exist gracefully beside another floating box.
- play: some media files cannot be displayed inline; if this is the case set
|play=no
to prevent the broken inline link from displaying. - plain: if set
|plain=yes
, removes most of the ornamentation (table border, image, and help links) to give a minimalist version. This also removes the left/right float and positioning, to allow the box to be manually positioned as desired using the|style=
(e.g.,|style=float:right
) parameter and surrounding markup. - embed: use
|embed=yes
to remove border and padding when using as a module embedded in another infobox (see examples below). - start: Timestamp at which the file should start playing
Examples
labot šo sadaļuBasic
{{Listen | filename = Accordion chords-01.ogg | title = Accordion chords | description = Chords being played on an accordion }}
With video
{{Listen | image = [[File:Crystal Project video camera.png|50px]] | help = no | filename = Barack Obama inaugural address.ogv | alt = A black man in a black coat gestures and talks at a lecturn surrounded by teleprompters. Behind him, in the background, are about a dozen warmly-dressed onlookers. | title = Inaugural address of Barack Obama | description = Barack Obama's [[First inauguration of Barack Obama|first inaugural address]], January 20, 2009<br />(Duration: 21 minutes, 21 seconds) }}
With header
{{Listen | header = Recordings of this phrase: | type = speech | filename = Phrase de Neil Armstrong.oga | title = "One small step for a man..." | description = First words spoken on the [[Moon]]. }}
Embedding Veidne:Infobox person
{{Infobox person | name = Dr. Accordion | occupation = Accordion player | module = {{Listen | filename = Accordion chords-01.ogg | title = Accordion chords | embed = yes }} }}
Plain
{{Listen | filename = Accordion chords-01.ogg | title = Accordion chords | plain = yes | style = float:left }} |
Multiple files
{{Listen
| type = music
| filename = Accordion chords-01.ogg
| title = Accordion chords
| description = Chords being played on an accordion
| filename2 = Moonlight.ogg
| title2 = ''Moonlight Sonata''
| description2 = [[Ludwig van Beethoven|Beethoven]]'s [[Piano Sonata No. 14 (Beethoven)|Sonata in C-sharp minor]]
| filename3 = Brahms-waltz15.ogg
| title3 = Waltz No. 15
| description3 = From [[Sixteen Waltzes, Op. 39 (Brahms)|Sixteen Waltzes, Op. 39]] by [[Johannes Brahms|Brahms]]
}}
Microformat
labot šo sadaļuSee also
labot šo sadaļuVeidne:Audio templates Veidne:Film- and television-related infobox templates