Constraints and MediaRecorder

I'm skeptical of the Constraints API in general, but I think MediaRecorder
at least doesn't seem to need it.

Suppose we had a MediaRecorderOptions dictionary like so:
dictionary MediaRecorderOptions {
  DOMString mimeType;
  unsigned long width;
  unsigned long height;
};
and pass it as an additional argument to the constructor. Further suppose
we specify that any video frames are aspect-preserving-scaled to fit within
width x height if both are specified, or if only one is specified then the
video frames are aspect-preserving-scaled to that dimension. The mimeType
is used if supported, otherwise the UA ignores it and makes its own choice.

What are the use-cases that approach fails to solve? Maybe there are some,
but the usability penalty going from
var mr = new MediaRecorder(stream, {mimeType:"audio/opus"});
to
var mr = new MediaRecorder(stream);
mr.applyConstraints({optional:[{mimeType:"audio/opus"}]}, function
onsuccess() { ... });
(in particular going from sync to async) is annoying. Not to mention the
spec and WebIDL issues of indirecting through Constraints and pulling in
that machinery.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w

Received on Saturday, 1 February 2014 11:38:57 UTC