A person close to Mr. Trump’s son said he was unaware that the video had been played at the conference. Ms. Sanders said she was unaware of the video’s existence until a Times reporter contacted her.
“I was there to speak at a prayer breakfast, where I spoke about unity and bringing the country together,” Ms. Sanders said. “I wasn’t aware of any video, nor do I support violence of any kind against anyone.”
A spokesman for Mr. Trump’s campaign said he knew nothing about the video.
“That video was not produced by the campaign, and we do not condone violence,” said Tim Murtaugh, the spokesman.
A DeSantis spokeswoman did not respond to an email seeking comment.
The video depicts a scene inside the “Church of Fake News,” where parishioners rise as Mr. Trump — dressed in a black pinstripe suit and tie — walks down the aisle. Many parishioners’ faces have been replaced with the logos of news media organizations, including PBS, NPR, Politico, The Washington Post and NBC.
Mr. Trump stops in the middle of the church, pulls a gun out of his suit jacket pocket and begins a graphic rampage. As the parishioners try to flee, the president fires at them. He shoots Black Lives Matter in the head, and also shoots Vice News.
Some of those in the church try to apprehend Mr. Trump. He fends them off and makes his way toward the altar, knocking over several pews. He wrestles a parishioner with a Vice News logo as a face to the ground and then shoots the person at point blank range. In the background, the former F.B.I. director, James B. Comey, is seen trying to get away.
From there, Mr. Trump attacks a range of his critics. He strikes the late Arizona senator John McCain in the back of the neck. He hits the television personality Rosie O’Donnell in the face and then stabs her in the head. He strikes Representative Maxine Waters, Democrat of California. He lights the head of Senator Bernie Sanders, a Democratic presidential rival, on fire.
He takes Senator Mitt Romney, Republican of Utah, hostage before throwing him to the ground. Then he strikes former President Barack Obama in the back and throws him against a wall.
Others shown in the video include Mika Brzezinski of MSNBC; former Secretary of State Hillary Clinton; former President Bill Clinton; the film producer Harvey Weinstein; and Representative Adam B. Schiff, the California Democrat who as chairman of the House Intelligence Committee is overseeing an impeachment inquiry of Mr. Trump.
The clip ends with Mr. Trump putting a stake into the head of a person with a CNN logo for a face. Mr. Trump then stands on the altar, admiring his rampage, and smiles.
The video is similar in style to one Mr. Trump tweeted in July 2017, in which he is shown at a wrestling match body slamming CNN’s logo and beating it up. The president was roundly criticized for encouraging violence against journalists by posting that clip, but his supporters enjoyed it, and helped make the tweet viral.
Throughout his 2016 campaign and presidency, Mr. Trump has sought to demonize the news media, partly out of frustration about the coverage of his administration and partly because he likes to have an opponent to target. Mr. Trump has also sought to undermine confidence in the mainstream media, some of his advisers acknowledge privately, to make people doubt the accuracy of less favorable accounts of what goes on in his administration.
The president said at a rally on Friday that there was an “unholy alliance of corrupt Democrat politicians, deep-state bureaucrats and the fake news media.”’