Video loading cause freeze
sorae42 opened this issue ยท 2 comments
When a video is being loaded, the game will freeze for a few seconds until the video is completely loaded. This is annoying when walking/flying across someone's house, or going in and out an area with the TV.
This seems to be that the video loading is done on the main thread, causing game freeze to be happening.
This also cause Elytra fly to stop moving towards the direction I was flying to.
Fabric 1.20.1. No errors in log.
this issue is mosly related to watermedia. If you're using mac, the issue might be that, watermedia turns off async media loading on mac to "prevent" other memory reading bugs (doesn't work). I will rollback that change, yet again some mac users must have crashes loading media
for other operative systems... must... no(? VLCJ is not very optimized on memory managment, is on my todo list fix that but nothing that i can address right now...
closed as no planned due to a bague report.
I don't really mind when it freezes with entering once and leave after. But it gets insanely annoying when I'm building something nearly and have to step out-step in the TV loading radius.
I think one way to temporary solve this is to implement an area range that keep the video loaded until the player has gone out of that radius.
It could go like this:
- If a player enter a 16 blocks radius of a TV, video began loading.
- Player left the 16 blocks radius, however there will be an additional range (e.g. 8 blocks) that keep the video loaded until the player also got out of that range.
That means it only takes 16 blocks radius to load the video, but 24 blocks range before the video is unloaded.
This will make the issue less annoying since I don't have to load a video everytime I go in and out an area (literally freezing), making the experience less frustrating this way.