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

Please allow users to make a sound effect for any element for HTML slides #214

Closed
jooyoungseo opened this issue Jun 20, 2019 · 12 comments
Closed

Comments

@jooyoungseo
Copy link
Contributor

Hello,

xaringan is very nice tool for blind people to create presentation slides as long as they have enough knowledge about R Markdown and some CSS syntax.

I am one of the blind R users who have massively benefitted from Rmd in many areas of my professional life.
I really appreciate your hard work for rmarkdown, bookdown, blogdown, xaringan, etc.

There is no problem at all in terms of composing an Rmd-based xaringan document.

However, when I give a professional presentation using HTML slides produced by xaringan, I have to turn off my screen reading software not to bother my audience from the text-to-speech synthesizer.

As you guess, I have to memorize how many times I have to press space bar corresponding to either the number of my slides or incremental element as I cannot see the screen; this is not very ideal and sometimes I make a mistake.

I was wondering if there would be any way for you to improve xaringan to implement a sound effect towards each slide or any element like we apply CSS class properties to make some parts large or small using .large[] or .small[].

If possible, I would like to associate any sound effect file wen applying that sound property to an element so that I can recognize what appears.
Do you think it is something that can be implemented?

Appreciatively,

@gadenbuie
Copy link
Contributor

Thank you for sharing your experience with xaringan! I would be happy to develop a solution that fits your needs.

What kind of sound effects would be best in this situation? Do you want each slide or transition to have a different sound? I'm not sure about the feasibility of this idea, but would it make sense to mark progress through the slides by starting with a higher pitched tone and decreasing the tone for each slide?

@jooyoungseo
Copy link
Contributor Author

@gadenbuie,

I sincerely appreciate your willingness to address this need! This would be instrumental for not just me alone, but also other R users with visual impairments!

My original desire was to have each slide has the same audio sound (like clicking sound) so that I can recognize a new slide pops up; however, I really love your suggested novel idea marking slide progress using audio tone!!
Would it be possible to mark progress through the slides by starting with a lower pitched tone and increasing the tone for each slide?
Again, your support would enable many people all over the world including me.
Many thanks!

@gadenbuie
Copy link
Contributor

That makes a lot of sense, thanks! I may not be able to get to this right away, but I'm looking forward to trying to solve this challenge and help make xaringan more accessible for all users.

@yihui
Copy link
Owner

yihui commented Jun 20, 2019

@gadenbuie Thanks for volunteering! This post might be helpful in terms of playing audio with JS: https://marcgg.com/blog/2016/11/01/javascript-audio/

Once you figure that out, you can use the showSlide event to play the sound: https://github.com/gnab/remark/wiki/Configuration#events The slides object is named slideshow in xaringan:

'var slideshow = remark.create(%s);', if (length(nature)) xfun::tojson(nature) else ''

Eventually, you can include the JS code via after_body, e.g.,

output:
  xaringan::moon_reader:
    includes:
      after_body: "sound.js"

@gadenbuie
Copy link
Contributor

Thanks @yihui for the pointers and the link to the blog post, that looks perfect! I'll report back here if I run into any issues or when I get it working

@gadenbuie
Copy link
Contributor

Hi @jooyoungseo -- just wanted to let you know that I just (GitHub) released xaringanExtra. It's a little package of xaringan extensions, including adding sound effects to slides. Here's a little example: https://pkg.garrickadenbuie.com/xaringanExtra/slide-tone/

@cderv
Copy link
Collaborator

cderv commented Jan 31, 2020

This is awesome @gadenbuie ! 🤩

@pat-s
Copy link
Collaborator

pat-s commented Jan 31, 2020

Good damn, another classical Garrick 🚀

@tcgriffith
Copy link
Collaborator

@pat-s off the topic, maybe we could integrate the CSS theme thing into xaringanExtra?

@pat-s
Copy link
Collaborator

pat-s commented Jan 31, 2020

@pat-s off the topic, maybe we could integrate the CSS theme thing into xaringanExtra?

Hm, we lost track on this one a bit. Not sure if it would fit there and if Garrick wants to have it there. What are your detailed thoughts on putting it there? (let's discuss this in a separate issue).

@jooyoungseo
Copy link
Contributor Author

@gadenbuie, thank you so much for this development and release!

I faced installation issue so I had opened the issue on your GitHub page.

@jooyoungseo
Copy link
Contributor Author

I am closing this issue because this has been implemented via xaringanExtra::use_slide_tone(). Many thanks to @gadenbuie! :)

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

6 participants