Show Google Cast streaming quality setting on Chromecast-capable builds (#2065)

This commit is contained in:
JDStriker456
2026-07-07 13:13:51 +02:00
committed by GitHub
parent e9673e7360
commit 07c2f16324
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -153,7 +153,11 @@ window.NativeShell.AppHost = {
return "mobile";
},
supports(command) {
return features.includes(command.toLowerCase());
command = command.toLowerCase();
if (command === "chromecast") {
return window.NativeInterface.hasChromecast();
}
return features.includes(command);
},
getDeviceProfile,
getSyncProfile: getDeviceProfile,
@@ -6,6 +6,7 @@ import android.content.Intent
import android.media.session.PlaybackState
import android.webkit.JavascriptInterface
import androidx.core.content.ContextCompat
import org.jellyfin.mobile.BuildConfig
import org.jellyfin.mobile.events.ActivityEvent
import org.jellyfin.mobile.events.ActivityEventHandler
import org.jellyfin.mobile.player.deviceprofile.DeviceProfileBuilder
@@ -65,6 +66,9 @@ class NativeInterface(private val context: Context) : KoinComponent {
@JavascriptInterface
fun getCodecCapabilities(): String = deviceProfileBuilder.getWebCodecCapabilitiesJson()
@JavascriptInterface
fun hasChromecast(): Boolean = BuildConfig.IS_PROPRIETARY
@JavascriptInterface
fun enableFullscreen(): Boolean {
emitEvent(ActivityEvent.ChangeFullscreen(true))