Repository navigation
pptx: read media volume, mute, loop, hide and full screen from the timing tree (refs #1368) - #1465
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Parse media timing settings crates/pptx/src/read/timing.rs |
media_settings resolves video and audio timing targets and applies supported settings to matching media shapes. |
Wire slide import and test media settings crates/pptx/src/read.rs, crates/pptx/tests/it/main.rs, crates/pptx/tests/it/media_timing.rs |
read_slide calls media_settings when a slide has timing. Integration tests check imported media settings and defaults when settings are absent. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant read_slide
participant media_settings
participant IdCtx
participant Shapes
read_slide->>media_settings: timing element, shape context, mutable shapes
media_settings->>IdCtx: resolve cMediaNode target
IdCtx-->>media_settings: matching shape reference
media_settings->>Shapes: update media settings
Suggested reviewers: marcoarnulfo, aiongg
Merge Risk: 
Minimal · up to 964f4
-
No actionable issue is established for this change. The timing import can merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Landed on main, thank you @Harrison-Booth for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft |
Reads the media settings PowerPoint keeps in the slide's timing tree (part of #1368).
PowerPoint stores a video's or sound's volume, mute, Loop until Stopped, Hide While Not Playing and Play Full Screen on
p:video/p:audio>p:cMediaNode(vol,mute,showWhenStopped,p:cTn repeatCount) andfullScrn, not on the picture, soMediaClip::volumestayed 1 andloop_play,hide_while_not_playingandfull_screenstayed false after opening a file.timing::media_settingsnow copies them onto the target'sMediaClip(also inside groups). Absent attributes leave the existing defaults;mutegives volume 0.Not in this PR: handing a decoded video frame to the renderer (the
RenderOpts::video_frameshalf of the issue), and writing these settings back on save (the writer does not emitcMediaNodeyet).What ran:
cargo test -p deckcraft-pptxon Linux (all pass), including two new tests that splice a timing tree into an exported deck and read it back (crates/pptx/tests/it/media_timing.rs). I did not open the files in PowerPoint; the attribute meanings are taken from the issue and the schema.Refs #1368
Summary by CodeRabbit