Hello, everyone. Welcome to my friends who like me and continue to pay attention to my technical articles. Now, things are getting faster and faster, and what is updated is not what you think.
Next, most of the websites built by enterprises are built using mature class libraries in the company, which is not as fast as you can imagine. Take my current company as an example, zhengzhou is a relatively large project. It takes about three days for an OA of 100,000 to come out. A larger project, millions of projects, is more than a month, less than 10 people can complete the test. PS: Calculate the test time. Therefore, China's mechanized production enterprise OA is fully presented in this big environment. Generally, the graduates of new graduates cannot be in line with the enterprise in most cases. Here you can understand the reasons. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026451U3-0.gif "/>
After all, there are still a few opportunities like me. It seems that you are not working hard enough to meet the so-called "noble man" in your life, after all, it is rare in large enterprises to bring a hairy boy. Therefore, please cherish it if you have the opportunity. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/202645J03-1.gif "/>
Now, let's start with today's knowledge:
There are a lot of things to pay attention to when building a website, and there are also many things to pay attention to. You must realize that you are looking at tens of millions of people on the network, so you must improve the functions of each module step by step, there are a lot of things to pay attention to in the background. I will not talk about it today, but I am afraid that everyone will be bored. So I will give you some interesting things at the front-end. For UI display, in fact, the technical content is not high, but it is actually related to the fate of your website access, right? Hey, let's show you how to compile your own website music player. BKJIA's music player is very powerful and easy to use. However, it seems that it cannot keep up with the rapid development of the network. Here I will write some of my own ideas. Maybe I can provide some suggestions for BKJIA, I think.
Player Selection:
Most technical people use some of the more practical practices,
<object id=nstv classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' width=280 height=60 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components... type=application/x-oleobject><param name='URL' value='your.mp3'><PARAM NAME='UIMode' VALUE='full'><PARAM NAME='AutoStart' VALUE='false'><PARAM NAME='Enabled' VALUE='true'><PARAM NAME='enableContextMenu' VALUE='false'></object>======
Disadvantage: adding too many concerts slows down the space, and the space will die if it is hit by thunder or other hosts. These music boxes can be implemented without several lines of code. It depends on whether your website supports such functions.
I also looked for the Dewplayer I found for a long time, for example,
650) this. width = 650; "src =" http://img1.51cto.com/attachment/201308/230140695.jpg "title =" o%%%6tcpx'%bo%1yadmm39se.jpg "/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026454P1-3.jpg "title =" smx?zz6ifqfk913020.gs0(je.jpg "/>
The reason for choosing it is not only because it is very PL, but also because it is very good. Another reason is that it is open-source and easy to learn and apply.
Player usage:
This is what it looks like after the download, such,
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026455Y6-4.jpg "title =" 954ZC $ I2 @~ A_BVQP_2B69' B .jpg "/>
There are many options for you to choose from. First of all, you can decide whether to use the reference method of js to use the player. I have tested it. You can also use js, you only need to use NotePad to view the downloaded webpage source code and put it in your own webpage. The attributes can also be added at will, which is convenient, but the disadvantage is that loading is slow, then there will be no problem. Considering the public network speed, this really makes me sweat. After all, you are already using a music player, coupled with js calls, Alexander. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/202645DU-5.gif "/>
So today I want to teach you some moderate ways to maximize your website access, XML storage:
It can be noted that this player provides the storage of the xml playlist, so it is very convenient and does not have to use a database. I have tried to use database storage before, and the results have indeed been achieved, below is the code,
1. Add Repeaterbind:
<Div> <asp: Repeater ID = "MusicRepeater" runat = "server" OnItemCommand = "MusicRepeater_ItemCommand"> <HeaderTemplate> <table style = "height: 16px; width: 232px "> <tr> <td> song name </td> <td> select </td> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td> <% # Eval ("MusicName ") %> </td> <asp: LinkButton ID = "btnChoose" runat = "server" CommandName = "choose" CommandArgument = '<% # Eval ("ID ") %> '> [Play] </asp: LinkButton> </td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp: repeater> </div> <object type = "application/x-shockwave-flash" width = "250" height = "65" id = "dewplayer" data = "music/jsmusic /dewplayer-playlist-cover.swf "> <param name =" wmode "value =" transparent "/> <param name =" movie "value =" music/jsmusic/dewplayer-playlist-cover.swf "/> <param name = "flashvars" value = "showtime = true & amp; autoreplay = true & amp; xml = music/jsmusic/playlist. xml "> <param name =" flashvars "value =" mp3 = <% = Url %> & amp; autostart = 1 & amp; showtime = 1 & amp; randomplay = 1 "/> </object>
2. cs interface code:
// Bind the Music list protected void bindMusic () {L_Music lm = new L_Music (); MusicService MS = new MusicService (); MusicRepeater. dataSource = ms. recommanddataset (); MusicRepeater. dataBind ();} // bind MusicRepeater protected void MusicRepeater_ItemCommand (object source, RepeaterCommandEventArgs e) {if (e. commandName = "choose") {MusicService ms = new MusicService (); L_Music lm = new L_Music (); lm = ms. get_singleMusic (Convert. toInt32 (e. commandArgument. toString (); Url = lm. musicAddress. toString ();}}
3. In this way, the list of backend databases can be controlled. The results are as follows,
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026452G0-6.jpg "title =" HV (5PYO [G2RP @ IE {3't ~ VJN.jpg "/>
Player usage 2:
If you use XML binding, it will be much easier. You can select and display the playback and list without having to write code on the front-end, as well as various playback settings. In this case, we will describe the following:
1. Source Page code:
<% -- Page music -- %> <div class = "music"> <asp: updatePanel ID = "UpdatePanel1" runat = "server"> <ContentTemplate> <div> <object type = "application/x-shockwave-flash" data = "music/jsmusic/dewplayer-playlist.swf" width = "240" height = "200" id = "dewplayer" name = "dewplayer"> <param name = "wmode" value = "transparent"/> <param name =" movie "value =" music/jsmusic/dewplayer-playlist.swf "/> <param name =" flashvars "value =" showtime = true & autoreplay = true & xml = XML/xmltodataset. xml & autostart = 1 & amp; showtime = 1 & amp; randomplay = 1 "/> </object> </div> </ContentTemplate> </asp: UpdatePanel> </div>
2. In this way, you can implement the required functions. Isn't it very easy, but pay attention to the following points:
2. 1. Select the relative path of the physical path.) Use & to connect the value;
2. We recommend that you add Ajax. Partial refresh does not affect the playing of music.
3 .,
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026456310-7.jpg "title ="] BWXDF2 ~ J3o0000t0(hsf-0000'58xn.jpg "/>
4. if the above results are not very good, please try it. As for the management of list information in the background, it is nothing more than the addition, deletion, modification, and query functions of XML. We will not post them here for the time being, later I will talk about addition, deletion, modification, and query. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026451U3-0.gif "/>
To sum up, you can try these attributes on your own to improve your player. This open-source player is really good. At least what my website uses now is, I hope some of my ideas can help you and affect you. Well, I have to go to work tomorrow. Let's get there today. Good night! 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/202645E18-9.gif "/>
Options
All options can be added to the parametersflashvars="option1=value1&option2=value2"Or after the. swf file URLdewplayer.swf?option1=value1&option2=value2.
| Default volume |
Volume = 100 |
With value between 0 = silent and 100 = maximal |
| Auto start |
Autostart = true |
Plays automatically when the player is loaded |
| Loop play |
Autoreplay = true |
Plays the same file at the end of the playing |
| Random play |
Randomplay = true |
For the players with multiple loaded MP3s |
| Timer minutes: seconds |
Showtime = true |
Display the durations in mm: ss |
| No cursor |
Nopointer = true |
Disable the cursor on the seek bar |
| Playlist |
Xml =Playlist. xml |
Load the XML playlist (XSPF format) for players that can load multiple files |
| Fading |
Fading =3 |
No gap (seconds) between one track and the next one, for players that can support fading |
Dewpalyer address: http://www.alsacreations.fr/dewplayer-en.html
Personal website, welcome everyone to shoot bricks, address: http://www.liujinlan.cc/
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2026455295-10.jpg "title =" UDMBT5HD68YATTPUL99XXMG.jpg "/>
This article is from the "Liang Xiao Technology Center" blog, please be sure to keep this source http://liangxiao.blog.51cto.com/3626612/1263203