woooot, got streaming via the jellyfin api working!

This commit is contained in:
Chris Kruining 2025-05-28 13:16:54 +02:00
parent 826a30f95f
commit d96f89d4b3
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
21 changed files with 282 additions and 169 deletions

View file

@ -0,0 +1,15 @@
import { Component, Show } from "solid-js";
import { useVideo } from "../context";
import { FaSolidCompress, FaSolidExpand } from "solid-icons/fa";
export const Fullscreen: Component<{}> = (props) => {
const video = useVideo();
return (
<button onclick={(e) => video.setFullscreen((last) => !last)}>
<Show when={video.fullscreen()} fallback={<FaSolidExpand />}>
<FaSolidCompress />
</Show>
</button>
);
};

View file

@ -1,13 +0,0 @@
.play {
font-size: var(--size-7);
text-shadow: 0 0 .5rem #000;
aspect-ratio: 1;
background-color: transparent;
border-radius: var(--radius-2);
transition: background-color .2s var(--ease-in-out-1);
&:hover {
background-color: rgba(from var(--gray-2) r g b / .25);
}
}

View file

@ -1,14 +1,12 @@
import { Component, Show } from "solid-js";
import { useVideo } from "../context";
import { FaSolidPause, FaSolidPlay } from "solid-icons/fa";
import css from "./playState.module.css";
export const PlayState: Component<{}> = (props) => {
const video = useVideo();
return (
<button
class={css.play}
onclick={(e) =>
video.state.setState((last) =>
last === "playing" ? "paused" : "playing"

View file

@ -0,0 +1,19 @@
import { Component } from "solid-js";
import { useVideo } from "../context";
import { FaSolidEllipsisVertical } from "solid-icons/fa";
export const Settings: Component<{}> = (props) => {
const video = useVideo();
return (
<button
onclick={(e) =>
video.state.setState((last) =>
last === "playing" ? "paused" : "playing"
)
}
>
<FaSolidEllipsisVertical />
</button>
);
};

View file

@ -1,13 +1,9 @@
import { Component, Show } from "solid-js";
import css from "./volume.module.css";
import { useVideo } from "../context";
import { FaSolidVolumeOff, FaSolidVolumeXmark } from "solid-icons/fa";
import css from "./volume.module.css";
interface VolumeProps {
value: number;
muted?: boolean;
onInput?: (next: { volume: number; muted: boolean }) => any;
}
interface VolumeProps {}
export const Volume: Component<VolumeProps> = (props) => {
const video = useVideo();