Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer values of Reveal.js options are not set by template #312

Closed
ncomet opened this issue Jan 16, 2020 · 7 comments
Closed

Integer values of Reveal.js options are not set by template #312

ncomet opened this issue Jan 16, 2020 · 7 comments

Comments

@ncomet
Copy link

ncomet commented Jan 16, 2020

It seems integer values of options

  • :revealjs_defaultTiming: 60
  • :revealjs_autoSlide: 10

for instance, are not set properly by template.
It works fine with boolean and textual values though.

@obilodeau
Copy link
Member

obilodeau commented Jan 17, 2020

I built a simple deck to reproduce your issue:

= Title Slide
:revealjsdir: reveal.js
:revealjs_defaultTiming: 60
:revealjs_autoSlide: 10000

== Slide One

* Foo
* Bar
* World

== Slide Two

Hello World

[NOTE.speaker]
--
Testing
--

== Slide Trois

Fancy

:revealjs_autoSlide: is in milliseconds (as documented) so 10 is blazingly fast. It does work on that slide deck. Using 10000 also works and is probably what you expected.

I can see that default timing is also set to 60 in the javascript but it is not visible in the speaker notes to me. I'm unsure why and maybe I'm not looking at the right place since I never used that feature.

@obilodeau
Copy link
Member

obilodeau commented Jan 17, 2020

It looks like slides pacing (defaultTiming option) only works when there is a web server to serve the slides (there's probably some websocket action going on between the presenter and the speaker views). See screenshot (with same example deck):

reveal js - Slide Notes - Google Chrome_004

Run a simple web server, load your slide deck through it, hit s and see if it works for you. I use ruby -run -e httpd . -p 5000 -b 127.0.0.1 as documented in the README.

To me, both feature work as expected. With the caveats of using a web server for speaker notes but that also has been documented in the reveal.js repo.

@ncomet
Copy link
Author

ncomet commented Jan 17, 2020

Hi !
Thanks for the quick reply. I am indeed serving the slides from a server. I’ve noticed the timing does not work locally.

I will try to find out what happens in my case. I am using the asciidoctor.js converter. Maybe the problem comes from here.

If you want to reproduce, just clone https://github.com/ncomet/oss-koson-2020

I've set the defaultTiming option (to 40) in slides.adoc

Then run ./generate.sh

The problem appears in the generated slides.html file, you can check by searching for defaultTiming in the source. (I temporarily solved this by manually sed-ing the generated slides.html and the server took the 40s time allowed for one slide without any issue)

Once it it served by github pages, everything is fine.

@obilodeau
Copy link
Member

obilodeau commented Jan 17, 2020 via email

@ncomet
Copy link
Author

ncomet commented Jan 17, 2020

I tried :

:revealjs_defaultTiming: 40
or
:revealjs_defaulttiming: 40

No matter what the html output is :

  // Specify the average time in seconds that you think you will spend
  // presenting each slide. This is used to show a pacing timer in the
  // speaker view
  defaultTiming: 120,

It is valid JS, but somehow the value is not picked up.

@obilodeau
Copy link
Member

According to your repo, you are using a version with a bug: https://github.com/ncomet/oss-koson-2020/blob/master/package-lock.json#L71.

npm update your package.json.

See #263 (comment) for details.

2.0.1 fixes that problem.

However, the latest version (and the one I tested) is 3.0.0 but there is a font-awesome issue so 3.0.1 should be released soon.

@ncomet
Copy link
Author

ncomet commented Jan 17, 2020

Thanks a lot, it was indeed a bug of 2.0.0. I close the issue.

@ncomet ncomet closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants