Forum Discussion
How to add Voiceover to Quiz questions?
This is technically possible with JavaScript, and in theory the answer order can be detected or inferred at runtime when the question is loaded and answers shuffled.
With 4 shuffled answers, there are: 4!=4×3×2×1=24 possible permutations (scenarios) of answer order each time the question loads.
The only part that would need to be handled is the audio trigger logic, where each displayed answer position must be mapped at runtime to its corresponding audio file. Without JavaScript, there is no viable workaround. The only alternative would be building static trigger conditions covering all 24 permutations, specifically just for audio playback, which quickly becomes unmanageable and difficult to maintain.
Because of this, while JavaScript is the only real solution, the effort required to correctly manage audio triggering in a shuffled environment is disproportionate to the benefit especially given the complexity.
I would like to see if anyone has an alternative logic or idea on how to do this, as I may have over-calculated something or misunderstood the concept.
Related Content
- 1 year ago