mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-03 05:10:27 +03:00
Show Google Cast streaming quality setting on Chromecast-capable builds (#2065)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user