The main part of the code of the html5 mobile music player.

Source: Internet
Author: User

Comments: HTML5 works are similar to cool-dog html5 mobile phone music players. After testing, the results are good. Unfortunately, only Google and Apple browsers with webkit core are supported, if you are interested, you can learn the HTML5 works. After testing, the results are good. Unfortunately, only Google and Apple browsers with webkit core are supported, please use Google or other browsers to run the user experience. Otherwise, you will not be able to see the effect.


The Code is as follows:
The main code is as follows:
Function ZzxMusic (){
Var aa = {};
// Module Settings
Var setting = {
NewSong: {'target': 'newsongg', 'type': '1', 'firstcount': 6, 'Count': 5 },
SongCharts: {'target': 'newsongg', 'type': '1', 'firstcount': 2, 'Count': 4 },
Singer: {'target': 'newsongg', 'type': '1', 'firstcount': 8, 'Count': 7 },
RadioStation: {'target': 'newsongg', 'type': '1', 'firstcount': 9, 'Count': 2}
};
// Default module Loading
Aa. newSong = new Zzx (setting. newSong );
// Module initialization
$ (". Menu_tagList"). children ("li"). bind ('click', function (){
For (var I in setting ){
If ($ (this). attr ("id") = I ){
If (typeof aa [I] === 'undefined '){
Aa [I] = new Zzx (setting [I]);
} Else {
Aa [I]. init ();
}
}
}
$ (". Menu_hover"). removeClass ("menu_hover ");
$ (This). addClass ("menu_hover ");
})
}
// Instantiate the Console
Var myControl = new Control ({
Audio: document. getElementById ("myMusic"), // player
PlayModeNode: $ ("# modeButton"), // mode selection button
PlayBtn: $ ("# playButton"), // master button
PlayTitle: $ ("# musicTitle"), // song TITLE container
SingerHead: $ ("# singerHead"), // container of Song illustration
ProgressWrap: $ ("# progressWrap"), // container of the Song progress bar
Progress: $ ("# progress"), // song progress bar
OWinObj: $ ("# oWindow"), // warning window container
AllTimeNode: $ ("# totleTime"), // current time container
CurrentTimeNode: $ ("# currentTime") // current time container
});
ZzxMusic ();


Original www.jq-school.com

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.