and tried to do the same thing on android
Code: Select all
if(sourceUrl.contains("youtube")) {
final Uri uri = Uri.parse(sourceUrl);
final Media nm = new Media(mLibVLC, uri );
nm .parse(0x04);
nm .release();
MediaList mediaList = nm .subItems();
mediaList.release();
Media nMedia = mediaList.getMediaAt(0);
nMedia.release();
nMedia.setHWDecoderEnabled(hwDecoderEnabled, false);
mMediaPlayer.setMedia(nMedia);
Code: Select all
Caused by: java.lang.IllegalStateException: can't get VLCObject instance
at org.videolan.libvlc.MediaList.nativeNewFromMedia(Native Method)
at org.videolan.libvlc.MediaList.<init>(MediaList.java:104)
at org.videolan.libvlc.Media.subItems(Media.java:572)