jQuery Media 多媒体插件
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
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"});
$("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
}
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
}