A US Air Force service member reaches for the flag during retreat. U.S. Air Force Photo/Dennis Rogers President Donald Trump appeared confused about a longstanding military tradition on Wednesday night.

While speaking with Fox News' Sean Hannity at an Air National Guard hangar in Middletown, Pennsylvania, Trump paused as loudspeakers began playing the tune, "Retreat," in the distance.

It's part of a firmly rooted tradition that predates the American Revolutionary War; the US military tune signals the end of the official duty day on military installations.

"What a nice sound that is," Trump said, as the tune began playing. "Are they playing that for you or for me?"

"They're playing that in honor of his ratings," Trump quipped, answering his own question to Hannity. "He's beating everybody."

When the American flag is lowered and raised on US military installations, a bugle blares on loudspeakers as service members and civilians pay their respects to the flag.

Uniformed service members located outside of a building are required to stop and salute the flag, while civilians are required to place their hand over their heart. The tradition also requires service members who are driving vehicles on a military base to pull over and render a salute.

Members of the audience could be seen standing up during the ceremony:

Trump's apparent confusion about the military exercise follows weeks of rebukes from the president about NFL players who kneel during the national anthem in protest of racial injustice and police brutality. Trump has frequently called the peaceful demonstration, which is protected by the First Amendment, a sign of disrespect for the flag, US troops, and the national anthem.