Roku's share prices surged by as much as 20% of Wednesday after it announced that it had signed a multi-year contract with Alphabet Inc. that would restore the YouTube TV app on its platform. The stock closed 18% higher after the day's trading.

Roku's stock rose 18.2% to $256.08 after hitting a high of $260.99 earlier in the day. As the COVID-19 pandemic kept more people at home and increased their usage of streaming services, Roku's stock climbed by around 148% last year.

As of Tuesday, the stock had dropped 35% this year, owing to a slowdown in the addition of new customers. Roku officials blamed the sluggishness on supply-chain issues that impacted the U.S. television industry in November.

 According to the company, the new deal with YouTube's parent company would now allow its more than 56.4 million active users to continue to watch content on YouTube and YouTube TV without disruptions.

Alphabet previously threatened to pull both YouTube and YouTube TV from Roku's platform. In April, Roku removed the YouTube TV app from its online store as its dispute with Alphabet continued. The dispute drew the attention of Congress, which has been working to limit the dominance of large internet corporations such as Facebook and Alphabet.

The new arrangement prevents a YouTube shutdown, which may have resulted in a massive exodus of Roku users. YouTube is available on Amazon Fire TV and Apple TV, among other competitors. The agreement will effectively extend the partnership between the two companies. The specifics of the agreement were not disclosed.

YouTube spokesperson Mariana De Felice said the company was pleased that it had finally reached a deal with Roku so it could continue to offer its streaming service to Roku devices. She added that new and existing Roku customers would continue to have access to YouTube and YouTube TV apps.

Roku said in a statement that it was also glad to have finally reached an agreement. The company said the agreement is a "positive development" for their shared customers.

Roku sells both smart televisions with built-in streaming technology and devices that can be plugged into televisions. The company makes the majority of its money by selling advertisements on streaming channels and receiving a cut of the subscription revenue and ad inventory generated by the streaming providers.

Roku and YouTube initially had a disagreement over how they should divide their advertising income. In each carriage contract that Roku negotiated, it requested a share of advertising inventory. YouTube, the world's second most visited website, had denied Roku's requests. Roku alleged that Google forced them to prioritize YouTube content in its search results above those of other sources.