Where a literary, dramatic or musical work, or an adaptation of such a work, is performed in public, by the operation of reception equipment or by the use of a record, at premises where persons reside or sleep, as part of the amenities provided exclusively for residents or inmates of the premises or for those residents or inmates and their guests, the performance does not constitute an infringement of the copyright in the work.