HTMLVideoElement 在流分辨率更改时触发 “resize”。这是否有文档记录?

huangapple go评论53阅读模式
英文:

HTMLVideoElement fires "resize" on stream resolution change. Is it documented somehow?

问题

至少在WebKit浏览器中,当视频流的分辨率发生变化时,相应的video元素会触发一个resize事件。关于此事是否有相关文档可供参考?或者有没有相关的引用或讨论?我一直没有找到相关信息。

英文:

At least in WebKit browsers, when the resolution of a video stream changes, the corresponding video element triggers a resize event. Is there any documentation available on this? Or any references or discussions? I haven't been able to find anything.

答案1

得分: 1

这是HTML标准的一部分:
https://html.spec.whatwg.org/multipage/media.html#dom-video-videowidth

每当视频的自然宽度或自然高度发生变化时 [...]
在媒体元素上触发名为"resize"的事件。
英文:

This is part of the HTML standard:
https://html.spec.whatwg.org/multipage/media.html#dom-video-videowidth

Whenever the natural width or natural height of the video changes [...]
fire an event named resize at the media element.

huangapple
  • 本文由 发表于 2023年5月29日 16:32:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76355792.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定