Bug 268750

Summary: Exiting of pip mode does not render well for for MediaStream videos
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

youenn fablet
Reported 2024-02-05 08:58:28 PST
Exiting of pip mode does not render well for for MediaStream videos
Attachments
Radar WebKit Bug Importer
Comment 1 2024-02-05 08:58:42 PST
youenn fablet
Comment 2 2024-02-05 08:59:51 PST
This is most probably a bad computation of the rendering size due to UI side compositing
youenn fablet
Comment 3 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.
youenn fablet
Comment 4 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.
youenn fablet
Comment 5 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.
youenn fablet
Comment 6 2024-03-13 06:35:49 PDT
EWS
Comment 7 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.
Note You need to log in before you can comment on or make changes to this bug.