Can one pray along with a recording or a television broadcast?
For supplication, yes; for the ritual prayer, no. Anyone anywhere can join in a supplication, but congregational prayer requires a living imam and worshippers standing together behind him in one place.
Islam has two kinds of praying that need to be distinguished here. One is supplication, a free conversation with God. The other is the ritual prayer, the Salat, with fixed times, fixed movements and, when it is offered together, an imam.
When people are invited at the end of a broadcast to join in a silent supplication, anyone can take part, whether live or watching a recording. One raises one’s hands and asks God. No shared place is needed for this. The second verse above says that God is near to everyone who prays to Him.
The ritual prayer is different. Whoever prays behind an imam belongs to a congregation that stands together in one place, in rows behind him, all facing the Kaaba. The imam leads the prayer at that very moment, and the worshippers follow him step by step. This is not possible through a screen. People are in different places, and with a recording no one is leading the prayer at that moment at all.
That is why one should not offer an obligatory prayer behind an audio recording or a television broadcast. That would be a wrong innovation. Whoever is alone prays alone, or looks for a congregation nearby. Supplication, however, connects people across any distance.