aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/slideprops.tsx6
-rw-r--r--pages/present.tsx4
2 files changed, 8 insertions, 2 deletions
diff --git a/components/slideprops.tsx b/components/slideprops.tsx
index 0b0ee5f..57b9230 100644
--- a/components/slideprops.tsx
+++ b/components/slideprops.tsx
@@ -105,6 +105,12 @@ export default function SlideProperties(props: SlidePropertiesPropsType) {
variant='filled'
type='number'
label='Factor'
+ value={(props.slide as State<speedChangeSlide>).newFramerate.get()
+ / props.player.project.video.framerate}
+ onChange={event =>
+ updateProp<speedChangeSlide>('newFramerate')(
+ Number(event.target.value) * props.player.project.video.framerate,
+ )}
/>
</>,
}[props.slide.value.type]}
diff --git a/pages/present.tsx b/pages/present.tsx
index 2757cc5..190feb7 100644
--- a/pages/present.tsx
+++ b/pages/present.tsx
@@ -71,7 +71,7 @@ export class TimedVideoPlayer {
if (previousSlide.type != 'speedChange') {
continue;
}
- return this.project?.video?.framerate / (previousSlide as speedChangeSlide).newFramerate;
+ return (previousSlide as speedChangeSlide).newFramerate / this.project?.video?.framerate;
}
return 1;
}
@@ -96,7 +96,7 @@ export class TimedVideoPlayer {
this.slide++;
var event = new CustomEvent('TimedVideoPlayerSlide', { detail: this.timeline[this.slide] });
this.dispatchEvent(event);
- this.player.playbackRate = this.project?.video?.framerate / (slide as speedChangeSlide).newFramerate;
+ this.player.playbackRate = (slide as speedChangeSlide).newFramerate / this.project?.video?.framerate;
break;
}
default: {