A shim to insulate apps from WebRTC spec changes and browser prefix differences
Overall
score
98%
{
"context": "This criteria evaluates how well the engineer uses webrtc-adapter to implement a WebRTC compatibility detector. The focus is on correctly importing and using adapter's automatic shim application, browser detection capabilities, and accessing normalized WebRTC APIs after shims have been applied.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import adapter",
"description": "Correctly imports webrtc-adapter (e.g., 'require' or 'import' statement for 'webrtc-adapter') to enable automatic shim application",
"max_score": 15
},
{
"name": "Use browserDetails",
"description": "Uses adapter.browserDetails to access browser information (adapter.browserDetails.browser and adapter.browserDetails.version)",
"max_score": 25
},
{
"name": "Check RTCPeerConnection",
"description": "Checks for RTCPeerConnection availability after shims are applied (checks window.RTCPeerConnection or global.RTCPeerConnection, not vendor-prefixed versions)",
"max_score": 15
},
{
"name": "Check getUserMedia",
"description": "Checks for getUserMedia availability via navigator.mediaDevices.getUserMedia (the standard location after adapter normalization)",
"max_score": 15
},
{
"name": "Check RTCSessionDescription",
"description": "Checks for RTCSessionDescription availability after shims are applied (checks window.RTCSessionDescription or global.RTCSessionDescription)",
"max_score": 10
},
{
"name": "Check RTCIceCandidate",
"description": "Checks for RTCIceCandidate availability after shims are applied (checks window.RTCIceCandidate or global.RTCIceCandidate)",
"max_score": 10
},
{
"name": "Return correct structure",
"description": "Returns an object with the correct structure containing browser (string), version (number), and features (object with boolean values)",
"max_score": 10
}
]
}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