elm-allo | Videoconference WebRTC example with an Elm frontend | SDK library
kandi X-RAY | elm-allo Summary
kandi X-RAY | elm-allo Summary
Videoconference WebRTC example with an Elm frontend. Requires https. More info in the post on Elm discourse.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- A shim for removing all streaming tracks .
- Creates a new PeerConnection instance
- Creates a WebRTC client .
- Shims the current protocol size .
- create adapter factory
- Signal socket .
- Shim a tracker receiver .
- A wrapper around the Dtmender method used to modify the stream
- Fetches fullscreen configuration .
- This function is called when a message negotiation and sends it to the remoteDescription
elm-allo Key Features
elm-allo Examples and Code Snippets
Community Discussions
Trending Discussions on elm-allo
QUESTION
I have been trying to implement WebRTC "perfect negotiation" as explained in this blog post. Unfortunately, I'm very often triggering errors on the polite side of the conversation (in the following linked code, this is the last peer to join).
The two most frequent errors are InvalidStateError: Cannot rollback local description in stable
caused by this line and ONN DOMException: "Cannot set local offer in state have-remote-offer"
triggered here and caused by this line. That second error is quite inexplicable to me since the line before checks that we should be in stable
state and it is the first async call following that.
If you want to try it for yourself, my code is hosted on GitHub. It can be deployed directly on Heroku:
...ANSWER
Answered 2020-May-24 at 00:29TL;DR: Browser bugs fixed in Firefox 77 & the spec, as well as a separate bug in Chrome.
ONN DOMException: "Cannot set local offer in state have-remote-offer"
... That second error is quite inexplicable to me since the line before checks that we should be in stable state and it is the first async call following that.
WebRTC negotiation code has the tricky task of translating synchronous signaling messages into asynchronous operations on the RTCPeerConnection object. To ensure order, these asynchronous methods are chained internally, so only one runs at a time, because state machine.
Under signaling stress, it's possible for this internal chain to fill up, which complicates things, because methods you invoke end up running later, not immediately in the state you just observed synchronously.
The "second error" happened because the browser erroneously fired the negotiationneeded
event while the RTCPeerConnection object's internal operations chain was non-empty. The spec has now been fixed so this won't happen.
Since the browser controls when the negotiationneeded
event is fired, this takes care of it.
InvalidStateError: Cannot rollback local description in stable
The "first error" on the impolite side is similarly a symptom of an overloaded chain: synchronous state check that we're NOT in stable, followed by this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install elm-allo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page