(Reuters) - Roku Inc on Wednesday topped Wall Street estimates for quarterly revenue as its strategy to focus on its ad-supported platform paid off, with more viewers spending longer hours streaming content.

FILE PHOTO A video sign displays the logo for Roku Inc, a Fox-backed video streaming firm, in Times Square after the company's IPO at the Nasdaq Market in New York, U.S., September 28, 2017. REUTERS/Brendan McDermid/File Photo

Shares of Roku, which made a spectacular debut on the Nasdaq last year, rose as much as 9.2 percent in after-hours trading after the company said it added 22 million active accounts in the second quarter.

Roku is known for its device that connects televisions to streaming services from companies such as Hulu, Netflix Inc and Amazon.com Inc.

However, the company has been witnessing intense competition in this space from Apple Inc’s Apple TV, Alphabet Inc’s Google Chromecast and Amazon.com Inc’s Amazon Fire TV.

This led the company to tap other revenue sources such as licensing its technology to television makers and earning a share of the advertising revenue from media companies based on sign-ups for apps on its platform and namesake channel.

The company’s subscriber addition rose 46 percent in the quarter and streaming hours increased 57 percent to 5.5 billion hours.

Roku’s average revenue per user grew 48 percent to $16.60, helping overall platform revenue nearly double to $90.3 million in the quarter.

“Live news launch in mid-May and World Cup in June likely contributed to the performance in the quarter,” D.A. Davidson & Co analyst Thomas Forte said.

Separately, the company also launched the Roku Channel for the web in the United States and the channel app on select Samsung smart TVs.

“We don’t think the new platforms like web will have any big impact in the short term, but in the long term it’s going to expand the reach and help with the overall performance of the business,” Chief Executive Officer Anthony Wood told Reuters.

Roku reported a profit of $526 million in the quarter ended June 30 compared with a loss of $15.5 million a year ago.

Excluding items, the company broke even on a per share basis, better than the average analyst estimate of a 15-cent loss. Total net revenue rose 57.4 percent to $156.8 million, beating estimates of $141.5 million.

The company also raised its full-year revenue forecast to $710 million, beating estimates of $698 million, according to Thomson Reuters I/B/E/S.

Shares of the company were trading up 7.8 percent at $50.92.