Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc-android
  • thresh/vlc-android
  • Dekans/vlc-android
  • robUx4/vlc-android
  • tguillem/vlc-android
  • Corbax/vlc-android
  • judeosby/vlc-android
  • chouquette/vlc-android
  • washingtonmurphy93/vlc-android
  • wipawanbeadklang540/vlc-android
  • xcorail/vlc-android
  • Aza/vlc-android
  • Skantes/vlc-android
  • filipjares/vlc-android
  • kazemihabib/vlc-android
  • amq10x/vlc-android
  • qadrian370/vlc-android
  • shivanshs9/vlc-android
  • vitaliyg2/vlc-android
  • orgads/vlc-android
  • rom1v/vlc-android
  • evidence/vlc-android
  • lk888/vlc-android
  • Klaus81/vlc-android
  • EwoutH/vlc-android
  • XilasZ/vlc-android
  • pawelpablo1975/vlc-android
  • uae2ae/vlc-android
  • Garf/vlc-android
  • abetatsunori7/vlc-android
  • ePirat/vlc-android
  • magsoft/vlc-android
  • quink/vlc-android
  • Ektos974/vlc-android
  • CymGen30/vlc-android
  • b1ue/vlc-android
  • alessiavalenti8/vlc-android
  • bars27101982/vlc-android
  • billybanda18/vlc-android
  • dklvip/vlc-android
  • sherylynn/vlc-android
  • ramcoach5/vlc-android
  • takise/vlc-android
  • peibolovedie/vlc-android
  • AMHeijboer/vlc-android
  • dahburj/vlc-android
  • gobennyb/vlc-android
  • masripmasrip824/vlc-android
  • bubu/vlc-android
  • tmk907/vlc-android
  • gorbahaaa/vlc-android
  • govind3321/vlc-android
  • jamieboyer42818/vlc-android
  • mrtakilapop/vlc-android
  • kazikarter90/vlc-android
  • chunyie771/vlc-android
  • nop404/vlc-android
  • hcalzazperz/vlc-android
  • zagwojtek69/vlc-android
  • nikonnick24/vlc-android
  • gmohiuddin215/vlc-android
  • stheinthan31/vlc-android
  • rogelioloreto29/vlc-android
  • philippestcyr5/vlc-android
  • Happyheather20/vlc-android
  • jimbobmcgee/vlc-android
  • mohwie/vlc-android
  • HeartBeat1608/vlc-android
  • jahan/vlc-android
  • Kevo1987/vlc-android
  • rrangel3584/vlc-android
  • xfridrich/vlc-android
  • devswami23/vlc-android
  • Isira-Seneviratne/vlc-android
  • PartyPhone22/vlc-android
  • kmajeshkrishnan/vlc-android
  • ramirotorresjr/vlc-android
  • aaronsalas469/vlc-android
  • arnan.np31/vlc-android
  • hkosacki/vlc-android
  • mg0691872/vlc-android
  • louregni/vlc-android
  • ritmapp/vlc-android
  • diegofn/vlc-android
  • s-ayush2903/vlc-android
  • chrisbohn1984/vlc-android
  • alexandre-janniaux/vlc-android
  • optimumpr/vlc-android
  • chirag-jn/vlc-android
  • e9ab98e991ab/vlc-android
  • suvDev/vlc-android
  • killthelord/vlc-android
  • Phoenix/vlc-android
  • soriyallc/vlc-android
  • tda1009/vlc-android
  • rhstone/vlc-android
  • ltnokiago/vlc-android
  • elbrujo1987/vlc-android
  • m1s4k1/vlc-android
  • mdc/vlc-android
  • arnaudj/vlc-android
  • abhinavmarwaha/vlc-android
  • dali546/vlc-android
  • Jeffset/vlc-android
  • megan30/vlc-android
  • lizhengdao/vlc-android
  • YajTPG/vlc-android
  • halcyon/vlc-android
  • ilya.yanok/vlc-android
  • jeramydhallmon/vlc-android
  • tijoemecano77/vlc-android
  • cjcj125125/vlc-android
  • dejan2609/vlc-android
  • JATIN2111999/vlc-android
  • imrohitkumar/vlc-android
  • sagudev/vlc-android
  • ILoveLin/vlc-android
  • tfighiera/vlc-android
  • snehil101/vlc-android
  • MKornelsen/vlc-android
  • m/vlc-android
  • core1024/vlc-android
  • vadimdolgachev/vlc-android
  • Kk77539/vlc-android
  • linzj/vlc-android
  • dantalian-pv/vlc-android
  • admkhalid/vlc-android
  • yaron/vlc-android
  • kn21091974/vlc-android
  • mylove1302/vlc-android
  • roblav96/vlc-android
  • alabiaga/vlc-android
  • kmnaveen101/vlc-android
  • nikiforoff1407/vlc-android
  • Android-Jester/vlc-android
  • frieda.rtwski/vlc-android
  • glaciers7506/vlc-android
  • rahul-gill/vlc-android
  • gaoxugang/vlc-android
  • Rishavgupta12345/vlc-android
  • dinho991556460/vlc-android
  • lighterowl/vlc-android
  • mary-kate/vlc-android
  • adnank20216/vlc-android
  • anthonylgutierrez79/vlc-android
  • Heliottw/vlc-android
  • mu1zix.ft3/vlc-android
  • yvesmaltais1212/vlc-android
  • ereme/vlc-android
  • jhonypalomino829/vlc-android
  • mx1up/vlc-android
  • sjwaddy/vlc-android
  • MohitMandalia/vlc-android
  • temaershov/vlc-android
  • js6pak/vlc-android
  • mishikallu/vlc-android
  • irfanmumtaz008/vlc-android
  • smurfohrachie/vlc-android
  • Goooler/vlc-android
  • eldo203050/vlc-android
  • dejesuszeus99/vlc-android
  • mfkl/vlc-android
  • Samfun75/vlc-android
  • markg85/vlc-android-ipfs
  • doktamelek911/vlc-android
  • wikwity/vlc-android
  • aangelmaker/vlc-android
  • krawczykradek119/vlc-android
  • ylz18180813163/vlc-android
  • galaxy9sx3/vlc-android
  • huajie2020/vlc-android
  • XuanTung95/vlc-android
  • kl/vlc-android
  • melihyolcu83/vlc-android
  • rt1shnik/vlc-android
  • jerryboy307/vlc-android
  • ikeuzochukwu6/vlc-android
  • patrikgolis/vlc-android
  • Ismavv/vlc-android
  • clementosumo/vlc-android
  • joshlamp66/vlc-android
  • nkmoyonyathiericyounge/vlc-android
  • DanTm99/vlc-android
  • Jeffrow41/vlc-android
  • fromphfr/vlc-android
  • 16project/vlc-android
  • Tomas8874/vlc-android
  • fixxxer87/vlc-android
  • sanjay/vlc-android
  • franciscojrp/vlc-android
  • cashellauswaus23/vlc-android
  • hengwu0/vlc-android
  • naythu2020rain/vlc-android
  • TongtengInhole/vlc-android
  • pupdoggy666/vlc-android
  • jcj921013/vlc-android
  • Gc6026/vlc-android
  • crijojc/vlc-android
  • mdrewight/vlc-android
  • davidhaywood0782/vlc-android
  • jbschtt/vlc-android
  • macfarlandcamel/vlc-android
  • syazairi/vlc-android
  • Commander01/vlc-android
  • baileyterry014/vlc-android
  • rodrickfranklin38/vlc-android
  • diego1245hernb/vlc-android
  • anton.canada/vlc-android
  • egazaekb/vlc-android
  • Marissa111113/vlc-android
  • jeinerbruno2/vlc-android
  • wehnie13/vlc-android
  • ozill87/vlc-android
  • legionfso/vlc-android
  • anazahirajoel/vlc-android
  • naomirojas1227/vlc-android
  • xbao/vlc-android
  • antoni.kozubek/vlc-android
  • pajela8482/vlc-android
  • karlfandango55/vlc-android
  • ruanbester07/vlc-android
  • chigita73/vlc-android
  • giu.pat6/vlc-android
  • Aura/vlc-android
  • marcwabo/vlc-android
  • contact.adgrafix/vlc-android
  • exlaverdad/vlc-android
  • simon.marquis88/vlc-android
  • youngkinsamantha421/vlc-android
  • edgard1161/vlc-android
  • agzx77/vlc-android
  • ha7204993/vlc-android
  • alghazwani.jar.6090/vlc-android
  • zrowton1206/vlc-android
  • darek1979513/vlc-android
  • matthiaskett18198/vlc-android
  • kubadyr77/vlc-android
  • romanstudeny1982/vlc-android
  • kumar107375/vlc-android
  • schong0525/vlc-android
  • Kt/vlc-android
  • jovelyn.esconde125/vlc-android
  • corriemacbarnard/vlc-android
  • apisbg91/vlc-android
  • yyusea/vlc-android
  • protechq88/vlc-android
  • rmangaraman/vlc-android
  • soutomikel/vlc-android
  • goregladaleksej5/vlc-android
  • tao/vlc-android
  • aruiz595/vlc-android
  • horvathpeter1202/vlc-android
  • litteh82/vlc-android
  • kerriochoa96/vlc-android
  • skshemul2022/vlc-android
  • popy/vlc-android
  • mizadpanahdev/vlc-android
  • pinarim2035/vlc-android
  • davidgooch1127/vlc-android
  • NyanCatTW1/vlc-android
  • Pendynurcahyo/vlc-android
  • fcartegnie/vlc-android
  • xiaoxiao921/vlc-android
  • rjtoell/vlc-android
  • devanshu6445/vlc-android
  • DopeDo69/vlc-android
  • quimsical/vlc-android
  • nickita.koltsoff/vlc-android
  • zeestander8617/vlc-android
  • alexsonarin06/vlc-android
  • minh189999h/vlc-android
  • JonnycatMeow/vlc-android
  • pup.ragnarok.1984/vlc-android2
  • jlcalderon13/vlc-android
  • franciszekk51214/vlc-android
  • yinsheng996/vlc-android
  • KenN3RD/vlc-android
  • leogps/vlc-android
  • alicuteo0407/vlc-android
  • MessirVoland/vlc-android
  • brett2uk/vlc-android
  • thomas.hermes/vlc-android
  • dgyudin/vlc-android
  • anuoshemohammad/vlc-android
  • r7truong/vlc-android
  • aaa1115910/vlc-android
  • arunkennedy78/vlc-android
  • nicholaszarra0069/vlc-android
  • georgipetrovdochev/vlc-android
  • Nikhil-z/vlc-android
  • misb1033/vlc-android
  • ktcoooot1/vlc-android
  • manmuc5/vlc-android
  • ahwhatisinttaken/vlc-android
  • m.nozka90/vlc-android
  • kabeermuhammad124319/vlc-android
  • ANGELONCE/vlc-android
  • manstabuk/vlc-android
  • yajcoca/vlc-android
  • dreamscell83/vlc-android
  • oldsssteveo/vlc-android
  • c0ff330k/vlc-android
  • ZhangXinmin528/vlc-android
  • lacsimarnald09/vlc-android
  • boykaisaac758/vlc-android
  • ooseidesmond/vlc-android
  • andresbott/vlc-android
  • yolandawanttoplay/vlc-android
  • lapaz17/vlc-android
  • sillyearl0138/vlc-android
  • NF-Repo/vlc-android
  • aaasg4001/vlc-android
  • mongia.puneet/vlc-android
  • slablaykon/vlc-android
  • Shabgardtanha1111/vlc-android
  • Benjamin_Loison/vlc-android
  • ashishami2002/vlc-android
  • Niram7777/vlc-android
  • Yashraj254/vlc-android
  • Choucroute_melba/vlc-android
  • Soete/vlc-android
  • MangalK/vlc-android
  • mohak2003/vlc-android
  • advait-0/vlc-android
  • McLP/vlc-android
  • fhuber/vlc-android
  • sami-sweng/vlc-android
  • josiahcarlson/vlc-android
  • mzych/vlc-android
