Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
kairusds committed Aug 10, 2023
1 parent 8c601c3 commit 4206f3e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public void onWindowFocusChanged(boolean hasFocus) {
protected void onResume() {
super.onResume();
makeFullScreen();
mMediaPlayer.play();
if(time > 0L) mMediaPlayer.setTime(time);
}

Expand All @@ -97,13 +96,15 @@ protected void onStart(){
}catch(IOException e){
throw new RuntimeException("Invalid asset folder");
}
mMediaPlayer.play();
}

@Override
protected void onStop(){ // activity is in the background or minimized
super.onStop();
time = mMediaPlayer.getTime();
mMediaPlayer.stop();
mMediaPlayer.pause();
// mMediaPlayer.stop();
mMediaPlayer.detachViews();
}

Expand Down

0 comments on commit 4206f3e

Please sign in to comment.