Bug 268750 - Exiting of pip mode does not render well for for MediaStream videos
Summary: Exiting of pip mode does not render well for for MediaStream videos
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-05 08:58 PST by youenn fablet
Modified: 2024-03-14 06:08 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2024-02-05 08:58:28 PST
Exiting of pip mode does not render well for for MediaStream videos
Comment 1 Radar WebKit Bug Importer 2024-02-05 08:58:42 PST
<rdar://problem/122314896>
Comment 2 youenn fablet 2024-02-05 08:59:51 PST
This is most probably a bad computation of the rendering size due to UI side compositing
Comment 3 youenn fablet 2024-03-13 03:27:23 PDT
Test page that does not work:
https://jsfiddle.net/wr9f4ez6/

This does not repro in some other pages like https://webrtc.github.io/samples/src/content/getusermedia/gum/ with controls=true added via web inspector to trigger pip.

When it does work, the GPUProcess VideoLayerManagerObjC frame is getting updated.
When it does not work, the GPUProcess VideoLayerManagerObjC frame does not get updated.

[WebAVPlayerLayer layoutSublayers] (and resolveBounds) are being called when exiting pip mode.

In the bad case, [WebAVPlayerLayer layoutSublayers] bails out early: "targetVideoFrame (", _targetVideoFrame, ") is essentially equal to videoSublayer.frame, bailing.

In the correct case, it goes through and triggers resolveBounds.
The frame check size is not valid by 1 pixel, so I am not sure that this works as expected, vs by chance.
Comment 4 youenn fablet 2024-03-13 03:39:36 PDT
https://jsfiddle.net/97hgzy5m/ shows a case where exiting pip happens (1px kicks in) but we see that the rendering is not optimal as positioning is off for a small amount of time.
Comment 5 youenn fablet 2024-03-13 03:58:35 PDT
Looking at the MSE code path, it does not seem like it needs the update frame, so it might be something else.
Comment 6 youenn fablet 2024-03-13 06:35:49 PDT
Pull request: https://github.com/WebKit/WebKit/pull/25816
Comment 7 EWS 2024-03-14 06:08:07 PDT
Committed 276086@main (42ce83919521): <https://commits.webkit.org/276086@main>

Reviewed commits have been landed. Closing PR #25816 and removing active labels.