Streaming pioneer Roku (NASDAQ:ROKU) reported the financial results of its first quarter and investors cheered as the stock rose more than 26% in the wake of its earnings report. The company once again delivered results that topped expectations and gave an increasingly favorable outlook for the rest of the year.

Roku delivered revenue of nearly $207 million, up 51% year over year, easily surpassing its guidance and analysts' expectations. This is even more remarkable considering this is typically the company's softest quarter in terms of revenue growth. Roku generated a loss per share of just $0.09, also far better than anticipated.

On the conference call to discuss the results, Roku executives shared insight into how the company achieved those impressive results and why the company might just be getting started.

A Roku TV showing premium subscriptions.

Image source: Roku.

1. Its operating system is gaining market share

Roku execs said that in the first quarter, more than 33% of smart TVs sold in the U.S. were Roku TVs, a fact that founder and CEO Anthony Wood was eager to point out. That made the Roku operating system (OS) "the No. 1 selling smart TV OS in the country." 

In a move that set the stage for its current growth, Roku custom-built an OS that was designed to take the guesswork out of connected TVs, making streaming easy. The company has deals with a growing list of television manufacturers that pre-install the Roku OS in their devices. This way, the TV makers don't have to develop their own OS or worry about the continual updates that would be necessary. This benefits Roku by expanding its footprint, as the devices act as a funnel for the company's account and user growth.

2. User metrics continue to soar

As those operating systems find their way into more televisions and, ultimately, more homes, this acts as a catalyst for Roku's account growth. In the first quarter, active accounts increased by 40% year over year -- on top of 47% growth in the prior-year quarter. This provides the foundation for the company's future success.

It isn't just that users are growing, but Roku's growing cadre of viewers are also spending more time watching, driving streaming hours to 8.9 billion, up 74% year over year.

In fact, on the conference call, Roku's CFO Steve Louden said, "Roku users streamed more content on our platform in the last six months than they did in all of 2017." That shows Roku is on track to double its streaming hours compared to just two years ago.

3. Margins continue to improve

Several years ago, Roku shifted its focus, foregoing profits on its players to focus on growing its platform business, which makes money from advertising. As the number of users and viewing hours increase, so does Roku's leverage and profitability.

This move was brilliant in retrospect because, as the scope and scale of the platform business continues to soar, so do Roku's margins. For the first quarter, gross margin increased to 48.8%, up 260 basis points year over year. According to Louden, this was driven primarily by a "continued mix shift to the higher-margin platform business." This was even in the face of declining player margins, as the company continues to sacrifice profits in one segment to drive even more profitable growth in the other.

The Roku Channel showing on a laptop.

Image source: Roku.

Investor takeaway

It should be clear that Roku has cracked the code that will continue to drive its success. By sacrificing profits on its players and expanding the reach of its operating system, Roku is drawing more users into its ecosystem and thereby increasing streaming hours, which, in turn, increases the profits the company generates from its platform business by way of advertising.

That should continue to drive gains for the foreseeable future -- and that should be music to the ears of Roku investors.