Say you're watching a 60mins video, it has buffered 45mins, you are now at 25:00, at this point if the internet gets cut off, instead of playing that 20mins left the player blacks out. Can I prevent it from blacking out? And can you please explain why this happens?
The other person who mentioned video chunks is right in that pseudostreaming, not to be consumed with progressive streaming which you can't fast forward past the point of where the video has downloaded, streaming will download the video in chunks but it isn't complicated to track the chunks.
With Real-time Transport Protocol (RTP), keyframes are put into the packets at certain intervals in order to track where the video frames go. Keyframes become mission critical when the video has lots of motion or action. It is also worth noting that RTP splits both the video and audio streams which are later matched up. Even if packet loss occurs on one of the streams, RTP is able to correct for that so long as it isn't a huge. The frames are used to be able to sync the streams back up again. You may notice skipping in video or audio when packet loss occurs (sometimes happens when CPU is overloaded).
--- Possible reason one why Youtube will sometimes not load the rest of the video even when it is buffered when the internet is disconnected is that too much packet loss occurred in one stream. The keyframes, unable to match the streams properly, weren't able to recover to stream from that point. Even if the video after the loss could be matched up properly, the stream had to stop at the point of where high packet loss occurred.
There is not much you can do to prevent heavy packet loss.
---Reason two requires some more explanation. RTP Control Protocol (RTCP) is commonly used in conjunction with RTP to provide quality of service. If you internet connection is not stable, you may notice it downgrade and upgrade the stream quality multiple times. What could possibly be happening, given that there is a sufficient buffer of say 15 minutes plus, is that RTCP detects that a sudden drop in bytes being sent and then tries to request a lower-quality stream.
The one possible fix would be to manually have the quality set at say 720p. That way RTCP isn't going to send a QoS request to lower the quality of the stream.
I am not a video engineer expert so mistakes may have been made when formulating this answer.
This is because youtube wasn't programmed to do that
Youtube could keep different chunk for the video's and it is very complicated to track the chunk which was loaded and which was not.