-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I receive many requests to add audio for this event like showing the result or for that event like pressing a button or dropping an item, and I wonder if it was a good idea to add some audio features to H5P.Question as a central spot.
I am thinking of something like (that's what I needed so far):
/**
- Register audio to add an element to the DOM.
- @param {number|string} id Id.
- @param {object} audio Audio params of H5P audio object.
*/
registerAudio(id, audio)
/**
- Play audio.
- @param {number|string} id Id.
- @return {boolean} False, if audio could not be played (e. g. due to browser autoplay policy)
*/
playAudio(id)
/**
- Stop audio.
- @param {number|string} [id] Id. If empty, stop all audios.
*/
stopAudio(id)
What do you think about that? Anything wrong? Anything missing (an audio button like the full screen button that could be used easily, other functions like pauseAudio(id), ... )? Would that have chances to become a part of H5P.Question?
Metadata
Metadata
Assignees
Labels
No labels