After years of railing against technology giants for exploiting music to attract customers, record companies have embraced social media as their new cash machine.

In the latest example, Warner Music Group has signed a deal with TikTok that will boost its fees for song rights and increase collaboration with the popular social-media app. The contract covers recordings from the company’s labels, as well as songs from its publishing division.

In the past year, major music companies have signed licensing agreements with Facebook, TikTok and Snap, three of the largest social-media platforms, creating a new, billion-dollar business. Warner Music alone now generates hundreds of millions of dollars a year from such deals, CEO Steve Cooper said last month.

Social-media dollars have helped music companies replace sales lost to the pandemic, which has shuttered stores, suppressed radio listening and halted touring. The Covid era also has accelerated music companies’ experimentation and dealmaking with a new generation of partners, including video-game companies and fitness apps.

“It feels like we’ve seen years’ worth of change and evolution in the course of a handful of months,” said Oana Ruxandra, Warner Music’s chief digital officer. “We want to ensure there’s value for our artists across the board, and the goal is to ensure that they make money to live their lives.”

Ms Ruxandra joined Warner Music two years ago and is changing the way the company approaches new technology. Record labels have blamed the internet and technology companies like Google and Apple for 15 years of decline as piracy and online listening decimated CD sales, once the industry’s cash cow.

As additional players emerged, including Spotify and Pandora, music companies lamented a new generation of companies getting rich off their work. Initially, social media was even worse. Google’s YouTube, Facebook, Snapchat and TikTok all hosted user videos featuring music without paying much, if anything.

This dance has played out again and again. A new social-media platform amasses hundreds of millions of users, often using music as an integral part of its appeal. The record industry cries foul, and the social-media company counters that it’s helping to market songs. Wash, rinse, spin, repeat.

Yet as social-media companies devised new products to compete for users, they saw benefits in developing closer ties with the music industry.

YouTube, long the biggest offender, put real money into a paid-music service, a way to generate sales from something other than ads. While record companies still view YouTube as undercutting the value of their works due to the wide availability of free music, the growth of its paid service, as well as large upfront guarantees, has quieted the rancour. YouTube said it paid the music industry more than $3bn (€2.45bn) in 2019.

After years of not compensating for music – much to the chagrin of record labels – Facebook came onboard in late 2017 and early 2018 with agreements that paid the music industry more than $600m (€490m) a year so users could include songs in their videos, according to people with knowledge of the terms. The company has since increased its payout by signing premium video deals. Earlier this year, Snap agreed to a similar smaller arrangement based on its smaller user base.

TikTok, owned by the Chinese company ByteDance, has licensed music dating back to its time as Musical.ly. But the labels, artists and songwriters felt the company was short-changing them, given that TikTok was one of the most popular apps in the world, boasting more than 600m users. These deals solve that problem. The impact of social media on the business is immense, both in terms of revenue and promotion, according to Ole Obermann, TikTok’s global head of music.

“It’s just become so huge that it’s unavoidable,” said Mr Obermann. TikTok released its first music report on Wednesday, revealing its most popular genres, artists and songs. The company also advanced an argument it has made time and time again: Songs that go viral on TikTok generate revenue elsewhere. Dreams, released in 1977 by Fleetwood Mac, was one of the 25 most popular songs in the US after it was featured in a viral video on TikTok.

“This fantastic report confirms what we knew: the almost inconceivable scale of new hits, old catalog and artists that TikTok drove in 2020,” Bill Werde, director of the Bandier music business programme at Syracuse University, said on Twitter.

Now that social-media companies have all committed to paying for music, record labels are attempting to mine new industries, including video games and fitness.

A number of high-profile artists, such as Travis Scott and Anderson .Paak, have hosted virtual concerts within video games. Scott’s single, The Scotts, topped the charts after he introduced it in Fortnite, the popular battle-royale game.

It’s not yet clear if these latest efforts will take off or be one-offs, and the companies continue to sound off when they think they’re being shortchanged. The major music groups have all accused Twitch, a video-streaming site owned by Amazon.com Inc., of violating their copyrights.

But the labels are increasingly open to new ideas, including virtual experiences. Behind it all, is the demand that they get paid.

“We’re experimenting because we see real business there,” Ms Ruxandra said.