- From: Jim Barnett <Jim.Barnett@genesyslab.com>
- Date: Fri, 12 Jul 2013 14:32:23 +0000
- To: "public-webrtc@w3.org" <public-webrtc@w3.org>
- Message-ID: <57A15FAF9E58F841B2B1651FFE16D28105964B@GENSJZMBX01.msg.int.genesyslab.com>
This topic came up while Adam was trying to clean up some open issues on the WebRTC spec. Someone (Mozilla?) has asked that we add success and failure callbacks to addStream. On the other hand, the consensus of the group up to this point seems to have been that addStream doesn't do much, and that the real work occurs later when you create and apply an offer or answer (so no need for success and failure callbacks on addStream). However, under the current definition, addStream does throw errors in certain cases. Specifically: --- from spec --- 5. Parse the constraints provided by the application and apply them to the MediaStream, if possible. If the constraints could not be successfully applied, provide an RTCError object of type INCOMPATIBLE_CONSTRAINTS to the failure callback. 6. If the stream has a peerIdentity constraint set and the PeerConnection is in a connected state, check that the remote identity matches the constraint. If there is no match, provide an RTCError object of type INCOMPATIBLE_CONSTRAINTS to the failure callback. --- So do we want to: 1. Add success and failure callbacks to addStream? 2. Move the two checks above to createOffer/createAnswer (and leave addStream without callbacks)? We could also consider throwing exceptions in the two cases listed above, but that would mean doing the related processing in the main thread, and we are trying to avoid doing anything that might block the main thread. - Jim
Received on Friday, 12 July 2013 14:32:53 UTC