好吧,最近我买了一个名为“Liner”的音频播放器,现在我正在使用它将其转换为WordPress插件,但我遇到的最大问题是需要手动添加曲目。。
这里是我的JS的一个片段。
<script>
jQuery(function($) {
$(\'body\').linerPlayer({
firstPlaying: 0,
autoplay: true,
shuffle: false,
//veryThin: true,
slideAlbumsName: true,
nowplaying2title: true,
roundedCorners: true,
//accentColor:"#cc181e", //008DDE
pluginPath: "/canyon/liner/", // <<< IMPORTANT! - Change this to your path to the plugin folder
playlist: [ //♩ ♪ ☊ ♫ ♬ //
{mp3:"song/songname.mp3", title:"song title", artist:"song artist", album:"name", cover:"song/cover.png"},
]
});
});
</script>
我想知道是否有任何方式,我可以写这个JS来填写歌曲MP3,然后把标题作为例子<?php the_title(); ?>
而艺术家作为<?php the_tags(); ?>
但是我不需要手动向播放器添加任何内容吗?我如何开始这样做。。只是一些想法会对我有很大帮助,因为我现在真的被困了。