我正在使用VLC播放视频,但我需要知道视频何时结束。所以基本上我需要一个onlistener
。有人可以给我一个用于VLC的onlistener
的简单代码。这是我用来播放VLC的代码:
int vlcRequestCode = 42; Uri uri = Uri.parse("/storage/emulated/0/Download/hero.mp4");
vlcIntent.setComponent(new ComponentName("org.videolan.vlc", "org.videolan.vlc.gui.video.VideoPlayerActivity"));
vlcIntent.setDataAndTypeAndNormalize(uri, "video/*");
vlcIntent.putExtra("title", " Concert Collection");
vlcIntent.putExtra("from_start", true);
vlcIntent.putExtra("position", 90000l);
vlcIntent.putExtra("position", 90000l);
startActivityForResult(vlcIntent, vlcRequestCode);