SAN FRANCISCO — Google is developing a home entertainment device, according to people with knowledge of the company’s plans, in a move that would bring it more broadly into consumer electronics.

The device, which exists as a prototype and will eventually be sold as a branded item to consumers, is the company’s most significant venture into hardware. While the initial purpose of the device will be for streaming music, the eventual use could be much wider.

As the Internet matures, the leading companies are trying to create full-fledged ecosystems to preserve their individual dominance. Amazon, which began as a retailer, now makes reading devices. Apple, which originally produced only hardware, now sells content.

Google still makes the vast majority of its money from Internet search. But as computing detaches from the desktop and laptop, the company cannot afford to be marginalized. The new device is an effort to control the design, production and sale of an entertainment device, just as its competitors have done so successfully.