Rudi
Rudi

Reputation: 4314

Android Sorry, this video cannot be played

I'm using VideoPlayer in my app. It play everything fine but when I want to scroll on the media player's bar, usually it gives me the error : Sorry, this video cannot be played. and I have to restart the video to watch it again. All I found is if I stop the video and scroll the bar it will be fine. I just wonder how can I fix this problem ? how can I access to media player's bar. Hens I can pause the video onClick. My code:

MediaController mediaController = new MediaController(
                rootView.getContext());
        mediaController.setAnchorView(video);
        Uri uri = Uri.parse(passVideo.file_link);

        video.setMediaController(mediaController);
        video.setVideoURI(uri);
        video.setOnPreparedListener(new OnPreparedListener() {

            public void onPrepared(MediaPlayer arg0) {
                mProgress.setVisibility(View.INVISIBLE);
                video.requestFocus();
                video.start();
            }
        });

Upvotes: 3

Views: 9307

Answers (1)

Huy Tower
Huy Tower

Reputation: 7976

Many people get this error like you,

Bugs :

Sorry this video is not valid for streaming to this device.

Sorry, this video can not be played.

You can find out at Sorry, this video is not valid for streaming to this device in Http streaming android

Thanks,

Upvotes: 4

Related Questions