代码示例:(标识:event_oncanplaythrough_audio)
<!DOCTYPE html> 
<html> 
<body> 

<audio controls oncanplaythrough="myFunction()">
  <source src="/static/demo/video/horse.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

<script>
function myFunction() {
  alert("Can play through video without stopping");
}
</script>

</body> 
</html>
运行结果: