我是 android 开发的初学者,并尝试从链接播放视频。但它给出了错误"sorry,we can't play this video"
。我尝试了很多链接,但所有链接都显示相同的错误。
我的代码如下
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