本模板連結至「位於中文維基百科或維基共享資源」的音訊檔案。在文章中使用本模板,可讓讀者聆聽輔助文章內容的音訊檔案。要使用本模板,請參閱以下說明:

用法

{{Listen
|filename    = 檔案名稱.副檔名
|title       = 檔案標題
|description = 檔案的描述
|pos         = 填入left或right控制左右
|image       = 填入[[File:Example.jpg|50px]]
|style       = 模板的樣式
|play        = 填入yes啟用另一種顯示方式
|plain       = 填入yes或no決定是否帶邊框
|embed       = 填入yes或no決定是否嵌入資訊框
}}

其中|filename=參數的檔案格式必須是音訊檔案。

多重檔案

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

範例

{{Listen|filename=Accordion chords-01.ogg|title=手風琴和絃|description=用手風琴彈奏的和絃|pos=left}}

模板數據

模板數據
以下是該模板的模板資料,適用於視覺化編輯器等工具。

Listen模板資料

Allows audio and video files to be embedded in articles.

模板參數

此模板有自訂格式。

參數描述類型狀態
Headerheader

Text or other content to go above all the files in the template (but within the template boundary). Allows markup.

內容非必填
Music or speech icontype

Enter "music" or "speech" here to change the template icon to a speaker with music notes or a microphone.

建議值
sound music speech
預設
sound
範例
music
非必填
Custom iconimage

Custom image to replace the speaker icon in the template. Alternatively, enter "none" here to hide the icon entirely.

範例
[[File:Example.jpg|50px]], none
檔案非必填
Filenamefilename

The filename of the file. Filename2, filename3, etc. can be used for subsequent files.

檔案必填
Titletitle

The title to display for the file. Title2, title3, etc. can be used for subsequent files.

字串必填
Descriptiondescription

A description of the file. Description2, description3, etc. can be used for subsequent files.

字串建議
Start timestart

Timestamp at which the first file should start playing (start2, start3, etc. can be used for subsequent files)

範例
0:20
非必填
Hide duration?length

Enter "hide" here to hide the duration of the first file (length2, length3, etc. can be used for subsequent files).

範例
hide
非必填
Hide player?play

Enter "no" here to hide the file player for the first file (play2, play3, etc. can be used for subsequent files). To be used for some media files that cannot be displayed inline, to prevent a broken inline link from showing.

範例
no
非必填
Hide help text?help

Enter "no" here to hide the "Problems playing this file? See media help." text at the bottom of the template. Must not be done on the first instance of the template; optional on subsequent instances of the template.

範例
no
非必填
Positionpos

Enter "left" or "center" here to change the default position of the template from on the right.

建議值
left center right
預設
right
範例
left
非必填
Plain style?plain

Enter "yes" here to remove most of the ornamentation (border, background, icon and help text) and the float/positioning of the template to give a minimalist version, allowing the user to use the custom CSS ("style") parameter to style and position the template.

範例
yes
非必填
Optimise for embedding?embed

Enter any text here to remove the left, right and bottom border, the background, the icon, the help text and the padding of the template for use in an infobox.

範例
y
非必填
Custom CSSstyle

Custom CSS for the template

範例
float:none; clear:none
內容非必填

參見

  • {{Listen interwiki}},與本模板類似,適用於位於其他語言版本維基百科上的音訊檔案。
  • {{Audio}},與本模板功能類似的另一個模板,主要以直接將音訊檔案插入文字行中。
  • {{Pronunciation}},與本模板功能類似的另一個模板,用於發音說明等用途。