Let's say I like to create my own progressive flow mechanics in Javascript, because I find that the browser built into the streaming mechanism is not very accurate, or I like to implement my own native method via WebSocket. I would like to create a buffer that stores already loaded segments of a continuous media file (say, arraybuffer or something like that). Is it possible to play this file even if it is not already loaded from beginning to end?
My only idea was the web audio API, which has a noteOn () function to pre-count the start time of each segment. However, I do not know how hopeless it would be. It also presents a problem that I need to know exactly where the audio files can be safely cut on the server side, so the next part can be decoded without any loss or space. For instance. The mp3 bit stores audio data in adjacent sound frames even in CBR mode, which complicates the work.
NagyI source share