diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-07-25 12:46:45 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-07-25 12:46:45 +0200 |
commit | 4dcfd8efdd92b8c1b643e288d36ee531d2417ff5 (patch) | |
tree | f66200818a4b1afe7889b44177daca72d803bb2c /components/videosourcesettings.tsx | |
parent | 3d396c2a11784a755fa96bb5031250c5d3d52e9e (diff) |
rerender dummies
Diffstat (limited to 'components/videosourcesettings.tsx')
-rw-r--r-- | components/videosourcesettings.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/videosourcesettings.tsx b/components/videosourcesettings.tsx index 345aea1..9464cef 100644 --- a/components/videosourcesettings.tsx +++ b/components/videosourcesettings.tsx @@ -1,6 +1,6 @@ import { State } from '@hookstate/core'; import { useRef, useState } from 'react'; -import { globalState } from '../pages/editor'; +import { globalState, rerenderComponent } from '../pages/editor'; import { TimedVideoPlayer } from '../pages/present'; import { arrayBufferToBase64, LocalVideo } from '../project'; @@ -34,13 +34,14 @@ export function LocalVideoSettings(props: VideoSourceSettings) { reader.addEventListener('load', ev => { var video = ev.target.result as ArrayBuffer; props.settings.source = video; - props.settings.getVideoInfo(); props.settings.mimetype = file.type; props.player.loadVideo(arrayBufferToBase64(video, file.type)); props.global.update.refreshLiveTimeline.value(); - props.global.ready.video.set({ - available: true, - playable: true, + props.global.ready.video.available.set(true); + props.settings.getVideoInfo().then(() => { + props.global.ready.video.playable.set(true); + props.global.dummies.timeline.set(n => n + 1); + props.global.dummies.tools.set(n => n + 1); }); }); reader.readAsArrayBuffer(file); |