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

freezeFrame() has inconsistent behavior #145

Open
gpapageorgiou opened this issue Nov 19, 2021 · 1 comment
Open

freezeFrame() has inconsistent behavior #145

gpapageorgiou opened this issue Nov 19, 2021 · 1 comment

Comments

@gpapageorgiou
Copy link

gpapageorgiou commented Nov 19, 2021

I have been experiencing some inconsistent behavior with xaringanExtra:::use_freezeframe(). Most of the times seems to work but there are instances that some of the .gif files will be already playing when reaching the corresponding slide.

The issue seems to be present mostly when viewing the slides in chrome (e.g. not in Rstudio's viewer).

For example if I open in chrome and go back and forward between the two gif slides, it is not always the case that they will start from the beginning. I can tell however that use_freezeframe() works as when I click on the slide the animation stops and when I click again it starts from the beginning. However, the moment I turn on the slide with the animation sometimes it seems to be already playing rather than starting from the beginning.

I tried to create a reproducible example below:

---
title: "Presentation"
subtitle: ""
author: ""
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
  xaringan::moon_reader:
    self_contained: true
    css: ["default", "custom.css"]
    lib_dir: libs
    nature:
      ratio: '16:9'
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
    seal: false
---

```{r xaringanExtra-freezeframe, echo=FALSE}
xaringanExtra:::use_freezeframe()
```


---

<center>
<img src="animation_haz.gif">
</center>

---

<center>
<img src="animation_obs.gif">
</center>

---
@gadenbuie
Copy link
Owner

I've noticed this too on occasion and had a really hard time reproducing it or figuring out the context in which it happens.

Thanks for submitting an example, but it's not quite a reprex yet since I don't have custom.css, animation_haz.gif or animation_obs.gif. If you can create a reprex that doesn't include those files (you can see the freezeframe docs for some examples gifs you could use), I'd be happy to take another look.

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