-
Notifications
You must be signed in to change notification settings - Fork 726
Description
Okay, here goes... We've been putting this one off for too long.
Background
Since the beginning of time, there has been a desire for media and WebRTC-related events. Ever since the first GetUserMedia call succeeded asynchronously, ever since calls were accepted before ICE completed, ever since the other day when we mixed up the accepted event just a little bit...media events have been on the horizon. At first, they were impossible (or just plain hard), as the media and the signaling were mixed in one Session constructor.
Now, we have separated the media from the signaling, leaving a completely eventless MediaHandler class just waiting for this functionality.
The Goal
Let's figure out what events we want, and try to define their behavior and naming in a way that is consistent.
Requested Events So Far
- Upon callback of successful getUserMedia call (Should we also lump in 'beginning to ask for getUserMedia,' so UIs can be updated with big arrows and orange bars?)
- Upon beginning ICE candidate collection
- Upon completing ICE candidate collection and sending of INVITE.
- Upon receipt of offer. (Independent of INVITE w/o SDP)
- Upon receipt of answer. (INVITE w/o SDP causes this to happen later than
accepted) (See issue Provide event for receipt of remote media. #20) - Any that I missed?
I'm also going to combine the following into this discussion, as it is a related feature:
- Upon DataChannel created/opened/closed/error
- Upon DataChannel message received.
Also, remember that all of these events apply only to stock WebRTC MediaHandlers. These events shouldn't be used internally by other parts of SIP.js, as a custom MediaHandler may not implement them.
PS - I know, I changed my mind about discussing this on the Issues tracker. I started typing this to the mailing list, but here does feel like a better place for development chatter. Sorry, Joseph. :-/