溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

html5怎么實現手機音樂播放器

發(fā)布時間:2022-03-07 16:50:09 來源:億速云 閱讀:327 作者:iii 欄目:web開發(fā)

這篇文章主要介紹了html5怎么實現手機音樂播放器的相關知識,內容詳細易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇html5怎么實現手機音樂播放器文章都會有所收獲,下面我們一起來看看吧。

代碼如下:

主要部分代碼如下:

function ZzxMusic(){

var aa={};

//模塊設置

var setting = {

newSong:{'target':'newSong','type':'1','firstCount':6,'Count':5},

songCharts:{'target':'newSong','type':'1','firstCount':2,'Count':4},

singer:{'target':'newSong','type':'1','firstCount':8,'Count':7},

radioStation:{'target':'newSong','type':'1','firstCount':9,'Count':2}

};

//默認加載模塊

aa.newSong = new Zzx(setting.newSong);

//模塊初始化

$(".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");

})

}

//實例化控制臺

var myControl = new Control({

audio : document.getElementById("myMusic"), //播放器

playModeNode : $("#modeButton"), //模式選擇按鈕

playBtn : $("#playButton"), //主控按鈕

playTitle : $("#musicTitle"), //歌曲TITLE容器

singerHead : $("#singerHead"), //歌曲插圖容器

progressWrap : $("#progressWrap"), //歌曲進度條容器

progress : $("#progress"), //歌曲進度條

oWinObj : $("#oWindow"), //警告窗容器

allTimeNode : $("#totleTime"), //當前時間容器

currentTimeNode : $("#currentTime") //當前時間容器

});

ZzxMusic();

關于“html5怎么實現手機音樂播放器”這篇文章的內容就介紹到這里,感謝各位的閱讀!相信大家對“html5怎么實現手機音樂播放器”知識都有一定的了解,大家如果還想學習更多知識,歡迎關注億速云行業(yè)資訊頻道。

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI