-
Notifications
You must be signed in to change notification settings - Fork 0
/
index3.html
365 lines (345 loc) · 16.9 KB
/
index3.html
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="language" content="vi_vn" />
<meta name="robots" content="follow, index" />
<meta name="author" content="M Live" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="abstract" content="Nghe nhạc mới HOT nhất, tải nhạc MP3 chất lượng cao nhanh nhất" />
<meta name="copyright" content="Copyright (c) 2018 by M Live" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:updated_time" content="2018-10-13 07:37:02" />
<meta property="fb:app_id" content="" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="M Live" />
<base href="jwplayer-7.12.0" />
<script type="text/javascript" src="jwplayer-7.12.0/css/bootstrap-button.js"></script>
<script type="text/javascript" src="jwplayer-7.12.0/css/bootstrap-toggle.v2.2.0.js"></script>
<script type="text/javascript" src="jwplayer-7.12.0/css/data-log-1.0.0.js"></script>
<link rel="stylesheet" type="text/css" href="jwplayer-7.12.0/css/nhac-all-4.0.0.css" />
<script type="text/javascript" src="jwplayer-7.12.0/jwplayer.js"></script>
<link rel="stylesheet" href="css/style.v1.css">
<link rel="stylesheet" href="css/custom.v2.2018.css">
<link rel="stylesheet" href="css/style_add.css">
</head>
<body>
<div id="myalbum-player"></div>
<script type="text/javascript">
/*<![CDATA[*/
jwplayer.key = "YgtWotBOi+JsQi+stgRlQ3SK21W2vbKi/K2V86kVbwU=";
jwplayer('myalbum-player').setup({
width: '100%',
height: '300',
//aspectratio: '16:9',
base: 'jwplayer-7.12.0/',
stretching: 'fill',
thumb: 'https://archive.org/download/dinh.-dai.-vu.-cover.-zing-mp-3/Dinh.Dai.Vu.Cover.ZingMP3.jpg',
playlist: "playlist.json",
image: 'default/images/bg_default.png',
title: 'Tuyển tập nhạc trẻ 2020',
skin: {
name: 'nhac'
},
timeSliderAbove: true,
autostart: true,
repeat: true,
plugins: {
'jwplayer-7.12.0/css/nhac-album-4.0.0.min.js': {
resounded: true, //false true, default false
showAutoNext: true,
performance: true, //false true, default true
perform_debug: false, //false true, default false
duration: 20,
user_id: '5698769',
vega_id: '21897841',
msisdn: '',
package_id: 0,
album_id: 'EZEFZ68',
content_type: 'song',
utm_source: '',
utm_medium: '',
utm_term: '',
utm_content: '',
utm_campaign: '',
device_id: '',
channel: 'WEB',
session_id: '83huqf02etj9cf58q01mghaqu0',
url_referer: '',
action_type: 'play_album',
player_type: 'NotDRM',
service_id: 0,
source_rec: 'next',
listen_state: 'online',
other_info: '',
expired_time: 0,
version: '1.0'
}
}
});
function playThis(index) {
jwplayer().playlistItem(index);
};
var device_type = 'mobile ';
var listPlayed = Array();
var logPlayAlbumFlag = true;
var logSongFlag = true;
var embed = false;
var isFirst = true;
var index_st = '0';
var firstPause = false;
var userStatus = 1;
//jwplayer().setMute(false);
//jwplayer().setMute(false);
/*jwplayer().onPlaylistItem(function(evt) {
logSongFlag = true;
var currentItem = jwplayer().getPlaylistItem();
itemId = currentItem.mediaid;
hashdis = new Hashids(has_key);
id = hashdis.encode(parseInt(itemId));
songId = 'so'+id;
//history.replaceState({}, '', '?st='+songId);
var uri = location.href;
if(uri.indexOf('?')>0 && embed){
history.replaceState({}, '', '?embed=1&st='+songId);
}else{
history.replaceState({}, '', '?st='+songId);
}
if(evt.index == 0 && evt.index != index_st) return;
/*var isiPad = (navigator.userAgent.match(/iPad/i) != null);
if(!isFirst && !isiPad && embed==false){
jwplayer().stop();
jwplayer().setMute(true);
window.location.reload();
return;
}*/
/*var playlistIndex = jwplayer().getPlaylistIndex();
if(typeof scrollToY=='function'){
scrollToY(playlistIndex);
}*/
//})*/
jwplayer().onPause(function() {
var currentItem = jwplayer().getPlaylistItem();
itemId = currentItem.mediaid;
$('.mlive-player ul li.item').removeClass('playing');
$('.mlive-player #song_' + itemId).addClass('onpause');
});
jwplayer().onBeforePlay(function() {
var currentItem = jwplayer().getPlaylistItem();
itemId = currentItem.mediaid;
//var now = Math.floor(Date.now() / 1000);
var now = '1550391773';
if (currentItem.active_from > now) {
var curentIndex = jwplayer().getPlaylistIndex();
var totalItem = jwplayer().getPlaylist().length;
if (curentIndex < totalItem) {
nextItem = curentIndex + 1;
} else {
nextItem = 0;
}
jwplayer().playlistItem(nextItem);
}
jwplayer().onComplete(function() {
var curentIndex = jwplayer().getPlaylistIndex();
var totalItem = jwplayer().getPlaylist().length;
if (curentIndex < (totalItem - 1)) {
//alert('Xong một bài!');
} else {
MLiveAutoPlay();
}
});
loadLyrics(itemId);
var playlistIndex = jwplayer().getPlaylistIndex();
if (typeof scrollToY == 'function') {
scrollToY(playlistIndex);
}
$('#playlist').scrollTo("#song_" + itemId, 'slow');
$('.mlive-player ul li.item').removeClass('onpause');
$('.mlive-player ul li.item').removeClass('playing');
$('.mlive-player #song_' + itemId).addClass('playing');
});
jwplayer().onBeforeComplete(function() {
if (isFirst) {
isFirst = false;
}
// Chuyen trang sang trang khac neu khong auto
console.log('complete');
if (logPlayAudioFlag == false && typeof MLiveAutoPlay == 'function') {
console.log('call MLiveAutoPlay');
MLiveAutoPlay();
}
});
jwplayer().onQualityLevels(function(event) {
console.log('onQualityLevels', event.currentQuality);
var bitrateIndex = event.currentQuality;
var currQL = jwplayer().getQualityLevels();
var qualityObj = currQL[bitrateIndex];
if (userStatus == 0) {
if (qualityObj.label != '128K') {
for (var i = 0; i < currQL.length; i++) {
if (currQL[i].label == '128K') {
console.log('set ', i);
jwplayer().setCurrentQuality(i);
}
}
}
} else {
for (var i = 0; i < currQL.length; i++) {
if (currQL[i].label == '320K') {
console.log('set ', i);
jwplayer().setCurrentQuality(i);
}
}
}
});
jwplayer().onQualityChange(function(event) {
console.log('onQualityChange', event.currentQuality);
var setQuality = false;
var currEQIndex = jwplayer().getCurrentQuality();
var currQL = jwplayer().getQualityLevels();
var bitrate = currQL[currEQIndex].label;
bitrate = parseInt(bitrate);
var defaultProfile = '128K';
if (userStatus == 0 && bitrate == 320) {
//NhacVnCoreJs.popupLoginVegaId();
var isSetDf = false;
for (var i = 0; i < currQL.length; i++) {
if (!isSetDf) {
if (currQL[i].label == '128K') {
defaultProfile = '128K';
isSetDf = true;
}
}
}
//console.log('set pr:',defaultProfile);
if (defaultProfile != '' && setQuality == false) {
for (var i = 0; i < currQL.length; i++) {
if (currQL[i].label == defaultProfile && currEQIndex != i) {
jwplayer().setCurrentQuality(i);
setQuality = true;
}
}
}
}
})
jwplayer().onTime(function(event) {
if (firstPause == false && embed == true) {
firstPause = true;
jwplayer().pause();
}
var currentItem = jwplayer().getPlaylistItem();
//var now = Math.floor(Date.now() / 1000);
var now = '1550391773';
if (currentItem.active_from > now) {
jwplayer().pause();
}
if (Math.round(event.position) >= 5) {
if (logPlayAlbumFlag) {
logPlayAlbumFlag = false;
var action = 'Play Album';
if (in_array(listPlayed, 'album_' + EZEFZ68)) {
var action = 'Replay Album';
}
var item = {
id: 'album_EZEFZ68'
};
if (!in_array(listPlayed, item.id)) {
listPlayed.push(item);
}
//ajax_load('/player/logAlbum',{'id':EZEFZ68});
}
if (logSongFlag) {
logSongFlag = false;
var currentItem = jwplayer().getPlaylistItem();
itemId = currentItem.mediaid;
itemTitle = currentItem.media_title;
itemDesc = currentItem.media_desc;
var action = 'Play Song';
if (in_array(listPlayed, 'song_' + itemId)) {
var action = 'Replay Song';
}
var item = {
id: 'song_' + itemId
};
if (!in_array(listPlayed, item.id)) {
listPlayed.push(item);
}
//ajax_load('/player/logSong',{'id':itemId,'album_id':EZEFZ68});
console.log(device_type + '-' + action + '|' + itemId + '|' + itemTitle + '|' + itemDesc);
ga('send', 'event', device_type, action, itemTitle + '-' + itemDesc + '-' + itemId);
//var eventLabel = itemTitle+'-'+itemDesc+'-'+itemId;
//NhacVnCoreJs.gaTrackingEvents('Play By Content',action,eventLabel);
}
}
})
var isFallback = '';
jwplayer().onError(function(event) {
isFirst = true;
console.log('onError:' + event.message);
var currentItem = jwplayer().getPlaylistItem();
var fileCurrent = currentItem.file;
var isFcurr = 'EZEFZ68' + fileCurrent;
if (isFallback != isFcurr) {
var ref = document.referrer;
}
var playlist = jwplayer().getPlaylist();
var playlistIndex = jwplayer().getPlaylistIndex();
/*if(isFallback!=isFcurr){
isFallback = isFcurr;
var linkFallback = fileCurrent.replace('music.vegacdn.vn','media.nhac.vn');
playlist[playlistIndex].file = linkFallback;
playlist[playlistIndex].sources[0].file = linkFallback;
jwplayer().load(playlist);
jwplayer().playlistItem(playlistIndex);
}else{
var curentIndex = jwplayer().getPlaylistIndex();
var totalItem = jwplayer().getPlaylist().length;
if(curentIndex<totalItem){
nextItem = curentIndex+1;
}else{
nextItem = 0;
}
jwplayer().playlistItem(nextItem);
}*/
})
setInterval(function() {
var state = jwplayer().getState();
if (state == 'PLAYING') {
if (typeof jwplayer().getPlaylistItem() == 'object') {
var currentItem = jwplayer().getPlaylistItem();
itemId = currentItem.mediaid;
//ajax_load('/player/logPlayEverytime',{'content_id':itemId,'album_id':EZEFZ68});
}
}
}, 60000);
/*]]>*/
</script>
<div class="box_content">
<ul id="playlist" class="list_song album_song_list scrollbar1">
<li class="item item-in-list song-item-0" id="song_001" id-index="001"><span class="album_order" id-index="001">01</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('0');return false;" href="#" title="Mỹ Nhân">Mỹ Nhân</a> - <a title="Đinh Đại Vũ" class="singer"> Đinh Đại Vũ</a></h4 </li>
<li class="item item-in-list song-item-1" id="song_002" id-index="002"><span class="album_order" id-index="002">02</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('1');return false;" title="Tình Sầu Thiên Thu Muôn Lối">Tình Sầu Thiên Thu Muôn Lối</a> - <a title="Doãn Hiếu" class="singer"> Doãn Hiếu</a></h4>
</li>
<li class="item item-in-list song-item-2" id="song_003" id-index="003"><span class="album_order" id-index="003">03</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('2');return false;" title="Từng Yêu">Từng Yêu</a> - <a title="Phan Duy Anh" class="singer"> Phan Duy Anh</a></h4>
</li>
<li class="item item-in-list song-item-3" id="song_004" id-index="004"><span class="album_order" id-index="004">04</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('3');return false;" title="Gặp Đúng Người Sai Thời Điểm">Gặp Đúng Người Sai Thời Điểm</a> - <a title="Trương Linh Đan" class="singer"> Trương Linh Đan</a></h4>
</li>
<li class="item item-in-list song-item-4" id="song_005" id-index="005"><span class="album_order" id-index="005">05</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('4');return false;" title="Gửi Anh Xa Nhớ">Gửi Anh Xa Nhớ</a> - <a title="Bích Phương" class="singer"> Bích Phương</a></h4>
</li>
<li class="item item-in-list song-item-5" id="song_006" id-index="006"><span class="album_order" id-index="006">06</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('5');return false;" title="Mình Yêu Nhau Đi">Mình Yêu Nhau Đi</a> - <a title="Bích Phương" class="singer"> Bích Phương</a></h4>
</li>
<li class="item item-in-list song-item-6" id="song_007" id-index="007"><span class="album_order" id-index="007">07</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('6');return false;" title="Bùa Yêu">Bùa Yêu</a> - <a title="Bích Phương" class="singer"> Bích Phương</a></h4>
</li>
<li class="item item-in-list song-item-6" id="song_008" id-index="008"><span class="album_order" id-index="008">07</span>
<h4 class="over-text h4-song-item"><a onClick="javascript: playThis('7');return false;" title="Một Nhà">Một Nhà</a> - <a title="Da LAB" class="singer"> Da LAB</a></h4>
</li>
</ul>
</div>
</body>
</html>