On the heels of a national tragedy, the crowd inside the Beacon Theater on Sunday night was pulsating with pride and passion for the achievements of the Broadway community in the season of “Hamilton.”

The massacre of 50 people in a gay nightclub in Orlando, Fla., earlier in the day made for some somber moments, but it did not cast a pall on the 70th annual Tony Awards ceremony. The crowd refused to let that happen. If anything, the horror of the nation’s worst mass shooting seemed to draw people together.

To serve the cause of soldiering on, the Tony Awards had an able general in James Corden, the cuddly clown of CBS’ “The Late Late Show” and a Tony winner himself for lead actor in a play for “One Man, Two Guvnors” in 2012.

Corden sang and danced, goofed with A-listers in the audience and even exchanged gum with Jake Gyllenhaal (anything for a laugh). He got Jeff Daniels to sing “The Sound of Music” and Gyllenhaal and Sean Hayes to duet on “A Whole New World” — all during commercial breaks just for the entertainment of the Beacon audience. He pretended to fall over with excitement when Barbra Streisand came on stage and he held his own with “Hamilton” maestro Lin-Manuel Miranda in his “Carpool Karaoke” segment.

For all his goofiness, Corden delivered requisite opening statement of the show with heart. He pre-taped a cold open to acknowledge to viewers across the country that Broadway’s elite were not oblivious to the national tragedy that unfolded earlier in the day. Corden took two takes on the segment, urging the crowd to be patient because “we want to get it right.”

“Theater is a place where every race, creed, sexuality, gender is equal, is embraced and is loved,” Corden said. “Hate will never win.”

Meanwhile, winner after winner made a point of addressing their dedication to theater and the legit community.

“What we’ve seen this season is that there are stories to be told and people who want to hear them,” Thomas Kail, who won directing in a musical for “Hamilton,” “I’m so proud to work in theater.”

The wins by “The Humans” stars Reed Birney and Jayne Houdyshell offered prime examples of the unpredictability of working in theater, where accolades can come for journeyman actors with the right property and a little luck.

Birney noted that he’s been working as an actor “almost 42 years — 35 of them were pretty bad.” To his fellow actors and the extended Broadway community, he added: “I am so grateful for all of you. I love sharing the planet with you.”

The youthfulness of many the “Hamilton” winners including Daveed Diggs and Renee Elise Goldsberry also added exuberance to the evening. Diggs thanked no less than “all of Oakland, California” for his success in the show.

When Frank Langella won his fourth career Tony for “The Father,” the crowd sat up straight as the revered actor took to the stage. When he veered from the usual litany of thank-yous to address the events of the day, a literal hush fell over the theater.

“When something bad happens we have three choices. We can let it define us. we can let it destroy us or we can let it strengthen us,” Langella said. “Today in Orlando we had a hideous dose of reality. I urge you Orlando to be strong. I’m standing in a room full of the most generous human beings on earth and we will be with you every step of the way.”

Perhaps the crowning moment of solidarity for theater people came just after the telecast ended with a final number from the “Hamilton” troupe.

After the cameras stopped rolling cast members stayed on stage for more than five minutes, taking selfies and group photos, hugging one another and breaking out into bits of rhyme from the blockbuster show. A few audience members in the front row seats then walked on stage to shake some hands and join in the pictures. Security guards were scattered around the stage, but none of them tried to stop the exchange of hands and high-fives. This, after all, was a family affair.