Just in case it is not clear from the sources you have looked at - you don't actually have to do this yourself, although you may want to as an academic exercise.
If you are using the standard HTML5 video tag in a web page without using a 3rd party HMTML video player like Video.js etc, or implementing your own javascript player using the Media Source Extension as in the example you linked to, then the browser will take care of checking the server supports range requests and handle the requests for you. All you need to do is provide the URL and host the video on a server that supports range requests.
If you do use a 3rd party player like video.js, then again it will take care of this for you and you should not need to worry about the ranges. In practice many (most?) players hand over the range requests to the underlying browser anyway.
It's worth adding, also, that most serious streaming services use Adaptive Bit Rate streaming now - with ABR multiple bit rate versions of the video are created and each one is broken down into equal length (by time) chunks - e.g. 10 second chunks. The player is then able to select the next chunk from the most appropriate bit rate stream for the current network conditions. See here for more info: https://stackoverflow.com/a/42365034/334402