aboutsummaryrefslogtreecommitdiff
path: root/pages/editor.tsx
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-05-24 15:42:46 +0200
committerlonkaars <loek@pipeframe.xyz>2021-05-24 15:42:46 +0200
commit2d7acc472ee4f4a37556f41a0ea6ffec8b7b0e26 (patch)
tree92773668ed71c32b1c0bb52c53349b0de081171f /pages/editor.tsx
parent7469afab31ebfdd2d447c351d615b7c1d8e42c2e (diff)
player buttons working :tada:g
Diffstat (limited to 'pages/editor.tsx')
-rw-r--r--pages/editor.tsx30
1 files changed, 26 insertions, 4 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx
index 2deb6f5..95b6005 100644
--- a/pages/editor.tsx
+++ b/pages/editor.tsx
@@ -466,19 +466,41 @@ export default function Index() {
</div>
<div className='controls'>
<div className='posabs abscenter'>
- <Fab size='small' children={<SkipPreviousRoundedIcon />} />
+ <Fab
+ size='small'
+ children={<SkipPreviousRoundedIcon />}
+ onClick={() => {
+ player.slide = 0;
+ player.previous();
+ }}
+ />
<Fab
className='playPause'
size='medium'
- onClick={() => player.next()}
+ onClick={() => {
+ player.next();
+ player.player.play();
+ }}
children={<PlaySkipIconAni />}
style={{ '--ani-state': playing ? 'skip' : 'play' } as CSSProperties}
/>
<Fab size='small' children={<NavigateBeforeRoundedIcon />} onClick={() => player.previous()} />
- <Fab size='small' children={<NavigateNextRoundedIcon />} />
+ <Fab
+ size='small'
+ children={<NavigateNextRoundedIcon />}
+ onClick={() => {
+ player.next(); // TODO: fix jank here
+ player.next();
+ player.previous();
+ }}
+ />
</div>
<div className='posabs abscenterv r0'>
- <Fab size='small' children={<FullscreenRoundedIcon />} />
+ <Fab
+ size='small'
+ children={<FullscreenRoundedIcon />}
+ onClick={() => document.body.requestFullscreen()}
+ />
</div>
</div>
</div>