[Android] Add a tip whe playing video as audio
Nicolas Pomepuy
git at videolan.org
Tue Feb 8 14:39:35 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Feb 8 09:48:50 2022 +0100| [221ab54eb871e624215a688c75eba25f1ff3d1ab] | committer: Nicolas Pomepuy
Add a tip whe playing video as audio
> https://code.videolan.org/videolan/vlc-android/commit/221ab54eb871e624215a688c75eba25f1ff3d1ab
---
application/resources/src/main/res/values/strings.xml | 1 +
application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/application/resources/src/main/res/values/strings.xml b/application/resources/src/main/res/values/strings.xml
index 546157f88..e19622da0 100644
--- a/application/resources/src/main/res/values/strings.xml
+++ b/application/resources/src/main/res/values/strings.xml
@@ -33,6 +33,7 @@
<string name="play_from_start">Play from start</string>
<string name="play_as_audio">Play as audio</string>
<string name="play_as_video">Play as video</string>
+ <string name="return_to_video">Long tap the cover to restore the video</string>
<string name="video_app_switch_title">Background/PiP mode</string>
<string name="video_app_switch_summary">Select VLC behavior when you switch to other application from video playback</string>
<string name="play_pip_title">Play videos in Picture-in-picture mode</string>
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 0ec45e6ae..f4e364774 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -122,6 +122,10 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
playlistAdapter = PlaylistAdapter(this)
settings = Settings.getInstance(requireContext())
playlistModel = PlaylistModel.get(this)
+ playlistModel.service?.let {
+ if (it.videoTracksCount > 0)
+ UiTools.snacker(requireActivity(), R.string.return_to_video)
+ }
playlistModel.progress.observe(this at AudioPlayer) { it?.let { updateProgress(it) } }
playlistModel.speed.observe(this at AudioPlayer) { showChips() }
playlistAdapter.setModel(playlistModel)
More information about the Android
mailing list