android 媒体播放器播放预告片
我想使用以下代码播放上面的预告片,但它不起作用,抛出以下错误
Command PLAYER_INIT Completed with an error or info PVMFFailure 02-02 13:40:33.696: 错误/MediaPlayer(805): 错误 (1, -1) 02-02 13:40:33.706: 错误/MediaPlayer(805): 错误 (1,-1)
预告片链接 = http://uk.clip-1.filmtrailer.com/3230_8406_a_4.wmv?log_var=103|441100218-1|-
private final void playTrailler(String url)throws IOException, IllegalArgumentException {
MediaPlayer mp = new MediaPlayer();
Log.v(TAG, "Trailler: " + url);
mp.setDataSource(url);
mp.setOnPreparedListener(this);
mp.prepareAsync();
}
public void onPrepared(MediaPlayer mp) {
mp.start();
}
I want to play the above trailer using following code but it is not working throwing following error
Command PLAYER_INIT completed with an error or info PVMFFailure
02-02 13:40:33.696: ERROR/MediaPlayer(805): error (1, -1)
02-02 13:40:33.706: ERROR/MediaPlayer(805): Error (1,-1)
Trailler link = http://uk.clip-1.filmtrailer.com/3230_8406_a_4.wmv?log_var=103|441100218-1|-
private final void playTrailler(String url)throws IOException, IllegalArgumentException {
MediaPlayer mp = new MediaPlayer();
Log.v(TAG, "Trailler: " + url);
mp.setDataSource(url);
mp.setOnPreparedListener(this);
mp.prepareAsync();
}
public void onPrepared(MediaPlayer mp) {
mp.start();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论