PARK CITY, Utah (AP) — The normally private Taylor Swift premiered an intimate documentary Thursday at the Sundance Film Festival in which the pop star discloses a past eating disorder, chronicles her inner battle over speaking forthrightly about politics and says her victorious 2017 sexual assault court case was a dramatic turning point in her life.

"Miss Americana," a Netflix documentary directed by Lana Wilson, was one the most feverishly awaited films in this year's Sundance program, and the premiere at the Eccles Center in Park City on the festival's opening day was a predictably frenzied scene. Outside the theater, dozens of Swift fans sang in unison.

The film, which will debut Jan. 31 on Netflix, plays like a coming-of-age drama for a performer who — despite finding mega-fame as a teenager — took some time to truly find her voice. In the film, she says she always strove to be "a good girl" and needed approving "pats on the head" for any sense of gratification.

But "Miss Americana" captures an evolution in Swift.

"It's time to take the masking tape off my mouth, like, forever," she says in the documentary.

Swift entered the theater after the lights went down to watch the film and appeared afterward on stage in a brief Q&A with Wilson. While Swift said she was a big fan of movies and documentaries, this was a new experience for her. After a standing ovation, Swift turned to Wilson and said, "So I've never done this before. What do we do?"

One of the film's most dramatic scenes shows Swift, eager to speak out against the 2018 Senate campaign of Tennessee Republican Marsha Blackburn, meeting with her family to discuss it. Her father warns against it, citing the potential economic impact. Her publicist later advises President Donald Trump might come after her. Indeed, when Swift posted on Instagram against Blackburn and urged young voters to register, Trump said he liked Swift's music about 25% less — a response Swift mocks in the film.

On the Eccles stage, Swift said she grew more political after after she countersued, and won, against a Denver radio DJ whom she said groped her during a meet-and-greet before a concert.

"It was a really horrible experience to have," Swift said. "I had all the privilege in the world, financial support and the ability to pay for a brilliant lawyer. I won that trial but without all that, I don't know what would have happened. It taught me so much."

Swift also talks in the film about coming to terms with body image issues that grew out of scanning the countless images that are shot of her, and the comments posted on social media. Swift says she would sometimes go into "a hate spiral" and starve herself after seeing photos that she felt she looked overweight in.

"Miss Americana" includes plenty of intimate scenes of Swift at home or at work. She drinks white wine with ice cubes and didn't try a burrito until a few years ago, we learn.

But a continuous thread through the documentary is of Swift, who last month turned 30, crafting music. In scenes by the piano or in the studio, Wilson captures Swift writing lyrics and honing melodies with a relentless passion.

Swift said she was most nervous about sharing her writing process with Wilson. But the filmmaker earned her trust.

"For so much of my life in the public eye when I get sad or upset or humiliated or angry or go through a really horrible time, I feel like people lean in with, like, this hunger. And you never did that to me," Swift told Wilson. "That was what made me feel OK about feeling sadness, humiliation and anger around you."