Currently, the H.264 profileLevelId is defined as unsigned long. This is inconvenient - developers can more easily manipulate it as a string.
Switching it to a string brings all kinds of additional issues with validating invalid data coming in. Either in long or string, it will still require a chart of valid values and what they mean, is it really inconvenient, seems the error that will be caused by people putting in strings that are kind of but not quite valid is much more inconvenient.
H.264/AVC profileLevelId as DOMString
Fix for Issue #587
Since the codec parameter dictionary is provided as a JSON blob, ORTC implementations already parse and validate the profileLevelId parameter represented as a string, and shim libraries such as adapter.js already handle profile-level-id that way, since profile-level-id is an SDP string in WebRTC 1.0. So in practice, existing ORTC implementations already treat profileLevelId as a DOMString.
If thats the case, can passing an invalid value throw an exception here so its very easy to catch the mistake?
In send() or receiver() the promise will be rejected with InvalidParameters if invalid parameters are passed as an argument.
Converted to a string since that's the way capability will be announced by the remote party as a string because of SDP. Otherwise adapters will have to know to specially convert this value to decimal. Resolved as a string.