简体   繁体   English

如何在网页上播放mp3

[英]how to play mp3 in a web page

I'm going to play MP3 in my ASP.NET web app (VS 2008), I want user to have a nice GUI for play/pause/stop and selecting different musics. 我将在ASP.NET Web应用程序(VS 2008)中播放MP3,我希望用户拥有一个不错的GUI,用于播放/暂停/停止以及选择不同的音乐。 Is there any way to start playing music automatically at site start up? 有什么方法可以在网站启动时自动开始播放音乐吗? Of course music should not be restarted after a new page is being loaded, is there any way I can control music via server side code? 当然,加载新页面后不应该重新启动音乐,我可以通过服务器端代码控制音乐吗?

thanks, I've tested many players but I think I need more sources 谢谢,我已经测试了许多玩家,但我认为我需要更多资源

Music media can be played using HTML5 or Flash. 可以使用HTML5或Flash播放音乐媒体。 These are front-end technologies. 这些是前端技术。 You can, of course, 'fetch' urls and files using back-end asp.net code. 当然,您可以使用后端asp.net代码“获取” URL和文件。

There are a few javascript libraries out there that will determine if a user has an HTML5 browser and if not, use Flash as a backup. 那里有一些JavaScript库,这些库将确定用户是否具有HTML5浏览器,如果没有,则使用Flash作为备份。

One of them I like to use is called jPlayer, for jQuery. 我喜欢使用的其中一个名为jQuery的jPlayer。

http://jplayer.org/ http://jplayer.org/

您可以使用服务器控件,也可以检查这些资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM