There are two events shown as one during the homily scene. As a matter of fact Pope Pius XIII delivered a speech, not an homily, because an homily always follows the reading of the Scripture and comments on It.
Furthermore the first homily of a newly elected pope is delivered during the Papal Inauguration, a Mass which takes place on St. Peter's Square and not in the Loggia (balcony) of the Basilica. The newly elected Pope appears in the Loggia right after the "Habemus Papam" is announced and then he says his first few words to the faithful, but this is a speech and not an homily. It is only then that the cardinals gather at the large windows of the Basilica. During the Papal Inauguration they sit on St. Peter's Square next to the Pope.