Chunk audio/video files for web

ⅰ亾dé卋堺 提交于 2019-12-08 03:59:57

问题


i see in sites like youtube, soundcloud, spotify, that they stream their contents (audio or video) in small chunks. For example, when i load an audio on soundcloud, the server response an small piece of the complete archive, then, before of consume this chunk, the browser sends another request with the next chunk and repeat this process until the complete file is consumed. What is the name of this technique? How can achive this? Currently i have an nodejs server that streams audio files and accepts range headers.

I load this files in the browser with html5 Audio API, but the browser loads the entire file and i can't able to achive the behaivor mentioned above.

This is a configuration that i need set in the client (Browser)? this is related with .m3u files?

I attach an image of the Network tab in Chrome dev tools of the behavior mentioned above.

https://i.stack.imgur.com/COOCd.png

Chunks

来源:https://stackoverflow.com/questions/47894859/chunk-audio-video-files-for-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!