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-2/

{
  "context": "This criteria evaluates how well the engineer uses webrtc-adapter to implement cross-browser compatible media stream acquisition. The evaluation focuses on proper usage of the adapter's getUserMedia normalization capabilities including constraint handling, error normalization, and browser compatibility features.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Adapter Import",
      "description": "Correctly imports webrtc-adapter to enable automatic shimming of getUserMedia API and applies browser-specific normalizations",
      "max_score": 15
    },
    {
      "name": "Navigator getUserMedia Usage",
      "description": "Uses navigator.mediaDevices.getUserMedia() which is shimmed by webrtc-adapter to provide cross-browser compatibility",
      "max_score": 20
    },
    {
      "name": "Audio Processing Constraints",
      "description": "Properly uses audio constraint properties (noiseSuppression, autoGainControl) which are normalized by adapter across browsers including Mozilla-prefixed versions in Firefox",
      "max_score": 20
    },
    {
      "name": "FacingMode Constraint",
      "description": "Uses the facingMode constraint property with values like 'user' or 'environment' to select front/rear cameras, leveraging adapter's mobile camera selection polyfill",
      "max_score": 20
    },
    {
      "name": "Error Handling",
      "description": "Catches and handles errors from getUserMedia where adapter normalizes error names (e.g., PermissionDeniedError to NotAllowedError) for consistent cross-browser error handling",
      "max_score": 15
    },
    {
      "name": "Stream Validation",
      "description": "Returns or validates the MediaStream object obtained through adapter's normalized getUserMedia, ensuring it contains the requested tracks",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-webrtc-adapter

tile.json