A shim to insulate apps from WebRTC spec changes and browser prefix differences
Overall
score
98%
{
"context": "This criteria evaluates how well an engineer uses the webrtc-adapter package to implement connection state monitoring functionality. It focuses on proper usage of webrtc-adapter's connection state polyfill and event handling capabilities.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Adapter Import",
"description": "Imports webrtc-adapter package correctly to enable automatic shimming and connection state normalization",
"max_score": 15
},
{
"name": "ConnectionState Access",
"description": "Uses the connectionState property from RTCPeerConnection, which is polyfilled by webrtc-adapter when not natively available",
"max_score": 25
},
{
"name": "IceConnectionState Mapping",
"description": "Correctly accesses and maps iceConnectionState to connectionState values according to the spec ('completed' → 'connected', 'checking' → 'connecting'), leveraging webrtc-adapter's normalization",
"max_score": 25
},
{
"name": "Event Listener Setup",
"description": "Uses 'iceconnectionstatechange' or 'connectionstatechange' event listeners on the peer connection object, relying on webrtc-adapter's event normalization and polyfilling",
"max_score": 20
},
{
"name": "State Change Detection",
"description": "Implements logic to track state changes and avoid duplicate notifications by comparing current and previous states",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-webrtc-adapterdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10