[英]Unable to play mp3 in j2me
I am trying to play file from direct web link(http) but it throws exception: 我正在尝试从直接Web链接(http)播放文件,但会引发异常:
Can not create player for: Unsupported contect type
无法为以下对象创建播放器:不支持的对接类型
code is simple as 代码很简单
Player player = Manager.createPlayer("http://c648382.r82.cf2.rackcdn.com/01_Genesis_001/0001.mp3");
player.realize();
player.start();
here is StackTrace: 这是StackTrace:
javax.microedition.media.MediaException: Cannot create a Player for: Unsupported content type
at javax.microedition.media.Manager.getPlayerFromType(+13)
at javax.microedition.media.Manager.createPlayer(+35)
at javax.microedition.media.Manager.createPlayer(+389)
I am using WTK 2.5.2
and DefaultColorPhone
emulator 我正在使用
WTK 2.5.2
和DefaultColorPhone
模拟器
any suggestion? 有什么建议吗?
as far as I know 2.5.2
does not support mp3. 据我所知
2.5.2
不支持mp3。 Did you try newer versions of emulator? 您尝试过较新版本的模拟器吗?
Also per my recollection there is a way to programmatically find out content types supported by particular device / emulator. 根据我的回忆,还有一种方法可以以编程方式找出特定设备/仿真器支持的内容类型。 Check JSR 135 (MMAPI) javadocs for details if you're interested.
如果您有兴趣,请查看JSR 135(MMAPI)javadocs以获取详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.