329 results
Show changes
Commits on Source (45)
Showing
with 249 additions and 92 deletions
Changes between 3.6.2 and 3.6.3:
------------------
* Fix SMB navigation
* Cast only audio setting
* Behavior and crash fixes
Changes between 3.6.1 and 3.6.2:
------------------
* Update the remote access dependency to fix a crash loop
......
......@@ -162,12 +162,9 @@ android {
dependencies {
implementation project(':application:vlc-android')
implementation project(':application:television')
devImplementation project(':application:webserver')
debugImplementation project(':application:webserver')
releaseImplementation "org.videolan.android:remote-access:$rootProject.ext.remoteAccessVersion"
vlcBundleImplementation "org.videolan.android:remote-access:$rootProject.ext.remoteAccessVersion"
implementation project(':application:remote-access-server')
testImplementation project(':application:television')
testImplementation project(':application:webserver')
testImplementation project(':application:remote-access-server')
androidTestImplementation "androidx.test.espresso:espresso-contrib:$rootProject.espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
......
/*
* ************************************************************************
* build.gradle
* *************************************************************************
* Copyright © 2025 VLC authors and VideoLAN
* Author: Nicolas POMEPUY
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* **************************************************************************
*
*
*/
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'com.vanniktech.maven.publish'
}
ext {
library_version = "$rootProject.ext.remoteAccessVersion"
}
android {
namespace 'org.videolan.vlc.remoteaccessclient'
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdk rootProject.ext.compileSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
resValue "string", "build_remote_access_revision", remoteAccessRevision()
resValue "string", "remote_access_version", remoteAccessVersion()
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
task webCopy(type: Copy) {
from 'remoteaccess/dist'
into 'assets/dist'
}
sourceSets.main {
assets.srcDirs = ['assets']
}
sourceSets.main {
assets.srcDirs = ['assets']
}
// Make per-variant version code
libraryVariants.all { variant ->
//Custom APK name
variant.outputs.each { output ->
if (output.outputFileName != null && output.outputFileName.endsWith('.aar')) {
output.outputFileName = "vlc-android-remote-access-${library_version}.aar"
}
}
}
}
preBuild.dependsOn(webCopy)
def remoteAccessVersion() {
def code = new ByteArrayOutputStream()
try {
if (file("remoteaccess/package.json").exists()) {
exec {
commandLine = ['bash', '-c', 'grep -m1 "version" remoteaccess/package.json']
standardOutput = code
}
return code.toString().split("\"")[3]
}
} catch (Exception e) {
}
return "unknown"
}
def remoteAccessRevision() {
try {
def hash = new ByteArrayOutputStream()
exec {
commandLine = ['bash', '-c', 'git -C remoteaccess rev-parse --short HEAD']
standardOutput = hash
}
return hash.toString()
} catch (Exception e) {
}
return "unknown"
}
dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
apply from: '../../buildsystem/publish.gradle'
......@@ -2,7 +2,7 @@
# *************************************************************************
# gradle.properties
# **************************************************************************
# Copyright © 2024 VLC authors and VideoLAN
# Copyright © 2025 VLC authors and VideoLAN
# Author: Nicolas POMEPUY
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -28,4 +28,4 @@ POM_ARTIFACT_ID=remote-access
POM_NAME=VLC-Android-RemoteAccess
POM_DESCRIPTION=Android port of VLC's Remote Access
POM_INCEPTION_YEAR=2021
\ No newline at end of file
POM_INCEPTION_YEAR=2024
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ *************************************************************************
~ AndroidManifest.xml
~ **************************************************************************
~ Copyright © 2025 VLC authors and VideoLAN
~ Author: Nicolas POMEPUY
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
~ ***************************************************************************
~
~
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'com.vanniktech.maven.publish'
}
ext {
library_version = "$rootProject.ext.remoteAccessVersion"
}
android {
namespace 'org.videolan.vlc.webserver'
namespace 'org.videolan.vlc.remoteaccessserver'
dataBinding {
enabled = true
......@@ -23,8 +19,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
buildConfigField 'Boolean', 'VLC_REMOTE_ACCESS_DEBUG', project.hasProperty("vlc_remote_access_debug") ? vlc_remote_access_debug : "false"
resValue "string", "build_remote_access_revision", remoteAccessRevision()
resValue "string", "remote_access_version", remoteAccessVersion()
}
......@@ -43,11 +37,6 @@ android {
}
}
task webCopy(type: Copy) {
from '../../remoteaccess/dist'
into 'assets/dist'
}
sourceSets.main {
assets.srcDirs = ['assets']
}
......@@ -68,56 +57,20 @@ android {
buildConfig true
}
// Make per-variant version code
libraryVariants.all { variant ->
//Custom APK name
variant.outputs.each { output ->
if (output.outputFileName != null && output.outputFileName.endsWith('.aar')) {
output.outputFileName = "vlc-android-remote-access-${library_version}.aar"
}
}
}
}
def remoteAccessVersion() {
def code = new ByteArrayOutputStream()
try {
if (file("../../remoteaccess/package.json").exists()) {
exec {
commandLine = ['bash', '-c', 'grep -m1 "version" ../../remoteaccess/package.json']
standardOutput = code
}
return code.toString().split("\"")[3]
}
} catch (Exception e) {
}
return "unknown"
}
def remoteAccessRevision() {
try {
def hash = new ByteArrayOutputStream()
exec {
commandLine = ['bash', '-c', 'git -C ../../remoteaccess rev-parse --short HEAD']
standardOutput = hash
}
return hash.toString()
} catch (Exception e) {
}
return "unknown"
}
preBuild.dependsOn(webCopy)
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
devImplementation project(':application:remote-access-client')
debugImplementation project(':application:remote-access-client')
releaseImplementation "org.videolan.android:remote-access:$rootProject.ext.remoteAccessVersion"
vlcBundleImplementation "org.videolan.android:remote-access:$rootProject.ext.remoteAccessVersion"
implementation project(':application:vlc-android')
implementation "io.ktor:ktor:$rootProject.ext.ktorVersion"
implementation "io.ktor:ktor-server-netty:$rootProject.ext.ktorVersion"
implementation "io.ktor:ktor-server-websockets:$rootProject.ext.ktorVersion"
implementation "io.ktor:ktor-server-caching-headers:$rootProject.ext.ktorVersion"
implementation "io.ktor:ktor-server-compression:$rootProject.ext.ktorVersion"
implementation "io.ktor:ktor-server-cors:$rootProject.ext.ktorVersion"
implementation("io.ktor:ktor-server-auth:$rootProject.ext.ktorVersion")
implementation("io.ktor:ktor-server-partial-content:$rootProject.ext.ktorVersion")
......@@ -130,6 +83,4 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
apply from: '../../buildsystem/publish.gradle'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
......@@ -22,7 +22,7 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
......@@ -43,6 +43,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("org.videolan.vlc.webserver.test", appContext.packageName)
assertEquals("org.videolan.vlc.remoteaccessserver.test", appContext.packageName)
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* ************************************************************************
* RemoteAccessOTP.kt
* *************************************************************************
* Copyright © 2023 VLC authors and VideoLAN
* Copyright © 2025 VLC authors and VideoLAN
* Author: Nicolas POMEPUY
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,14 +22,14 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import android.content.Context
import androidx.core.app.NotificationManagerCompat
import org.videolan.vlc.gui.helpers.NotificationHelper
import org.videolan.vlc.gui.helpers.REMOTE_ACCESS_CODE_ID
import org.videolan.vlc.webserver.ssl.SecretGenerator
import org.videolan.vlc.webserver.utils.CypherUtils
import org.videolan.vlc.remoteaccessserver.ssl.SecretGenerator
import org.videolan.vlc.remoteaccessserver.utils.CypherUtils
import java.security.SecureRandom
......
......@@ -2,7 +2,7 @@
* ************************************************************************
* RemoteAccessRouting.kt
* *************************************************************************
* Copyright © 2023 VLC authors and VideoLAN
* Copyright © 2025 VLC authors and VideoLAN
* Author: Nicolas POMEPUY
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +22,7 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import android.content.Context
import android.content.res.Resources
......@@ -107,6 +107,7 @@ import org.videolan.vlc.BuildConfig
import org.videolan.vlc.gui.dialogs.getPlaylistByName
import org.videolan.vlc.gui.helpers.AudioUtil
import org.videolan.vlc.gui.helpers.BitmapUtil
import org.videolan.vlc.gui.helpers.VectorDrawableUtil
import org.videolan.vlc.gui.helpers.getBitmapFromDrawable
import org.videolan.vlc.gui.helpers.getColoredBitmapFromColor
import org.videolan.vlc.gui.preferences.search.PreferenceParser
......@@ -131,16 +132,16 @@ import org.videolan.vlc.util.slugify
import org.videolan.vlc.util.toByteArray
import org.videolan.vlc.viewmodels.browser.FavoritesProvider
import org.videolan.vlc.viewmodels.browser.PathOperationDelegate
import org.videolan.vlc.webserver.RemoteAccessServer.Companion.getServerFiles
import org.videolan.vlc.webserver.RemoteAccessServer.PlayerStatus
import org.videolan.vlc.webserver.RemoteAccessSession.verifyLogin
import org.videolan.vlc.webserver.utils.MediaZipUtils
import org.videolan.vlc.webserver.utils.serveAudios
import org.videolan.vlc.webserver.utils.servePlaylists
import org.videolan.vlc.webserver.utils.serveSearch
import org.videolan.vlc.webserver.utils.serveVideos
import org.videolan.vlc.webserver.websockets.RemoteAccessWebSockets
import org.videolan.vlc.webserver.websockets.WSIncomingMessage
import org.videolan.vlc.remoteaccessserver.RemoteAccessServer.Companion.getServerFiles
import org.videolan.vlc.remoteaccessserver.RemoteAccessServer.PlayerStatus
import org.videolan.vlc.remoteaccessserver.RemoteAccessSession.verifyLogin
import org.videolan.vlc.remoteaccessserver.utils.MediaZipUtils
import org.videolan.vlc.remoteaccessserver.utils.serveAudios
import org.videolan.vlc.remoteaccessserver.utils.servePlaylists
import org.videolan.vlc.remoteaccessserver.utils.serveSearch
import org.videolan.vlc.remoteaccessserver.utils.serveVideos
import org.videolan.vlc.remoteaccessserver.websockets.RemoteAccessWebSockets
import org.videolan.vlc.remoteaccessserver.websockets.WSIncomingMessage
import java.io.BufferedWriter
import java.io.File
import java.io.FileNotFoundException
......@@ -275,7 +276,7 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
// Sends an icon
get("/icon") {
val idString = call.request.queryParameters["id"]
val width = call.request.queryParameters["width"]?.toInt() ?: 32
val width = call.request.queryParameters["width"]?.toInt()?.coerceAtLeast(1) ?: 32
val preventTint = call.request.queryParameters["preventTint"]?.toBoolean() ?: false
val id = try {
......@@ -289,6 +290,17 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
call.respond(HttpStatusCode.NotFound)
return@get
}
idString?.let {
try {
call.respondText(VectorDrawableUtil.convertToSvg(appContext, width, id, it), ContentType.Image.SVG)
return@get
} catch (e: Resources.NotFoundException) {
Log.w(this::class.java.simpleName, "Failed to convert vector drawable. ${e.message}", )
// Continue on and let BitmapUtil attempt to load the file
}
}
val bmp = if (preventTint)
BitmapUtil.vectorToBitmap(appContext, id, width, width)
else
......
......@@ -2,7 +2,7 @@
* ************************************************************************
* RemoteAccessServer.kt
* *************************************************************************
* Copyright © 2023 VLC authors and VideoLAN
* Copyright © 2025 VLC authors and VideoLAN
* Author: Nicolas POMEPUY
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +22,7 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import android.annotation.SuppressLint
import android.content.Context
......@@ -54,6 +54,9 @@ import io.ktor.server.netty.Netty
import io.ktor.server.netty.NettyApplicationEngine
import io.ktor.server.plugins.cachingheaders.CachingHeaders
import io.ktor.server.plugins.callloging.CallLogging
import io.ktor.server.plugins.compression.Compression
import io.ktor.server.plugins.compression.matchContentType
import io.ktor.server.plugins.compression.minimumSize
import io.ktor.server.plugins.cors.routing.CORS
import io.ktor.server.plugins.origin
import io.ktor.server.plugins.partialcontent.PartialContent
......@@ -112,9 +115,9 @@ import org.videolan.vlc.viewmodels.CallBackDelegate
import org.videolan.vlc.viewmodels.ICallBackHandler
import org.videolan.vlc.viewmodels.browser.IPathOperationDelegate
import org.videolan.vlc.viewmodels.browser.PathOperationDelegate
import org.videolan.vlc.webserver.ssl.SecretGenerator
import org.videolan.vlc.webserver.websockets.RemoteAccessWebSockets
import org.videolan.vlc.webserver.websockets.RemoteAccessWebSockets.setupWebSockets
import org.videolan.vlc.remoteaccessserver.ssl.SecretGenerator
import org.videolan.vlc.remoteaccessserver.websockets.RemoteAccessWebSockets
import org.videolan.vlc.remoteaccessserver.websockets.RemoteAccessWebSockets.setupWebSockets
import java.io.File
import java.math.BigInteger
import java.net.InetAddress
......@@ -492,6 +495,18 @@ class RemoteAccessServer(private val context: Context) : PlaybackService.Callbac
maxFrameSize = Long.MAX_VALUE
masking = false
}
install(Compression) {
default()
matchContentType(
ContentType.Text.Plain,
ContentType.Image.SVG,
ContentType.Text.CSS,
ContentType.Text.Xml,
ContentType.Text.Html,
ContentType.Text.JavaScript,
ContentType.Application.JavaScript
)
}
install(CachingHeaders) {
options { _, content ->
when (content.contentType?.withoutParameters()) {
......
......@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import android.annotation.SuppressLint
import android.app.ForegroundServiceStartNotAllowedException
......
......@@ -2,7 +2,7 @@
* ************************************************************************
* RemoteAccessSession.kt
* *************************************************************************
* Copyright © 2023 VLC authors and VideoLAN
* Copyright © 2025 VLC authors and VideoLAN
* Author: Nicolas POMEPUY
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +22,7 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
import android.content.SharedPreferences
import com.squareup.moshi.JsonAdapter
......@@ -36,7 +36,7 @@ import io.ktor.server.response.respond
import io.ktor.server.sessions.sessions
import io.ktor.util.pipeline.PipelineContext
import org.videolan.tools.putSingle
import org.videolan.vlc.webserver.ssl.SecretGenerator
import org.videolan.vlc.remoteaccessserver.ssl.SecretGenerator
private const val VALID_SESSIONS = "valid_sessions"
......
......@@ -22,7 +22,7 @@
*
*/
package org.videolan.vlc.webserver
package org.videolan.vlc.remoteaccessserver
/**
* Describe the sharing server status
......