[Bug Report] Some video previews don't play on mobile
Describe the bug
When you're on the Scenes page with Wall display mode, some video previews never play on mobile. I even tried manually calling video.play() in devtools but the promise never returns. I suspect the problem happens because phones can't play so many videos at once (I have 40 displayed per page). I think a good solution would be to use intersection observers to only play videos when they are visible on the screen. Maybe we could do that just for mobile devices, or maybe for desktop and tablet devices too?
To Reproduce Steps to reproduce the behavior:
- Open Scenes page
- Click on Wall display mode
- Notice that some video previews never play. To verify, you can run
document.querySelectorAll('video').forEach(video => console.log(video.paused))in devtools and see how many videos are paused (failed to play).
Expected behavior All video previews should play.
Stash Version: (from Settings -> About): v0.12.0
Smartphone (please complete the following information):
- Device: Pixel 8 Pro
- OS: Android 14
- Browser: Chrome
- Version: 126.0.6478.122