A bug on YouTube has been reported where embedded videos reload when scrolling up or down while the post containing the video is still visible. ky_metro reproduced the issue in Firefox and Chrome stable, providing repro steps and example links. purldator confirmed the issue and suggested it might be related to YouTube links that start the video from a specific spot.
However, further testing revealed that the bug is more tied to the post containing the video, not the video itself. ky_metro found that keeping a tiny bit of the video’s post on screen while scrolling around causes the video to reload every time the URL updates. Once the post goes off screen, the video stops.
@codinghorror and @ky_metro were able to reproduce the issue. A fix has been implemented by eviltrout to prevent the video from restarting when scrolling to different posts. However, the issue of the video stopping when off screen is due to the site’s cloaking feature, which unloads content to save memory. eviltrout suggests increasing the threshold or adding a check to see if a video is playing, but considers it a less serious bug.
The repro steps in your OP did not conjure the same bug as seen from my post. RE: simplified category styles post.
I start that video, scroll down, the video stops. I scroll back up, press play anew, let it run a bit then scroll up; it stops. Intended behavior. I am on latest Chrome/Windows 10.
So, this narrows down to videos that start from a spot specified in the URL.
After some experimenting, I’ve updated the repro steps. Its more tied to the post which contains the video, not the video itself.
Keep a tiny bit of that video’s post onscreen as you scroll around, and the video will reload every time the URL updates. Once the post goes offscreen, the video stops.
As for it stopping when offscreen: that’s the result of our cloaking, which tries to save memory by unloading things as they scroll off. We might be able to increase the threshold before this happens, or perhaps add a check to see if there’s a video playing, but I think it’s less serious of a bug.