[Bug 25298] How to represent VideoFacingMode if browser is not able to detect the FacingMode of the camera.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25298

--- Comment #13 from Jan-Ivar Bruaroey [:jib] <jib@mozilla.com> ---
(In reply to Adam Bergkvist from comment #12)
> Do we have to rely on the resolution of bug Bug 19936 to future-proof the
> enum?

I don't think so, I marked it as a dependency more to revive the other bug.

> I noted that, for ECMAScript, assignments to enum attributes are
> ignored if the new value isn't a valid enum value, but an invalid enum value
> as a function argument generates an error.

Yes, from http://www.w3.org/TR/WebIDL/#idl-enums

> I would expect an assignment to a dictionary member to be similar to the
> attribute assignment case. Not sure though.

Unfortunately, dictionaries are always function arguments (they can't be
attributes), so invalid facingModes throw, hence Bug 19936.

I suggest two actions here:

1. Add "unknown" as Kiran suggests in comment 0.

2. Use DOMString for facingMode and refer to VideoFacingModeEnum in a
   comment as a workaround for now, as I suggest in Bug 19936 comment 5.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Received on Wednesday, 16 April 2014 15:20:48 UTC