Android:Mediaplayer错误无法在客户端播放

时间:2014-03-12 12:38:28

标签: android android-mediaplayer

我想从我的设备上的网址(Google Nexus-4)播放视频,但每当我运行我的应用时,它都会向我显示无法播放此视频的消息。这是我的代码

VideoView videoView = (VideoView)findViewById(R.id.videoView);
        MediaController mc = new MediaController(this);
        videoView.setMediaController(mc);

        String str = "http://mywebsite.com/456-sd-sdss.mp4";
        Uri uri = Uri.parse(str);

        videoView.setVideoURI(uri);

        videoView.requestFocus();
        videoView.start();

这是我的logcat

D/MediaPlayer(29745): Couldn't open file on client side, trying server side
E/MediaPlayer(29745): error (1, -1004)
E/MediaPlayer(29745): Error (1,-1004)
D/VideoView(29745): Error: 1,-1004

0 个答案:

没有答案
相关问题