const video = document.querySelector("video");
video.addEventListener("canplay", (event) => {
console.log("Video can start, but not sure it will play through.");
});HTMLMediaElement: canplay event / notebook
HTMLMediaElement: canplay event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const video = document.querySelector("video");
video.oncanplay = (event) => {
console.log("Video can start, but not sure it will play through.");
};