rajgoel / reveal.js-plugins

Plugins for reveal.js
MIT License
739 stars 248 forks source link

[audio-slideshow] Features for audio-slideshow plugin requested #29

Open egrosclaude opened 7 years ago

egrosclaude commented 7 years ago

A BIG THANK YOU for this set of plugins. I use all of them heavily for my courses!!! I would like to ask for help about audio plugin. I've tried to do some cut at them myself but I'm a lousier JS programmer than I thought.

  1. When autoplay is set true in config(), muting the audio only works in the current piece of audio being played. I think it should stay muted until the user sets otherwise.
  2. Having a toggle key to disable audio autoplay would be really OK IMO. Toggling again should reenable autoplay only if config says so.

Thank you in advance!!!

rajgoel commented 7 years ago

The presentation stays muted upon slide change, independent on whether autoplay is true or false (at least I cannot reproduce your problems in 1). Concerning adding an extra key to toggle autoplay, I do not see a real use case as opposed to just stopping playback using the audio controls.

However, please reopen this issue if you can produce an example in which 1. is not working or a description for the use case of 2.

egrosclaude commented 7 years ago

Asvin, thank you for your response!

  1. In retrospection, my explanation was totally wrong. What I meant was that if the user stops the audio using the stop/play button (probably because she does not like the autoplay feature and wants to set her own pace), then audio resumes when slide changes. Muting, however, does not prevent autoplay. So, if user wants to control the timing of slides, she needs to stop playing, for each and every slide. Perhaps it is rather autoplay what should be cancelled when stop is pressed -or by some other means such as mentioned in 2.

  2. My use case for a toggle key is for visually disabled users. Accessible material should be controllable with just the keyboard as per WAI guidelines. Many other plugins unfortunately lack a keyboard control, but audio playing is crucial to me as I am a teacher making Reveal-based handover learning material and I actually have blind students.

It can be argued that if the discussion before is of concern, then the presentation should not be configured with autoplay=on in the first place; but in my use case, learning material is used in a diversity of scenarios (blind or not, home or classroom, etc) and giving control to the user is preferred as a catchall technique.

For the sake of accessibility, ultimate state-of-the-art Reveal should have also voice-controlled plugins tho! This is undoubtedly an interesting subproject.

rajgoel commented 7 years ago

@egrosclaude Thanks for the explanation of the use case. If I understand correctly, the requested feature does not really concern autoplay (which is responsible for starting the audio when the slides are loaded), but rather advance (which is responsible for advancing to the next slide after audio is completed).

How about the following:

egrosclaude commented 7 years ago

I was not aware of advance as such - you're right. Seems a very good solution:

1) the disabled user should be greeted with audio explaining purpose, usage or other front matter (thus audio autoplay on), then s/he'd should have a key toggle to keep advance on/off. Audio replay is a matter of back, then forward. Visually able users can always check off sound if desired. 2) audio playing actually stays orthogonal to advancing. I should have thought of this, as I use coursemod plugin to add extra text to slides. I have set up a custom plugin to TTS the side text as a second way of offering audio, so my materials can have recorded audio or automatic speech as needed. Your solution embraces the usage of this second audio source.

As a side note, AFAIK key controls apply on desktop only, as browsers on mobile platforms won't offer virtual keyboard as long as input is not required by the page (am I right in thinking this?). Hence the need for voice-controlled asynch toggles.