Embed video in Web pages using Jwplayer

Source: Internet
Author: User
Tags flv file

Starter: Personal blogs, continuous updates and corrections

I always thought that it was complicated to embed video in a Web page, and it was very simple to study it.

The actual thing is to embed a control in the page. There are already many solutions in the community. Jwplayer is the most popular (one).
Controls include JS, CSS, and SWF files, the SWF file is the player, it is part of the control, and the introduction of the control package is the same as introducing other front-end control package methods, which can be copied to the project path.
The video is an FLV file, where the FLV files are all right. Personal advice to put a separate server like a picture.

Sample program here, the code has been uploaded to GitHub.
Jwplayer itself document here, hidden very deep, personal very dislike this official website, gaudy, the claws.
Official documents I still like the simple and simple kind.

The web code and its simplicity, that's all:

<! Doctype>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title>use jw</title>

<script src= "Jwplayer/jwplayer.js" ></script>
<!--is not unique to each user ID, the unique website to the only, do not change--
<script>jwplayer.key= "baonhra71ke/mhvb0sirt4hewltakpiya1mvsa==";</script>
<body>
<div id= "MyElement" >loading the player...</div>
<script type= "Text/javascript" >
var playerinstance = Jwplayer ("myelement");
Playerinstance.setup ({
File: "http://img.zidafone.com/test.flv",
Image: "Http://img.zidafone.com/test.jpg",
width:640,
Height:360,
Title: ' Beautiful Woman ',
Description: ' The most beautiful woman in the world, does you agree? '
});
</script>
</body>

Long-term welcome project Cooperation Opportunity Introduction, project income 10% to reward introducer. Sina Weibo: @ Cold Mirror, qq:908789432.

Embed video in Web pages using Jwplayer

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.