Heads-up:
In our WebRTC media stream track support, we are in the process of adding support for standards compliant constraints.
In the long run, it will make constraints simpler to use; instead of
getUserMedia({video: {mandatory: { ‘maxWidth’: ‘640’ }, optional: [ {‘maxFrameRate’: ‘31’, ‘minFrameRate’: ‘29}]}})
(this expresses a requirement for video no wider than 640, and a wish for a framerate of 30)
you will be able to write
getUserMedia({video: { ‘frameRate’: 30, width: { ‘max’: 640 }})
We’re adding this while keeping backwards compatibility as far as possible, but there will be a few changes that are visible to the user.
If you look at “constraint errors” that include a constraint name, the constraint name may change. Even if you specify “maxWidth” in the old syntax, the constraint name will be “width”.
Some error codes may change. Particularly, we’re going to introduce some more checking on legal values - so that if you have been specifying “True” instead of “true”, you’ll get a TypeError. (Previously, depending on the particular constraint, it would be interpreted as false or give an error.)
You will be able to use old and new constraints for a while, but you can’t mix them; for example, this will give an error message:
getUserMedia({video: { mandatory: { ‘maxWidth’: ‘640’ }, ‘height’: {‘max’: 480}})
pc.createAnswer({offerToReceiveAudio: true, offerToReceiveVideo: true})versus:pc.createAnswer({mandatory: {offerToReceiveAudio: true, offerToReceiveVideo: true}})
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/1011101e-19a5-49bb-a28d-e1c7fda8d458%40googlegroups.com.
--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/ZRQiSy6z_Dg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CADxkKiKmf4aMOZOhO%2BXx3MKYcq4gsj6SFvUWiK%3DtJga7XWNDfg%40mail.gmail.com.
i mean the mandatory part. We've got a few errors of older chromes that say: Failed to execute 'createAnswer' on 'RTCPeerConnection': Malformed constraints objectWhat is the best practice today?
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAPMy_djL_7_DWL1giweWGNOSTLcCGmjF2fo8EvSOMbrXqKe6Ng%40mail.gmail.com.