I had a problem. Here's the very simplified code:
<!DOCTYPE html>
<html>
<head>
<script>
function ended(e) {
alert("Ended");
}
function paused(e) {
alert("Paused");
}
function played(e) {
alert("Played");
}
</script>
</head>
<body>
<div>
<video src="videoFile.mp4" controls onended="ended(event)" onpause="paused()" onplay="played(event)" >
</video>
</div>
</body>
</html>
Any time I paused, played, or ended the video, I would get the error:
Uncaught TypeError: played is not a function
at HTMLVideoElement.onplay
or the same but with paused or ended instead of played, and onpause and onended instead of onplay.
I've already solved it, so I put the answer below, for those who encounter a similar problem.