On Wed, Feb 17, 2016 at 9:45 AM, Jan-Ivar Bruaroey <jib@mozilla.com> wrote: > On 2/17/16 12:36 PM, Peter Thatcher wrote: > > The original thread was about both screencasts and rotating cameras, and > I've mostly been focusing on the screencasting case (trying to figure that > out before moving on to rotation). > > But, actually, I have a question for you about getUserMedia: > > If I specify an exact height of 90 pixels (min and max are 90) and the > camera can't open that small, what will an implementation of getUserMedia > be expected to do? Will it scale the camera's input in order to get that > exact height, or will it just say "nope"? Or is it implementation > dependent? > > > I believe Chrome will rescale it to whatever you want, whereas Firefox > will fail with OverconstrainedError, reflecting the fact that no camera on > the machine has a native 160x90 mode. Both are to spec btw, but which one > honors the intent of the spec? > > So the only way on Firefox to get a video track that outputs less than 91 pixels in height (perhaps to put into a MediaRecorder to record a small video) is to open a bigger video track, open a PeerConnection, create an RtpSender, set the maxHeight to 90, hook that PeerConnection into another PeerConnection, create an RtpReceiver, and then use the track of that RtpReceiver? Or I guess you could do something like render to a canvas, do the scale in there, and then use the canvas as source of the track. Both seem crazy. > See my other post right now about discovery and arbitrary scaling being > mutually exclusive. > > .: Jan-Ivar :. > >Received on Wednesday, 17 February 2016 19:37:21 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:14 UTC