-
Notifications
You must be signed in to change notification settings - Fork 0
/
163MusicPlayer.js
26 lines (22 loc) · 1.35 KB
/
163MusicPlayer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var songs1 = [1479199734,32477986,33166666,29534449,427142146,29947420,505449407,440353010,32166628,3932159,1973141817,1372188635,1377642003,467164552,29774609,1297742167,455502171,30854966,41653419,418602744,451126088,32098431,30987703,30064263,34040716,1871891830,31365070,];
var songs2 = [283760,396696,31517504,396351,396366,393640,92627,174451,457492084,29005083,25640065,29005087,29097535,28457782,29005080,29005084,29097536,441622203,32743519,27571858,28528323,1339107643,2014882450,1831430367,1475596788,1303019637,29753734,34586283,436346312,];
var songs3 = [1958727599,1954450075,1916464921,1932524296,1920357731,1907327012,1910623552,1928112928,1923133670,1303026215,864100873,448742120,1405318694,536622304,1324466790,26096272,1350160463,1478965386,30148802,1439814454,33760047,1339107643,2014882450,579954,496869422,];
var songs = [songs1,songs2,songs3];
var last = 33166666;
var sl = 1;
function updLast(){
var cur = songs[sl-1][parseInt(Math.random() * songs[sl-1].length)];
while(last == cur){
cur = songs[sl-1][parseInt(Math.random() * songs[sl-1].length)];
}
return cur;
}
function getMusic(){
last = updLast();
document.getElementById("my163musicplayer").src = "https://music.163.com/outchain/player?type=2&id=" + last + "&auto=0&height=32";
}
function switchSongLists(){
if(sl < songs.length) sl++;
else sl = 1;
getMusic();
}