In late April, M.J. Hegar released an online video to launch her campaign in Texas for the U.S. Senate. At the start of the ad, which runs nearly four minutes, she rolls a flat-screen television into a room and takes a deep breath, looking less like a politician challenging a three-term Republican incumbent and more like a substitute teacher confronting skeptical high schoolers. “Where do I begin?” she asks. “We made a video, and people watched it.” Then she grabs a remote control from the pocket of her blazer and presses a button, and the TV screen is filled with cable-news talking heads.

They’re all talking about the video Hegar made a year earlier, when she was running for Congress. A CNN anchor notes that the video has “gone viral”; MSNBC’s Chris Matthews calls it “dynamite.” As the camera whirls around the room — now filling up with busy-looking workers — it lands on a laptop screen, where we see liberal celebrities tweeting their reviews. “The best political ad anyone’s ever seen,” raves Lin-Manuel Miranda, creator of “Hamilton.” “Stop what you’re doing and watch this,” instructs the former “Who’s the Boss?” star Alyssa Milano. The comedian Patton Oswalt is hailing the ad as “extraordinary” when his Twitter avatar suddenly comes to life as a celebrity cameo: “But M.J.,” he says, “what if people haven’t seen ‘Doors’?”

“Doors” is the name of the ad they’re all raving about, the one that turned a first-time candidate into a political star. It’s a key example of a new and thriving genre: the campaign launch video, made for and distributed over social media, not television, with the hope that it will go viral and lead to a prodigious fund-raising haul. “Doors” had a sweeping, cinematic style and a jangly guitar score that borrowed from the Rolling Stones. In three and a half minutes, it told the story of Hegar’s life through a series of doors, from one of her first memories — watching her father throw her mother through a plate-glass door — to the doors she kicked down to become an Air Force helicopter pilot. During the last of her three tours in Afghanistan, her helicopter was shot down; its door now hangs on her dining room wall.