I'm looking for a way to get that information. I'm currently dealing with the problem of track how many seconds of an mp3 file were listened from the backend side. I've been working with the "Content-Range" header but it doesn't provide the information that I need (considering the accuracy of it). So, I started thinking in this other way to track this information, does anyone has experience with this?
Thanks!
I tried to intercept "Partial Content" requests with success, but doesn't provide the level of accuracy that I need. For doing this I have a small node express app that does this:
app.get('/episodes/:filename', (req, res, next) => {
console.log("HEADERS RANGE", req.headers.range);
// res.send(req.params)
next();
})
I have a folder called episodes on my project public folder, so, before the server returns the file I'm intercepting it to log requested range values.
Again, this is working fine, but I'm searching for a more accurate solution which I think it's related to the problem that I described initially.