var current_time; var current_song_id = 0; var play_list = new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_1", cssSelectorAncestor: "#jp_container_1" }, [ { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2001.mp3", id:10079, title:"归正神学讲座:启示论 1", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2002.mp3", id:10080, title:"归正神学讲座:启示论 2", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2003.mp3", id:10081, title:"归正神学讲座:启示论 3", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2004.mp3", id:10082, title:"归正神学讲座:启示论 4", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2005.mp3", id:10083, title:"归正神学讲座:启示论 5", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2006.mp3", id:10084, title:"归正神学讲座:启示论 6", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2007.mp3", id:10085, title:"归正神学讲座:启示论 7", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2008.mp3", id:10086, title:"归正神学讲座:启示论 8", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2009.mp3", id:10087, title:"归正神学讲座:启示论 9", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2010.mp3", id:10088, title:"归正神学讲座:启示论 10", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2011.mp3", id:10089, title:"归正神学讲座:启示论 11", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2012.mp3", id:10090, title:"归正神学讲座:启示论 12", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2013.mp3", id:10091, title:"归正神学讲座:启示论 13", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, { mp3:"http://jd.wzxx.org:13322/9%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%E5%90%AF%E7%A4%BA%E8%AE%BA-%E6%9E%97%E6%85%88%E4%BF%A1/%E5%BD%92%E6%AD%A3%E7%A5%9E%E5%AD%A6%E8%AE%B2%E5%BA%A7%EF%BC%9A%E5%90%AF%E7%A4%BA%E8%AE%BA%2014.mp3", id:10092, title:"归正神学讲座:启示论 14", artist_id:0, artist:"", album_id:0, album:"林慈信", cover:"" }, ],{ play: function(obj){ init_lrc(obj.jPlayer.status.media.id); }, timeupdate : function (obj){ current_time = obj.jPlayer.status.currentTime; } }); function init_lrc(song_id){ var url = "/api/music/lrc/"; var data = "id=" + song_id; $.getJSON(url,data,function(response){ if(response.result == "SUCCESS"){ $.lrc.start(response.message,function(){ return current_time; }); } }); } function start_play(url_data){ var url = "/music/player/?"; window.location.href=url+url_data; } function play(ids){ var url_data = "&ids=" + ids; start_play(url_data); } function play_album(album_id){ var url_data = "&album_id=" + album_id; start_play(url_data); } function play_box(box_id){ var url_data = "&box_id=" + box_id; start_play(url_data); } function play_book(book_id){ var url_data = "&book_id=" + book_id; start_play(url_data); } function play_favor(){ var url_data = "&favor=1"; start_play(url_data); } function play_callback(media_list){ var media_arr = []; for(var i = 0; i < media_list.length; i++){ var media = { mp3:"http://www.jiangdaowang.com:12421/" + media_list[i].url, id:media_list[i].id, title:media_list[i].title, artist_id:media_list[i].artist_id, artist:media_list[i].artist, album_id:media_list[i].album_id, album:media_list[i].album, cover:media_list[i].cover }; media_arr.push(media); } play_list.addList(media_arr,true); } function add(ids){ var data = "ids=" + ids; get_media_list(data,add_callback); } function add_album(album_id){ var data = "album_id=" + album_id; get_media_list(data,add_callback); } function add_callback(media_list){ var media_arr = []; for(var i = 0; i < media_list.length; i++){ var media = { mp3:"http://www.jiangdaowang.com:12421/" + media_list[i].url, id:media_list[i].id, title:media_list[i].title, artist_id:media_list[i].artist_id, artist:media_list[i].artist, album_id:media_list[i].album_id, album:media_list[i].album, cover:media_list[i].cover }; media_arr.push(media); } play_list.addList(media_arr,false); } function get_media_list(data,callback){ var url = "/api/music/song/"; $.getJSON(url,data,function(response){ if(response.result == "SUCCESS"){ callback(eval(response.message)); } }); }