Free codecs without patent issues were limited to things like Vorbis which never got wide support. There were FOSS codecs for patented algorithms, but those had legal issues in places that enforce software patents.
It's hard to get more mainstream than YouTube and Netflix.
Source? I’ve seen Vorbis used in a whole bunch of places.
Notably, Spotify only used Vorbis for a while (still does, but also includes AAC now, for Apple platforms I think).
Personal music players had the issue that they had to have MP3 due to market forces, so offering Vorbis didn't save them any money. There were also some design decisions in Vorbis that made it a little more annoying to support on some very limited hardware than MP3.