started on attempting to implement trailers for the hero element

This commit is contained in:
Chris Kruining 2025-06-16 16:33:04 +02:00
parent b5306d1d11
commit f3cb35653e
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
2 changed files with 11 additions and 2 deletions

View file

@ -30,7 +30,15 @@ const Page: Component<{ entry: Entry }> = (props) => {
</a> </a>
<img src={props.entry.thumbnail} class={css.thumbnail} /> <img src={props.entry.thumbnail} class={css.thumbnail} />
<img src={props.entry.image} class={css.background} /> {/* <img src={props.entry.image} class={css.background} /> */}
<video
class={css.background}
src={props.entry.trailer}
poster={props.entry.image}
muted
autoplay
/>
<span class={css.detail}> <span class={css.detail}>
{props.entry.releaseDate} {props.entry.releaseDate}

View file

@ -396,6 +396,7 @@ const toEntry = (item: components['schemas']['BaseItemDto']): Entry => {
image: new URL(`/Items/${item.Id}/Images/Backdrop`, getBaseUrl()), image: new URL(`/Items/${item.Id}/Images/Backdrop`, getBaseUrl()),
providers: { providers: {
jellyfin: item.Id jellyfin: item.Id
} },
trailer: item.RemoteTrailers?.at(-1)?.Url ?? undefined,
}; };
}; };