我是android开发的初学者,并尝试从链接播放视频。但它给出错误“对不起,我们不能播放此视频”。我试过这么多的链接,但对于所有链接,它显示相同的错误。
我的代码如下
public class VideoDemo extends Activity {
private static final String path ="http://demo.digi-corp.com/S2LWebservice/Resources/SampleVideo.mp4";
private VideoView video;
private MediaController ctlr;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.videoview);
video = (VideoView) findViewById(R.id.video);
video.setVideoPath(path);
ctlr = new MediaController(this);
ctlr.setMediaPlayer(video);
video.setMediaController(ctlr);
video.requestFocus();
}
}
Logcat显示以下错误消息:
04-12 15:04:54.245: ERROR/PlayerDriver(554): HandleErrorEvent: PVMFErrTimeout