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

<video controls oncanplay="myFunction()">
  <source src="/static/demo/video/shanghai.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<script>
function myFunction() {
  alert("Can start playing video");
}
</script>

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