778 fix webrtc fatal error
Closes #778
This MR is based on !31 (closed) for #550, should be merged after !31 (closed).
Main goal was achieved by replacing handling of fatal WebRtc error via promise to message broadcast.
I also took this fix as an opportunity to do cleanup of CtiProxy
:
- try to make it more robust, esp. re-initialization and stopping
WebRtcAudio
- use
dummyAdapter
in uninitializedCtiProxy
(beforeCtiProxy
was implicitly attached toCti
) - let
CtiProxy
register itself to receiveCti.MessageType.LOGGEDON
- restructure code, streamline outer interface, move shared strings to "constants"
- replace
console
with$log
- extend tests