Flash Player mp4 plug-in easily solves video playback problems, and mp4 easily handles

Source: Internet
Author: User

Flash Player mp4 plug-in easily solves video playback problems, and mp4 easily handles

1. Use SWFObject to insert Adobe Flash Media resources with good compatibility
Code
<Script src = "http://js.kuwo.cn/yinyue/webmv/swfobject.js"> </script>
SWFObject is an independent and agile JavaScript module used to easily insert Adobe Flash Media resources (*. swf files) in HTML. The JavaScript script in this module can automatically detect the support of Flash plug-ins by mainstream browsers on PCs and Mac machines. It makes inserting Flash Media resources as simple and secure as possible. In addition, it is very consistent with the search engine optimization principles. In addition, it can avoid non-standard tags such as object and embed in your HTML and XHTML, so as to conform to more standards.

Code used by the plug-in

<! DOCTYPE html>
<Html>

<Head>
<Meta charset = "UTF-8">
<Meta name = "viewport" content = "initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<Title> flash Player mp4 plug-in -webkfa.com </title>
</Head>

<Body>
<Input type = "button" value = "playing mv1" onclick = "playflashmv ('HTTP: // media.cdn.kuwo.cn/resource/m1/webkge/2015/7/10/201507101126_4.mp4');"/>
<Input type = "button" value = "playing mv2" onclick = "playflashmv ('HTTP: // media.cdn.kuwo.cn/resource/m1/webkge/2015/7/10/201507101126_1.mp4');"/>
<Div class = "video_w" id = "videoDivhtmlid">
<Div id = "videoDiv">
</Div>
</Div>
<Script src = "http://libs.baidu.com/jquery/1.9.0/jquery.js"> </script>
<Script src = "http://js.kuwo.cn/yinyue/webmv/swfobject.js"> </script>
<Script type = "text/javascript">
Var SWF_ID = "KwVideo ";
Var SWF_NAME = "http://www.kuwo.cn/yy/jsp/webMv/KwVideo.swf? 05 ";
/**
* Create live swf
* @ Parammsg
*/
Function EmbedSWF_SWF (divId, mp4Url ){
Var flashvars = {
Url: mp4Url
};
Var params = {
AllowFullscreen: "true ",
AllowScriptAccess: "always ",
Wmode: "transparent" // can cause issues with FP settings & webcam
};
Var attributes = {
Id: SWF_ID,
Name: SWF_ID
};
Swfobject. embedSWF (
SWF_NAME,
// You can set the playback width and height.
DivId, "685", "420", "10.0.0 ",
"ExpressInstall.swf ",
Flashvars, params, attributes );
}

Function playflashmv (urlmp4 ){
Var html = [];
Html [html. length] = '<div id = "videoDiv"> ';
Html [html. length] = '<a href = "javascript: playflashmv (\ 'HTTP: // callback);" class = "butm_middle"> </a> ';
Html [html. length] = '</div> ';
('{Videodivhtm='{.html (html. join (""));
EmbedSWF_SWF ("videoDiv", urlmp4 );
}
Playflashmv ('HTTP: // media.cdn.kuwo.cn/resource/m1/webkge/2015/7/10/201507101126_4.mp4 ');
</Script>
</Body>

</Html>

Online address: http://www.webkfa.com/one2/w1442.html

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.