什么是从mysql数据库加载歌曲的jQuery音乐播放器? [英] What's a jQuery Music Player that loads songs from a mysql database?

查看:71
本文介绍了什么是从mysql数据库加载歌曲的jQuery音乐播放器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个使用php从mysql数据库加载歌曲的jQuery音乐播放器。我可以使用插件,但我更喜欢教我如何操作的教程,所以我可以自定义音乐播放器。

I'm looking for a jQuery Music Player that loads songs from a mysql database using php. I could use a plugin, but I would prefer a tutorial that teaches me how to do it, so I can customize the music player.

有没有人知道jQuery音乐播放器加载来自mysql数据库的歌曲或教授如何操作的教程?

Does anyone know a jQuery Music Player that loads songs from a mysql database or a tutorial that teaches how to do it?

推荐答案

我一直使用jPlayer来获取来自MySQL数据库的歌曲。您将不得不编写一个后端脚本,将歌曲加载到播放器中。您似乎可能将歌曲文件直接存储到数据库中。如果我是你,我会将文件存储在另一个位置,将URL存储在数据库中并将其插入jPlayer,如下所示:

I use jPlayer all the time to get songs from a MySQL database. You're going to have to write a back end script that loads the song in to the player though. It seems like you might be storing the song files directly into the database. If I were you, I would store the files in another location, store the URL in the database and plug it in to jPlayer like so:

$(this).jPlayer("setMedia", {
   mp3: "<?php echo $path_to_music_file; ?>"
})

这篇关于什么是从mysql数据库加载歌曲的jQuery音乐播放器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