mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 10:37:03 -06:00
Media: engine requests resolve on the editor's slide (#994)
The media.* commands look the shape id up on the editor's current slide, so the request has to be carried out against that slide too. Passing the show's slide instead could play another slide's clip under a repeated id. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1347,8 +1347,8 @@ impl SlideApp {
|
||||
}
|
||||
UiRequest::Media { action, shape, ms } => {
|
||||
let owner = if self.show.is_some() { media::Owner::Show } else { media::Owner::Editor };
|
||||
let shown = self.show.as_ref().map(|s| s.state.slide);
|
||||
if let Some((uid, doc, slide)) = self.session.active().map(|d| (d.uid, d.doc.clone(), shown.unwrap_or(d.selection.slide))) {
|
||||
// The command resolved `shape` on the editor's slide, also while a show runs.
|
||||
if let Some((uid, doc, slide)) = self.session.active().map(|d| (d.uid, d.doc.clone(), d.selection.slide)) {
|
||||
self.media.request(uid, &doc, slide, &action, shape, ms, owner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user