fix: chromecast

This commit is contained in:
Fredrik Burmester
2025-02-23 14:35:00 +01:00
parent daf7f35196
commit 8e0e35afe3
8 changed files with 185 additions and 63 deletions

View File

@@ -6,6 +6,7 @@ import {
PlaybackInfoResponse,
} from "@jellyfin/sdk/lib/generated-client/models";
import { getMediaInfoApi } from "@jellyfin/sdk/lib/utils/api";
import { Alert } from "react-native";
export const getStreamUrl = async ({
api,
@@ -80,7 +81,6 @@ export const getStreamUrl = async ({
const res2 = await getMediaInfoApi(api).getPlaybackInfo(
{
userId,
itemId: item.Id!,
},
{
@@ -148,4 +148,8 @@ export const getStreamUrl = async ({
};
}
}
Alert.alert("Error", "Could not play this item");
return null;
};