worked on various things
This commit is contained in:
parent
f3cb35653e
commit
3c35b89250
18 changed files with 156 additions and 126 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue