I assume you're referring to codecs like H.264, which is owned and licensed by Apple. But are you sure using those codecs to play media is illegal? I thought it was only required to pay to encode.
I can't imagine that Firefox is illegally breaking the law too..