[Webkit-unassigned] [Bug 214689] getUserMedia aspectRatio overconstrained in portrait orientation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 24 09:03:15 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=214689

--- Comment #5 from Kyle Dunn <kpd400 at gmail.com> ---
Created attachment 405149

  --> https://bugs.webkit.org/attachment.cgi?id=405149&action=review

applyConstraint Workaround Test

(In reply to youenn fablet from comment #3)
> In general, I would recommend to use ideal constraints for getUserMedia.
> Then, you can check the results and use applyConstraints to resize at will.
> 
> Would the following workaround work for you:
> - Call getUserMedia with aspectRatio 4/3 as ideal constraints whatever the
> orientation.
> - Use applyConstraints to flip height and width in case of portrait mode.

Thanks for the quick response/workaround. I'm seeing odd behavior when initially applying constraints in portrait mode - I have to flip the height/width with applyConstraints multiple times before it actually crops the video. This does not seem to be an issue in landscape. The dimensions set with applyConstraints do get reflected in getSettings, but only reliably crop the video after "flipping" 3-5 times. However, once the video is reliably cropping it works exactly as expected and would be an acceptable workaround. 

A new demo with this workaround is attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200724/ee763f87/attachment.htm>


More information about the webkit-unassigned mailing list