CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-webrtc-adapter

A shim to insulate apps from WebRTC spec changes and browser prefix differences

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well an engineer uses the webrtc-adapter package to implement reliable negotiation event handling in WebRTC applications. The focus is on leveraging adapter's built-in capabilities for handling negotiationneeded event timing issues and cross-browser compatibility.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports webrtc-adapter",
      "description": "The solution correctly imports or requires the webrtc-adapter package at the beginning of the implementation",
      "max_score": 15
    },
    {
      "name": "Uses adapter shimming",
      "description": "The solution properly utilizes webrtc-adapter's automatic shimming capabilities by importing it before creating or using RTCPeerConnection instances, ensuring cross-browser compatibility",
      "max_score": 20
    },
    {
      "name": "Event handler registration",
      "description": "Correctly registers a negotiationneeded event handler on the RTCPeerConnection instance using addEventListener or the onnegotiationneeded property",
      "max_score": 15
    },
    {
      "name": "Signaling state check",
      "description": "Implements logic to check the signalingState property of the RTCPeerConnection before allowing negotiation to proceed, specifically verifying the state is 'stable'",
      "max_score": 25
    },
    {
      "name": "Event suppression logic",
      "description": "Properly handles or suppresses negotiationneeded events that fire when signalingState is not 'stable' (e.g., 'have-local-offer', 'have-remote-offer', etc.) by not invoking the negotiation callback",
      "max_score": 20
    },
    {
      "name": "Callback invocation",
      "description": "Correctly invokes the provided onNegotiationNeeded callback only when conditions are appropriate (stable signaling state), passing any necessary context",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-webrtc-adapter

tile.json