Use of Jplayer Plug-ins

Source: Internet
Author: User

Recently, and double 叒 叕 made a page (well, in fact, the previous one), which used a thing called Jplayer Plug-ins. Use paste out, specific can reader network demo


<! DOCTYPE html>  

1, with the CSS style sheet inside, you need to reference, you can modify on demand

2, play the interface of the button icon to the background image of the way to present, is not flattened sexual indifference wind, the individual does not like. Have time to modify (need both the CSS and JS)

3, this plug-in various methods of introduction can also be in the official website inquiries to understand

When I was developing, I simply used two methods


ready‡

Function: (default:undefined): Defines an event handler function that is bound to a $.jplayer.event.ready event. To refer to the current object instance, use $ (this). In general, we recommend that object instances use at least one function $ (this). Jplayer ("Setmedia", media) to ensure that URLs are available.

Event handler ready is created to eliminate the race conditions between the JS code and the Flash code. So ensure that the Flash function definition already exists when the JS code executes.
This processor is bound to the. Jplayer namespace.
Swfpath

String: (Default: "JS"): Defines the path to the Jplayer jplayer.swf file. It allows developers to place SWF files in any location, using relative positioning or absolute path cooperation, or relative server path references.

The Swfpath option can be a SWF file path that points to the end of the. SWF, or it can be a URL. For example, for Example,jplayer ({swfpath: "/scripts/banana.swf"}) is the path after you rename jplayer.swf to "banana.swf". Do not rename the. swf extension or the hypothetical path.

You can use Jplayer ({solution: "Flash, HTML") to test the correctness of your swfpath on HTML5 browsers that support Flash.

When you perform a command such as Jplayer ("Setmedia", media), incorrect Swfpath can cause $.jplayer.event.error to be $.jplayer.error.flash error.

The individual trailing slashes, such as "mypath/" and "MyPath", are the same meaning.
The URL provided must use a standard URL encoding rule. Solution

String: (Default: HTML, Flash): Defines the priority of HTML and flash solutions. The default priority is to use Html,flash standby. Exchange Order "flash, HTML" preferred to use flash, alternate HTML.

Depending on the supplied format, Jplayer may use both solutions at the same time. For example, using jplayer{supplied: "MP3,OGA,M4V"} as a media player, browsers such as Firefox require Flash solutions to play video media formats, and audio media can be played using HTML solutions.

Of course you can limit the value to use a solution, although we do not recommend that you do so.

The choice of Jplayer solution depends on the format defined in your browser and supplied options. Supplied

String: (Default: "MP3"): Defines the format provided to Jplayer. The order represents precedence, the left has the highest format precedence, and the right priority is lower.

See media Encoding for more format information. For more information on why some formats are mandatory, see essential Formats.

Required audio format: mp3 or m4a.
Required video format: m4v.

Other corresponding formats: WEBMA, WEBMV, OGA, OGV, WAV, FLA, FLV, Rtmpa, RTMPV.

All formatting in the supplied option must be given in the Jplayer ("Setmedia", media) commands.

There are exceptions to this rule, such as a multimedia player that plays video and audio simultaneously. The video and audio formats are defined in the supplied option. You can use the video format or audio format when using the Jplayer ("Setmedia", media) command. (You must give all audio and video formats in the supplied option.) )

Solution priority is higher than supplied

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.