model/errors/media_error_classifier library

Classifies platform media errors (PlatformException, strings, generic exceptions) into the appropriate TelnyxErrorCodes value.

This bridges the gap between raw platform/WebRTC errors and the structured SDK error registry, so callers can always map any getUserMedia failure to a known error code.

Functions

classifyMediaErrorCode(Object? error) → int
Classifies error — a PlatformException, string, or generic object — into the matching TelnyxErrorCodes media code.