aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/editor.tsx30
-rw-r--r--pages/present.tsx3
2 files changed, 27 insertions, 6 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>
diff --git a/pages/present.tsx b/pages/present.tsx
index 2ad8f72..df32e60 100644
--- a/pages/present.tsx
+++ b/pages/present.tsx
@@ -197,8 +197,6 @@ export class TimedVideoPlayer {
if (!this.player.paused && this.frame < slide?.frame) {
this.skip();
}
-
- this.player.play();
}
previous() {
@@ -258,6 +256,7 @@ export default function Present() {
className='control next'
onClick={() => {
player.next();
+ player.player.play();
rerender();
}}
/>