This example demonstrates how to assign an “onended” event to an audio element. Press play and wait for the audio to end. Your browser does not support the audio element.