Bug fixes

This commit is contained in:
the1812 2018-11-25 20:53:40 +08:00
parent b95e4a1ceb
commit 495966376f
4 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -81,7 +81,7 @@
this.loaded = 0;
this.totalSize = null;
this.workingXhr = null;
this.fragmentSplitFactor = 8;
this.fragmentSplitFactor = 6 * 5;
}
fetchVideoInfo()
{
@ -125,7 +125,7 @@
const promises = [];
const partialLength = Math.round(fragment.size / this.fragmentSplitFactor);
let startByte = 0;
while (startByte <= fragment.size)
while (startByte < fragment.size)
{
const range = `bytes=${startByte}-${Math.min(fragment.size - 1, Math.round(startByte + partialLength))}`;
promises.push(new Promise((resolve, reject) =>