JQuery Media Plugin

Source: Internet
Author: User
Tags silverlight

About JQuery Media




Jquery Media plugin is a plug-in for page content nesting multimedia. Most of the supported multimedia players and multimedia formats, such as: Flash, Quicktime, Windows Media player, Real player, MP3, Silverlight, PDF, etc.



Player

File format

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


This plugin will convert <a> into <div> to embed multimedia content. This plugin is as easy to use as other jquery plugins.


Like what:

1, JS call:

$ ('. Media'). Media ();

jQuery Media Plugin optionsjQuery Media plugin includes a number of options that control some of the behavior of multimedia (see the properties that require special settings).

The default options are as follows:

Global Defautls; Override as needed
$.fn.media.defaults = {
Standards:false,//Use of Object tags only (no embeds for non-ie browsers)
Canundo:true,//tells plugin to store the original markup so it can be reverted via: $ (SEL). Mediaundo ()
width:400,
height:400,
autoplay:0,//normalized cross-player setting
BgColor: ' #ffffff ',//Background color
Params: {wmode: ' Transparent '},//Added to object element as Param elements; Added to embed element as Attrs
Attrs: {},//Added to object and embed elements as Attrs
Flvkeyname: ' file ',//key used for object src param (thanks to Andrea Ercolino)
Flashvars: {},//Added to Flash content as Flashvars param/attr
Flashversion: ' 7 ',//Required Flash version
Expressinstaller:null,//src for Express installer

Default Flash video and MP3 player (@see: Http://jeroenwijering.com/?item=Flash_Media_Player)
Flvplayer: ' mediaplayer.swf ',
Mp3player: ' mediaplayer.swf ',

@see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
Silverlight: {
Inplaceinstallprompt: ' true ',//display in-place install prompt?
Iswindowless: ' true ',//Windowless mode (False for wrapping markup)
Framerate: ' $ ',//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
}
};


A simple Demo


<script type= "Text/javascript" >
JQuery (function () {
$ ('. Media '). Media ({

width:190,
height:126,

autoplay:false,//Auto Play
src: ' 2.avi '//VideoPath

});
});
</script>

<a href= "2.avi" class= "Media" >watch my movie!< / a>


Operating effect:

&NBSP;
    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.