aboutsummaryrefslogtreecommitdiff
path: root/pages/editor.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'pages/editor.tsx')
-rw-r--r--pages/editor.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx
index 81a0c66..cb68601 100644
--- a/pages/editor.tsx
+++ b/pages/editor.tsx
@@ -63,10 +63,9 @@ function TimelineEditor(props: {
var canvas = document.getElementById('timeScaleCanvas') as HTMLCanvasElement;
var ctx = canvas.getContext('2d');
- function onframe(frame: number) {
- setFrame(frame);
- }
- props.player.onframe = onframe;
+ props.player.addEventListener('TimedVideoPlayerOnFrame', (event: CustomEvent) => {
+ setFrame(event.detail);
+ });
var css = (varname: string) => getComputedStyle(document.body).getPropertyValue(varname).trim();
var baseColor = css('--c100');