Hi i am writing a media player application in android when i calling a mp.prepare() it is giving a IllegalStateException.
The same rtsp url waorking with vlc or quick time media player.
Hi i am writing a media player application in android when i calling a mp.prepare() it is giving a IllegalStateException.
The same rtsp url waorking with vlc or quick time media player.
Hi this is the code which i m trying to run for the RTSP.
code :
// Create a new media player and set the listeners mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource("rtsp://video2.americafree.tv/AFTVHorrorH26496.sdp"); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepare(); // mMediaPlayer.prepareAsync(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
This same url works fine with videoview setVideoURI().