ensure video is paused at start of video_editor

This commit is contained in:
Chris Cochrun 2025-09-30 05:57:25 -05:00
parent 19e8fbcc35
commit 076a75e3c2

View file

@ -52,7 +52,7 @@ impl VideoEditor {
pub fn update(&mut self, message: Message) -> Action { pub fn update(&mut self, message: Message) -> Action {
match message { match message {
Message::ChangeVideo(video) => { Message::ChangeVideo(video) => {
let Ok(player_video) = Url::from_file_path( let Ok(mut player_video) = Url::from_file_path(
video.path.clone(), video.path.clone(),
) )
.map(|url| Video::new(&url).expect("Should be here")) else { .map(|url| Video::new(&url).expect("Should be here")) else {
@ -61,7 +61,7 @@ impl VideoEditor {
self.core_video = Some(video); self.core_video = Some(video);
return Action::None; return Action::None;
}; };
player_video.set_paused(true);
self.video = Some(player_video); self.video = Some(player_video);
self.title = video.title.clone(); self.title = video.title.clone();
self.core_video = Some(video.clone()); self.core_video = Some(video.clone());