You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some earlier browsers it was possible to register resize event handlers on any HTML element. It is still possible to set onresize attributes or use addEventListener() to set a handler on any element. However, resize events are only fired on the window object (i.e. returned by document.defaultView). Only handlers registered on the window object will receive resize events.
There is a proposal to allow all elements to be notified of resize changes. See Resize Observer to read the draft document, and GitHub issues to read the on-going discussions.
The ResizeObserver API is an interface for observing changes to Element’s size. It is an Element's counterpart to window.resize event.
Issue
Record video using MediaRecorder where the input pixel dimensions are variable at Chromium, Firefox and Nighlty browsers. For example input frames to the MediaStream being
Chromium browser (78) does not display correct pixel dimensions save for the first (initial) pixel dimensions when the WebM file recored at Chromium using MediaRecorder and VP8 or VP9 codecs is played back at HTML <video> element at Chromium (the same browser which output the WebM file) and does not dispatch resize event at the element save for the first pixel dimension being set from the default, initial dimensions of the <video> element.
The same WebM file output by Chromium browser does display correct pixel dimensions at Mozilla Firefox (68) and Nightly (70) browsers.
Mozilla Firefox and Nightly both display the correct pixel dimensions corresponding the variable width and height input frames.
Chromium does display correct variable pixel dimensions during playback and dispatch resize event only when the codec set at MediaRecorder options is H264 or AVC1.
It is not immediately clear which specification and implementation (MediaRecorder; HTML; DOM; CSS) owns the resize event and is responsible for HTML <video> element resizing during playback corresponding the potentially variable pixel dimensions encoded into the video; and what specifically needs to be changed at the governing specification or standard and source code of Chromium browser for the expected result of HTML <video> element displaying variable width and height, and to be notified by ResizeObserver when the underlying encoded pixel dimensions change during playback of the video.
Background
MDN Window: resize event
Specifications linked at MDN
Resize Observer https://drafts.csswg.org/resize-observer-1/
Issue
Record video using
MediaRecorder
where the input pixel dimensions are variable at Chromium, Firefox and Nighlty browsers. For example input frames to theMediaStream
beingWidthxHeight
768x576
480x240
640x360
400x300
1280x720
Chromium browser (78) does not display correct pixel dimensions save for the first (initial) pixel dimensions when the WebM file recored at Chromium using
MediaRecorder
and VP8 or VP9 codecs is played back at HTML<video>
element at Chromium (the same browser which output the WebM file) and does not dispatchresize
event at the element save for the first pixel dimension being set from the default, initial dimensions of the<video>
element.The same WebM file output by Chromium browser does display correct pixel dimensions at Mozilla Firefox (68) and Nightly (70) browsers.
Mozilla Firefox and Nightly both display the correct pixel dimensions corresponding the variable width and height input frames.
Chromium does display correct variable pixel dimensions during playback and dispatch
resize
event only when the codec set atMediaRecorder
options is H264 or AVC1.It is not immediately clear which specification and implementation (
MediaRecorder
;HTML
;DOM
;CSS
) owns theresize
event and is responsible for HTML<video>
element resizing during playback corresponding the potentially variable pixel dimensions encoded into the video; and what specifically needs to be changed at the governing specification or standard and source code of Chromium browser for the expected result of HTML<video>
element displaying variablewidth
andheight
, and to be notified byResizeObserver
when the underlying encoded pixel dimensions change during playback of the video.Related issues
Question
Does the HTML or DOM or CSS specification own resize of HTML
<video>
element?The text was updated successfully, but these errors were encountered: