使用媒体播放器播放音频 [英] Play Audio using media player

查看:77
本文介绍了使用媒体播放器播放音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我正在为音乐播放器创建一个Web应用程序,我的要求是播放任何在线音频文件,我已经尝试过使用对象和嵌入标签,但是它可以使用静态网址,例如-http://sound21.mp3pk.com/Dil%20De% 20De%20Bandeya.mp3

但是具有动态链接-http://www.dhingana.com/play/raabta/MjAwOTM3/pop/1
它不起作用...
那怎么办呢?

问候,
Prema G

Hello frends,
I am creating an web application for Music Player,my requirement is to play any online audio file,i have tried used object and embed tags but it works with static urls like-http://sound21.mp3pk.com/Dil%20De%20De%20Bandeya.mp3

But with dynamic link-http://www.dhingana.com/play/raabta/MjAwOTM3/pop/1
it doesnt work...
So how to do it?

With Regards,
Prema G

推荐答案

可以使用NAudio开源.NET音频库,该博客中对此进行了解释:http://mark-dot-net.blogspot.in/2011/05/如何-to-play-back-streaming-mp3-using.html [
It''s possible using the NAudio open source .NET audio library, which is explained in the blog: http://mark-dot-net.blogspot.in/2011/05/how-to-play-back-streaming-mp3-using.html[^]

Essentially you have one thread downloading video frames, decompressing them and storing them in a BufferedWaveProvider. Another thread then plays back using the BufferedWaveProvider as an input.


这篇关于使用媒体播放器播放音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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