Streaming mpeg-4
video by node.js server.
This repo is an example of using video streaming by backend and using stream on the client-side.
Native <video>
html5 tag is capable of displaying a different kind of streams.
In very basics (like in this repo example) it is capable of displaying video (formats supported by browser: firefox, chrome, another list of supported formats) that is divided into parts.
If type
attribute is not provided browser is trying to download a small chank to verify if the content is playable before it's ready to play (source).
Video tag might support src
like:
<video src="rtsp://myhost.com/mymedia.format">
<!-- Fallback here -->
</video>
as well as
<video src="http://myhost.com/mymedia.format">
<!-- Fallback here -->
</video>
Website is also capable of support more streaming protocols like:
- HTTP
- RTMP
- RTSP 1.0 & 2.0
Another way to support streamed conntent on FE is using Media Source Extensions and for streaming p2p: WebRTC.
Also popular HTTP streaming formats:
- MPEG-DASH
- HLS