const video = document.querySelector("video");
video.addEventListener("canplaythrough", (event) => {
console.log(
"I think I can play through the entire video without having to stop to buffer.",
);
});HTMLMediaElement: canplaythrough event / notebook
HTMLMediaElement: canplaythrough 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.oncanplaythrough = (event) => {
console.log(
"I think I can play through the entire video without having to stop to buffer.",
);
};