Out-of-court-play is irrelevant here. The outside of the court, the walls, the lighting, the ceiling, *anything* but the field/ground/carpet of the court is *out*. So, that means if it bounces on the edge, it's out, because it touched any of these objects.