Trump rips the NFL for disrespecting the flag. Then he jokes about a military flag ceremony.

President Trump joked about a bugle call he heard on Harrisburg Air National Guard Base on Oct. 11. The call is part of the military's flag raising and lowering ceremonies. (Patrick Martin/The Washington Post)

After he had repeatedly railed against professional athletes over perceived slights to the American flag and military, President Trump joked on Wednesday about a bugle call that is part of the armed forces’ time-honored tradition of showing respect for the Stars and Stripes.

The bugle call occurred during Trump’s interview with Fox News host Sean Hannity, conducted in an airplane hangar used by the Pennsylvania Air National Guard in Harrisburg and before the president’s address on tax revision.

“What a nice sound that is. Are they playing that for you or for me?” Trump said before turning to the audience. “They’re playing that in honor of his ratings,” he added, referencing the popularity of Hannity’s news program.

Trump went back to speaking about economic growth as several audience members behind him stood up. The bugle call was “Retreat,” which signifies the lowering of the American flag on a military installation. Although Trump attended a military high school, the commander in chief appeared unaware of the music’s meaning.

The White House did not respond to questions seeking to understand Trump’s familiarity with this military tradition.

One of the first subjects taught to new members of the armed forces is customs and courtesies, including respect for the flag. Service members are required to stand at attention and salute when they are outside and “Retreat” plays.

Most military bases have loudspeakers to play “To The Color” when the flag is raised in the morning and “Retreat” when it is lowered in the evening. Regardless of whether a service member can see the flag being raised or lowered, they will stop and face in the direction of the music to salute. All outdoor activity on a military base stops when this bugle call sounds. Service members talking or exercising will stop. It they are driving a vehicle, they will pull over.

According to the Air Force protocol guide, “During ‘To The Color,’ military members and civilians should render the same customs and courtesies as those given to the playing of the national anthem.”

Master Sgt. Matt Schwartz, a spokesman for the 193rd Special Operations Wing in Harrisburg, said the bugle call plays on the base every day at 7 a.m. and 5 p.m. While the base flag is not raised or lowered at that time, personnel outside are required to stop and salute. Those indoors are not required to render honors.

“Being in the hangar, they didn’t have to do anything special,” Schwartz said.

In 2007, comedian Robin Williams was performing for service members at an American base in Kuwait when his show was interrupted by “Retreat.” The entire audience stood to salute, while Williams removed his hat and stood quietly. “I’m not going to forget that,” Williams said after the ceremony was over.

Footage of Williams’s solemn reaction was captured by a soldier and later featured on “Late Night with David Letterman.” It’s since been viewed millions of times on YouTube.