gadenbuie / xaringanExtra

:ferris_wheel: A playground of enhancements and extensions for xaringan slides.
https://pkg.garrickadenbuie.com/xaringanExtra
Other
448 stars 36 forks source link

freezeframe stops working when self_contained: true #115

Closed BerriJ closed 3 years ago

BerriJ commented 3 years ago

Hi,

somehow the freezeframe feature does not work when self_contained is set to true. Is this expected behaviour? I like to use the self_contained option to obtain a one-file HTML presentation. Below is a minimal reprex. I'm using R 4.1.0 with the latest CRAN version of xaringan.

test.Rmd

---
title: 'Test'
output:
  xaringan::moon_reader:
    self_contained: true # if true, freezefrome stops working
---

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

![](test.gif)

---

Thanks in advance :+1:

gadenbuie commented 3 years ago

Thanks for the investigation and reprex @BerriJ. I doubt that it will be possible for Freezeframe to support self-contained presentations. The single-file presentations use base64 encoding to write images into the final HTML file using data URIs. It appears that the freezeframe.js library doesn't support these and expects the image files to be hosted somewhere.

It's possible that with a deeper dive we might figure out a work around but for now I don't expect xaringanExtra to be able to support freezeframe with self-contained presentations.

BerriJ commented 3 years ago

Thank you anyways. At least now I know the cause of the problem.