We are trying the Android VLC LIb from the URL.
We won't able to catch exception if play rtsp stream fails.
Code: mMediaPlayer.play();
How can we catch exception if anything fails in calling above method.
We are trying the Android VLC LIb from the URL.
We won't able to catch exception if play rtsp stream fails.
Code: mMediaPlayer.play();
How can we catch exception if anything fails in calling above method.
Just explored bit more, It seems Latest version of Android VLC SDK Wrapper 1.9.8 have support of tracking events.(https://github.com/mrmaffen/vlc-android-sdk)
Code:
try {
options = new ArrayList<String>();
options.add("-vvv"); // verbosity
options.add("--extraintf=logger");
options.add("--verbose=0");
options.add("--log-verbose=0");
options.add("--rtsp-tcp");
mLibVLC = new LibVLC(options);
mMediaPlayer = new MediaPlayer(mLibVLC);
mMediaPlayer.setEventListener(mPlayerListener);
videoView.setVideoPath(mMediaUrl);
videoView.setVideoURI(Uri.parse(mMediaUrl));
videoView.setMediaController(new MediaController(this));
videoView.setOnPreparedListener(new android.media.MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(android.media.MediaPlayer mp) {
Log.d("TAG", "OnPrepared called");
}
});
videoView.start();
} catch (Exception e){
Log.e(TAG, e.toString());
}
Logs attached below: