var MOOVVideoPlayer ={ curProfileId:'', refType:'', moduleType:'', playList : [], currentPlayingItem :0, currentCover :'', shuffle:false, loop:0, playQuality:'FD', init:function(){ //videojs.registerComponent('Hls',require('videojs.hls.js')); videojs.options.flash.swf="https://moov.hk/flash/video-js.swf"; playerVDO = videojs('videoHLSPlayer',{ hls:{ widthCredentials:true}, controls:true /*plugins: { videoJsResolutionSwitcher: { default: 'high', dynamicLabel: true } }*/ },function(){ // player.play(); }); playerVDO.on('ended',function(){ //console.log('player end lun jot'); MOOVVideoPlayer.playNext(); }); }, pauseItem: function(){ playerVDO.pause(); //sendToFlash("MOOVLive").pauseItem(); }, /*playItem:function(){ sendToFlash("MOOVMain3").playItem(); $('#player #pause img').attr('src','images/icon/pause_off.png'); $('#player #pause img').attr('onclick','pauseItem();'); },*/ addToPlaylist:function(plElement){ var profileName='' if(plElement.profileName!=null && plElement.profileName!='' ){ profileName=' - '+safeTagsReplace(plElement.profileName)+''; } this.playList.push(plElement); var clickFunction = ''; if(canRunStopPropagation){ clickFunction = 'playVideoIndex('+((this.playList.length)-1)+')'; } $('#videoList #player_list').append('
'+ //'
'+this.playList.length+'
'+ '
'+ '
'+safeTagsReplace(plElement.title)+'
'+ //'
'+plElement.artists+'
'+ '
'+ '
'+plElement.explicit+'
'+ '
'+toMinutes(plElement.length)+'
'+ '
'+ '
'+ //''+ ''+ '
'+ '
'+ //'
'+ '
'); }, checkout:function(playListElement){ // console.log('??'); $('#videoList #player_list .l-r').removeClass('playing'); $('.moduleList .l-r').removeClass('playing'); //$('#videoplayer_wrapper').show(); //createVideoPlayer(); //console.log(playListElement); currentPlayingItem=this.currentPlayingItem; if(userData!=null){ if(userData.accountStatus=='Closed'){ // showUpgradeMsg(); // showDefaultUpgradePopUp(); if(typeof showUpgradeMsg != 'undefined'){ showUpgradeMsg(); }else{ showDefaultUpgradePopUp(); } }/*else if (!swfobject.hasFlashPlayerVersion("10.1.85")) { showMessage(langJSON.error_message.no_flash); }*/else{ pauseItem(); $('#videoplayer_wrapper').height('100%'); $.ajax({ type: 'GET', //url: 'https://mtguat.moov.now.com/music/api/verifyloginresult', //url: apiServer+'/moov/api/user/autologin', url: apiServer+'/moov/api/content/checkout?deviceid='+getCookie("MOOVUUID")+'&devicetype=web&cat=playlist&refid=&reftype=&pid='+playListElement.pid+'&preview=F&connect=web&streamtype=stdhls&quality='+localStorage.videoQuality+'&application=moovnext&clientver=2.0.6&json=true', //url: 'https://mtguat.moov.now.com/music/api/loginresult', //data: data, dataType: 'json', xhrFields: { withCredentials: true }, //success: function(responseData, textStatus, jqXHR) { success: function(data) { if(data.result.resultCode=='0'){ var obj=data.result.dataObject; //$('#player #timer').html(toMinutes(playListElement.length)); //$('#player #timer').data('value',playListElement.length); currentPlayItemLength=playListElement.length; if(playListElement.profileName != '' && typeof playListElement.profileName != 'undefined'){ $('#videoplayer .left .artist').html(playListElement.artists+' - '+playListElement.profileName); }else{ $('#videoplayer .left .artist').html(playListElement.artists+playListElement.profileName); } /*if(playListElement.profileName!=null){ $('#videoplayer .left .artist').append(playListElement.artists); }*/ //$('#player #thumbnail img').attr('src',playListElement.cover); //$('#player #pause img').attr('src','images/icon/pause_off.png'); //$('#player #pause img').attr('onclick','pauseItem();'); //$('#player_bg img').attr('src',playListElement.cover); $('#videoplayer .left .title').html(playListElement.title); playerVDO.src({ type:'application/x-mpegURL', src:obj.playUrl }) /*var quality = obj.quality; //var pattern = new RegExp('/(?:\/)(.+\-([A-Z]{2}(\.m3u8)))/g'); var pattern = new RegExp('quality\=([A-Z]{2})'); var m3u8List = []; var videoSD = obj.playUrl.replace(pattern, 'quality=SD'); //var videoSD = obj.playUrl.replace(pattern, 'SD.m3u8'); m3u8List.push({ src: videoSD, type: 'application/x-mpegURL', label: 'SD', res: 360 }); if (quality == 'FD' || quality == 'HD') { //var videoHD = obj.playUrl.replace(pattern, 'HD.m3u8'); var videoHD = obj.playUrl.replace(pattern, 'quality=HD'); m3u8List.push({ src: videoHD, type: 'application/x-mpegURL', label: 'HD', res: 720 }); } if (quality == 'FD') { //var videoFD = obj.playUrl.replace(pattern, 'FD.m3u8'); var videoFD = obj.playUrl.replace(pattern, 'quality=FD'); m3u8List.push({ src: videoFD, type: 'application/x-mpegURL', label: 'FD', res: 1080 }); } console.log(m3u8List); playerVDO.updateSrc(m3u8List);;*/ playerVDO.play(); $('#videoplayer .left .fnc .share').attr('onclick','openShareDialog(\''+MOOVVideoPlayer.currentCover+'\', \''+playListElement.title.replace(/\'/g, "\\\'").replace(/\"/g, """)+'\', \''+playListElement.artistStr.replace(/\'/g, "\\\'").replace(/\"/g, """)+'\', \''+shareURL+'?pageid=122&profileId='+playListElement.pid+'\',\'\');'); $('#videoplayer .left .fnc .share').attr('title',langJSON.share_panel.share); // $('#player_info .left .artist').html(playListElement.artists); // $('#player_info .left .cover img').attr('src',playListElement.cover); //123sendToFlash("MOOVMain3").processCheckOut(pid,getCookie("moovperf"),obj.netpassId,obj.loginId,obj.playUrl,obj.playUrlValidate,obj.token,true); //sendToFlash("MOOVLive").processCheckOut(playListElement.pid,getCookie("moovperf"),obj.netpassId,obj.loginId,obj.playUrl,obj.playUrlValidate,obj.token,obj.quality,obj.quality,'message',true); //sendToFlash("MOOVLive").qualityDisplay(obj.quality); $($('#videoList #player_list .l-r')[currentPlayingItem]).addClass('playing'); $('.moduleList .l-r[data-refId="'+playListElement.pid+'"]').addClass('playing'); if(MOOVVideoPlayer.playList.length > 0){ document.title = MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem].title+' - '+MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem].artistStr+' - MOOV'; } $('#videoplayer .left .fnc .add').unbind( "click" ); $('#videoplayer .left .fnc .add').click(function(event){ stopPropagation(event); var listData={ "playListId":"", "actionDate":new Date().YYYYMMDDHHMMSS(), "lastSyncDate":"", "name":"", "desc":"", "productIds": [playListElement.pid] } playlistSeletion(listData); }); //getProductionDetail(playListElement.pid); }else{ /*if(userData.accountStatus=='Suspended'){ showSuspendedMsg(); }else if(data.result.resultCode=='5' || data.result.resultCode=='6'){ if(getCookie("MTGLOGONTOKEN")!=null && getCookie("MTGLOGONTOKEN")!='' ){ doStartPlayer=true; autoLogin(); }else{ $('#login').click(); } }else if(data.result.resultCode=='10'){ showUpgradeMsg(); }else if(data.result.resultCode=='30'){ showMusicTherapyBlocker(data.result[lang+'Message']); }else{ showMessage(data.result[lang+'Message']); }*/ pauseItem(); playerAutoLaunch=true; /*if(userData.accountStatus=='Suspended'){ // showSuspendedMsg(); }else*/ if(data.result.resultCode=='5'){ if(getCookie("MTGLOGONTOKEN")!=null && getCookie("MTGLOGONTOKEN")!=''){ autoLogin(); doStartPlayer=true; }else{ $('#login').click(); } }else if(data.result.resultCode=='10' || data.result.resultCode=='32'){ //showUpgradeMsg(); if(typeof showUpgradeMsg != 'undefined'){ showUpgradeMsg(); }else if (!!data.result[lang+'Message'] && data.result[lang+'Message'] != ''){ var messageArr = data.result[lang+'Message'].split('||'); var messageObj = {}; messageObj[lang+'Message'] = messageArr[0]; messageObj[lang+'Message2'] = messageArr[1]; showDefaultUpgradePopUp(messageObj); }else{ showDefaultUpgradePopUp(); } // showMessage(data.result.engMessage); }else if(data.result.resultCode=='30'){ //showMusicTherapyBlocker(data.result[lang+'Message']); showMessage(data.result.engMessage); }else{ //showMessage(data.result[lang+'Message']); showMessage(data.result.engMessage); } } }, error: function (responseData, textStatus, errorThrown) { //$("#login_block").show(); //alert('POST failed.1'+errorThrown); if(responseData.readyState==0){ showMessage(langJSON.error_message.the_network_connection_is_unstable_now); } } }); RecentlyPlay.rProductId = playListElement.pid; RecentlyPlay.rProductType = "VDO"; RecentlyPlay.logSubmit(); } }else{ $('#login').click(); } }, instantPlay:function(product){ //instantPlay:function(pid, length,title, artists, explicit, cover, bookmark){ this.playList=[]; this.currentPlayingItem =0 this.refType=''; this.moduleType=''; this.curProfileId=''; $('#videoList #player_list .l-r').remove(); var cover='images/default_cover.png'; if(product.thumbnail!=''){ cover=product.thumbnail; } var artists=''; var artistString=''; for(var j=0; j'+product.artists[j]['name']+', '; artistString+=product.artists[j]['name']+', '; } artists=artists.substring(0, artists.length-2); artistString=artistString.substring(0, artistString.length-2); var explicit=(product.explicit=='0')?'':''; var favourite='Y'; //try{ if(product.favourite!=null){ favourite=product.favourite; } //}catch(){ //} var plElement=new playListElement(product.productId, product.productLength,product.productTitle, artists, explicit, cover, favourite, artistString,'', ''); document.title = product.productTitle+' - '+artistString+' - MOOV'; //ga('send', 'event', 'Video','play_video',plElement.title+'(VDO)'); //var plElement=new playListElement(pid, length,title, artists, explicit, cover, bookmark); //this.addToPlaylist(plElement) //this.playList.push(plElement); $('#videoList #player_list').append('
'+ //'
'+this.playList.length+'
'+ '
'+ '
'+safeTagsReplace(plElement.title)+'
'+safeTagsReplace(plElement.profileName)+'
'+ //'
'+plElement.artists+'
'+ '
'+ '
'+plElement.explicit+'
'+ '
'+toMinutes(plElement.length)+'
'+ '
'+ '
'+ ''+ '
'+ '
'+ '
'); this.checkout(plElement); }, playProfileByGrid:function(type,id){ playerAutoLaunch=false; this.profileid=""; this.playList=[]; if(!this.shuffle){ this.currentPlayingItem = 0; }else{ this.currentPlayingItem = null; } $('#player_list .l-r').remove(); ajaxCall('/getPlayListData?type='+type+'&id='+id,null, playByConcertCallBack); }, playNext:function(){ if(this.loop==1){ this.checkout(this.playList[this.currentPlayingItem]); }else if(this.shuffle==true){ var x = this.currentPlayingItem; do { x = Math.floor(Math.random() * (this.playList.length-1)) } while (x== this.currentPlayingItem); this.currentPlayingItem=x; this.checkout(this.playList[x]); }else{ if(this.currentPlayingItem0){ this.currentPlayingItem--; this.checkout(this.playList[this.currentPlayingItem]); } }, playIndex:function(index){ this.currentPlayingItem =index; this.checkout(this.playList[this.currentPlayingItem]); }, playByConcert:function(id){ this.profileid=""; this.playList=[]; this.currentPlayingItem =0 // $('#player_list .l-r').remove(); $('#videoList #player_list .l-r').remove(); ajaxCall(apiServer+'/moov/api/profile/getProfile?refType=PCO&profileId='+id+'&deviceType=web',null, playByConcertCallBack); RecentlyPlay.rRefType = "PCO"; RecentlyPlay.rSourceId = id; } /*playByArtist:function(id){ this.profileid=""; this.playList=[]; this.currentPlayingItem =0 $('#videoList #player_list .l-r').remove(); ajaxCall(apiServer+'/moov/api/artist/randomProduct?profileId='+id+'&row=100&deviceType=web',null,playByArtistCallBack); }, playByPlayList:function(id){ this.profileid=""; this.playList=[]; this.currentPlayingItem =0 $('#videoList #player_list .l-r').remove(); ajaxCall(apiServer+'/moov/api/profile/getProfile?refType=PP&profileId='+id+'&deviceType=web',null,playByPlayListCallBack); }, shuffleOn:function(){ this.shuffle=true; $('#player_info #player_shuffle').removeClass(); $('#player_info #player_shuffle').addClass('on'); }, shuffleOff:function(){ this.shuffle=false; $('#player_info #player_shuffle').removeClass(); $('#player_info #player_shuffle').addClass('off'); }, repeatOff:function(){ this.loop=0; $('#player_info #player_repeat').removeClass(); $('#player_info #player_repeat').addClass('off'); }, repeatOne:function(){ this.loop=1; $('#player_info #player_repeat').removeClass(); $('#player_info #player_repeat').addClass('one'); }, repeatAll:function(){ this.loop=2; $('#player_info #player_repeat').removeClass(); $('#player_info #player_repeat').addClass('loop'); }*/ }; //function instantPlay(pid, length,title, artists, explicit, cover, bookmark){ // MOOVVideoPlayer.instantPlay(pid, length,title, artists, explicit, cover, bookmark); function instantPlayVideo(pid){ ajaxCall(apiServer+'/moov/api/content/getProductDetail?productId='+pid,null,instantPlayVideoCallback); } function instantPlayVideoCallback(data){ $('#videoList #currentProfile').hide(); $('#videoList .moduleList').height(500); if(data.resultCode=='0'||data.resultCode=='11'){ var obj=data.dataObject; MOOVVideoPlayer.instantPlay(obj); $('#videoList #player_list .l-r .add').click(function(event){ stopPropagation(event); var listData={ "playListId":"", "actionDate":new Date().YYYYMMDDHHMMSS(), "lastSyncDate":"", "name":"", "desc":"", "productIds": [($(this).parent()).parent().data('refid')] } playlistSeletion(listData); }); } } function playModuleListVideo(data){ $('#player_info .right .total').remove(); MOOVVideoPlayer.playList=[]; $('#videoList #player_list .l-r').remove(); if(data.resultCode=='0'||data.resultCode=='11'){ var listName='products'; var imageName='albumCover'; var totalTime=0; for(var i=0; i'+obj.artists[j]['name']+', '; } artists=artists.substring(0, artists.length-2); var explicit=(obj.explicit=='0')?'':''; var plElement=new playListElement(obj.productId, obj.productLength,obj.productTitle, artists, explicit, image, false, obj.artist,''); totalTime+=parseInt(obj.productLength); MOOVVideoPlayer.addToPlaylist(plElement); } $('#videoList #player_list .l-r .add').click(function(event){ stopPropagation(event); var listData={ "playListId":"", "actionDate":new Date().YYYYMMDDHHMMSS(), "lastSyncDate":"", "name":"", "desc":"", "productIds": [($(this).parent()).parent().data('refid')] } playlistSeletion(listData); }); RecentlyPlay.rRefType = MOOVVideoPlayer.refType; //$('#player_info .right').append('
' + langJSON.general.total + ' ' + data.dataObject[listName].length + ' ' + langJSON.general.songs + '・' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + '
'); if(MOOVVideoPlayer.shuffle){ MOOVVideoPlayer.currentPlayingItem=-1; MOOVVideoPlayer.playNext() }else{ MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); } } } function playModuleItemVideo(refType,moduleType,moduleId, index, shuffle){ ga('send', 'event', 'Video','play_video',currentProfileName+'('+currentRefType+')'); $('#videoList #currentProfile').hide(); $('#videoList .moduleList').height(500); if(shuffle){ MOOVVideoPlayer.shuffleOn(); }else{ MOOVVideoPlayer.currentPlayingItem =index; } ///if(refType!=MOOVVideoPlayer.refType || moduleType!=MOOVVideoPlayer.moduleType || moduleId!=MOOVVideoPlayer.curProfileId){ MOOVVideoPlayer.refType=refType; MOOVVideoPlayer.moduleType=moduleType; MOOVVideoPlayer.curProfileId=moduleId; ajaxCall(apiServer+'/moov/api/profile/moduleDetail?refType='+refType+'&moduleType='+moduleType+'&moduleId='+moduleId+'&deviceType=web&page=1',null,playModuleListVideo); /*}else{ MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[index]); }*/ if(refType == "PAT"){ RecentlyPlay.rRefType = "PAT"; RecentlyPlay.rSourceId = moduleId; } } function playProfileItemVideo( refType,moduleType,moduleId, index, shuffle){ ga('send', 'event', 'Video','play_video',currentProfileName+'('+currentRefType+')'); $('#videoList #currentProfile').show(); $('#videoList .moduleList').height(300); $('#videoList #currentProfile .cover').html(''); $('#videoList #currentProfile .name').html(''+langJSON.music_player.now_playing+'
'+prePlayVideoName+''); /*if(shuffle){ MOOVVideoPlayer.shuffleOn(); }else{*/ MOOVVideoPlayer.currentPlayingItem =index; //} //if(refType!=MOOVVideoPlayer.refType || moduleType!=MOOVVideoPlayer.moduleType || moduleId!=MOOVVideoPlayer.curProfileId || ){ $('#videoList .total').remove(); MOOVVideoPlayer.refType=refType; MOOVVideoPlayer.moduleType=moduleType; MOOVVideoPlayer.curProfileId=moduleId; MOOVVideoPlayer.currentCover=prePlayVideoCover; MOOVVideoPlayer.playList=[]; RecentlyPlay.rRefType = refType; $('#videoList #player_list .l-r').remove(); var totalTime=0; for(var i=0; i' + langJSON.general.total + ' ' + preVideoPlayList.length + ' ' + langJSON.general.videos + '' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + ''); /*if(MOOVVideoPlayer.shuffle){ MOOVVideoPlayer.currentPlayingItem=-1; MOOVVideoPlayer.playNext() }else{ MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); }*/ // console.log(MOOVVideoPlayer.currentPlayingItem); MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); /*}else{ console.log('1'); MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[index]); }*/ } function playByConcertCallBack(data){ $('#videoList .total').remove(); if(data.resultCode=='0'||data.resultCode=='11'){ var obj=data.dataObject; var modules=data.dataObject.modules; var image=defaultCover; if(obj.images[0].path!=''){ image=obj.images[0].path; } var label= obj.chiTitle[0]+'(PAB)'; if(currentRefType=='LND'){ label= currentProfileName+'|'+label; } ga('send', 'event', 'Video','play_grid_video',label); $('#videoList #currentProfile').show(); $('#videoList .moduleList').height(300); $('#videoList #currentProfile .cover').html(''); $('#videoList #currentProfile .name').html(''+langJSON.music_player.now_playing+'
'+obj[lang+'Title'][0]+'');; MOOVVideoPlayer.refType=obj.refType; MOOVVideoPlayer.moduleType=obj.moduleType; MOOVVideoPlayer.curProfileId=obj.moduleId; MOOVVideoPlayer.currentCover=image; for(var j=0; j'+product.artists[j]['name']+', '; } var cover=defaultCover; if(product.albumCover!=''){ cover=product.albumCover; } artists=artists.substring(0, artists.length-2); var explicit=(product.explicit=='0')?'':''; var plElement=new playListElement(product.productId, product.productLength,product.productTitle, artists, explicit, cover, false, product.artist,product.albumTitle ); MOOVVideoPlayer.addToPlaylist(plElement); } $('#videoList #player_list .l-r .add').click(function(event){ stopPropagation(event); var listData={ "playListId":"", "actionDate":new Date().YYYYMMDDHHMMSS(), "lastSyncDate":"", "name":"", "desc":"", "productIds": [($(this).parent()).parent().data('refid')] } playlistSeletion(listData); }); $('#videoList').append('
' + langJSON.general.total + ' ' +products.length + ' ' + langJSON.general.videos + '' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + '
'); // $('#player_info .right').append('
' + langJSON.general.total + ' ' + products.length + ' ' + langJSON.general.songs + '・' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + '
'); MOOVVideoPlayer.currentPlayingItem =0; MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[0]); } } } } function playByUserListVideo( id, index, shuffle){ //ga('send', 'event', 'Video','play_video',currentProfileName+'('+currentRefType+')'); $('#videoList #currentProfile').show(); $('#videoList .moduleList').height(300); $('#videoList #currentProfile .cover').html(''); $('#videoList #currentProfile .name').html(''+langJSON.music_player.now_playing+'
'+prePlayVideoName+''); /*if(shuffle){ MOOVVideoPlayer.shuffleOn(); }else{*/ MOOVVideoPlayer.currentPlayingItem =index; //} //if(refType!=MOOVVideoPlayer.refType || moduleType!=MOOVVideoPlayer.moduleType || moduleId!=MOOVVideoPlayer.curProfileId || ){ $('#videoList .total').remove(); MOOVVideoPlayer.refType='UPL'; MOOVVideoPlayer.moduleType='UPL'; MOOVVideoPlayer.curProfileId=id; MOOVVideoPlayer.currentCover=prePlayVideoCover; MOOVVideoPlayer.playList=[]; RecentlyPlay.rRefType = 'UPL'; RecentlyPlay.rSourceId = id; $('#videoList #player_list .l-r').remove(); var totalTime=0; for(var i=0; i' + langJSON.general.total + ' ' + preVideoPlayList.length + ' ' + langJSON.general.videos + '' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + ''); if(MOOVVideoPlayer.shuffle){ MOOVVideoPlayer.currentPlayingItem=-1; MOOVVideoPlayer.playNext() }else{ MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); } MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); /*}else{ console.log('1'); MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[index]); }*/ } function playMyCollectionVideo( id, index, shuffle){ //ajaxCall(cloudSyncServer+'/moov/api/sync/getSyncData?refType=VDO&start=0&end=40&orderBy=addtime&order=desc',null,getCollectioncCallback); console.log("calling playMyCollectionVideo...") //ajaxCall(apiServer+'/moov/api/sync/getSyncData?refType=VDO&start=0&end=40&orderBy=addtime&order=desc',null,playMyCollectionCallBack); //ga('send', 'event', 'Video','play_video',currentProfileName+'('+currentRefType+')'); $('#videoList #currentProfile').hide(); $('#videoList .moduleList').height(500); //$('#videoList #currentProfile .cover').html(''); //$('#videoList #currentProfile .name').html(''+langJSON.music_player.now_playing+'
'+prePlayVideoName+''); /*if(shuffle){ MOOVVideoPlayer.shuffleOn(); }else{*/ MOOVVideoPlayer.currentPlayingItem =index; //} //if(refType!=MOOVVideoPlayer.refType || moduleType!=MOOVVideoPlayer.moduleType || moduleId!=MOOVVideoPlayer.curProfileId || ){ $('#videoList .total').remove(); MOOVVideoPlayer.refType='myCollection'; MOOVVideoPlayer.moduleType='myCollection'; MOOVVideoPlayer.curProfileId='STAR_VIDEO'; MOOVVideoPlayer.currentCover=prePlayVideoCover; MOOVVideoPlayer.playList=[]; RecentlyPlay.rRefType = 'STAR_VIDEO'; RecentlyPlay.rSourceId = 'STAR_VIDEO'; $('#videoList #player_list .l-r').remove(); //ajaxCall(cloudSyncServer+'/moov/api/sync/getSyncData?refType=VDO&start=0&end=40&orderBy=addtime&order=desc',null,getCollectioncCallback); var totalTime=0; for(var i=0; i' + langJSON.general.total + ' ' + preVideoPlayList.length + ' ' + langJSON.general.videos + '' + langJSON.general.in_length + ' ' + toMinutes(totalTime) + ''); if(MOOVVideoPlayer.shuffle){ MOOVVideoPlayer.currentPlayingItem=-1; MOOVVideoPlayer.playNext() }else{ MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); } MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[MOOVVideoPlayer.currentPlayingItem]); /*}else{ console.log('1'); MOOVVideoPlayer.checkout(MOOVVideoPlayer.playList[index]); }*/ } /*function currentPlay(id){ console.log('currentPlay:'+id); }*/ function playByConcert(id){ MOOVVideoPlayer.playByConcert(id); RecentlyPlay.rSourceId = id; } function playNextVideo(){ MOOVVideoPlayer.playNext(); } function playPrevVideo(){ MOOVVideoPlayer.playPrev(); } function playVideoIndex(index){ MOOVVideoPlayer.playIndex(index); } function changeVideoQuality(quality){ MOOVVideoPlayer.playQuality=quality; } function playStateAction(state){ if(state=='playbackerror'){ showMessage(langJSON.error_message.the_network_connection_is_unstable_now); } }