內容簡介
此外掛為 WordPress 設計的影音控制元件,是建立在 MediaElement.js HTML5 播放器程式庫之上,並為不支援 HTML5 的瀏覽器提供 Flash 或 Silverlight 候補播放器。支援 iPhone、iPad 和 Android 裝置。
支援多種格式檔案:MP4、OGG、WebM、WMV、MP3、WAV、WMA,且可新增 WebSRT 格式的字幕檔案。
欲瞭解更多資訊與範例,請參閱mediaElementjs.com。
影片使用範例
音訊使用範例
短碼選項
替代選項
如果您的掛件與 MediaElement.js 衝突,您可以使用以下短碼
[mejsvideo src="http://mysite.com/mymedia.mp4" width="640" height="360"]
[mejsaudio src="http://mysite.com/mymedia.mp3"]
網址(src)
音訊或影片檔案的網址
您也可以省略副檔名,MediaElement.js 會搜尋與檔案名稱相符的所有媒體檔案(mymedia.mp4、mymedia.webm,等等)。
http://mysite.com/mymedia類型(type)
媒體檔案的類型
http://mysite.com/mymedia?xyzMP4
影片的 H.264/MP4 來源網址
MP3
音訊的 MP3 來源網址
OGG
影片的 Theora/Ogg 來源網址
WebM
影片的 VP8/WebM 來源網址
封面(poster)
影片的封面圖片網址
寬度(width)
影片的寬度
高度(height)
影片的高度
循環(loop)
當影片結束後重複播放
預載(preload)
在使用者點擊播放之前,就開始下載影片。
自動播放(autoplay)
影片準備好後立即開始播放。
全螢幕(fullscreen)
停用全螢幕功能按鈕
長度(duration)
停用影片長度輸出
音量(volume)
停用音量調節器
進度條(progress)
停用進度條
字幕(captions)
WebSRT 字幕檔案的 URL 網址
簡易影片格式
外掛標籤
開發者團隊
② 後台搜尋「MediaElement.js – HTML5 Video & Audio Player」→ 直接安裝(推薦)
原文外掛簡介
Video and audio plugin for WordPress built on the MediaElement.js HTML5 media player library. Provides Flash or Silverlight fallback players for non-HTML5 browsers. Supports iPhone, iPad, and Andriod.
Supports MP4, OGG, WebM, WMV, MP3, WAV, WMA files as well as captions with WebSRT files.
Check out mediaElementjs.com for more information and examples.
Typical Usage for video
Typical Usage for audio
Shortcode Options
Alternatives
If you have a plugin that conflicts with MediaElement.js, you can also use the short codes
[mejsvideo src="http://mysite.com/mymedia.mp4" width="640" height="360"]
[mejsaudio src="http://mysite.com/mymedia.mp3"]
src
This location of any audio or video file
You can also leave off the extention and MediaElement.js will look for all media files matching the filename (mymedia.mp4, mymedia.webm, etc.)
http://mysite.com/mymedia
type
The media type of the resource
http://mysite.com/mymedia?xyz
mp4
The location of the h.264/MP4 source for the video.
mp3
The location of an MP3 file for video
ogg
The location of the Theora/Ogg source for the video.
webm
The location of the VP8/WebM source for the video.
poster
The location of the poster frame for the video.
width
The width of the video
height
The height of the video
loop
Loops the video or audio when it ends
preload
Start loading the video as soon as possible, before the user clicks play.
autoplay
Start playing the video as soon as it’s ready.
fullscreen
Disables the fullscreen button
duration
Disables the duration output
volume
Disables the volume slider
progress
Disables the progress bar
captions
URL to a WebSRT captions file
Simple Video
Basic playback options
All Attributes Video
All options enabled
Simple Audio
Basic playback options
All Attributes Audio
All options enabled
Use in a template
You can use WordPress shortcodes in your templates using the do_shortcode function.
