Change videos URL issue.
Posted: 11 Nov 2019 07:57
Hi, i've tried using libvlc for Android and i have some issue.
When i try to change the url (UDP) on same activity, sometimes its give delay and display white screen.
Can i reduce the delay when switching URL?
Here's my code (example url : udp://@222.10.1.2:1234) :
private void changeVideo(String url) {
mMediaPlayer.stop();
Media media = new Media(mLibVLC, Uri.parse(url));
media.setHWDecoderEnabled(true, true);
mMediaPlayer.setMedia(media);
mMediaPlayer.setEventListener(mPlayerListener);
mMediaPlayer.play();
}
Thank you
When i try to change the url (UDP) on same activity, sometimes its give delay and display white screen.
Can i reduce the delay when switching URL?
Here's my code (example url : udp://@222.10.1.2:1234) :
private void changeVideo(String url) {
mMediaPlayer.stop();
Media media = new Media(mLibVLC, Uri.parse(url));
media.setHWDecoderEnabled(true, true);
mMediaPlayer.setMedia(media);
mMediaPlayer.setEventListener(mPlayerListener);
mMediaPlayer.play();
}
Thank you