jQuery Media 支援以下檔案的播放
Player File Formats
Quicktime aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3pg
Flash flv, mp3, swf
Windows Media Player asx, asf, avi, wma, wmv
Real Player ra, ram, rm, rpm, rv, smi, smil
Silverlight xaml
iframe html, pdf
其調用 mediaplayer.swf 插放swf,mp3,flv (可以人工指定其他),調用系統對象對其他檔案進行播放
調用
<a href="1.wma">dd<a>
$("a").media();
<div></div>
$("div").media({src:"1.wma"});
選項
src:"url",
type:"mp3",//.如果SRC中指定的檔案,副檔名不明顯,則在此指定該檔案的類型
width:400,//指定播放器的寬
height:300,//指定播放器的高
cls:,//指定播放器容器的CSS
caption:true,//是否顯示播放器的標題
preferMeta: 1, // true if markup metadata takes precedence over options object
autoplay: 0, // 自動播放否
bgColor: '#ffffff', // background color
params: {}, // added to object element as param elements; added to embed element as attrs
attrs: {}, // added to object and embed elements as attrs
flashvars: {}, // added to flash content as flashvars param/attr
flashVersion: '7', // required flash version
// default flash video and mp3 player
flvPlayer: 'mediaplayer.swf',
mp3Player: 'mediaplayer.swf',
// Silverlight options
silverlight: {
inplaceInstallPrompt: 'true', // display in-place install prompt?
isWindowless: 'true', // windowless mode (false for wrapping markup)
framerate: '24', // maximum framerate
version: '0.9', // Silverlight version
onError: null, // onError callback
onLoad: null, // onLoad callback
initParams: null, // object init params
userContext: null // callback arg passed to the load callback
}
示範一 音樂
示範二 視頻
下載點這裡