Use case: We want to play a 1-hour MP3 file on loop (possibly for up to 8 hours) without having to re-download the audio segments multiple times. In desktop Chrome, I noticed that it will only cache about 20 minutes of audio data, so that when the track loops it has to re-download again from the beginning. After 8 loops, this amounts to almost 500MB of data downloaded. Alternatively, caching the whole MP3 would only download 60MB. Some questions:
1. Is there a way to configure the cache size for a specific renderer in C++? I'm not too familiar with the
file download ->
media buffer data path, but in theory if we can just keep the entire file in memory for this renderer, this would be sufficient.
2. In general, how does sub-resource caching work in Chromium? Any good resources or pointers? I found the following doc, but it's a little light on details with respect to media playback:
https://www.chromium.org/developers/design-documents/network-stack/disk-cache