Baseline Widely available
The resize
event of the HTMLVideoElement
interface fires when one or both of the videoWidth
and videoHeight
properties have just been updated.
This event is not cancelable but may bubble.
SyntaxUse the event name in methods like addEventListener()
, or set an event handler property.
addEventListener("resize", (event) => { })
onresize = (event) => { }
Event type
A generic Event
.
<video id="media" src="https://example.com/video.mp4"></video>
const el = document.getElementById("media");
el.addEventListener("resize", () => {
console.log("The size of the video element has changed!");
});
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4