本文介绍了如何动态地将歌曲传递给jPlayer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在开发具有地铁外观的asp.net应用程序.在mp3播放器中,您可以选择艺术家(单击图块),然后选择专辑(相同),然后从列表中选择一首歌曲.

I am working on a metro-looking asp.net application right now. It's a mp3 player where you choose artist (clicking on a tile), then album (same) and you pick a song from the list.

现在,我想将所选歌曲的文件名和位置传递给jPlayer,以便它替换实际播放的歌曲.我知道如何播放在播放器构造函数中指定的一首歌,但不知道如何对其进行动态更改.

Now I want to pass the picked song's filename and location to jPlayer so that it replaces the actual played song. I know how to play one song specified in the players constructor but have no idea how to change it dinamically.

我不需要坚持使用jPlayer,如果您可以向我推荐其他可以更轻松地完成上述任务的播放器,那就没问题了:)

I don't need to stick to jPlayer, if You can recommend me any other player that can do above in easier way there is no problem :)

(英语不是我的主要语言,对不起,我希望能理解).

(English is not my main tounge, sorry for mistakes, I hope it is understandable).

推荐答案

您尝试过吗?

$("#jquery_jplayer_1").jPlayer("setMedia", {mp3: url}).jPlayer("play");

从以下位置拉出:通过单击链接在jPlayer上更改歌曲,托管在Amazon S3

这篇关于如何动态地将歌曲传递给jPlayer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 13:21