MDN self-hosted library · e01.org

HTMLMediaElement: canPlayType() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
let obj = document.createElement("video");
console.log(obj.canPlayType("video/mp4")); // "maybe"