Reputation: 93
Here is my code, and when I run the app, it will display "Sorry this video cannot be played".
public class rtspActivity extends Activity {
Button btn;
VideoView v;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rtsp);
v=(VideoView)findViewById(R.id.vv);
v.setVideoURI(Uri.parse("rtsp://server.intelcast.tv:554/live/haditvfour1"));
}
}
Upvotes: 1
Views: 479
Reputation: 471
You should start with
v.setMediaController(new MediaController(this));
v.requestFocus();
v.start();
Also, the url you're using might not be good. Try it in VLC or similar, to see if its actually there
Another problem can be the "server.intelcast.tv:554" part, try replacing this with a real ip adress with numbers, i've experinced this issue myself
Upvotes: 2