Map<String, dynamic> toJson() { return { if (format != null) 'format': format, if (quality != null) 'quality': quality, if (optimizeForSpeed != null) 'optimizeForSpeed': optimizeForSpeed, }; }