[Android] RemoteAccess: start videoplayback based on setting

Duncan McNamara git at videolan.org
Wed Sep 18 07:17:25 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Mon Sep 16 18:43:52 2024 +0200| [6d3c5cdbbe143cd1805f9361fa283992e290bc0d] | committer: Duncan McNamara

RemoteAccess: start videoplayback based on setting

> https://code.videolan.org/videolan/vlc-android/commit/6d3c5cdbbe143cd1805f9361fa283992e290bc0d
---

 .../src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt b/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
index e267ca00fc..71ea35073b 100644
--- a/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
+++ b/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
@@ -967,7 +967,7 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
                         return at get
                     }
                     if (asAudio) medias[0].addFlags(MediaWrapper.MEDIA_FORCE_AUDIO)
-                    if (medias[0].type == MediaWrapper.TYPE_VIDEO && !appContext.awaitAppIsForegroung()) {
+                    if (medias[0].type == MediaWrapper.TYPE_VIDEO && !appContext.awaitAppIsForegroung() && settings.getString("video_action_switch", "0") != "1") {
                         call.respond(HttpStatusCode.Forbidden, appContext.getString(R.string.ra_not_in_foreground))
                         return at get
                     }



More information about the Android mailing list