TikTok has closed a deal with the National Music Publisher's Association, allowing artists and songwriters to license their work to the platform.