jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
419 stars 46 forks source link

[BUG] Touch controls not working on the HTML Reveal.js export #384

Closed lucmos closed 3 months ago

lucmos commented 4 months ago

Description

Thank you for the great work with manim-slides! :rocket:

I have a problem with the mobile version of the HTML export.

I am exporting the slides with this configuration:

manim-slides convert \
    -ccontrols=false \
    -cprogress=true \
    -cshow_slide_number=false \
    -coverview=true \
    -ctouch=true \
    -cview_distance=6 \
    -cmobile_view_distance=4  \
    -chide_cursor_time=1000 \
    Slide1 \
    ... \
    SlideN

Unfortunately, though, from mobile I cannot swipe to change slide (so I am stuck at the title).

This is the exported presentation with these options: https://lucmos.github.io/latentcommunication_anims/

I know that as a workaround, I could show the arrow controls, but they may overlap with the contents --- Moreover, I would prefer having a single hosted presentation (both for quick access from the mobile; and for full live presentations)

Am I doing something wrong with the convert configuration?

Version

manim-slides, version 5.1.3

Platform

Linux

Screenshots

No response

Additional information

No response

jeertmans commented 4 months ago

Hello! I recognize that I have already met this issue, and this is quite annoying.

However, I have never experienced the « touch » swipe on RevealJS slides, so do you have example slides where touch actually work?

lucmos commented 4 months ago

Hi!

Unfortunately no 😅 I discovered Reveal.js thanks to manim-slides, thus I have no other experiences with it

lucmos commented 4 months ago

I found this example where it is working, although in vertical mode: https://revealjs.com/demo/?view=scroll

It is super interesting also the progress bar! It think it could be a great fit for manim presentations 😁 It allows to show the progress of the animations inside a slide (within a fragment I guess), and between slides (between fragments).

jeertmans commented 4 months ago

Ok so after searching a bit, it seems that the faulty lines are in RevealJS' codebase: https://github.com/hakimel/reveal.js/blob/63e0a37a8896071c9ccf4e56acc9df3f8c51abd4/js/controllers/touch.js#L84-L96.

For short, they prevent swiping if the slide contains either audio or video, which is the case of all our slides :-/

I will create an issue on their repo, but I don't know if that will get fixed :-/

jeertmans commented 4 months ago

Well I did not expect this fix to be so quickly addressed by RevealJS' team!

I just subscribed to their releases, so I will receive a notification when the next version of RevealJS (i.e., >5.0.5) is released. Once this is released, I will try to upgrade the default version we use in the template :-)

lucmos commented 4 months ago

Awesome! Thank you so much! :rocket:

jeertmans commented 3 months ago

RevealJS just released v5.1.0, so this will be soon integrated to Manim Slides!

jeertmans commented 3 months ago

Hello @lucmos, v5.1.4 was just released, feel free to give it a try as it should solve your issue :-)

Please ping me if that is not the case so I can reopen this!