Share a jQuery-based video playback plug-in.

Source: Internet
Author: User

Share a jQuery-based video playback plug-in.

I recently wrote a function for online video playback. I feel this plug-in is okay. I 'd like to share it with you!

Copy codeThe Code is as follows:
<Div class = "report" id = "play-product" style = "cursor: pointer" data-flv = "video path address"> </div>

<Script type = "text/javascript">
// Play the video
$ ('# Play-product'). click (function (){
Var flvUrl = $ (this). attr ('data-flv ');
Var Close = 'closeplayer ';
Var box = 'playerbox ';

Var objclose = "#" + Close;
Var objBox = "#" + box;

$ ("Body "). append ("<div id =" + box + "> <div class = 'closetitle'> <a href = 'javascript :; 'id = "+ Close +"> click Close </a> </div> <object classid = 'clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 'width = '000000' height = '000000' id = 'index' align = 'middle'> <param name = 'movi' value = '/club/images/flvPlayer.swf'> <param name = 'quality' value = 'high'> <param name = 'bgcolor' value = '# 000'> <param name = 'play' value = 'true'> <param name = 'logging' v Alue = 'true'> <param name = 'wmode' value = 'transparent'> <param name = 'Scale' value = 'show'> <param name = 'menu 'value = 'true'> <param name = 'devicefont 'value = 'false'> <param name = 'salign 'value = ''> <param name = 'flashvars' value =' flvURL = "+ flvUrl +" '> <param name = 'allowScriptAccess' value = 'sample'> <param name = 'allowfullscreen' value = 'true'> <! -- [If! IE]> --> <object type = 'application/x-shockwave-flash' data = '/club/images/flvPlayer.swf 'width = '000000' height = '000000' align = & apos; middle & apos; value & apos; & AP' bgcolor 'value = '# 000'> <param name = 'play' value = 'true'> <param name = 'loop' value = 'true'> <param name =' wmode 'value = 'transparent'> <param name = 'Scale' value = 'showall'> <param n Ame = 'menu 'value = 'true'> <param name = 'devicefont 'value = 'false'> <param name = 'salign 'value = ''> <param name = 'allowfullscreen' value = 'true'> <param name = 'flashvars' value = 'flvurl = "+ flvURL +" '> <param name = 'allowScriptAccess' value = 'sample'> <! -- <! [Endif] --> <a href = 'HTTP: // www.adobe.com/go/getflash'> </a> <! -- [If! IE]> --> </object> <! -- <! [Endif] --> </object> </div> ");

$ (Objclose). click (function (){
$ (ObjBox). remove ();
});
Return false;
});
</Script>


Js jquery video playback plug-in

Html provides an element tag for online playback. You do not need to load any plug-in or player. It is called by the element tag.
For details, go to w3school's html. If html5 is supported, it is more convenient.
 
Jquery Video Player Plugin

It should be a swf player or html5 player.

Related Article

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.