Closed Bug 826008 Opened 11 years ago Closed 11 years ago

WebRTC CreateOffer/Answer constraints don't work

Categories

(Core :: WebRTC, defect, P2)

17 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: jesup, Assigned: jesup)

Details

(Whiteboard: [webrtc][blocking-webrtc+][blocking-webrtc-interop][qa-])

Attachments

(1 file, 2 obsolete files)

The tests in PeerCOnnectionImpl.cpp for the constraints objects appear wrong.
Assignee: nobody → rjesup
Priority: -- → P2
Whiteboard: [webrtc] → [webrtc][blocking-webrtc+]
Attachment #697137 - Attachment is obsolete: true
Attachment #697334 - Attachment is obsolete: true
Comment on attachment 697336 [details] [diff] [review]
Fix type tests for constraints objects

My reading is that simply foo.isObject() is appropriate for this (from the comments above this patch), and will not trigger for null or undefined.

 * Constraints look like this:
 *
 * {
 *    "mandatory": {"foo":"hello", "bar": false, "baz": 10},
 *    "optional": [{"hello":"foo"}, {"baz": false}]
 * }
 *
 * Optional constraints are ordered, and hence in an array. This function
 * converts a jsval that looks like the above into a MediaConstraints object.
Attachment #697336 - Flags: review?(bugs)
Comment on attachment 697336 [details] [diff] [review]
Fix type tests for constraints objects

So do we have any tests for this stuff? We certainly should.
Also, would be good to investigate if WebIDL dictionaries could be used here. Would be better to try to avoid use of 
JS API and just use generated code if possible.
Attachment #697336 - Flags: review?(bugs) → review+
Whiteboard: [webrtc][blocking-webrtc+] → [webrtc][blocking-webrtc+][blocking-webrtc-interop]
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1e4862d5e1d

I'll open a bug for constraints tests - we certainly need them.  The WG is still defining them, which adds to the fun, but we should test them as we add support.  First we need a framework.
Target Milestone: --- → mozilla20
https://hg.mozilla.org/mozilla-central/rev/e1e4862d5e1d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [webrtc][blocking-webrtc+][blocking-webrtc-interop] → [webrtc][blocking-webrtc+][blocking-webrtc-interop][qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: