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

Embed audio? #1

Open
Arc676 opened this issue Mar 12, 2018 · 0 comments
Open

Embed audio? #1

Arc676 opened this issue Mar 12, 2018 · 0 comments

Comments

@Arc676
Copy link
Owner

Arc676 commented Mar 12, 2018

It would be nice if it were possible to embed audio into questions. It could be useful for quizzes for learning languages or music identification (or various other things).

Several implementation questions though:

  1. Where will the audio be saved?
  2. Will the audio be played by the host device or by the clients?

Question 1

If the audio is saved as part of the quiz, then the audio data will have to be serialized.

Advantages:

  • Sharing quizzes doesn't require sharing resource files. This is already the case for image data.
  • Can send audio data over network to clients

Disadvantages:

  • Increased file size for quizzes
  • Increased complexity

If the audio data is not serialized, other questions arise:

  1. Where will the audio be stored? How will Toohak know where to access them? What if they move?
  2. What will the implications be for sharing quizzes?
  3. Will it still be possible to send audio data to clients?

Question 2

One of the primary advantages of Toohak over Kahoot is that all the necessary information for answering a question is sent to the clients. Although the leaderboard is only visible on the server (for now, anyway), clients don't have to be physically near the server to play. If this is to continue to be the case, then the audio data must be transmitted to the clients. This could incur extreme latency and server-side overhead. The alternative is to simply not support audio data questions for when people aren't actually near the server, but this would be a compromise when questions and images are already independent of physical location.

Additionally, if the audio data is played client side and the players are close to one another, then they'll all be playing the audio over each other, which would be detrimental to the experience.

Suggested solution

One potential solution that should be simple to implement is the following:

  • Audio files must be stored in the same directory as the quiz file
  • Search for audio files in the same directory as the quiz file when needed (the path is retrieved when the quiz file is loaded)
  • Play audio server-side (compromise as stated for question 2)
  • Sharing quizzes would require sharing audio files
  • No need for serializing, en/decoding audio, or transmitting audio data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant