toMap

fun toMap(): Map<String, Any?>

Convert to a map, omitting null values to match JavaScript behavior. In JavaScript, undefined fields are stripped from JSON serialization. This is critical for WebRTC/mediasoup compatibility - sending null for ssrc when using rid-based simulcast causes routing failures.