TikTok and its Chinese parent company ByteDance agreed on Friday to pay $400 million (roughly €342 million) to resolve allegations by the US Justice Department that the platform violated children's online privacy laws.

"Under the settlement, TikTok will pay $300 million immediately and an additional $100 million upon entry of an order vacating a prior consent decree entered against TikTok's predecessor, Musical.ly," the department said in a statement.

It's "one of the largest recoveries ever obtained" from a case involving the Children's Online Privacy Protection Act (COPPA), a federal law which safeguards online privacy of minors, the statement added.

Social media bans: What it means for youTo view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

What was TikTok accused of?