If you stop the download, you have to re-start it all over again and all the data from the first attempt is lost.
What should happen
If you stop the download, you are left with a partially-downloaded file. Once you restart, it continues from where it left off.
Misc
Will probably need a rudimentary webm/mp4/ogg parser to figure out how much data is already there (i.e. read the timestamps on the frames). Also, will probably need to trim partial frames from the end of the existing file before downloading. Then request the stream at a timestamp a bit earlier than the last one we have, and keep discarding frames until we get to a never-before-seen timestamp, then start appending the data to the file we already have.
What happens now
If you stop the download, you have to re-start it all over again and all the data from the first attempt is lost.
What should happen
If you stop the download, you are left with a partially-downloaded file. Once you restart, it continues from where it left off.
Misc
Will probably need a rudimentary webm/mp4/ogg parser to figure out how much data is already there (i.e. read the timestamps on the frames). Also, will probably need to trim partial frames from the end of the existing file before downloading. Then request the stream at a timestamp a bit earlier than the last one we have, and keep discarding frames until we get to a never-before-seen timestamp, then start appending the data to the file we already have.