Created
June 16, 2023 07:45
-
-
Save hcodes/4270aafc23aac51656c13eeebcf3a9ca to your computer and use it in GitHub Desktop.
log videoevents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logVideoEvents(video) { | |
[ | |
'canplay', | |
'canplaythrough', | |
'durationchange', | |
'ended', | |
'loadeddata', | |
'loadedmetadata', | |
'pause', | |
'play', | |
'playing', | |
'seeking', | |
'seeked', | |
'timeupdate', | |
'stalled', | |
'volumechange', | |
'waiting', | |
'suspend', | |
].forEach(function(item) { | |
video.addEventListener(item, function() { | |
console.log(item); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment