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

AudioSlideshow: Add suport for silence all slides #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions audio-slideshow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ To use the plugin include
<script src="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/audio-slideshow/plugin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/audio-slideshow/recorder.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.6.2/RecordRTC.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/audio-slideshow/style.css">

```
to the header of your presentation and configure reveal.js and the plugin by

Expand Down Expand Up @@ -53,6 +56,7 @@ Reveal.initialize({
playerOpacity: 0.05, // opacity value of audio player if unfocused
playerStyle: 'position: fixed; bottom: 4px; left: 25%; width: 50%; height:75px; z-index: 33;', // style used for container of audio controls
startAtFragment: false, // when moving to a slide, start at the current fragment or at the start of the slide
silencedByDefault: true, // start with no audio by default. No player is shown, but a key binding is provided and a control button.
},
// ...
});
Expand Down Expand Up @@ -84,6 +88,13 @@ If no audio file is explicitly specified, the plugin automatically determines th

If you just want to play audio when file names are explicitly set with ```data-audio-src```, configure ```defaultAudios``` to ```false```.

### Silenced by default

Sometimes you need to silence all audios for your presentation. In this case,
`silencedByDefault` can be set to **true** so no player will be shown. Instead,
a button to enable all audios is provided so player can be enabled/disabled.
User's decision is stored in localStorage to persist visitors choise.

### Text-to-speech

If no audio file is explicitly specified and the default audio file is not found, the plugin can play audio files obtained from a text-to-speech generator.
Expand Down
Loading