I have two methods in use in my house for hidden electronics. As one poster mentioned, speaker (or any relatively light cloth, stretched) will transmit IR signals. For my cable box in one built-in, I had the panel for that niche built as a frame that clicked in (small dowel pins and a magnetic catch); I built a cloth covered frame that pressure fitted inside this --- used white cloth, which matched the white lacquer of the built-in. Cable remote controls the cable box with no problem.
For another built-in that contained an Apple TV hidden behind the flat screen, I used an IR Remote. The receiver sensor inserts in a 5/8" hole as I recall and is very unobtrusive. I scotch taped the sender directly over the Apple TV sensor (there is a complete spaghetti mass of wires and cables where this box lives). Everything has worked fine now for four years.