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

Audio features #9

Open
otacke opened this issue Oct 16, 2020 · 0 comments
Open

Audio features #9

otacke opened this issue Oct 16, 2020 · 0 comments

Comments

@otacke
Copy link
Contributor

otacke commented Oct 16, 2020

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?

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

1 participant