/** * Casting Player Title Area * Fixed title bar: item title and optional grey episode/season info. */ import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; import type { TFunction } from "i18next"; import { View } from "react-native"; import { Text } from "@/components/common/Text"; import { truncateTitle } from "@/utils/casting/helpers"; interface CastPlayerTitleProps { /** Top safe-area inset, used to offset the fixed title area. */ insetTop: number; /** The currently playing item. */ currentItem: BaseItemDto; /** Translation function. */ t: TFunction; } export function CastPlayerTitle({ insetTop, currentItem, t, }: CastPlayerTitleProps) { return ( {/* Title */} {truncateTitle(currentItem.Name || t("casting_player.unknown"), 50)} {/* Grey episode/season info */} {currentItem.Type === "Episode" && currentItem.ParentIndexNumber !== undefined && currentItem.IndexNumber !== undefined && ( {t("casting_player.season_episode_format", { season: currentItem.ParentIndexNumber, episode: currentItem.IndexNumber, })} )} ); }