mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-18 17:18:11 +00:00
feat: share selected playback options to chromecast
This commit is contained in:
@@ -145,6 +145,7 @@ export const PlayButton: React.FC<Props> = ({
|
||||
client,
|
||||
item,
|
||||
contentUrl: data.url,
|
||||
playbackOptions: selectedOptions,
|
||||
images: [
|
||||
{
|
||||
url: getParentBackdropImageUrl({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { SelectedOptions } from "@/components/ItemContent";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { RemoteMediaClient, WebImage } from "react-native-google-cast";
|
||||
|
||||
@@ -6,18 +7,23 @@ export function chromecastLoadMedia({
|
||||
item,
|
||||
contentUrl,
|
||||
images,
|
||||
playbackOptions,
|
||||
}: {
|
||||
client: RemoteMediaClient;
|
||||
item: BaseItemDto;
|
||||
contentUrl: string;
|
||||
images: WebImage[];
|
||||
playbackOptions: SelectedOptions;
|
||||
}) {
|
||||
return client.loadMedia({
|
||||
mediaInfo: {
|
||||
contentId: item.Id,
|
||||
contentUrl,
|
||||
contentType: "video/mp4",
|
||||
customData: item,
|
||||
customData: {
|
||||
item,
|
||||
playbackOptions,
|
||||
},
|
||||
metadata:
|
||||
item.Type === "Episode"
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user