[Android] TV: Leave video player if device is shut down
Geoffrey Métais
git at videolan.org
Fri Jun 14 17:49:50 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 14 16:40:36 2019 +0200| [b7d1afcca74c48515e7d840c33517a49cf620268] | committer: Geoffrey Métais
TV: Leave video player if device is shut down
> https://code.videolan.org/videolan/vlc-android/commit/b7d1afcca74c48515e7d840c33517a49cf620268
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 1314d0f14..51b11aa54 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -857,11 +857,14 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
return
}
service?.run {
- wasPaused = !isPlaying || (!Settings.showTvUi && !isInteractive)
+ val tv = Settings.showTvUi
+ val interactive = isInteractive
+ wasPaused = !isPlaying || (!tv && !interactive)
if (wasPaused) settings.edit().putBoolean(VIDEO_PAUSED, true).apply()
if (!isFinishing) {
currentAudioTrack = audioTrack
currentSpuTrack = spuTrack
+ if (tv && !isInteractive) finish() // Leave player on TV, restauration can be difficult
}
if (isMute) mute(false)
More information about the Android
mailing list