Hello. I’ve encountered a weird problem (or a bug) in the Home Assistant Core.
I use media browser to view my CCTV recordings stored on a local HDD as 30-minute mp4 h264 files. If I view the files using a local IP, everything works just fine and quick. However, if I try to access the media browser via Apache (reverse proxy), the webpage crashes after a minute with a SIGILL code.
At first I looked through the Apache access log and found out that after opening a third or fourth video no more request are sent. So I opened a Chromium devtools and compared the output of the Network tab for local and remote (via proxy) access.
Here is the output:
As you can see, during the local connection only parts of the files were preloaded as expected. Also, after closing the file in the media browser (X button), the loading stops. So far so good.
But - when I access the hass via proxy, weird things start to happen. If I open any file,
service_worker.js will start a preload and it won’t stop even after closing the file. Which means if I open more files, they will all try to load and effectively kill the browser. In the attached screenshot I opened and closed some files and you can see it loaded a lot of data. That’s probably the cause of the crash.
But the question is - why does it happen only via proxy connection? Is it a bug or an expected behavior? That makes a media browser unusable for viewing larger files or viewing on a mobile device (loading four 2 GB files will kill my 5G FUP very easily).