started a more proper implementation of the player
This commit is contained in:
parent
d902f19d35
commit
fbc040c317
6 changed files with 231 additions and 50 deletions
26
src/features/player/controls/seekBar.tsx
Normal file
26
src/features/player/controls/seekBar.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Component } from "solid-js";
|
||||
|
||||
interface SeekBarProps {
|
||||
video: HTMLVideoElement | undefined;
|
||||
}
|
||||
|
||||
export const SeekBar: Component<SeekBarProps> = () => {
|
||||
return (
|
||||
<>
|
||||
<input
|
||||
list="chapters"
|
||||
type="range"
|
||||
max={duration().toFixed(0)}
|
||||
value={currentTime().toFixed(0)}
|
||||
oninput={(e) => setTime(e.target.valueAsNumber)}
|
||||
step="1"
|
||||
/>
|
||||
|
||||
<datalist id="chapters">
|
||||
<option value="100">Chapter 1</option>
|
||||
<option value="200">Chapter 2</option>
|
||||
<option value="300">Chapter 3</option>
|
||||
</datalist>
|
||||
</>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue