Skip to content

Commit

Permalink
fix video container size
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp committed Aug 24, 2024
1 parent 6389098 commit 9af0763
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
24 changes: 10 additions & 14 deletions src/YoutubePlayer/PlayerContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,18 @@ const PlayerContainer: Component<{
}

return (
<div class={cls("fixed inset-0 bg-primary-dark", visible() ? "visible" : "hidden")}>
<SimpleButton
class={"absolute top-1 right-1 z-10"}
size={"small"}
label={t("video.stop")}
icon={IconStop}
onClick={stop}
/>
<div ref={onPlayerElement} class="absolute inset-0 z-0 pb-32"></div>
<div class={cls("fixed inset-0 bg-primary-dark flex flex-col", visible() ? "visible" : "hidden")}>
<div ref={onPlayerElement} class="flex-1"></div>

{youtubeLink() != null && (
<div
class={
"absolute bottom-0 left-0 right-0 z-10 bg-secondary-darkest h-32 border-t-4 border-secondary-light text-secondary-light p-4"
}
>
<div class={"bg-secondary-darkest border-t-4 border-secondary-light text-secondary-light p-4 relative"}>
<SimpleButton
class={"absolute top-1 right-1 z-10"}
size={"small"}
label={t("video.stop")}
icon={IconStop}
onClick={stop}
/>
<div class={"h-8 p-1 truncate"}>
{t("video.source")}{" "}
<a href={youtubeLink()?.videoPackMetadata.source}>{youtubeLink()?.videoPackMetadata.name}</a>
Expand Down
1 change: 0 additions & 1 deletion src/YoutubePlayer/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export async function loadYoutubeAdapter(container: HTMLDivElement): Promise<You
playerVars: {
rel: 0,
autoplay: 0,
// modestbranding: 1,
controls: 1,
},
});
Expand Down

0 comments on commit 9af0763

Please sign in to comment.