我在尝试使用VideoView观看视频时遇到了一些问题。在Can't play this video
failed to connect
这是我的网址
rtsp://136.243.10.198:1935/xxx_vod/xx_1455171793.mp4?key=b1fbf3e6e6edcc2bb6c75f879edf8bf0
我在Log上遇到错误:
E/MediaPlayer: setDataSource: IOException! uri=rtsp://136.243.10.198:1935/xxx_vod/xx_1455171793.mp4?key=b1fbf3e6e6edcc2bb6c75f879edf8bf0
和
E/MediaPlayer: error (262, -1010)
我的代码:
path = getActivity().getIntent().getStringExtra("path");
videoView.setMediaController(new MediaController(getActivity()));
videoView.setVideoPath(path);
videoView.requestFocus();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.start();
}
});