File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
1616- Update the comparison table in the README.
1717 [ #560 ] ( https://github.com/jeertmans/manim-slides/pull/560 )
18+ - Update the template in the * Customize your RevealJS slides* section.
19+ [ #565 ] ( https://github.com/jeertmans/manim-slides/pull/565 )
1820
1921(v5.5.2)=
2022## [ v5.5.2] ( https://github.com/jeertmans/manim-slides/compare/v5.5.1...v5.5.2 )
Original file line number Diff line number Diff line change 5050 </ div >
5151
5252 < script src ="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/reveal.min.js "> </ script >
53+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/notes/notes.min.js "> </ script >
5354
5455 <!-- To include plugins, see: https://revealjs.com/plugins/ -->
5556 {% if has_notes %}
56- < script src ="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/markdown/markdown.min.js "> </ script >
57- < script src ="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/notes/notes.min.js "> </ script >
57+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/markdown/markdown.min.js "> </ script >
5858 {% endif %}
5959
6060 <!-- <script src="index.js"></script> -->
262262 // Time before the cursor is hidden (in ms)
263263 hideCursorTime : { { hide_cursor_time } }
264264 } ) ;
265+ // Override SPACE to play / pause the video
266+ Reveal . addKeyBinding (
267+ {
268+ keyCode : 32 ,
269+ key : 'SPACE ',
270+ description : 'Play / pause video '
271+ } ,
272+ ( ) => {
273+ var currentVideos = Reveal . getCurrentSlide ( ) . slideBackgroundContentElement . getElementsByTagName ( "video" ) ;
274+ if ( currentVideos . length > 0 ) {
275+ if ( currentVideos [ 0 ] . paused == true ) currentVideos [ 0 ] . play ( ) ;
276+ else currentVideos [ 0 ] . pause ( ) ;
277+ } else {
278+ Reveal . next ( ) ;
279+ }
280+ }
281+ ) ;
265282 { % if one_file % }
266283 // Fix found by @t -fritsch and @Rapsssito on GitHub
267284 // see: https://github.com/hakimel/reveal.js/discussions/3362#discussioncomment-11733074.
306323 Reveal . on ( 'ready' , fixBase64VideoBackground ) ;
307324 { % endif % }
308325 </ script >
326+ {% if env['READTHEDOCS'] %}
327+ < style >
328+ readthedocs-flyout , readthedocs-notification {
329+ display : none;
330+ }
331+ </ style >
332+ {% endif %}
309333
310334 <!-- Add a clock to each section dynamically using JavaScript -->
311335 < script >
You can’t perform that action at this time.
0 commit comments