Android:错误E / MediaPlayer:setDataSource:IOException!当试图观看视频时

时间:2016-02-11 07:26:03

标签: android video android-videoview rtsp

我在尝试使用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();
            }
        });

0 个答案:

没有答案