Search code examples
html5-videowebmmpeg-dashshaka

What does Shaka player do that the <video> tag alone doesn't do?


As I understand it, modern browsers have progressed to the point where a <video> tag can play an HLS or MPEG-DASH stream with no JavaScript.

Shaka Player (https://github.com/google/shaka-player) seems to be a JS library for... doing what the <video> tag already does. And yet it's actively maintained.

What does Shaka provide that <video> doesn't? When/why would I use it?


Solution

  • As I understand it, modern browsers have progressed to the point where a tag can play an HLS or MPEG-DASH stream with no JavaScript.

    Nope, that's not really the case. Safari supports HLS natively, but that's about it.

    JavaScript libraries for DASH and HLS use MediaSource Extensions (MSE) to push data to the browser's codec handling, meaning the manifests/playlists and segments can be fetched in whatever way the script wants. While more complex, this is better for everyone as we can now use whatever distribution protocol/method we want without a years-long process of browser standardization.