manim-slides icon indicating copy to clipboard operation
manim-slides copied to clipboard

[FEATURE] Is it possible to create a slideshow with alternating images and videos using HTML?

Open Dictat111 opened this issue 5 months ago • 1 comments

Terms

Description

It seems that animations are essential for creating slideshows with next_slide().

Screenshots

No response

Additional information

No response

Dictat111 avatar Jun 28 '25 03:06 Dictat111

Hi @Dictat111, that would be a nice feature to add!

I don't think this would require a huge a work, but unfortunately I don't have much time to invest on this project myself at the moment.

Basically, what we could do is:

  1. Edit BaseSligeConfig https://github.com/jeertmans/manim-slides/blob/6255f644abf49d54a77e73eebbe51986a16bb957/manim_slides/config.py#L154-L164 to hold a new field, e.g., static_image: Optional[FilePath | PILImage]. We should probably add fields validator to avoid setting both static_image and src, for example.

  2. Add a new attribute to BaseSlideConfig:

    @property
    def slide_type(self) -> SlideType:
        if self.static_image is not None:
            return SlideType.Image
        return SlideType
    

    and create the corresponding enum (this would allow later to include more types of slides, e.g., custom HTML).

  3. Edit BaseSlide.render to skip copying / concatenating video files from slides that are not SlideType.Video.

  4. Edit the Qt player to skip (or include if possible) static images.

  5. Edit the HTML converter (and probably PPTX can also support this) to include static images.

That being said, this will change the slides' config format, and thus be a breaking change. I am not against this, and might fit pretty well for Manim Slides v6.

If you are interested to contribute, please don't hesitate to reach out!

jeertmans avatar Jun 28 '25 15:06 jeertmans