与Android版的MediaPlayer播放.asx文件? [英] Android Play .asx file with MediaPlayer?

查看:319
本文介绍了与Android版的MediaPlayer播放.asx文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一个应用程序,使用它可以播放广播音频流。

I want to make an app with which you can play radio audio streams.

到目前为止,我有这样的:

So far i have this:

@Override
    public void onClick(View v)
    {
        player = new MediaPlayer();
        try {
            player.setDataSource("http://livestreams.omroep.nl/npo/3fm-bb");
            player.prepare();
            player.start();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

但是,这AINT似乎工作,它甚至有可能发挥.asx文件?还是这样吗? (点击链接,明白我的意思)

But this aint seem to be working, is it even possible to play an .asx file? or like this? (click on the link and see what i mean)

推荐答案

什么Android的媒体播放器可以播放依赖于codeCS纳入制造商的设备。有格式为所有设备没有固定的列表。检查您的设备手册为您的设备的可用codeCS。如果您正在开发用于分发的应用程序,那么你最好使用一个格式,在大多数Android设备常用的。维基百科(或谷歌)一个体面的搜索,就会发现一些列表。

What Android media player can play depends on the codecs included in the device by the manufacturer. There is no fixed list of formats for all devices. Check your device manual for the available codecs in your device. If you are developing an application for distribution, then you better use a format that is commonly available in most android devices. A decent search in Wikipedia (or google) will reveal some lists.

而且,最重要的是,我发现,Android模拟器无法播放可以在三星Galaxy S我有播放多个文件。

And, most importantly, I found that, the android emulator cannot play many files that can be played in the Samsung Galaxy S I have.

这篇关于与Android版的MediaPlayer播放.asx文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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