Search code examples
androidandroid-webviewrtspandroid-mediaplayerandroid-video-player

How I play my rtsp videos on android webview?


I mean I have a link like this: http://15....../a.stream

I write this code to see the video on android :

VideoView  wv = (VideoView)findViewById(R.id.videoView1);
wv.setVideoURI(Uri.parse("rtsp://15........./a.stream"));
MediaController controller = new MediaController(izle.this);
wv.setMediaController(controller);
wv.start(); 

This code works first.But one day the same code say : Cannot play video Sorry,this video cannot played.

My first question is why that alert me like that? second question is maybe i play video in another way maybe it is work.Like if I play video in webview maybe it is work? How I play the rtsp video stream on webview?

Thanks...


Solution

  • You can't play rtsp in webview. Only Flash(rtmp) stream play in browser with flash player.If streams is rtsp, then browser will open it in the external video player.

    HTTPS progressive streams are only supported under 3.0+.