a stop and resume bug
first all i use LibVLC Android samples ,here is my code: @Override protected void onStart() { super.onStart();
mMediaPlayer.attachViews(mVideoLayout, null, ENABLE_SUBTITLES, USE_TEXTURE_VIEW);
// try { Uri uri = Uri.parse("https://zxtcdn.bxt189.com/zxtplatform/20190930/151152/%E8%AF%BE%E7%A8%8B%E8%AE%BE%E8%AE%A1%E4%B8%8E%E5%BC%80%E5%8F%912_%E9%A1%BE%E7%AB%8B%E6%B0%91.mp4?AWSAccessKeyId=a8723c19ea1dcfa44450&Expires=1571102225&Signature=v9rJtGFqRIXIP9iZUpaS1YsQtJw%3D"); final Media media = new Media(mLibVLC, /getAssets().openFd(ASSET_FILENAME)/uri); mMediaPlayer.setMedia(media); media.setHWDecoderEnabled(false, false); media.addOption(":start-time=16"); media.release(); // } catch (IOException e) { // throw new RuntimeException("Invalid asset folder"); // } mMediaPlayer.play(); }
@Override
protected void onStop() {
super.onStop();
mMediaPlayer.stop();
mMediaPlayer.detachViews();
}
my steps: 1、play video 2、press home to back 3、relaucher app
actually i see black screen , and then the view
what i expect is show the last frame view not the black screen like most of other video app, i dont know how to make it.
and what is the diffrent of MediaPlayer.stop and MediaPlaer.pause? usually there may be a resume function