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/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/01%E7%BB%8F%E5%8E%86%E5%9F%BA%E7%9D%A3%E6%9C%8D%E4%BA%8B%E5%9C%A3%E5%BE%92%20.mp3", id:10217, title:"01经历基督服事圣徒", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/02%E5%B8%B8%E5%AD%98%E4%BF%A1%E5%BF%83%E5%92%8C%E4%BA%8F%E8%89%AF%E5%BF%83%20.mp3", id:10218, title:"02常存信心和亏良心", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/03%E7%88%B1%E4%B8%AD%E7%9A%84%E4%BA%8B%E5%A5%89.mp3", id:10219, title:"03爱中的事奉", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/04%E6%95%A3%E5%8F%91%E5%9F%BA%E7%9D%A3%E9%A6%99%E6%B0%94%E7%9A%84%E4%BA%8B%E5%A5%89.mp3", id:10220, title:"04散发基督香气的事奉", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/05%E5%8F%8D%E7%85%A7%E4%B8%BB%E5%85%89%E7%9A%84%E4%BA%8B%E5%A5%89.mp3", id:10221, title:"05反照主光的事奉", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/06%E7%94%9F%E5%91%BD%E7%9A%84%E4%BA%8B%E5%A5%89.mp3", id:10222, title:"06生命的事奉", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/07%E6%B0%B8%E6%81%92%E7%9A%84%E4%BB%B7%E5%80%BC%E8%A7%82.mp3", id:10223, title:"07永恒的价值观", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/08%E4%BD%9C%E5%9F%BA%E7%9D%A3%E7%9A%84%E4%BD%BF%E8%80%85.mp3", id:10224, title:"08作基督的使者", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/09%E7%88%B1%E7%A5%9E%E7%9A%84%E6%95%99%E5%92%8C%E5%9C%A3%E5%BE%92.mp3", id:10225, title:"09爱神的教和圣徒", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/10%E4%BD%9C%E4%B8%80%E4%B8%AA%E7%A5%B7%E5%91%8A%E7%9A%84%E4%BA%BA.mp3", id:10226, title:"10作一个祷告的人", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/11%E4%BD%9C%E5%8F%97%E8%8B%A6%E7%9A%84%E8%A7%81%E8%AF%81%E4%BA%BA.mp3", id:10227, title:"11作受苦的见证人", artist_id:0, artist:"", album_id:0, album:"程蒙恩", cover:"" }, { mp3:"http://jd.wzxx.org:13322/4%E5%B7%A5%E4%BA%BA%E8%A3%85%E5%A4%87/%E7%94%9F%E5%91%BD%E5%9F%B9%E8%AE%AD%E4%BF%A1%E6%81%AF-%E7%A8%8B%E8%92%99%E6%81%A9/12%E6%B4%BB%E5%9C%A8%E7%A4%BA%E5%85%89%E4%B8%AD%E7%9A%84%E4%BA%8B%E5%A5%89.mp3", id:10228, title:"12活在示光中的事奉", 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)); } }); }