webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.94k stars 5.71k forks source link

states: add e2e tests #1546

Closed fippo closed 2 years ago

fippo commented 2 years ago

and fix misc bugs and terminology

fippo commented 2 years ago

@alvestrand @henbos there is an interesting thing about this sample that I only noticed when writing the test: signaling state and ice connection state get a state change to "new/stable" (from "new/stabe"), connectionState does not. That seems inconsistent...

henbos commented 2 years ago

Yeah I think we should calculate connectionState the same way we calculate iceConnectionState, in blink, so that it matches the JS exposed transport states.

But incidentally connectionState still exposes the ”failed” heuristic that was removed from iceConnectionState.

My kingdom for an end-of-candidates

fippo commented 2 years ago

ah... turns out there was an extra call adding the 'new' / 'stable' state to the div. Not a spec issue, a sample issue. Updated the sample and the test.