worked on various things

This commit is contained in:
Chris Kruining 2025-06-17 16:13:40 +02:00
parent f3cb35653e
commit 3c35b89250
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
18 changed files with 156 additions and 126 deletions

View file

@ -1,4 +1,4 @@
import { Component } from "solid-js";
import { Component, createEffect, on } from "solid-js";
import { useVideo } from "../context";
import css from "./seekBar.module.css";
@ -7,6 +7,15 @@ interface SeekBarProps {}
export const SeekBar: Component<SeekBarProps> = () => {
const video = useVideo();
createEffect(
on(
() => [video.duration(), video.buffered(), video.currentTime()] as const,
([duration, buffered, currentTime]) => {
console.log({ duration, buffered, currentTime });
}
)
);
return (
<div class={css.container}>
<span class={css.time}>{formatTime(video.currentTime())}</span>