Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resize-observer-1] Does the HTML or DOM or CSS specification own resize of <video> element? #4266

Closed
guest271314 opened this issue Sep 2, 2019 · 0 comments

Comments

@guest271314
Copy link

Background

MDN Window: resize event

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.

Specifications linked at MDN

Resize Observer https://drafts.csswg.org/resize-observer-1/

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

WidthxHeight
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 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.

Related issues

Question

Does the HTML or DOM or CSS specification own resize of HTML <video> element?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant