Option needed to be passed in when creating a webrtc call, but for
incoming calls the js-sdk creates the call itself, so the app never
gets a chance to set the option.
* Store the answer we generate so if we fail to send it, we can
try to send it again (doing the same again doesn't work as
webrtc is in the wrong state).
* Don't send ICE candidates if the call is ringing: queue them up
so we can send them later if we manage to actually send the
answer.
We won't have sent the invite anyway. Also termainate before we
fire the error event so the call is 'ended' when the event handlers
fire (which means if they try to hang up it's also ignored)
* If we can't send an invite due to unknown devices, abort the
call.
* Don't transition to the `invite_sent` state until the invite
has actually sent.
* Add a specific error code for failure due to unknown devices.
* Don't send ICE candidate messages if the call has ended.
* Add an `event` property to errors from `sendEvent` so that the
caller can resend or cancel the event.
Reverts https://github.com/matrix-org/matrix-js-sdk/pull/378
This swallowed all errors from sendEvent, breaking the ICE candidate
retrying. react-sdk no longer listens for send_event_error so I
think it's best to just remove this.
FF is uber nice that it lets us select the display
does not seem to allow the composite ALL displays though
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
video.src = URL.createObjectURL(stream) is on the way out. Firefox will
complain with errors about not being able to play media of type
"text/html" for example.