[Android] Remote access: populate the track info in the now playing data
Nicolas Pomepuy
git at videolan.org
Wed Sep 9 06:43:36 UTC 2026
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug 31 13:12:01 2026 +0200| [225612d9899a5db524975cd9df6f2bce712eef1f] | committer: Duncan McNamara
Remote access: populate the track info in the now playing data
> https://code.videolan.org/videolan/vlc-android/commit/225612d9899a5db524975cd9df6f2bce712eef1f
---
.../java/org/videolan/vlc/remoteaccessserver/RemoteAccessServer.kt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessServer.kt b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessServer.kt
index a44ec965ff..9598d3db2f 100644
--- a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessServer.kt
+++ b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessServer.kt
@@ -775,9 +775,14 @@ class RemoteAccessServer(private val context: Context) : PlaybackService.Callbac
val isVideoPlaying = service.playlistManager.player.isVideoPlaying()
val waitForMediaEnd = service.waitForMediaEnd
val resetOnInteraction = service.resetOnInteraction
+ val audioTracks = service.audioTracks?.map { WSTrack(it.getId(), it.getName()) } ?: listOf()
+ val currentAudioTrack = service.audioTrack
+ val subtitleTracks = service.spuTracks?.map { WSTrack(it.getId(), it.getName()) } ?: listOf()
+ val currentSubtitleTrack = service.spuTrack
val nowPlaying = NowPlaying(media.title ?: "", media.artistName
?: "", service.isPlaying, isVideoPlaying, service.getTime(), service.length, media.id, media.artworkURL
- ?: "", media.uri.toString(), getVolume(), speed, sleepTimer, waitForMediaEnd, resetOnInteraction, service.isShuffling, service.repeatType, bookmarks = bookmarks.map { WSBookmark(it.id, it.title, it.time) }, chapters = chapters.map { WSChapter(it.name, it.duration) })
+ ?: "", media.uri.toString(), getVolume(), speed, sleepTimer, waitForMediaEnd, resetOnInteraction, service.isShuffling, service.repeatType, bookmarks = bookmarks.map { WSBookmark(it.id, it.title, it.time) }, chapters = chapters.map { WSChapter(it.name, it.duration) },
+ audioTracks = audioTracks, currentAudioTrack = currentAudioTrack, subtitleTracks = subtitleTracks, currentSubtitleTrack = currentSubtitleTrack)
return nowPlaying
}
More information about the Android
mailing list