PreviewVideoActivity: pause player when activity stops

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-02-18 17:36:57 +01:00
parent e419144456
commit 22555a901a
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -207,5 +207,13 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
} else {
finish();
}
}
}
@Override
protected void onStop() {
super.onStop();
if (exoPlayer.isPlaying()) {
exoPlayer.pause();
}
}
}