Template:Listen/doc

From S E B A S T I E N G O Y

Jump to: navigation, search


{{Listen/doc}} allows audio files to be embedded in articles. It should be used for audio files that are set off from the text, like music clips or sound recordings.

Contents

Simple usage

{{ listen
| filename     = 
| title        = 
| description  = 
}}

Multiple files

Additional files can be embedded in an article with one template by appending a number to each parameter. Up to ten files can be included.

{{ listen
| filename     = 
| title        = 
| alt          = 
| description  = 
| filename2    = 
| title2       = 
| alt2         = 
| description2 = 
| filename3    = 
| title3       = 
| alt3         = 
| description3 = 
}}

Style parameters

The template also takes a number of style parameters to control its appearance:

Examples

Basic example
{{ listen
| filename     = Accordian chords-01.ogg
| title        = Accordion chords
| description  = Chords being played on an accordion
}}


Example with video
{{Listen
 |header=Inaugural Address
 |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 delivers his [[inaugural address]] on January 20, 2009.<br>(Duration: 21 minutes, 21 seconds)
 |help=no
 |type=sound
}}


Example with header
{{ listen
| filename     = Frase de Neil Armstrong.ogg
| title        = "One small step for a man..."
| description  = First words spoken on the [[moon]].
| type         = speech
| pos          = left
| header       = Recordings of this phrase:
}}


Plain example
{{ listen
| filename = Accordian chords-01.ogg
| title    = Accordion chords
| plain    = yes
| style    = float:left
}}


Multiple files
{{ listen
| filename     = Accordian chords-01.ogg
| title        = Accordion chords
| description  = Chords being played on an accordion
| type         = music
| filename2    = Moonlight.ogg
| title2       = ''Moonlight Sonata''
| description2 = [[Beethoven]]'s "Sonata in C-sharp minor"
| filename3    = Au_clair_de_la_lune_mode_do.mid
| title3       = Au Clair de la Lune
| description3 = The traditional French children's song
| play3        = no
}}



Microformat

The HTML mark up produced by this template includes an hAudio microformat, which makes the recording's details parsable by computers, either acting automatically to catalogue articles across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to a playlist or database. For more information about the use of microformats on Wikipedia, please see the microformat project.

Date-of-publication ("published") information will only be included in the microformat if {{Start date}} (or {{Start date and age}} where appropriate) is used in a parent template or infobox (but do not use these if the date is before 1583 CE).

hAudio uses HTML classes including:

  • haudio
  • fn
  • album
  • description
  • category
  • contributor
  • duration
  • item
  • photo
  • position
  • price
  • published

Please do not rename or remove these classes; nor collapse nested elements which use them.

See also


Personal tools
Namespaces
Variants
Actions
S E B A S T I E N  G O Y                                                   
Works
About