Most streaming media services now make use of EME https://en.wikipedia.org/wiki/Encrypted_Media_Extensions. The media players built by these services make use of EME to invoke the underlying DRM (Digital Rights Management)
WebBrowser -> HTML5/Javascript -> EME -> DRM
And yes, of course you can build your own solution using EME.